Skip to content
Merged

Perf #436

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/twenty-toes-act.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@kitql/helpers': patch
---

perf improvements
4 changes: 2 additions & 2 deletions packages/handles/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@
"@sveltejs/package": "2.2.2",
"publint": "0.2.4",
"svelte": "4.2.1",
"svelte-check": "3.5.2",
"svelte-check": "3.6.0",
"tslib": "2.6.2",
"typescript": "5.2.2",
"vite": "4.5.0",
"vite": "5.0.0",
"vitest": "0.34.6"
},
"sideEffects": false,
Expand Down
4 changes: 2 additions & 2 deletions packages/helpers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@
"publint": "0.2.4",
"rollup-plugin-visualizer": "^5.9.2",
"svelte": "4.2.1",
"svelte-check": "3.5.2",
"svelte-check": "3.6.0",
"tslib": "2.6.2",
"typescript": "5.2.2",
"vite": "4.5.0",
"vite": "5.0.0",
"vitest": "0.34.0"
},
"sideEffects": false,
Expand Down
4 changes: 2 additions & 2 deletions packages/helpers/src/lib/colors/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { BROWSER } from '$lib/constants.js'
import { BROWSER } from '../constants.js'
import * as stylesBrowser from './stylesBrowser.js'
import * as stylesNode from './stylesNode.js'
import type { Style } from './types.js'
Expand All @@ -18,7 +18,7 @@ export const color = (style: Style, str: string) => {
}

const colorNode = (style: Style, str: string) => {
return `${getStyleNode(style).start}${str}${getStyleNode(style).end}`
return `${getStyleNode(style)[0]}${str}${getStyleNode(style)[1]}`
}

