Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: use tsx directly instead of indirect esno #8773

Merged
merged 6 commits into from
Jun 25, 2022
Merged
Show file tree
Hide file tree
Changes from 5 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
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
enable-pre-post-scripts=true
bluwy marked this conversation as resolved.
Show resolved Hide resolved
JounQin marked this conversation as resolved.
Show resolved Hide resolved
hoist-pattern[]=*eslint*
hoist-pattern[]=*babel*
hoist-pattern[]=@emotion/*
Expand Down
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
],
"scripts": {
"preinstall": "npx only-allow pnpm",
"postinstall": "simple-git-hooks",
Copy link
Member

@sapphi-red sapphi-red Jun 25, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will make simple-git-hooks run every time pnpm i is called. But I think it is good to have this for new contributors.
Ideally it is better to turn off side-effects-cache only for simple-git-hooks. I'm not sure if we can do this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps we can include it for now until an issue arise, otherwise we can point users to run it manually in the contributing guide.

"format": "prettier --write --cache .",
"lint": "eslint --cache packages/*/{src,types,__tests__}/** playground/**/__tests__/**/*.ts scripts/**",
"typecheck": "tsc -p scripts --noEmit && tsc -p playground --noEmit",
Expand All @@ -30,8 +31,8 @@
"docs-serve": "vitepress serve docs",
"build": "pnpm -r --filter=./packages/* run build",
"dev": "pnpm -r --parallel --filter=./packages/* run dev",
"release": "esno scripts/release.ts",
"ci-publish": "esno scripts/publishCI.ts",
"release": "tsx scripts/release.ts",
"ci-publish": "tsx scripts/publishCI.ts",
"ci-docs": "run-s build docs-build"
},
"devDependencies": {
Expand Down Expand Up @@ -67,7 +68,6 @@
"eslint-define-config": "^1.5.1",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-node": "^11.1.0",
"esno": "^0.16.3",
"execa": "^6.1.0",
"fs-extra": "^10.1.0",
"kill-port": "^1.6.1",
Expand All @@ -86,6 +86,7 @@
"simple-git-hooks": "^2.8.0",
"sirv": "^2.0.2",
"tslib": "^2.4.0",
"tsx": "^3.6.0",
"typescript": "^4.6.4",
"unbuild": "^0.7.4",
"vite": "workspace:*",
Expand All @@ -95,7 +96,7 @@
},
"simple-git-hooks": {
"pre-commit": "pnpm exec lint-staged --concurrent false",
"commit-msg": "pnpm exec esno scripts/verifyCommit.ts $1"
"commit-msg": "pnpm exec tsx scripts/verifyCommit.ts $1"
},
"lint-staged": {
"*": [
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-legacy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"scripts": {
"dev": "unbuild --stub",
"build": "unbuild && pnpm run patch-cjs",
"patch-cjs": "esno ../../scripts/patchCJS.ts",
"patch-cjs": "tsx ../../scripts/patchCJS.ts",
"prepublishOnly": "npm run build"
},
"engines": {
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"scripts": {
"dev": "unbuild --stub",
"build": "unbuild && pnpm run patch-cjs",
"patch-cjs": "esno ../../scripts/patchCJS.ts",
"patch-cjs": "tsx ../../scripts/patchCJS.ts",
"prepublishOnly": "npm run build"
},
"engines": {
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-vue-jsx/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"scripts": {
"dev": "unbuild --stub",
"build": "unbuild && pnpm run patch-cjs",
"patch-cjs": "esno ../../scripts/patchCJS.ts",
"patch-cjs": "tsx ../../scripts/patchCJS.ts",
"prepublishOnly": "npm run build"
},
"engines": {
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"scripts": {
"dev": "unbuild --stub",
"build": "unbuild && pnpm run patch-cjs",
"patch-cjs": "esno ../../scripts/patchCJS.ts",
"patch-cjs": "tsx ../../scripts/patchCJS.ts",
"prepublishOnly": "npm run build"
},
"engines": {
Expand Down
3 changes: 1 addition & 2 deletions packages/vite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"build-bundle": "rollup --config rollup.config.ts --configPlugin typescript",
"build-types": "run-s build-temp-types patch-types roll-types check-dist-types",
"build-temp-types": "tsc --emitDeclarationOnly --outDir temp/node -p src/node",
"patch-types": "esno scripts/patchTypes.ts",
"patch-types": "tsx scripts/patchTypes.ts",
"roll-types": "api-extractor run && rimraf temp",
"check-dist-types": "tsc --project tsconfig.check.json",
"lint": "eslint --cache --ext .ts src/**",
Expand Down Expand Up @@ -90,7 +90,6 @@
"dotenv": "^14.3.2",
"dotenv-expand": "^5.1.0",
"es-module-lexer": "^0.10.5",
"esno": "^0.16.3",
"estree-walker": "^3.0.1",
"etag": "^1.8.1",
"fast-glob": "^3.2.11",
Expand Down
Loading