Skip to content

Commit

Permalink
Update Vitest and other dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
ai committed Dec 6, 2023
1 parent bf5867f commit 94d8be6
Show file tree
Hide file tree
Showing 14 changed files with 633 additions and 569 deletions.
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"test": "vitest run --coverage && eslint . && sh scripts/max-listeners-check.sh"
},
"devDependencies": {
"@logux/eslint-config": "^52.0.1",
"@logux/eslint-config": "^52.0.2",
"@size-limit/esbuild": "workspace:^",
"@size-limit/esbuild-why": "workspace:^",
"@size-limit/file": "workspace:^",
Expand All @@ -19,21 +19,21 @@
"@size-limit/webpack": "workspace:^",
"@size-limit/webpack-css": "workspace:^",
"@size-limit/webpack-why": "workspace:^",
"@vitest/coverage-v8": "^0.34.6",
"@vitest/coverage-v8": "^1.0.1",
"clean-publish": "^4.2.0",
"cross-spawn": "^7.0.3",
"eslint": "^8.53.0",
"eslint": "^8.55.0",
"eslint-config-standard": "^17.1.0",
"eslint-plugin-import": "^2.29.0",
"eslint-plugin-n": "^16.3.1",
"eslint-plugin-node-imports": "^1.0.2",
"eslint-plugin-perfectionist": "^2.3.0",
"eslint-plugin-perfectionist": "^2.5.0",
"eslint-plugin-prefer-let": "^3.0.1",
"eslint-plugin-promise": "^6.1.1",
"print-snapshots": "^0.4.2",
"redux": "^4.2.1",
"size-limit-node-esbuild": "^0.3.0",
"vitest": "^0.34.6"
"vitest": "^1.0.1"
},
"eslintConfig": {
"extends": "@logux/eslint-config",
Expand Down
2 changes: 1 addition & 1 deletion packages/esbuild-why/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"devDependencies": {
"@size-limit/esbuild": "workspace:^",
"@size-limit/file": "workspace:^",
"esbuild": "^0.19.5",
"esbuild": "^0.19.8",
"redux": "^4.2.1",
"size-limit": "workspace:^"
}
Expand Down
4 changes: 2 additions & 2 deletions packages/esbuild/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
"size-limit": "11.0.0"
},
"dependencies": {
"esbuild": "^0.19.5",
"nanoid": "^5.0.3"
"esbuild": "^0.19.8",
"nanoid": "^5.0.4"
},
"devDependencies": {
"@size-limit/file": "workspace:^",
Expand Down
6 changes: 3 additions & 3 deletions packages/preset-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
"size-limit": "11.0.0"
},
"dependencies": {
"@size-limit/file": "11.0.0",
"@size-limit/time": "11.0.0",
"size-limit": "11.0.0"
"@size-limit/file": "workspace:*",
"@size-limit/time": "workspace:*",
"size-limit": "workspace:*"
}
}
8 changes: 4 additions & 4 deletions packages/preset-big-lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
"size-limit": "11.0.0"
},
"dependencies": {
"@size-limit/file": "11.0.0",
"@size-limit/time": "11.0.0",
"@size-limit/webpack": "11.0.0",
"size-limit": "11.0.0"
"@size-limit/file": "workspace:*",
"@size-limit/time": "workspace:*",
"@size-limit/webpack": "workspace:*",
"size-limit": "workspace:*"
}
}
6 changes: 3 additions & 3 deletions packages/preset-small-lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
"size-limit": "11.0.0"
},
"dependencies": {
"@size-limit/esbuild": "11.0.0",
"@size-limit/file": "11.0.0",
"size-limit": "11.0.0"
"@size-limit/esbuild": "workspace:*",
"@size-limit/file": "workspace:*",
"size-limit": "workspace:*"
}
}
2 changes: 1 addition & 1 deletion packages/size-limit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"bytes-iec": "^3.1.1",
"chokidar": "^3.5.3",
"globby": "^14.0.0",
"lilconfig": "^2.1.0",
"lilconfig": "^3.0.0",
"nanospinner": "^1.1.0",
"picocolors": "^1.0.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ exports[`highlight passed results with --highlight-less flag 1`] = `
Size limit: 102400 B
Size: 102401 B brotlied
[33mTry to reduce size or increase limit in [1m\\"size-limit\\"[22m section of [1mpackage.json[22m[39m
[33mTry to reduce size or increase limit in [1m"size-limit"[22m section of [1mpackage.json[22m[39m
"
`;

Expand All @@ -31,21 +31,21 @@ exports[`only renders failed results with --hide-passed flag 1`] = `
Size limit: 102.4 kB
Size: 102.5 kB brotlied
[33mTry to reduce size or increase limit in [1m\\"size-limit\\"[22m section of [1mpackage.json[22m[39m
[33mTry to reduce size or increase limit in [1m"size-limit"[22m section of [1mpackage.json[22m[39m
"
`;

exports[`renders JSON results 1`] = `
"[
{
\\"name\\": \\"big fail\\"
"name": "big fail"
},
{
\\"name\\": \\"big fail\\",
\\"passed\\": false,
\\"size\\": 1000,
\\"running\\": 0.3,
\\"loading\\": 0.2
"name": "big fail",
"passed": false,
"size": 1000,
"running": 0.3,
"loading": 0.2
}
]
"
Expand Down Expand Up @@ -87,7 +87,7 @@ exports[`renders failed results 1`] = `
Size limit: 102.4 kB
Size: 102.5 kB brotlied
[33mTry to reduce size or increase limit in [1m\\"size-limit\\"[22m section of [1mpackage.json[22m[39m
[33mTry to reduce size or increase limit in [1m"size-limit"[22m section of [1mpackage.json[22m[39m
"
`;

Expand Down
126 changes: 63 additions & 63 deletions packages/size-limit/test/__snapshots__/run.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -50,52 +50,52 @@ exports[`returns zero for empty webpack file without compression 1`] = `

exports[`shows debug 1`] = `
"{
\\"cwd\\": \\"/tmp/\\",
\\"configPath\\": \\"package.json\\",
\\"checks\\": [
"cwd": "/tmp/",
"configPath": "package.json",
"checks": [
{
\\"limit\\": \\"200 B\\",
\\"files\\": [
\\"/fixtures/integration/index.js\\"
"limit": "200 B",
"files": [
"/fixtures/integration/index.js"
],
\\"name\\": \\"index.js\\",
\\"sizeLimit\\": 200,
\\"highlightLess\\": true,
\\"webpackOutput\\": \\"/tmp/\\",
\\"webpackConfig\\": {
\\"entry\\": {
\\"index\\": [
\\"/fixtures/integration/index.js\\"
"name": "index.js",
"sizeLimit": 200,
"highlightLess": true,
"webpackOutput": "/tmp/",
"webpackConfig": {
"entry": {
"index": [
"/fixtures/integration/index.js"
]
},
\\"module\\": {
\\"rules\\": [
"module": {
"rules": [
{
\\"test\\": {},
\\"type\\": \\"asset/resource\\"
"test": {},
"type": "asset/resource"
}
]
},
\\"optimization\\": {
\\"concatenateModules\\": true
"optimization": {
"concatenateModules": true
},
\\"output\\": {
\\"path\\": \\"/tmp/\\"
"output": {
"path": "/tmp/"
},
\\"plugins\\": []
"plugins": []
},
\\"bundles\\": [
\\"/tmp/index.js\\"
"bundles": [
"/tmp/index.js"
],
\\"size\\": 123,
\\"loadTime\\": 0.01,
\\"runTime\\": 1,
\\"time\\": 1.01,
\\"passed\\": true
"size": 123,
"loadTime": 0.01,
"runTime": 1,
"time": 1.01,
"passed": true
}
],
\\"failed\\": false,
\\"missed\\": false
"failed": false,
"missed": false
}
Package size is 77 B less than limit
Expand All @@ -110,16 +110,16 @@ exports[`shows debug 1`] = `

exports[`shows debug on error 1`] = `
"{
\\"cwd\\": \\"/tmp/\\",
\\"configPath\\": \\"package.json\\",
\\"checks\\": [
"cwd": "/tmp/",
"configPath": "package.json",
"checks": [
{
\\"limit\\": \\"200 s\\",
\\"files\\": [
\\"/fixtures/internal-error/index.js\\"
"limit": "200 s",
"files": [
"/fixtures/internal-error/index.js"
],
\\"name\\": \\"index.js\\",
\\"timeLimit\\": 200
"name": "index.js",
"timeLimit": 200
}
]
}
Expand All @@ -142,7 +142,7 @@ exports[`shows error on time bigger than limit 1`] = `
Running time: 1 s  on Snapdragon 410
Total time: 1.1 s
[33mTry to reduce size or increase limit in [1m\\"size-limit\\"[22m section of [1mpackage.json[22m[39m
[33mTry to reduce size or increase limit in [1m"size-limit"[22m section of [1mpackage.json[22m[39m
"
`;

Expand All @@ -155,7 +155,7 @@ exports[`shows error on time bigger than limit. in silent mode 1`] = `
Running time: 1 s  on Snapdragon 410
Total time: 1.1 s
[33mTry to reduce size or increase limit in [1m\\"size-limit\\"[22m section of [1mpackage.json[22m[39m
[33mTry to reduce size or increase limit in [1m"size-limit"[22m section of [1mpackage.json[22m[39m
"
`;

Expand Down Expand Up @@ -432,10 +432,10 @@ exports[`throws on brotli option without brotli plugin 1`] = `
exports[`throws on empty config 1`] = `
" ERROR  Size Limit config must not be empty
[32m\\"size-limit\\"[39m: [
[32m"size-limit"[39m: [
{
[32m\\"path\\"[39m: [33m\\"dist/bundle.js\\"[39m,
[32m\\"limit\\"[39m: [33m\\"10 kB\\"[39m
[32m"path"[39m: [33m"dist/bundle.js"[39m,
[32m"limit"[39m: [33m"10 kB"[39m
}
]
"
Expand All @@ -444,10 +444,10 @@ exports[`throws on empty config 1`] = `
exports[`throws on no config 1`] = `
" ERROR  Create Size Limit config in package.json
[32m\\"size-limit\\"[39m: [
[32m"size-limit"[39m: [
{
[32m\\"path\\"[39m: [33m\\"dist/bundle.js\\"[39m,
[32m\\"limit\\"[39m: [33m\\"10 kB\\"[39m
[32m"path"[39m: [33m"dist/bundle.js"[39m,
[32m"limit"[39m: [33m"10 kB"[39m
}
]
"
Expand All @@ -456,10 +456,10 @@ exports[`throws on no config 1`] = `
exports[`throws on non-array config 1`] = `
" ERROR  Size Limit config must contain an array
[32m\\"size-limit\\"[39m: [
[32m"size-limit"[39m: [
{
[32m\\"path\\"[39m: [33m\\"dist/bundle.js\\"[39m,
[32m\\"limit\\"[39m: [33m\\"10 kB\\"[39m
[32m"path"[39m: [33m"dist/bundle.js"[39m,
[32m"limit"[39m: [33m"10 kB"[39m
}
]
"
Expand All @@ -468,10 +468,10 @@ exports[`throws on non-array config 1`] = `
exports[`throws on non-object check 1`] = `
" ERROR  Size Limit config array should contain only objects
[32m\\"size-limit\\"[39m: [
[32m"size-limit"[39m: [
{
[32m\\"path\\"[39m: [33m\\"dist/bundle.js\\"[39m,
[32m\\"limit\\"[39m: [33m\\"10 kB\\"[39m
[32m"path"[39m: [33m"dist/bundle.js"[39m,
[32m"limit"[39m: [33m"10 kB"[39m
}
]
"
Expand All @@ -485,10 +485,10 @@ exports[`throws on non-string entry 1`] = `
exports[`throws on non-string path 1`] = `
" ERROR  The path in Size Limit config must be a string or an array of strings
[32m\\"size-limit\\"[39m: [
[32m"size-limit"[39m: [
{
[32m\\"path\\"[39m: [33m\\"dist/bundle.js\\"[39m,
[32m\\"limit\\"[39m: [33m\\"10 kB\\"[39m
[32m"path"[39m: [33m"dist/bundle.js"[39m,
[32m"limit"[39m: [33m"10 kB"[39m
}
]
"
Expand Down Expand Up @@ -565,12 +565,12 @@ Check the real performance cost of your front-end project to users
exports[`works in integration test with JSON 1`] = `
"[
{
\\"name\\": \\"index.js\\",
\\"passed\\": true,
\\"size\\": 123,
\\"sizeLimit\\": 200,
\\"running\\": 1,
\\"loading\\": 0.01
"name": "index.js",
"passed": true,
"size": 123,
"sizeLimit": 200,
"running": 1,
"loading": 0.01
}
]
"
Expand Down
4 changes: 2 additions & 2 deletions packages/size-limit/test/run.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -355,9 +355,9 @@ it.skipIf(NODE_VERSION < 21)(
'allows to use peer dependencies in import',
async () => {
await checkJson('combine', [
{ name: 'all', size: 2051 },
{ name: 'all', size: 2049 },
{ name: 'a', size: 1 },
{ name: 'redux', size: 2046 }
{ name: 'redux', size: 2045 }
])
}
)
Expand Down
2 changes: 1 addition & 1 deletion packages/time/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"estimo": "^2.3.6"
},
"devDependencies": {
"nanoid": "^5.0.3",
"nanoid": "^5.0.4",
"size-limit": "workspace:^"
}
}
2 changes: 1 addition & 1 deletion packages/webpack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"size-limit": "11.0.0"
},
"dependencies": {
"nanoid": "^5.0.3",
"nanoid": "^5.0.4",
"webpack": "^5.89.0"
},
"devDependencies": {
Expand Down

0 comments on commit 94d8be6

Please sign in to comment.