const START1 = `$$KitQL_`
Expand Down
82 changes: 41 additions & 41 deletions packages/helpers/src/lib/colors/stylesNode.ts
Original file line number Diff line number Diff line change
@@ -1,41 +1,41 @@
export const reset = { start: '\x1b[0m', end: '\x1b[0m' }
export const bold = { start: '\x1b[1m', end: '\x1b[22m' }
export const dim = { start: '\x1b[2m', end: '\x1b[22m' }
export const italic = { start: '\x1b[3m', end: '\x1b[23m' }
export const underline = { start: '\x1b[4m', end: '\x1b[24m' }
export const inverse = { start: '\x1b[7m', end: '\x1b[27m' }
export const hidden = { start: '\x1b[8m', end: '\x1b[28m' }
export const strikethrough = { start: '\x1b[9m', end: '\x1b[29m' }
export const black = { start: '\x1b[30m', end: '\x1b[39m' }
export const red = { start: '\x1b[31m', end: '\x1b[39m' }
export const green = { start: '\x1b[32m', end: '\x1b[39m' }
export const yellow = { start: '\x1b[33m', end: '\x1b[39m' }
export const blue = { start: '\x1b[34m', end: '\x1b[39m' }
export const magenta = { start: '\x1b[35m', end: '\x1b[39m' }
export const cyan = { start: '\x1b[36m', end: '\x1b[39m' }
export const white = { start: '\x1b[37m', end: '\x1b[39m' }
export const gray = { start: '\x1b[90m', end: '\x1b[39m' }
export const bgBlack = { start: '\x1b[40m', end: '\x1b[49m' }
export const bgRed = { start: '\x1b[41m', end: '\x1b[49m' }
export const bgGreen = { start: '\x1b[42m', end: '\x1b[49m' }
export const bgYellow = { start: '\x1b[43m', end: '\x1b[49m' }
export const bgBlue = { start: '\x1b[44m', end: '\x1b[49m' }
export const bgMagenta = { start: '\x1b[45m', end: '\x1b[49m' }
export const bgCyan = { start: '\x1b[46m', end: '\x1b[49m' }
export const bgWhite = { start: '\x1b[47m', end: '\x1b[49m' }
export const blackBright = { start: '\x1b[90m', end: '\x1b[39m' }
export const redBright = { start: '\x1b[91m', end: '\x1b[39m' }
export const greenBright = { start: '\x1b[92m', end: '\x1b[39m' }
export const yellowBright = { start: '\x1b[93m', end: '\x1b[39m' }
export const blueBright = { start: '\x1b[94m', end: '\x1b[39m' }
export const magentaBright = { start: '\x1b[95m', end: '\x1b[39m' }
export const cyanBright = { start: '\x1b[96m', end: '\x1b[39m' }
export const whiteBright = { start: '\x1b[97m', end: '\x1b[39m' }
export const bgBlackBright = { start: '\x1b[100m', end: '\x1b[49m' }
export const bgRedBright = { start: '\x1b[101m', end: '\x1b[49m' }
export const bgGreenBright = { start: '\x1b[102m', end: '\x1b[49m' }
export const bgYellowBright = { start: '\x1b[103m', end: '\x1b[49m' }
export const bgBlueBright = { start: '\x1b[104m', end: '\x1b[49m' }
export const bgMagentaBright = { start: '\x1b[105m', end: '\x1b[49m' }
export const bgCyanBright = { start: '\x1b[106m', end: '\x1b[49m' }
export const bgWhiteBright = { start: '\x1b[107m', end: '\x1b[49m' }
export const reset = ['\x1b[0m', '\x1b[0m']
export const bold = ['\x1b[1m', '\x1b[22m']
export const dim = ['\x1b[2m', '\x1b[22m']
export const italic = ['\x1b[3m', '\x1b[23m']
export const underline = ['\x1b[4m', '\x1b[24m']
export const inverse = ['\x1b[7m', '\x1b[27m']
export const hidden = ['\x1b[8m', '\x1b[28m']
export const strikethrough = ['\x1b[9m', '\x1b[29m']
export const black = ['\x1b[30m', '\x1b[39m']
export const red = ['\x1b[31m', '\x1b[39m']
export const green = ['\x1b[32m', '\x1b[39m']
export const yellow = ['\x1b[33m', '\x1b[39m']
export const blue = ['\x1b[34m', '\x1b[39m']
export const magenta = ['\x1b[35m', '\x1b[39m']
export const cyan = ['\x1b[36m', '\x1b[39m']
export const white = ['\x1b[37m', '\x1b[39m']
export const gray = ['\x1b[90m', '\x1b[39m']
export const bgBlack = ['\x1b[40m', '\x1b[49m']
export const bgRed = ['\x1b[41m', '\x1b[49m']
export const bgGreen = ['\x1b[42m', '\x1b[49m']
export const bgYellow = ['\x1b[43m', '\x1b[49m']
export const bgBlue = ['\x1b[44m', '\x1b[49m']
export const bgMagenta = ['\x1b[45m', '\x1b[49m']
export const bgCyan = ['\x1b[46m', '\x1b[49m']
export const bgWhite = ['\x1b[47m', '\x1b[49m']
export const blackBright = ['\x1b[90m', '\x1b[39m']
export const redBright = ['\x1b[91m', '\x1b[39m']
export const greenBright = ['\x1b[92m', '\x1b[39m']
export const yellowBright = ['\x1b[93m', '\x1b[39m']
export const blueBright = ['\x1b[94m', '\x1b[39m']
export const magentaBright = ['\x1b[95m', '\x1b[39m']
export const cyanBright = ['\x1b[96m', '\x1b[39m']
export const whiteBright = ['\x1b[97m', '\x1b[39m']
export const bgBlackBright = ['\x1b[100m', '\x1b[49m']
export const bgRedBright = ['\x1b[101m', '\x1b[49m']
export const bgGreenBright = ['\x1b[102m', '\x1b[49m']
export const bgYellowBright = ['\x1b[103m', '\x1b[49m']
export const bgBlueBright = ['\x1b[104m', '\x1b[49m']
export const bgMagentaBright = ['\x1b[105m', '\x1b[49m']
export const bgCyanBright = ['\x1b[106m', '\x1b[49m']
export const bgWhiteBright = ['\x1b[107m', '\x1b[49m']
4 changes: 2 additions & 2 deletions packages/vite-plugin-kit-routes/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@
"@sveltejs/package": "2.2.2",
"publint": "0.2.4",
"svelte": "4.2.1",
"svelte-check": "3.5.2",
"svelte-check": "3.6.0",
"tslib": "2.6.2",
"typescript": "5.2.2",
"vite": "4.5.0",
"vite": "5.0.0",
"vitest": "0.34.6"
},
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/vite-plugin-striper/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@
"@sveltejs/package": "2.2.2",
"publint": "0.2.4",
"svelte": "4.2.1",
"svelte-check": "3.5.2",
"svelte-check": "3.6.0",
"tslib": "2.6.2",
"typescript": "5.2.2",
"vite": "4.5.0",
"vite": "5.0.0",
"vitest": "0.34.6"
},
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/vite-plugin-watch-and-run/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@
"@sveltejs/package": "2.2.2",
"publint": "0.2.4",
"svelte": "4.2.1",
"svelte-check": "3.5.2",
"svelte-check": "3.6.0",
"tslib": "2.6.2",
"typescript": "5.2.2",
"vite": "4.5.0",
"vite": "5.0.0",
"vitest": "0.34.6"
},
"dependencies": {
Expand Down
Loading