]> git.ipfire.org Git - thirdparty/vuejs/pinia.git/commitdiff
use nuxi to typecheck nuxt
authorPooya Parsa <pooya@pi0.io>
Fri, 8 Jul 2022 11:29:20 +0000 (13:29 +0200)
committerEduardo San Martin Morote <posva@users.noreply.github.com>
Wed, 13 Jul 2022 10:32:58 +0000 (12:32 +0200)
package.json
packages/nuxt/package.json
packages/nuxt/shims.d.ts [new file with mode: 0644]
packages/nuxt/tsconfig.json
tsconfig.json

index 1fec8a80fa46063e7b3d4186b62271aa6e10644a..09965ac28cfa5c6ff733187e5bad4bed8bc392bc 100644 (file)
@@ -15,7 +15,7 @@
     "lint:fix": "pnpm run lint --write",
     "test": "pnpm run test:types && pnpm run test:jest && pnpm run -r test && pnpm run build && pnpm run build:dts && pnpm test:dts",
     "test:jest": "jest --coverage",
-    "test:types": "tsc --build ./tsconfig.json",
+    "test:types": "tsc --build ./tsconfig.json && pnpm run -C packages/nuxt test:types",
     "test:dts": "pnpm run -r test:dts",
     "docs:api": "pnpm run -r docs:api --filter ./packages/docs"
   },
index 3a5117adabb4703330865d3e55e324cc42f396fe..455a4a924f480c31f0ec52b5ac8b67c74015dd18 100644 (file)
@@ -42,6 +42,7 @@
     "dev": "nuxi dev playground",
     "dev:build": "nuxi build playground",
     "dev:prepare": "nuxt-module-build --stub && nuxi prepare playground",
+    "test:types": "nuxi typecheck",
     "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s --commit-path . -l @pinia/nuxt -r 1"
   },
   "dependencies": {
diff --git a/packages/nuxt/shims.d.ts b/packages/nuxt/shims.d.ts
new file mode 100644 (file)
index 0000000..abaf3dc
--- /dev/null
@@ -0,0 +1,5 @@
+declare namespace NodeJS {
+  export interface Process {
+      server: boolean
+  }
+}
index 9dd826f99e89fe6b41a93aedb31fff80202309db..069aee030759b5669f3cb46642935c006eec939f 100644 (file)
@@ -1,3 +1,6 @@
 {
-  "extends": "./playground/.nuxt/tsconfig.json"
+  "extends": "./playground/.nuxt/tsconfig.json",
+  "include": [
+    "./shims.d.ts",
+  ]
 }
index d850a35e071c690a44d4383ea6d72795628430ba..235b1645952cbe61cc73ab1fbd3e7cd598e55589 100644 (file)
@@ -4,7 +4,7 @@
     "packages/*/src/**/*.ts",
     "packages/*/__tests__/**/*.ts"
   ],
-  "exclude": ["packages/test-vue-2", "packages/pinia/__tests__/test-utils.ts", "packages/pinia/test-dts"],
+  "exclude": ["packages/test-vue-2", "packages/pinia/__tests__/test-utils.ts", "packages/pinia/test-dts", "packages/nuxt"],
   "compilerOptions": {
     "baseUrl": ".",
     "rootDir": ".",