From 09a37695ff820ba2b067fcd2b26c5d1a47a60dc3 Mon Sep 17 00:00:00 2001 From: Haoqun Jiang Date: Fri, 26 Nov 2021 16:42:17 +0800 Subject: [PATCH] fix: add `@types/node` to ts projects To avoid warnings on missing type declarations for the `url` module. Ideally the version of `@types/node` should be based on the user's node version. But the latest is accepatble for now. --- .../package.json | 1 + .../typescript-jsx-router-vuex/package.json | 1 + .../package.json | 1 + playground/typescript-jsx-router/package.json | 1 + .../package.json | 1 + playground/typescript-jsx-vuex/package.json | 1 + .../typescript-jsx-with-tests/package.json | 1 + playground/typescript-jsx/package.json | 1 + .../package.json | 1 + .../typescript-router-vuex/package.json | 1 + .../typescript-router-with-tests/package.json | 1 + playground/typescript-router/package.json | 1 + .../typescript-vuex-with-tests/package.json | 1 + playground/typescript-vuex/package.json | 1 + playground/typescript-with-tests/package.json | 1 + playground/typescript/package.json | 1 + pnpm-lock.yaml | 36 +++++++++++++++++++ template/config/typescript/package.json | 1 + 18 files changed, 53 insertions(+) diff --git a/playground/typescript-jsx-router-vuex-with-tests/package.json b/playground/typescript-jsx-router-vuex-with-tests/package.json index 1fb73482..3bec0c0c 100644 --- a/playground/typescript-jsx-router-vuex-with-tests/package.json +++ b/playground/typescript-jsx-router-vuex-with-tests/package.json @@ -19,6 +19,7 @@ "devDependencies": { "@cypress/vite-dev-server": "^2.2.1", "@cypress/vue": "^3.0.5", + "@types/node": "^16.11.10", "@vitejs/plugin-vue": "^1.10.0", "@vitejs/plugin-vue-jsx": "^1.3.0", "cypress": "^8.7.0", diff --git a/playground/typescript-jsx-router-vuex/package.json b/playground/typescript-jsx-router-vuex/package.json index f4030963..03815111 100644 --- a/playground/typescript-jsx-router-vuex/package.json +++ b/playground/typescript-jsx-router-vuex/package.json @@ -13,6 +13,7 @@ "vuex": "^4.0.2" }, "devDependencies": { + "@types/node": "^16.11.10", "@vitejs/plugin-vue": "^1.10.0", "@vitejs/plugin-vue-jsx": "^1.3.0", "typescript": "~4.4.4", diff --git a/playground/typescript-jsx-router-with-tests/package.json b/playground/typescript-jsx-router-with-tests/package.json index 8412d23c..cc74af24 100644 --- a/playground/typescript-jsx-router-with-tests/package.json +++ b/playground/typescript-jsx-router-with-tests/package.json @@ -18,6 +18,7 @@ "devDependencies": { "@cypress/vite-dev-server": "^2.2.1", "@cypress/vue": "^3.0.5", + "@types/node": "^16.11.10", "@vitejs/plugin-vue": "^1.10.0", "@vitejs/plugin-vue-jsx": "^1.3.0", "cypress": "^8.7.0", diff --git a/playground/typescript-jsx-router/package.json b/playground/typescript-jsx-router/package.json index f9616b67..d54b04ca 100644 --- a/playground/typescript-jsx-router/package.json +++ b/playground/typescript-jsx-router/package.json @@ -12,6 +12,7 @@ "vue-router": "^4.0.12" }, "devDependencies": { + "@types/node": "^16.11.10", "@vitejs/plugin-vue": "^1.10.0", "@vitejs/plugin-vue-jsx": "^1.3.0", "typescript": "~4.4.4", diff --git a/playground/typescript-jsx-vuex-with-tests/package.json b/playground/typescript-jsx-vuex-with-tests/package.json index ee959014..ae6b6ec7 100644 --- a/playground/typescript-jsx-vuex-with-tests/package.json +++ b/playground/typescript-jsx-vuex-with-tests/package.json @@ -18,6 +18,7 @@ "devDependencies": { "@cypress/vite-dev-server": "^2.2.1", "@cypress/vue": "^3.0.5", + "@types/node": "^16.11.10", "@vitejs/plugin-vue": "^1.10.0", "@vitejs/plugin-vue-jsx": "^1.3.0", "cypress": "^8.7.0", diff --git a/playground/typescript-jsx-vuex/package.json b/playground/typescript-jsx-vuex/package.json index 5e98c4ab..fa6cb147 100644 --- a/playground/typescript-jsx-vuex/package.json +++ b/playground/typescript-jsx-vuex/package.json @@ -12,6 +12,7 @@ "vuex": "^4.0.2" }, "devDependencies": { + "@types/node": "^16.11.10", "@vitejs/plugin-vue": "^1.10.0", "@vitejs/plugin-vue-jsx": "^1.3.0", "typescript": "~4.4.4", diff --git a/playground/typescript-jsx-with-tests/package.json b/playground/typescript-jsx-with-tests/package.json index 94e29334..7c397df0 100644 --- a/playground/typescript-jsx-with-tests/package.json +++ b/playground/typescript-jsx-with-tests/package.json @@ -17,6 +17,7 @@ "devDependencies": { "@cypress/vite-dev-server": "^2.2.1", "@cypress/vue": "^3.0.5", + "@types/node": "^16.11.10", "@vitejs/plugin-vue": "^1.10.0", "@vitejs/plugin-vue-jsx": "^1.3.0", "cypress": "^8.7.0", diff --git a/playground/typescript-jsx/package.json b/playground/typescript-jsx/package.json index 76fdc447..54f115c4 100644 --- a/playground/typescript-jsx/package.json +++ b/playground/typescript-jsx/package.json @@ -11,6 +11,7 @@ "vue": "^3.2.22" }, "devDependencies": { + "@types/node": "^16.11.10", "@vitejs/plugin-vue": "^1.10.0", "@vitejs/plugin-vue-jsx": "^1.3.0", "typescript": "~4.4.4", diff --git a/playground/typescript-router-vuex-with-tests/package.json b/playground/typescript-router-vuex-with-tests/package.json index 454b92d4..12e461d3 100644 --- a/playground/typescript-router-vuex-with-tests/package.json +++ b/playground/typescript-router-vuex-with-tests/package.json @@ -19,6 +19,7 @@ "devDependencies": { "@cypress/vite-dev-server": "^2.2.1", "@cypress/vue": "^3.0.5", + "@types/node": "^16.11.10", "@vitejs/plugin-vue": "^1.10.0", "cypress": "^8.7.0", "start-server-and-test": "^1.14.0", diff --git a/playground/typescript-router-vuex/package.json b/playground/typescript-router-vuex/package.json index 441b6eb0..f28127da 100644 --- a/playground/typescript-router-vuex/package.json +++ b/playground/typescript-router-vuex/package.json @@ -13,6 +13,7 @@ "vuex": "^4.0.2" }, "devDependencies": { + "@types/node": "^16.11.10", "@vitejs/plugin-vue": "^1.10.0", "typescript": "~4.4.4", "vite": "^2.6.14", diff --git a/playground/typescript-router-with-tests/package.json b/playground/typescript-router-with-tests/package.json index d84402af..a310df69 100644 --- a/playground/typescript-router-with-tests/package.json +++ b/playground/typescript-router-with-tests/package.json @@ -18,6 +18,7 @@ "devDependencies": { "@cypress/vite-dev-server": "^2.2.1", "@cypress/vue": "^3.0.5", + "@types/node": "^16.11.10", "@vitejs/plugin-vue": "^1.10.0", "cypress": "^8.7.0", "start-server-and-test": "^1.14.0", diff --git a/playground/typescript-router/package.json b/playground/typescript-router/package.json index 61a4d6ee..5d5ea161 100644 --- a/playground/typescript-router/package.json +++ b/playground/typescript-router/package.json @@ -12,6 +12,7 @@ "vue-router": "^4.0.12" }, "devDependencies": { + "@types/node": "^16.11.10", "@vitejs/plugin-vue": "^1.10.0", "typescript": "~4.4.4", "vite": "^2.6.14", diff --git a/playground/typescript-vuex-with-tests/package.json b/playground/typescript-vuex-with-tests/package.json index 4080179c..0327c12b 100644 --- a/playground/typescript-vuex-with-tests/package.json +++ b/playground/typescript-vuex-with-tests/package.json @@ -18,6 +18,7 @@ "devDependencies": { "@cypress/vite-dev-server": "^2.2.1", "@cypress/vue": "^3.0.5", + "@types/node": "^16.11.10", "@vitejs/plugin-vue": "^1.10.0", "cypress": "^8.7.0", "start-server-and-test": "^1.14.0", diff --git a/playground/typescript-vuex/package.json b/playground/typescript-vuex/package.json index 97d66585..a3d591c1 100644 --- a/playground/typescript-vuex/package.json +++ b/playground/typescript-vuex/package.json @@ -12,6 +12,7 @@ "vuex": "^4.0.2" }, "devDependencies": { + "@types/node": "^16.11.10", "@vitejs/plugin-vue": "^1.10.0", "typescript": "~4.4.4", "vite": "^2.6.14", diff --git a/playground/typescript-with-tests/package.json b/playground/typescript-with-tests/package.json index 059df355..e9d23e67 100644 --- a/playground/typescript-with-tests/package.json +++ b/playground/typescript-with-tests/package.json @@ -17,6 +17,7 @@ "devDependencies": { "@cypress/vite-dev-server": "^2.2.1", "@cypress/vue": "^3.0.5", + "@types/node": "^16.11.10", "@vitejs/plugin-vue": "^1.10.0", "cypress": "^8.7.0", "start-server-and-test": "^1.14.0", diff --git a/playground/typescript/package.json b/playground/typescript/package.json index c11c89a6..f70d3e79 100644 --- a/playground/typescript/package.json +++ b/playground/typescript/package.json @@ -11,6 +11,7 @@ "vue": "^3.2.22" }, "devDependencies": { + "@types/node": "^16.11.10", "@vitejs/plugin-vue": "^1.10.0", "typescript": "~4.4.4", "vite": "^2.6.14", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3c9cbbf8..0d44d008 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -259,6 +259,7 @@ importers: playground/typescript: specifiers: + '@types/node': ^16.11.10 '@vitejs/plugin-vue': ^1.10.0 typescript: ~4.4.4 vite: ^2.6.14 @@ -267,6 +268,7 @@ importers: dependencies: vue: 3.2.22 devDependencies: + '@types/node': 16.11.10 '@vitejs/plugin-vue': 1.10.0_vite@2.6.14 typescript: 4.4.4 vite: 2.6.14 @@ -274,6 +276,7 @@ importers: playground/typescript-jsx: specifiers: + '@types/node': ^16.11.10 '@vitejs/plugin-vue': ^1.10.0 '@vitejs/plugin-vue-jsx': ^1.3.0 typescript: ~4.4.4 @@ -283,6 +286,7 @@ importers: dependencies: vue: 3.2.22 devDependencies: + '@types/node': 16.11.10 '@vitejs/plugin-vue': 1.10.0_vite@2.6.14 '@vitejs/plugin-vue-jsx': 1.3.0 typescript: 4.4.4 @@ -291,6 +295,7 @@ importers: playground/typescript-jsx-router: specifiers: + '@types/node': ^16.11.10 '@vitejs/plugin-vue': ^1.10.0 '@vitejs/plugin-vue-jsx': ^1.3.0 typescript: ~4.4.4 @@ -302,6 +307,7 @@ importers: vue: 3.2.22 vue-router: 4.0.12_vue@3.2.22 devDependencies: + '@types/node': 16.11.10 '@vitejs/plugin-vue': 1.10.0_vite@2.6.14 '@vitejs/plugin-vue-jsx': 1.3.0 typescript: 4.4.4 @@ -310,6 +316,7 @@ importers: playground/typescript-jsx-router-vuex: specifiers: + '@types/node': ^16.11.10 '@vitejs/plugin-vue': ^1.10.0 '@vitejs/plugin-vue-jsx': ^1.3.0 typescript: ~4.4.4 @@ -323,6 +330,7 @@ importers: vue-router: 4.0.12_vue@3.2.22 vuex: 4.0.2_vue@3.2.22 devDependencies: + '@types/node': 16.11.10 '@vitejs/plugin-vue': 1.10.0_vite@2.6.14 '@vitejs/plugin-vue-jsx': 1.3.0 typescript: 4.4.4 @@ -333,6 +341,7 @@ importers: specifiers: '@cypress/vite-dev-server': ^2.2.1 '@cypress/vue': ^3.0.5 + '@types/node': ^16.11.10 '@vitejs/plugin-vue': ^1.10.0 '@vitejs/plugin-vue-jsx': ^1.3.0 cypress: ^8.7.0 @@ -350,6 +359,7 @@ importers: devDependencies: '@cypress/vite-dev-server': 2.2.1_vite@2.6.14 '@cypress/vue': 3.0.5_cypress@8.7.0+vue@3.2.22 + '@types/node': 16.11.10 '@vitejs/plugin-vue': 1.10.0_vite@2.6.14 '@vitejs/plugin-vue-jsx': 1.3.0 cypress: 8.7.0 @@ -362,6 +372,7 @@ importers: specifiers: '@cypress/vite-dev-server': ^2.2.1 '@cypress/vue': ^3.0.5 + '@types/node': ^16.11.10 '@vitejs/plugin-vue': ^1.10.0 '@vitejs/plugin-vue-jsx': ^1.3.0 cypress: ^8.7.0 @@ -377,6 +388,7 @@ importers: devDependencies: '@cypress/vite-dev-server': 2.2.1_vite@2.6.14 '@cypress/vue': 3.0.5_cypress@8.7.0+vue@3.2.22 + '@types/node': 16.11.10 '@vitejs/plugin-vue': 1.10.0_vite@2.6.14 '@vitejs/plugin-vue-jsx': 1.3.0 cypress: 8.7.0 @@ -387,6 +399,7 @@ importers: playground/typescript-jsx-vuex: specifiers: + '@types/node': ^16.11.10 '@vitejs/plugin-vue': ^1.10.0 '@vitejs/plugin-vue-jsx': ^1.3.0 typescript: ~4.4.4 @@ -398,6 +411,7 @@ importers: vue: 3.2.22 vuex: 4.0.2_vue@3.2.22 devDependencies: + '@types/node': 16.11.10 '@vitejs/plugin-vue': 1.10.0_vite@2.6.14 '@vitejs/plugin-vue-jsx': 1.3.0 typescript: 4.4.4 @@ -408,6 +422,7 @@ importers: specifiers: '@cypress/vite-dev-server': ^2.2.1 '@cypress/vue': ^3.0.5 + '@types/node': ^16.11.10 '@vitejs/plugin-vue': ^1.10.0 '@vitejs/plugin-vue-jsx': ^1.3.0 cypress: ^8.7.0 @@ -423,6 +438,7 @@ importers: devDependencies: '@cypress/vite-dev-server': 2.2.1_vite@2.6.14 '@cypress/vue': 3.0.5_cypress@8.7.0+vue@3.2.22 + '@types/node': 16.11.10 '@vitejs/plugin-vue': 1.10.0_vite@2.6.14 '@vitejs/plugin-vue-jsx': 1.3.0 cypress: 8.7.0 @@ -435,6 +451,7 @@ importers: specifiers: '@cypress/vite-dev-server': ^2.2.1 '@cypress/vue': ^3.0.5 + '@types/node': ^16.11.10 '@vitejs/plugin-vue': ^1.10.0 '@vitejs/plugin-vue-jsx': ^1.3.0 cypress: ^8.7.0 @@ -448,6 +465,7 @@ importers: devDependencies: '@cypress/vite-dev-server': 2.2.1_vite@2.6.14 '@cypress/vue': 3.0.5_cypress@8.7.0+vue@3.2.22 + '@types/node': 16.11.10 '@vitejs/plugin-vue': 1.10.0_vite@2.6.14 '@vitejs/plugin-vue-jsx': 1.3.0 cypress: 8.7.0 @@ -458,6 +476,7 @@ importers: playground/typescript-router: specifiers: + '@types/node': ^16.11.10 '@vitejs/plugin-vue': ^1.10.0 typescript: ~4.4.4 vite: ^2.6.14 @@ -468,6 +487,7 @@ importers: vue: 3.2.22 vue-router: 4.0.12_vue@3.2.22 devDependencies: + '@types/node': 16.11.10 '@vitejs/plugin-vue': 1.10.0_vite@2.6.14 typescript: 4.4.4 vite: 2.6.14 @@ -475,6 +495,7 @@ importers: playground/typescript-router-vuex: specifiers: + '@types/node': ^16.11.10 '@vitejs/plugin-vue': ^1.10.0 typescript: ~4.4.4 vite: ^2.6.14 @@ -487,6 +508,7 @@ importers: vue-router: 4.0.12_vue@3.2.22 vuex: 4.0.2_vue@3.2.22 devDependencies: + '@types/node': 16.11.10 '@vitejs/plugin-vue': 1.10.0_vite@2.6.14 typescript: 4.4.4 vite: 2.6.14 @@ -496,6 +518,7 @@ importers: specifiers: '@cypress/vite-dev-server': ^2.2.1 '@cypress/vue': ^3.0.5 + '@types/node': ^16.11.10 '@vitejs/plugin-vue': ^1.10.0 cypress: ^8.7.0 start-server-and-test: ^1.14.0 @@ -512,6 +535,7 @@ importers: devDependencies: '@cypress/vite-dev-server': 2.2.1_vite@2.6.14 '@cypress/vue': 3.0.5_cypress@8.7.0+vue@3.2.22 + '@types/node': 16.11.10 '@vitejs/plugin-vue': 1.10.0_vite@2.6.14 cypress: 8.7.0 start-server-and-test: 1.14.0 @@ -523,6 +547,7 @@ importers: specifiers: '@cypress/vite-dev-server': ^2.2.1 '@cypress/vue': ^3.0.5 + '@types/node': ^16.11.10 '@vitejs/plugin-vue': ^1.10.0 cypress: ^8.7.0 start-server-and-test: ^1.14.0 @@ -537,6 +562,7 @@ importers: devDependencies: '@cypress/vite-dev-server': 2.2.1_vite@2.6.14 '@cypress/vue': 3.0.5_cypress@8.7.0+vue@3.2.22 + '@types/node': 16.11.10 '@vitejs/plugin-vue': 1.10.0_vite@2.6.14 cypress: 8.7.0 start-server-and-test: 1.14.0 @@ -546,6 +572,7 @@ importers: playground/typescript-vuex: specifiers: + '@types/node': ^16.11.10 '@vitejs/plugin-vue': ^1.10.0 typescript: ~4.4.4 vite: ^2.6.14 @@ -556,6 +583,7 @@ importers: vue: 3.2.22 vuex: 4.0.2_vue@3.2.22 devDependencies: + '@types/node': 16.11.10 '@vitejs/plugin-vue': 1.10.0_vite@2.6.14 typescript: 4.4.4 vite: 2.6.14 @@ -565,6 +593,7 @@ importers: specifiers: '@cypress/vite-dev-server': ^2.2.1 '@cypress/vue': ^3.0.5 + '@types/node': ^16.11.10 '@vitejs/plugin-vue': ^1.10.0 cypress: ^8.7.0 start-server-and-test: ^1.14.0 @@ -579,6 +608,7 @@ importers: devDependencies: '@cypress/vite-dev-server': 2.2.1_vite@2.6.14 '@cypress/vue': 3.0.5_cypress@8.7.0+vue@3.2.22 + '@types/node': 16.11.10 '@vitejs/plugin-vue': 1.10.0_vite@2.6.14 cypress: 8.7.0 start-server-and-test: 1.14.0 @@ -590,6 +620,7 @@ importers: specifiers: '@cypress/vite-dev-server': ^2.2.1 '@cypress/vue': ^3.0.5 + '@types/node': ^16.11.10 '@vitejs/plugin-vue': ^1.10.0 cypress: ^8.7.0 start-server-and-test: ^1.14.0 @@ -602,6 +633,7 @@ importers: devDependencies: '@cypress/vite-dev-server': 2.2.1_vite@2.6.14 '@cypress/vue': 3.0.5_cypress@8.7.0+vue@3.2.22 + '@types/node': 16.11.10 '@vitejs/plugin-vue': 1.10.0_vite@2.6.14 cypress: 8.7.0 start-server-and-test: 1.14.0 @@ -1068,6 +1100,10 @@ packages: resolution: {integrity: sha512-USUftMYpmuMzeWobskoPfzDi+vkpe0dvcOBRNOscFrGxVp4jomnRxWuVohgqBow2xyIPC0S3gjxV/5079jhmDg==} dev: true + /@types/node/16.11.10: + resolution: {integrity: sha512-3aRnHa1KlOEEhJ6+CvyHKK5vE9BcLGjtUpwvqYLRvYNQKMfabu3BwfJaA/SLW8dxe28LsNDjtHwePTuzn3gmOA==} + dev: true + /@types/sinonjs__fake-timers/6.0.4: resolution: {integrity: sha512-IFQTJARgMUBF+xVd2b+hIgXWrZEjND3vJtRCvIelcFB5SIXfjV4bOHbHJ0eXKh+0COrBRc8MqteKAz/j88rE0A==} dev: true diff --git a/template/config/typescript/package.json b/template/config/typescript/package.json index 1735112b..4d0fef9e 100644 --- a/template/config/typescript/package.json +++ b/template/config/typescript/package.json @@ -4,6 +4,7 @@ "typecheck": "vue-tsc --noEmit" }, "devDependencies": { + "@types/node": "^16.11.10", "typescript": "~4.4.4", "vue-tsc": "^0.29.6" } -- 2.39.5