micro-optimizations

This commit is contained in:
Norbert de Langen 2022-12-15 22:12:32 +01:00
parent b023e32cee
commit f189971eee
No known key found for this signature in database
GPG Key ID: FD0E78AF9A837762
7 changed files with 241 additions and 17 deletions

View File

@ -57,7 +57,6 @@
"lodash": "^4.17.21",
"react-router-dom": "6.0.2",
"ts-dedent": "^2.0.0",
"ts-node": "^10.4.0",
"typescript": "~4.9.3"
},
"peerDependencies": {

View File

@ -61,9 +61,9 @@
"coverage": "codecov",
"danger": "danger",
"generate-repros": "zx ../scripts/repros-generator/index.mjs",
"generate-repros-next": "ts-node ../scripts/next-repro-generators/generate-repros.ts",
"generate-repros-next": "ts-node --swc ../scripts/next-repro-generators/generate-repros.ts",
"github-release": "github-release-from-changelog",
"linear-export": "ts-node --project=../scripts/tsconfig.json ../scripts/linear-export.ts",
"linear-export": "ts-node --swc --project=../scripts/tsconfig.json ../scripts/linear-export.ts",
"lint": "yarn lint:js && yarn lint:md",
"lint:ejs": "ejslint **/*.ejs",
"lint:js": "yarn lint:js:cmd . --quiet",
@ -71,8 +71,8 @@
"lint:md": "remark -q .",
"lint:other": "prettier --write '**/*.{css,html,json,md,yml}'",
"lint:package": "sort-package-json",
"local-registry": "ts-node --project=../scripts/tsconfig.json ../scripts/run-registry.ts --port 6001",
"publish-repros": "ts-node ../scripts/next-repro-generators/publish.ts",
"local-registry": "ts-node --swc --project=../scripts/tsconfig.json ../scripts/run-registry.ts --port 6001",
"publish-repros": "ts-node --swc ../scripts/next-repro-generators/publish.ts",
"publish:debug": "npm run publish:latest -- --npm-tag=debug --no-push",
"publish:latest": "lerna publish --exact --concurrency 1 --force-publish",
"publish:next": "npm run publish:latest -- --npm-tag=next",
@ -236,6 +236,7 @@
"@storybook/web-components": "workspace:*",
"@storybook/web-components-vite": "workspace:*",
"@storybook/web-components-webpack5": "workspace:*",
"@swc/core": "^1.3.23",
"@testing-library/dom": "^7.29.4",
"@testing-library/jest-dom": "^5.11.9",
"@testing-library/react": "^11.2.2",
@ -334,7 +335,7 @@
"terser-webpack-plugin": "^5.3.1",
"trash": "^7.0.0",
"ts-dedent": "^2.0.0",
"ts-node": "^10.4.0",
"ts-node": "^10.9.1",
"tsup": "^6.2.2",
"typescript": "~4.9.3",
"util": "^0.12.4",

View File

@ -7314,6 +7314,7 @@ __metadata:
"@storybook/web-components": "workspace:*"
"@storybook/web-components-vite": "workspace:*"
"@storybook/web-components-webpack5": "workspace:*"
"@swc/core": ^1.3.23
"@testing-library/dom": ^7.29.4
"@testing-library/jest-dom": ^5.11.9
"@testing-library/react": ^11.2.2
@ -7416,7 +7417,7 @@ __metadata:
trash: ^7.0.0
ts-dedent: ^2.0.0
ts-loader: ^9.2.8
ts-node: ^10.4.0
ts-node: ^10.9.1
tsup: ^6.2.2
typescript: ~4.9.3
util: ^0.12.4
@ -7471,7 +7472,6 @@ __metadata:
qs: ^6.10.0
react-router-dom: 6.0.2
ts-dedent: ^2.0.0
ts-node: ^10.4.0
typescript: ~4.9.3
peerDependencies:
react: ^16.8.0 || ^17.0.0 || ^18.0.0
@ -7946,6 +7946,117 @@ __metadata:
languageName: node
linkType: hard
"@swc/core-darwin-arm64@npm:1.3.23":
version: 1.3.23
resolution: "@swc/core-darwin-arm64@npm:1.3.23"
conditions: os=darwin & cpu=arm64
languageName: node
linkType: hard
"@swc/core-darwin-x64@npm:1.3.23":
version: 1.3.23
resolution: "@swc/core-darwin-x64@npm:1.3.23"
conditions: os=darwin & cpu=x64
languageName: node
linkType: hard
"@swc/core-linux-arm-gnueabihf@npm:1.3.23":
version: 1.3.23
resolution: "@swc/core-linux-arm-gnueabihf@npm:1.3.23"
conditions: os=linux & cpu=arm
languageName: node
linkType: hard
"@swc/core-linux-arm64-gnu@npm:1.3.23":
version: 1.3.23
resolution: "@swc/core-linux-arm64-gnu@npm:1.3.23"
conditions: os=linux & cpu=arm64 & libc=glibc
languageName: node
linkType: hard
"@swc/core-linux-arm64-musl@npm:1.3.23":
version: 1.3.23
resolution: "@swc/core-linux-arm64-musl@npm:1.3.23"
conditions: os=linux & cpu=arm64 & libc=musl
languageName: node
linkType: hard
"@swc/core-linux-x64-gnu@npm:1.3.23":
version: 1.3.23
resolution: "@swc/core-linux-x64-gnu@npm:1.3.23"
conditions: os=linux & cpu=x64 & libc=glibc
languageName: node
linkType: hard
"@swc/core-linux-x64-musl@npm:1.3.23":
version: 1.3.23
resolution: "@swc/core-linux-x64-musl@npm:1.3.23"
conditions: os=linux & cpu=x64 & libc=musl
languageName: node
linkType: hard
"@swc/core-win32-arm64-msvc@npm:1.3.23":
version: 1.3.23
resolution: "@swc/core-win32-arm64-msvc@npm:1.3.23"
conditions: os=win32 & cpu=arm64
languageName: node
linkType: hard
"@swc/core-win32-ia32-msvc@npm:1.3.23":
version: 1.3.23
resolution: "@swc/core-win32-ia32-msvc@npm:1.3.23"
conditions: os=win32 & cpu=ia32
languageName: node
linkType: hard
"@swc/core-win32-x64-msvc@npm:1.3.23":
version: 1.3.23
resolution: "@swc/core-win32-x64-msvc@npm:1.3.23"
conditions: os=win32 & cpu=x64
languageName: node
linkType: hard
"@swc/core@npm:^1.3.23":
version: 1.3.23
resolution: "@swc/core@npm:1.3.23"
dependencies:
"@swc/core-darwin-arm64": 1.3.23
"@swc/core-darwin-x64": 1.3.23
"@swc/core-linux-arm-gnueabihf": 1.3.23
"@swc/core-linux-arm64-gnu": 1.3.23
"@swc/core-linux-arm64-musl": 1.3.23
"@swc/core-linux-x64-gnu": 1.3.23
"@swc/core-linux-x64-musl": 1.3.23
"@swc/core-win32-arm64-msvc": 1.3.23
"@swc/core-win32-ia32-msvc": 1.3.23
"@swc/core-win32-x64-msvc": 1.3.23
dependenciesMeta:
"@swc/core-darwin-arm64":
optional: true
"@swc/core-darwin-x64":
optional: true
"@swc/core-linux-arm-gnueabihf":
optional: true
"@swc/core-linux-arm64-gnu":
optional: true
"@swc/core-linux-arm64-musl":
optional: true
"@swc/core-linux-x64-gnu":
optional: true
"@swc/core-linux-x64-musl":
optional: true
"@swc/core-win32-arm64-msvc":
optional: true
"@swc/core-win32-ia32-msvc":
optional: true
"@swc/core-win32-x64-msvc":
optional: true
bin:
swcx: run_swcx.js
checksum: 70f9e17350a136713ee97c9fb80de7a0e0fca4cae339e64f22475634d6b35fe24e7456309361cf69a4ded88f1ad64ff86f5181507119ff6b17da54f30f509287
languageName: node
linkType: hard
"@swc/helpers@npm:0.4.14":
version: 0.4.14
resolution: "@swc/helpers@npm:0.4.14"
@ -31987,7 +32098,7 @@ __metadata:
languageName: node
linkType: hard
"ts-node@npm:^10.4.0":
"ts-node@npm:^10.9.1":
version: 10.9.1
resolution: "ts-node@npm:10.9.1"
dependencies:

View File

@ -5,13 +5,13 @@
"scripts": {
"docs:prettier:check": "cd ../docs && prettier --check ./snippets",
"docs:prettier:write": "cd ../docs && prettier --write ./snippets",
"get-report-message": "ts-node ./get-report-message.ts",
"get-template": "ts-node ./get-template.ts",
"get-report-message": "ts-node --swc ./get-report-message.ts",
"get-template": "ts-node --swc ./get-template.ts",
"lint": "yarn lint:js && yarn lint:md",
"lint:js": "yarn lint:js:cmd . --quiet",
"lint:js:cmd": "cross-env NODE_ENV=production eslint --cache --cache-location=../.cache/eslint --ext .js,.jsx,.json,.html,.ts,.tsx,.mjs --report-unused-disable-directives",
"lint:package": "sort-package-json",
"task": "ts-node ./task.ts",
"task": "ts-node --swc ./task.ts",
"test": "jest --config ./jest.config.js"
},
"husky": {
@ -69,6 +69,7 @@
"@storybook/jest": "^0.0.10",
"@storybook/linter-config": "^3.1.2",
"@storybook/testing-library": "0.0.14-next.0",
"@swc/core": "^1.3.23",
"@testing-library/dom": "^7.29.4",
"@testing-library/jest-dom": "^5.11.9",
"@testing-library/react": "^11.2.2",
@ -166,7 +167,7 @@
"tempy": "^1.0.0",
"trash": "^7.0.0",
"ts-dedent": "^2.0.0",
"ts-node": "^10.4.0",
"ts-node": "^10.9.1",
"tsup": "^6.2.2",
"type-fest": "^3.4.0",
"typescript": "~4.9.3",

View File

@ -1,4 +1,4 @@
#!/usr/bin/env ../../node_modules/.bin/ts-node
#!/usr/bin/env ../../node_modules/.bin/ts-node --swc
import fs from 'fs-extra';
import path, { dirname, join, relative } from 'path';

View File

@ -6,7 +6,7 @@ import { exec } from '../utils/exec';
import type { Task } from '../task';
const linkedContents = `export * from '../src/index';`;
const linkCommand = `nx run-many --target="prep" --all --parallel --exclude=@storybook/addon-storyshots,@storybook/addon-storyshots-puppeteer -- --reset`;
const linkCommand = `nx run-many --target="prep" --all --parallel --max-parallel=${maxConcurrentTasks} --exclude=@storybook/addon-storyshots,@storybook/addon-storyshots-puppeteer -- --reset`;
const noLinkCommand = `nx run-many --target="prep" --all --parallel=8 ${
process.env.CI ? `--max-parallel=${maxConcurrentTasks}` : ''
} -- --reset --optimized`;

View File

@ -3372,6 +3372,7 @@ __metadata:
"@storybook/jest": ^0.0.10
"@storybook/linter-config": ^3.1.2
"@storybook/testing-library": 0.0.14-next.0
"@swc/core": ^1.3.23
"@testing-library/dom": ^7.29.4
"@testing-library/jest-dom": ^5.11.9
"@testing-library/react": ^11.2.2
@ -3472,7 +3473,7 @@ __metadata:
trash: ^7.0.0
ts-dedent: ^2.0.0
ts-loader: ^9.2.8
ts-node: ^10.4.0
ts-node: ^10.9.1
tsup: ^6.2.2
type-fest: ^3.4.0
typescript: ~4.9.3
@ -3541,6 +3542,117 @@ __metadata:
languageName: node
linkType: hard
"@swc/core-darwin-arm64@npm:1.3.23":
version: 1.3.23
resolution: "@swc/core-darwin-arm64@npm:1.3.23"
conditions: os=darwin & cpu=arm64
languageName: node
linkType: hard
"@swc/core-darwin-x64@npm:1.3.23":
version: 1.3.23
resolution: "@swc/core-darwin-x64@npm:1.3.23"
conditions: os=darwin & cpu=x64
languageName: node
linkType: hard
"@swc/core-linux-arm-gnueabihf@npm:1.3.23":
version: 1.3.23
resolution: "@swc/core-linux-arm-gnueabihf@npm:1.3.23"
conditions: os=linux & cpu=arm
languageName: node
linkType: hard
"@swc/core-linux-arm64-gnu@npm:1.3.23":
version: 1.3.23
resolution: "@swc/core-linux-arm64-gnu@npm:1.3.23"
conditions: os=linux & cpu=arm64 & libc=glibc
languageName: node
linkType: hard
"@swc/core-linux-arm64-musl@npm:1.3.23":
version: 1.3.23
resolution: "@swc/core-linux-arm64-musl@npm:1.3.23"
conditions: os=linux & cpu=arm64 & libc=musl
languageName: node
linkType: hard
"@swc/core-linux-x64-gnu@npm:1.3.23":
version: 1.3.23
resolution: "@swc/core-linux-x64-gnu@npm:1.3.23"
conditions: os=linux & cpu=x64 & libc=glibc
languageName: node
linkType: hard
"@swc/core-linux-x64-musl@npm:1.3.23":
version: 1.3.23
resolution: "@swc/core-linux-x64-musl@npm:1.3.23"
conditions: os=linux & cpu=x64 & libc=musl
languageName: node
linkType: hard
"@swc/core-win32-arm64-msvc@npm:1.3.23":
version: 1.3.23
resolution: "@swc/core-win32-arm64-msvc@npm:1.3.23"
conditions: os=win32 & cpu=arm64
languageName: node
linkType: hard
"@swc/core-win32-ia32-msvc@npm:1.3.23":
version: 1.3.23
resolution: "@swc/core-win32-ia32-msvc@npm:1.3.23"
conditions: os=win32 & cpu=ia32
languageName: node
linkType: hard
"@swc/core-win32-x64-msvc@npm:1.3.23":
version: 1.3.23
resolution: "@swc/core-win32-x64-msvc@npm:1.3.23"
conditions: os=win32 & cpu=x64
languageName: node
linkType: hard
"@swc/core@npm:^1.3.23":
version: 1.3.23
resolution: "@swc/core@npm:1.3.23"
dependencies:
"@swc/core-darwin-arm64": 1.3.23
"@swc/core-darwin-x64": 1.3.23
"@swc/core-linux-arm-gnueabihf": 1.3.23
"@swc/core-linux-arm64-gnu": 1.3.23
"@swc/core-linux-arm64-musl": 1.3.23
"@swc/core-linux-x64-gnu": 1.3.23
"@swc/core-linux-x64-musl": 1.3.23
"@swc/core-win32-arm64-msvc": 1.3.23
"@swc/core-win32-ia32-msvc": 1.3.23
"@swc/core-win32-x64-msvc": 1.3.23
dependenciesMeta:
"@swc/core-darwin-arm64":
optional: true
"@swc/core-darwin-x64":
optional: true
"@swc/core-linux-arm-gnueabihf":
optional: true
"@swc/core-linux-arm64-gnu":
optional: true
"@swc/core-linux-arm64-musl":
optional: true
"@swc/core-linux-x64-gnu":
optional: true
"@swc/core-linux-x64-musl":
optional: true
"@swc/core-win32-arm64-msvc":
optional: true
"@swc/core-win32-ia32-msvc":
optional: true
"@swc/core-win32-x64-msvc":
optional: true
bin:
swcx: run_swcx.js
checksum: 70f9e17350a136713ee97c9fb80de7a0e0fca4cae339e64f22475634d6b35fe24e7456309361cf69a4ded88f1ad64ff86f5181507119ff6b17da54f30f509287
languageName: node
linkType: hard
"@testing-library/dom@npm:^7.28.1, @testing-library/dom@npm:^7.29.4":
version: 7.31.2
resolution: "@testing-library/dom@npm:7.31.2"
@ -17160,7 +17272,7 @@ __metadata:
languageName: node
linkType: hard
"ts-node@npm:^10.4.0":
"ts-node@npm:^10.9.1":
version: 10.9.1
resolution: "ts-node@npm:10.9.1"
dependencies: