Skip to content

Commit 9af763d

Browse files
committedJan 28, 2023
chore: bump release-scripts, typecheck package in CI, remove cache for eslint
1 parent c3e5730 commit 9af763d

File tree

9 files changed

+64
-40
lines changed

9 files changed

+64
-40
lines changed
 

‎package.json

+7-8
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"name": "@vitejs/vite-plugin-react-monorepo",
33
"private": true,
4+
"type": "module",
45
"engines": {
56
"node": "^14.18.0 || >=16.0.0"
67
},
@@ -18,26 +19,24 @@
1819
"postinstall": "simple-git-hooks",
1920
"format": "prettier --write --cache .",
2021
"lint": "eslint --cache .",
21-
"typecheck": "tsc -p scripts --noEmit && tsc -p playground --noEmit",
22+
"typecheck": "tsc -p scripts && tsc -p playground && tsc -p packages/plugin-react",
2223
"test": "run-s test-serve test-build",
23-
"test-serve": "vitest run -c vitest.config.e2e.ts",
24-
"test-build": "VITE_TEST_BUILD=1 vitest run -c vitest.config.e2e.ts",
25-
"test-build-without-plugin-commonjs": "VITE_TEST_WITHOUT_PLUGIN_COMMONJS=1 pnpm test-build",
26-
"debug-serve": "VITE_DEBUG_SERVE=1 vitest run -c vitest.config.e2e.ts",
27-
"debug-build": "VITE_TEST_BUILD=1 VITE_PRESERVE_BUILD_ARTIFACTS=1 vitest run -c vitest.config.e2e.ts",
24+
"test-serve": "vitest run -c playground/vitest.config.e2e.ts",
25+
"test-build": "VITE_TEST_BUILD=1 vitest run -c playground/vitest.config.e2e.ts",
26+
"debug-serve": "VITE_DEBUG_SERVE=1 vitest run -c playground/vitest.config.e2e.ts",
27+
"debug-build": "VITE_TEST_BUILD=1 VITE_PRESERVE_BUILD_ARTIFACTS=1 vitest run -c playground/vitest.config.e2e.ts",
2828
"build": "pnpm -r --filter='./packages/*' run build",
2929
"dev": "pnpm -r --parallel --filter='./packages/*' run dev",
3030
"release": "tsx scripts/release.ts",
3131
"ci-publish": "tsx scripts/publishCI.ts"
3232
},
3333
"devDependencies": {
3434
"@types/babel__core": "^7.20.0",
35-
"@types/execa": "^2.0.0",
3635
"@types/fs-extra": "^11.0.1",
3736
"@types/node": "^18.11.18",
3837
"@typescript-eslint/eslint-plugin": "^5.48.2",
3938
"@typescript-eslint/parser": "^5.48.2",
40-
"@vitejs/release-scripts": "^1.0.4",
39+
"@vitejs/release-scripts": "^1.1.0",
4140
"conventional-changelog-cli": "^2.2.2",
4241
"eslint": "^8.32.0",
4342
"eslint-define-config": "^1.14.0",

‎packages/plugin-react/src/babel.d.ts

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
declare module '@babel/plugin-transform-react-jsx'
21
declare module '@babel/plugin-transform-react-jsx-self'
32
declare module '@babel/plugin-transform-react-jsx-source'
43
declare module 'react-refresh/babel.js'

‎packages/plugin-react/src/refreshUtils.js

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ function debounce(fn, delay) {
66
}
77
}
88

9+
/* eslint-disable no-undef */
910
const enqueueUpdate = debounce(exports.performReactRefresh, 16)
1011

1112
// Taken from https://github.com/pmmmwh/react-refresh-webpack-plugin/blob/main/lib/runtime/RefreshUtils.js#L141

‎packages/plugin-react/tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
22
"include": ["src", "scripts"],
3-
"exclude": ["**/*.spec.ts"],
43
"compilerOptions": {
54
"outDir": "dist",
65
"target": "ES2020",
@@ -9,6 +8,7 @@
98
"strict": true,
109
"declaration": true,
1110
"sourceMap": true,
11+
"noEmit": true,
1212
"noUnusedLocals": true,
1313
"esModuleInterop": true
1414
}

‎playground/tsconfig.json

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"resolveJsonModule": true,
1212
"moduleResolution": "Node",
1313
"skipLibCheck": true,
14+
"noEmit": true,
1415
"noUnusedLocals": true,
1516
"jsx": "preserve",
1617
"types": ["vite/client", "node"],

‎vitest.config.e2e.ts ‎playground/vitest.config.e2e.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const timeout = process.env.CI ? 50000 : 30000
66
export default defineConfig({
77
resolve: {
88
alias: {
9-
'~utils': resolve(__dirname, './playground/test-utils'),
9+
'~utils': resolve(__dirname, './test-utils'),
1010
},
1111
},
1212
test: {

‎pnpm-lock.yaml

+52-13
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎scripts/tsconfig.json

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"module": "CommonJS",
66
"target": "ES2020",
77
"moduleResolution": "Node",
8+
"noEmit": true,
89
"strict": true,
910
"esModuleInterop": true,
1011
"skipLibCheck": true,

‎vitest.config.ts

-16
This file was deleted.

0 commit comments

Comments
 (0)
Please sign in to comment.