From 46f874a2aa90832a89a8ee03826a9a0affb3a908 Mon Sep 17 00:00:00 2001 From: mewton Date: Sun, 15 Oct 2023 02:22:37 +0900 Subject: [PATCH] test: add typecheck test --- .github/actions/init-node/action.yml | 27 +++- .github/workflows/test.yml | 65 ++++++++- examples/enclosure-vue2.7/package.json | 5 +- examples/enclosure-vue2.7/yarn.lock | 133 ++++++++++++++++- examples/enclosure-vue3/package.json | 2 +- examples/enclosure-vue3/src/router/index.ts | 3 +- examples/enclosure-vue3/yarn.lock | 8 +- examples/insider-vue2.7/package.json | 5 +- examples/insider-vue2.7/yarn.lock | 137 ++++++++++++++++-- examples/insider-vue3/package.json | 2 +- examples/insider-vue3/src/router/index.ts | 3 +- examples/insider-vue3/yarn.lock | 8 +- fixtures/enclosure/package.json | 6 +- .../src/internals/composition/DataSender.vue | 2 +- .../src/internals/optional/TransitionLog.vue | 2 +- fixtures/insider/package.json | 6 +- fixtures/insider/src/internals/Tag.vue | 5 +- .../src/internals/composition/DataSender.vue | 2 +- .../internals/optional/DataReceivedLog.vue | 3 +- packages/enclosure-vue/tsconfig.json | 3 +- packages/insider-vue/src/communicator.ts | 16 ++ packages/insider-vue/src/composables.ts | 6 +- packages/insider-vue/src/index.ts | 16 +- packages/insider-vue/tsconfig.json | 2 +- packages/insider-vue/vite.config.ts | 3 +- 25 files changed, 411 insertions(+), 59 deletions(-) diff --git a/.github/actions/init-node/action.yml b/.github/actions/init-node/action.yml index 70d576ee..79e033bb 100644 --- a/.github/actions/init-node/action.yml +++ b/.github/actions/init-node/action.yml @@ -17,12 +17,35 @@ runs: with: path: | ./node_modules - key: node-modules-${{ runner.os }}-${{ hashFiles('./yarn.lock') }} + ./**/node_modules + ./.yarn/cache + key: node-modules-${{ runner.os }}-${{ hashFiles('./**/yarn.lock') }} restore-keys: | - node-modules-${{ runner.os }}-${{ hashFiles('./yarn.lock') }} + node-modules-${{ runner.os }}-${{ hashFiles('./**/yarn.lock') }} node-modules-${{ runner.os }}- node-modules-- - if: steps.cache_node_modules.outputs.cache-hit != 'true' run: yarn --immutable shell: bash + + - if: steps.cache_node_modules.outputs.cache-hit != 'true' + working-directory: ./examples/enclosure-vue3 + run: yarn --immutable + shell: bash + + - if: steps.cache_node_modules.outputs.cache-hit != 'true' + working-directory: ./examples/enclosure-vue2.7 + run: yarn --immutable + shell: bash + + - if: steps.cache_node_modules.outputs.cache-hit != 'true' + working-directory: ./examples/insider-vue3 + run: yarn --immutable + shell: bash + + - if: steps.cache_node_modules.outputs.cache-hit != 'true' + working-directory: ./examples/insider-vue2.7 + run: yarn --immutable + shell: bash + diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9093f9c6..17a4b62d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -40,8 +40,8 @@ jobs: - uses: ./.github/actions/build-and-cache - run: yarn test - test__typecheck: - name: 'Test: TypeCheck' + test__typecheck__enclosure_vue: + name: 'Test: [package/enclosure-vue] TypeCheck' runs-on: ubuntu-latest needs: - build @@ -50,3 +50,64 @@ jobs: - uses: ./.github/actions/init-node - uses: ./.github/actions/build-and-cache - run: yarn typecheck + working-directory: packages/enclosure-vue + + test__typecheck__insider_vue: + name: 'Test: [package/insider-vue] TypeCheck' + runs-on: ubuntu-latest + needs: + - build + steps: + - uses: actions/checkout@v3 + - uses: ./.github/actions/init-node + - uses: ./.github/actions/build-and-cache + - run: yarn typecheck + working-directory: packages/insider-vue + + test__typecheck__example_enclosure_vue_3: + name: 'Test: [example/enclosure-vue3] TypeCheck' + runs-on: ubuntu-latest + needs: + - build + steps: + - uses: actions/checkout@v3 + - uses: ./.github/actions/init-node + - uses: ./.github/actions/build-and-cache + - run: yarn typecheck + working-directory: example/enclosure-vue3 + + test__typecheck__example_enclosure_vue_2_7: + name: 'Test: [example/enclosure-vue2.7] TypeCheck' + runs-on: ubuntu-latest + needs: + - build + steps: + - uses: actions/checkout@v3 + - uses: ./.github/actions/init-node + - uses: ./.github/actions/build-and-cache + - run: yarn typecheck + working-directory: example/enclosure-vue2.7 + + test__typecheck__example_insider_vue_3: + name: 'Test: [example/insider-vue3] TypeCheck' + runs-on: ubuntu-latest + needs: + - build + steps: + - uses: actions/checkout@v3 + - uses: ./.github/actions/init-node + - uses: ./.github/actions/build-and-cache + - run: yarn typecheck + working-directory: example/insider-vue3 + + test__typecheck__example_insider_vue_2_7: + name: 'Test: [example/insider-vue2.7] TypeCheck' + runs-on: ubuntu-latest + needs: + - build + steps: + - uses: actions/checkout@v3 + - uses: ./.github/actions/init-node + - uses: ./.github/actions/build-and-cache + - run: yarn typecheck + working-directory: example/insider-vue2.7 diff --git a/examples/enclosure-vue2.7/package.json b/examples/enclosure-vue2.7/package.json index 37129c22..09bc5fa0 100644 --- a/examples/enclosure-vue2.7/package.json +++ b/examples/enclosure-vue2.7/package.json @@ -4,7 +4,7 @@ "type": "module", "scripts": { "dev": "vite . --port 5173", - "typecheck": "tsc --noEmit" + "typecheck": "vue-tsc --noEmit --composite false" }, "devDependencies": { "@passerelle/enclosure-vue": "file:../../packages/enclosure-vue", @@ -13,6 +13,7 @@ "vite-plugin-vue2": "^2.0.3", "vue": "~2.7.0", "vue-router": "~3.6.5", - "vue-template-compiler": "~2.7.0" + "vue-template-compiler": "~2.7.0", + "vue-tsc": "^1.6.5" } } diff --git a/examples/enclosure-vue2.7/yarn.lock b/examples/enclosure-vue2.7/yarn.lock index 81fec1a1..9d02dfbf 100644 --- a/examples/enclosure-vue2.7/yarn.lock +++ b/examples/enclosure-vue2.7/yarn.lock @@ -266,7 +266,7 @@ __metadata: languageName: node linkType: hard -"@babel/parser@npm:^7.17.9, @babel/parser@npm:^7.18.4, @babel/parser@npm:^7.22.15, @babel/parser@npm:^7.23.0": +"@babel/parser@npm:^7.17.9, @babel/parser@npm:^7.18.4, @babel/parser@npm:^7.21.3, @babel/parser@npm:^7.22.15, @babel/parser@npm:^7.23.0": version: 7.23.0 resolution: "@babel/parser@npm:7.23.0" bin: @@ -854,6 +854,33 @@ __metadata: languageName: node linkType: hard +"@volar/language-core@npm:1.10.4, @volar/language-core@npm:~1.10.4": + version: 1.10.4 + resolution: "@volar/language-core@npm:1.10.4" + dependencies: + "@volar/source-map": 1.10.4 + checksum: 9e9a010d8fedc11a7408f6e8bcf1f746671ec7dbbfe8ed00e5c0363c077cb074775c6626838829ce77fd02bc1cc3061938cb4fc5267a421b0056f3f8c8c2a7d7 + languageName: node + linkType: hard + +"@volar/source-map@npm:1.10.4, @volar/source-map@npm:~1.10.4": + version: 1.10.4 + resolution: "@volar/source-map@npm:1.10.4" + dependencies: + muggle-string: ^0.3.1 + checksum: 03b39d96e955f9953aef25a4776b2ae046d78e752f4c95784f633555fa5ff94072aef5a73cbe3862c2e1f4463c6138b44fad9fb8b1d9cf3bc77be264dec75307 + languageName: node + linkType: hard + +"@volar/typescript@npm:~1.10.4": + version: 1.10.4 + resolution: "@volar/typescript@npm:1.10.4" + dependencies: + "@volar/language-core": 1.10.4 + checksum: 528602d520df712eb302fe34a865dfa396b053b118984207f8284eb602a67266ba043c2eadd3af8bcdcf0cd063245c060af8ed0c17df6a74f89f72df9a2a3e4d + languageName: node + linkType: hard + "@vue/babel-helper-vue-jsx-merge-props@npm:^1.2.1, @vue/babel-helper-vue-jsx-merge-props@npm:^1.4.0": version: 1.4.0 resolution: "@vue/babel-helper-vue-jsx-merge-props@npm:1.4.0" @@ -972,6 +999,28 @@ __metadata: languageName: node linkType: hard +"@vue/compiler-core@npm:3.3.4": + version: 3.3.4 + resolution: "@vue/compiler-core@npm:3.3.4" + dependencies: + "@babel/parser": ^7.21.3 + "@vue/shared": 3.3.4 + estree-walker: ^2.0.2 + source-map-js: ^1.0.2 + checksum: 5437942ea6575b316c9cd84f4f128a44939713da8b6958060e152c599e6d771d5db056c398d7574ee706ff8092e0d99ac4f14e7eef8712a8dd923d2323201b9e + languageName: node + linkType: hard + +"@vue/compiler-dom@npm:^3.3.0": + version: 3.3.4 + resolution: "@vue/compiler-dom@npm:3.3.4" + dependencies: + "@vue/compiler-core": 3.3.4 + "@vue/shared": 3.3.4 + checksum: 1c2ac0c89de8eef7be1c568d57504e6245adaaec40c2c4d9717bc231ca10bf682d918a3b358d24c786eeaf8e0d7eb8a65f57d9044775a304783fde1d069a1896 + languageName: node + linkType: hard + "@vue/compiler-sfc@npm:2.7.14": version: 2.7.14 resolution: "@vue/compiler-sfc@npm:2.7.14" @@ -1003,6 +1052,53 @@ __metadata: languageName: node linkType: hard +"@vue/language-core@npm:1.8.19": + version: 1.8.19 + resolution: "@vue/language-core@npm:1.8.19" + dependencies: + "@volar/language-core": ~1.10.4 + "@volar/source-map": ~1.10.4 + "@vue/compiler-dom": ^3.3.0 + "@vue/reactivity": ^3.3.0 + "@vue/shared": ^3.3.0 + minimatch: ^9.0.3 + muggle-string: ^0.3.1 + vue-template-compiler: ^2.7.14 + peerDependencies: + typescript: "*" + peerDependenciesMeta: + typescript: + optional: true + checksum: f540cde61849786252f2964aeee37f04ec5810c8bca378ff2554c0888e595121b531915b88c5f9cd8d128bf88ae6bda877a57de4e900014c83e224b7a4c8b947 + languageName: node + linkType: hard + +"@vue/reactivity@npm:^3.3.0": + version: 3.3.4 + resolution: "@vue/reactivity@npm:3.3.4" + dependencies: + "@vue/shared": 3.3.4 + checksum: 81c3d0c587d23656a57a7a31afb51357274f6512b51baffc67cda183b2361a7e65e646029c26a8bc28587f26b65bba808dcd93cdd3bacab48d2b99d11ad0ec97 + languageName: node + linkType: hard + +"@vue/shared@npm:3.3.4, @vue/shared@npm:^3.3.0": + version: 3.3.4 + resolution: "@vue/shared@npm:3.3.4" + checksum: 12fe53ff816bfa29ea53f89212067a86512c626b8d30149ff28b36705820f6150e1fb4e4e46897ad9eddb1d1cfc02d8941053939910eed69a905f7a5509baabe + languageName: node + linkType: hard + +"@vue/typescript@npm:1.8.19": + version: 1.8.19 + resolution: "@vue/typescript@npm:1.8.19" + dependencies: + "@volar/typescript": ~1.10.4 + "@vue/language-core": 1.8.19 + checksum: 52226a298f40b5378ec89387f30f62e4cb46f41c56fb5c6a6bf56ebdae9c735e3ec95bfb33de841fddafd277f6948197327fc6fd3b50881b8ea6b6d5cc65b3d4 + languageName: node + linkType: hard + "abbrev@npm:^1.0.0": version: 1.1.1 resolution: "abbrev@npm:1.1.1" @@ -1551,7 +1647,7 @@ __metadata: languageName: node linkType: hard -"estree-walker@npm:^2.0.1": +"estree-walker@npm:^2.0.1, estree-walker@npm:^2.0.2": version: 2.0.2 resolution: "estree-walker@npm:2.0.2" checksum: 6151e6f9828abe2259e57f5fd3761335bb0d2ebd76dc1a01048ccee22fabcfef3c0859300f6d83ff0d1927849368775ec5a6d265dde2f6de5a1be1721cd94efc @@ -1578,6 +1674,7 @@ __metadata: vue: ~2.7.0 vue-router: ~3.6.5 vue-template-compiler: ~2.7.0 + vue-tsc: ^1.6.5 languageName: unknown linkType: soft @@ -1597,11 +1694,11 @@ __metadata: "fixtures-enclosure@file:../../fixtures/enclosure::locator=example-enclosure-vue2%40workspace%3A.": version: 0.0.0 - resolution: "fixtures-enclosure@file:../../fixtures/enclosure#../../fixtures/enclosure::hash=d260b0&locator=example-enclosure-vue2%40workspace%3A." + resolution: "fixtures-enclosure@file:../../fixtures/enclosure#../../fixtures/enclosure::hash=ea5636&locator=example-enclosure-vue2%40workspace%3A." dependencies: json-editor-vue: ^0.10.19 vanilla-jsoneditor: ^0.18.8 - checksum: 1daf7c662fcbedea95238ee5cf65b6c10786510202e41bd3b2c891c6125e6e1f5e93fcb09c2a1a1508f554bc0328ff3728ec4e7e39372e129c7f21cd8527cc5d + checksum: e76644bdf7e36079c6afc9f4b974e6e4e8f8e3926b0e6356309ae85608791e8da77b2ae99ea7e89a9eb72523a2d12a45f42febbe726f2d54a41d18a9427d695e languageName: node linkType: hard @@ -2097,7 +2194,7 @@ __metadata: languageName: node linkType: hard -"minimatch@npm:^9.0.1": +"minimatch@npm:^9.0.1, minimatch@npm:^9.0.3": version: 9.0.3 resolution: "minimatch@npm:9.0.3" dependencies: @@ -2213,6 +2310,13 @@ __metadata: languageName: node linkType: hard +"muggle-string@npm:^0.3.1": + version: 0.3.1 + resolution: "muggle-string@npm:0.3.1" + checksum: f2357f906e0160b7df0179c77838cf859f3ca23cb74eca7c043b9fc9e1e416d91497c80fbe2f3c9aeb003c14ad15857fc4e94f1631e8a6695b07e4135626d305 + languageName: node + linkType: hard + "nanoid@npm:^3.3.6": version: 3.3.6 resolution: "nanoid@npm:3.3.6" @@ -2512,7 +2616,7 @@ __metadata: languageName: node linkType: hard -"semver@npm:^7.3.5": +"semver@npm:^7.3.5, semver@npm:^7.5.4": version: 7.5.4 resolution: "semver@npm:7.5.4" dependencies: @@ -2971,7 +3075,7 @@ __metadata: languageName: node linkType: hard -"vue-template-compiler@npm:~2.7.0": +"vue-template-compiler@npm:^2.7.14, vue-template-compiler@npm:~2.7.0": version: 2.7.14 resolution: "vue-template-compiler@npm:2.7.14" dependencies: @@ -2988,6 +3092,21 @@ __metadata: languageName: node linkType: hard +"vue-tsc@npm:^1.6.5": + version: 1.8.19 + resolution: "vue-tsc@npm:1.8.19" + dependencies: + "@vue/language-core": 1.8.19 + "@vue/typescript": 1.8.19 + semver: ^7.5.4 + peerDependencies: + typescript: "*" + bin: + vue-tsc: bin/vue-tsc.js + checksum: 0d5e9d2a06a3643a1a1f4d5421bec6e40c4948be3b6517e0d88f142292772a090393c8986de72d245e8b050393286d4227f110470359ca19f875bff0c62a2b3d + languageName: node + linkType: hard + "vue@npm:~2.7.0": version: 2.7.14 resolution: "vue@npm:2.7.14" diff --git a/examples/enclosure-vue3/package.json b/examples/enclosure-vue3/package.json index 81be2dc0..4dfed959 100644 --- a/examples/enclosure-vue3/package.json +++ b/examples/enclosure-vue3/package.json @@ -4,7 +4,7 @@ "type": "module", "scripts": { "dev": "vite . --port 5173", - "typecheck": "vue-tsc --noEmit" + "typecheck": "vue-tsc --noEmit --composite false" }, "devDependencies": { "@passerelle/enclosure-vue": "file:../../packages/enclosure-vue", diff --git a/examples/enclosure-vue3/src/router/index.ts b/examples/enclosure-vue3/src/router/index.ts index 8e37fab2..ae9a3c2b 100644 --- a/examples/enclosure-vue3/src/router/index.ts +++ b/examples/enclosure-vue3/src/router/index.ts @@ -3,7 +3,8 @@ import HomeView from '../views/HomeView.vue' import BridgeView from '../views/BridgeView.vue' const router = createRouter({ - history: createWebHistory(import.meta.env.BASE_URL), + // eslint-disable-next-line @typescript-eslint/no-explicit-any + history: createWebHistory((import.meta as any).env.BASE_URL), routes: [ { path: "/", diff --git a/examples/enclosure-vue3/yarn.lock b/examples/enclosure-vue3/yarn.lock index e333d94e..d3a2fd97 100644 --- a/examples/enclosure-vue3/yarn.lock +++ b/examples/enclosure-vue3/yarn.lock @@ -313,7 +313,7 @@ __metadata: "@passerelle/enclosure-vue@file:../../packages/enclosure-vue::locator=example-enclosure-vue3%40workspace%3A.": version: 0.0.1 - resolution: "@passerelle/enclosure-vue@file:../../packages/enclosure-vue#../../packages/enclosure-vue::hash=5255d9&locator=example-enclosure-vue3%40workspace%3A." + resolution: "@passerelle/enclosure-vue@file:../../packages/enclosure-vue#../../packages/enclosure-vue::hash=2cf910&locator=example-enclosure-vue3%40workspace%3A." dependencies: "@intlify/vue-router-bridge": ^1.0.1 "@passerelle/enclosure": ^1.0.0 @@ -328,7 +328,7 @@ __metadata: optional: true vue-router: optional: true - checksum: 47c1fd213cf71d24629856e7a33fd0f7f917fa32ca04ee6aa50153ca8bc626617f4ab02e292b2768698a22cbda2fc962bc50da794dfe4a8c30ffbd36488b71f4 + checksum: a5729b9b9ade32e01ea062009cc6cd080bdc91280afca3f0885e2e05d21eabb71fb2dc5fc4b987542af544d609244313c33e8ebf403fd9579da074291c08972c languageName: node linkType: hard @@ -1011,11 +1011,11 @@ __metadata: "fixtures-enclosure@file:../../fixtures/enclosure::locator=example-enclosure-vue3%40workspace%3A.": version: 0.0.0 - resolution: "fixtures-enclosure@file:../../fixtures/enclosure#../../fixtures/enclosure::hash=77faae&locator=example-enclosure-vue3%40workspace%3A." + resolution: "fixtures-enclosure@file:../../fixtures/enclosure#../../fixtures/enclosure::hash=ea5636&locator=example-enclosure-vue3%40workspace%3A." dependencies: json-editor-vue: ^0.10.19 vanilla-jsoneditor: ^0.18.8 - checksum: 3b7c6da83123a5839b97d2d1721c00b10b90e96d4334871ea368b3c885afaea3baff36495043e79c51a6f7c52d075b33a2b29164fb8f3cce842729ce8a6030dc + checksum: e76644bdf7e36079c6afc9f4b974e6e4e8f8e3926b0e6356309ae85608791e8da77b2ae99ea7e89a9eb72523a2d12a45f42febbe726f2d54a41d18a9427d695e languageName: node linkType: hard diff --git a/examples/insider-vue2.7/package.json b/examples/insider-vue2.7/package.json index 7afac943..5f51fff8 100644 --- a/examples/insider-vue2.7/package.json +++ b/examples/insider-vue2.7/package.json @@ -4,7 +4,7 @@ "type": "module", "scripts": { "dev": "vite . --port 5174", - "typecheck": "vue-tsc --noEmit" + "typecheck": "vue-tsc --noEmit --composite false" }, "devDependencies": { "@passerelle/insider-vue": "file:../../packages/insider-vue", @@ -13,6 +13,7 @@ "vite-plugin-vue2": "^2.0.3", "vue": "~2.7.0", "vue-router": "~3.6.5", - "vue-template-compiler": "~2.7.0" + "vue-template-compiler": "~2.7.0", + "vue-tsc": "^1.6.5" } } diff --git a/examples/insider-vue2.7/yarn.lock b/examples/insider-vue2.7/yarn.lock index 9c13e725..dacd0de2 100644 --- a/examples/insider-vue2.7/yarn.lock +++ b/examples/insider-vue2.7/yarn.lock @@ -266,7 +266,7 @@ __metadata: languageName: node linkType: hard -"@babel/parser@npm:^7.17.9, @babel/parser@npm:^7.18.4, @babel/parser@npm:^7.22.15, @babel/parser@npm:^7.23.0": +"@babel/parser@npm:^7.17.9, @babel/parser@npm:^7.18.4, @babel/parser@npm:^7.21.3, @babel/parser@npm:^7.22.15, @babel/parser@npm:^7.23.0": version: 7.23.0 resolution: "@babel/parser@npm:7.23.0" bin: @@ -778,7 +778,7 @@ __metadata: "@passerelle/insider-vue@file:../../packages/insider-vue::locator=example-insider-vue2%40workspace%3A.": version: 0.0.1 - resolution: "@passerelle/insider-vue@file:../../packages/insider-vue#../../packages/insider-vue::hash=bcb1ca&locator=example-insider-vue2%40workspace%3A." + resolution: "@passerelle/insider-vue@file:../../packages/insider-vue#../../packages/insider-vue::hash=e57fa9&locator=example-insider-vue2%40workspace%3A." dependencies: "@intlify/vue-router-bridge": ^1.0.1 "@passerelle/insider": ^1.0.0 @@ -789,7 +789,7 @@ __metadata: peerDependenciesMeta: "@vue/composition-api": optional: true - checksum: 91d7abdc17a192cc3fb609e94cd8e805b958338541edab7c493514b11fd52c9526a44809db5adfa2e7cc3f57053f1cbcae57d4497deb9fb445c1bf6ea9cbdb93 + checksum: 9c854534fd3792be75675f10384700d184b4005d612fe8a5c7ee276644da4fbd6d5a9236edd847fb9156071741cabaed3fbb3f7d470566ebf85d30f97d196d40 languageName: node linkType: hard @@ -827,6 +827,33 @@ __metadata: languageName: node linkType: hard +"@volar/language-core@npm:1.10.4, @volar/language-core@npm:~1.10.4": + version: 1.10.4 + resolution: "@volar/language-core@npm:1.10.4" + dependencies: + "@volar/source-map": 1.10.4 + checksum: 9e9a010d8fedc11a7408f6e8bcf1f746671ec7dbbfe8ed00e5c0363c077cb074775c6626838829ce77fd02bc1cc3061938cb4fc5267a421b0056f3f8c8c2a7d7 + languageName: node + linkType: hard + +"@volar/source-map@npm:1.10.4, @volar/source-map@npm:~1.10.4": + version: 1.10.4 + resolution: "@volar/source-map@npm:1.10.4" + dependencies: + muggle-string: ^0.3.1 + checksum: 03b39d96e955f9953aef25a4776b2ae046d78e752f4c95784f633555fa5ff94072aef5a73cbe3862c2e1f4463c6138b44fad9fb8b1d9cf3bc77be264dec75307 + languageName: node + linkType: hard + +"@volar/typescript@npm:~1.10.4": + version: 1.10.4 + resolution: "@volar/typescript@npm:1.10.4" + dependencies: + "@volar/language-core": 1.10.4 + checksum: 528602d520df712eb302fe34a865dfa396b053b118984207f8284eb602a67266ba043c2eadd3af8bcdcf0cd063245c060af8ed0c17df6a74f89f72df9a2a3e4d + languageName: node + linkType: hard + "@vue/babel-helper-vue-jsx-merge-props@npm:^1.2.1, @vue/babel-helper-vue-jsx-merge-props@npm:^1.4.0": version: 1.4.0 resolution: "@vue/babel-helper-vue-jsx-merge-props@npm:1.4.0" @@ -945,6 +972,28 @@ __metadata: languageName: node linkType: hard +"@vue/compiler-core@npm:3.3.4": + version: 3.3.4 + resolution: "@vue/compiler-core@npm:3.3.4" + dependencies: + "@babel/parser": ^7.21.3 + "@vue/shared": 3.3.4 + estree-walker: ^2.0.2 + source-map-js: ^1.0.2 + checksum: 5437942ea6575b316c9cd84f4f128a44939713da8b6958060e152c599e6d771d5db056c398d7574ee706ff8092e0d99ac4f14e7eef8712a8dd923d2323201b9e + languageName: node + linkType: hard + +"@vue/compiler-dom@npm:^3.3.0": + version: 3.3.4 + resolution: "@vue/compiler-dom@npm:3.3.4" + dependencies: + "@vue/compiler-core": 3.3.4 + "@vue/shared": 3.3.4 + checksum: 1c2ac0c89de8eef7be1c568d57504e6245adaaec40c2c4d9717bc231ca10bf682d918a3b358d24c786eeaf8e0d7eb8a65f57d9044775a304783fde1d069a1896 + languageName: node + linkType: hard + "@vue/compiler-sfc@npm:2.7.14": version: 2.7.14 resolution: "@vue/compiler-sfc@npm:2.7.14" @@ -976,6 +1025,53 @@ __metadata: languageName: node linkType: hard +"@vue/language-core@npm:1.8.19": + version: 1.8.19 + resolution: "@vue/language-core@npm:1.8.19" + dependencies: + "@volar/language-core": ~1.10.4 + "@volar/source-map": ~1.10.4 + "@vue/compiler-dom": ^3.3.0 + "@vue/reactivity": ^3.3.0 + "@vue/shared": ^3.3.0 + minimatch: ^9.0.3 + muggle-string: ^0.3.1 + vue-template-compiler: ^2.7.14 + peerDependencies: + typescript: "*" + peerDependenciesMeta: + typescript: + optional: true + checksum: f540cde61849786252f2964aeee37f04ec5810c8bca378ff2554c0888e595121b531915b88c5f9cd8d128bf88ae6bda877a57de4e900014c83e224b7a4c8b947 + languageName: node + linkType: hard + +"@vue/reactivity@npm:^3.3.0": + version: 3.3.4 + resolution: "@vue/reactivity@npm:3.3.4" + dependencies: + "@vue/shared": 3.3.4 + checksum: 81c3d0c587d23656a57a7a31afb51357274f6512b51baffc67cda183b2361a7e65e646029c26a8bc28587f26b65bba808dcd93cdd3bacab48d2b99d11ad0ec97 + languageName: node + linkType: hard + +"@vue/shared@npm:3.3.4, @vue/shared@npm:^3.3.0": + version: 3.3.4 + resolution: "@vue/shared@npm:3.3.4" + checksum: 12fe53ff816bfa29ea53f89212067a86512c626b8d30149ff28b36705820f6150e1fb4e4e46897ad9eddb1d1cfc02d8941053939910eed69a905f7a5509baabe + languageName: node + linkType: hard + +"@vue/typescript@npm:1.8.19": + version: 1.8.19 + resolution: "@vue/typescript@npm:1.8.19" + dependencies: + "@volar/typescript": ~1.10.4 + "@vue/language-core": 1.8.19 + checksum: 52226a298f40b5378ec89387f30f62e4cb46f41c56fb5c6a6bf56ebdae9c735e3ec95bfb33de841fddafd277f6948197327fc6fd3b50881b8ea6b6d5cc65b3d4 + languageName: node + linkType: hard + "abbrev@npm:^1.0.0": version: 1.1.1 resolution: "abbrev@npm:1.1.1" @@ -1455,7 +1551,7 @@ __metadata: languageName: node linkType: hard -"estree-walker@npm:^2.0.1": +"estree-walker@npm:^2.0.1, estree-walker@npm:^2.0.2": version: 2.0.2 resolution: "estree-walker@npm:2.0.2" checksum: 6151e6f9828abe2259e57f5fd3761335bb0d2ebd76dc1a01048ccee22fabcfef3c0859300f6d83ff0d1927849368775ec5a6d265dde2f6de5a1be1721cd94efc @@ -1473,6 +1569,7 @@ __metadata: vue: ~2.7.0 vue-router: ~3.6.5 vue-template-compiler: ~2.7.0 + vue-tsc: ^1.6.5 languageName: unknown linkType: soft @@ -1485,8 +1582,8 @@ __metadata: "fixtures-insider@file:../../fixtures/insider::locator=example-insider-vue2%40workspace%3A.": version: 0.0.0 - resolution: "fixtures-insider@file:../../fixtures/insider#../../fixtures/insider::hash=3b722d&locator=example-insider-vue2%40workspace%3A." - checksum: ae89a386e15994dfa33db6608ce97ff8fcc9f59c988638f0e402827a6be508d6f5134142d890e4a08f26f985657f6ad9f5fbaf560507a90d745c08d4787d6a25 + resolution: "fixtures-insider@file:../../fixtures/insider#../../fixtures/insider::hash=32f451&locator=example-insider-vue2%40workspace%3A." + checksum: c764ec50530cb9c647c8bb606dd29c07fb630ed2a453d9853dd677d2443af1a01ee1f1c78eea3ffa31721d858300c1011887cfa594a18c045b6050269af929dc languageName: node linkType: hard @@ -1920,7 +2017,7 @@ __metadata: languageName: node linkType: hard -"minimatch@npm:^9.0.1": +"minimatch@npm:^9.0.1, minimatch@npm:^9.0.3": version: 9.0.3 resolution: "minimatch@npm:9.0.3" dependencies: @@ -2036,6 +2133,13 @@ __metadata: languageName: node linkType: hard +"muggle-string@npm:^0.3.1": + version: 0.3.1 + resolution: "muggle-string@npm:0.3.1" + checksum: f2357f906e0160b7df0179c77838cf859f3ca23cb74eca7c043b9fc9e1e416d91497c80fbe2f3c9aeb003c14ad15857fc4e94f1631e8a6695b07e4135626d305 + languageName: node + linkType: hard + "nanoid@npm:^3.3.6": version: 3.3.6 resolution: "nanoid@npm:3.3.6" @@ -2310,7 +2414,7 @@ __metadata: languageName: node linkType: hard -"semver@npm:^7.3.5": +"semver@npm:^7.3.5, semver@npm:^7.5.4": version: 7.5.4 resolution: "semver@npm:7.5.4" dependencies: @@ -2699,7 +2803,7 @@ __metadata: languageName: node linkType: hard -"vue-template-compiler@npm:~2.7.0": +"vue-template-compiler@npm:^2.7.14, vue-template-compiler@npm:~2.7.0": version: 2.7.14 resolution: "vue-template-compiler@npm:2.7.14" dependencies: @@ -2716,6 +2820,21 @@ __metadata: languageName: node linkType: hard +"vue-tsc@npm:^1.6.5": + version: 1.8.19 + resolution: "vue-tsc@npm:1.8.19" + dependencies: + "@vue/language-core": 1.8.19 + "@vue/typescript": 1.8.19 + semver: ^7.5.4 + peerDependencies: + typescript: "*" + bin: + vue-tsc: bin/vue-tsc.js + checksum: 0d5e9d2a06a3643a1a1f4d5421bec6e40c4948be3b6517e0d88f142292772a090393c8986de72d245e8b050393286d4227f110470359ca19f875bff0c62a2b3d + languageName: node + linkType: hard + "vue@npm:~2.7.0": version: 2.7.14 resolution: "vue@npm:2.7.14" diff --git a/examples/insider-vue3/package.json b/examples/insider-vue3/package.json index ddb06da1..b8f1612c 100644 --- a/examples/insider-vue3/package.json +++ b/examples/insider-vue3/package.json @@ -4,7 +4,7 @@ "type": "module", "scripts": { "dev": "vite . --port 5174", - "typecheck": "vue-tsc --noEmit" + "typecheck": "vue-tsc --noEmit --composite false" }, "devDependencies": { "@passerelle/insider-vue": "file:../../packages/insider-vue", diff --git a/examples/insider-vue3/src/router/index.ts b/examples/insider-vue3/src/router/index.ts index b0855eec..e6d7c019 100644 --- a/examples/insider-vue3/src/router/index.ts +++ b/examples/insider-vue3/src/router/index.ts @@ -4,7 +4,8 @@ import ContactView from '../views/ContactView.vue' import WorksView from '../views/WorksView.vue' const router = createRouter({ - history: createWebHistory(import.meta.env.BASE_URL), + // eslint-disable-next-line @typescript-eslint/no-explicit-any + history: createWebHistory((import.meta as any).env.BASE_URL), routes: [ { path: '/about', diff --git a/examples/insider-vue3/yarn.lock b/examples/insider-vue3/yarn.lock index fb69f139..7e1b8f65 100644 --- a/examples/insider-vue3/yarn.lock +++ b/examples/insider-vue3/yarn.lock @@ -252,7 +252,7 @@ __metadata: "@passerelle/insider-vue@file:../../packages/insider-vue::locator=example-insider-vue3%40workspace%3A.": version: 0.0.1 - resolution: "@passerelle/insider-vue@file:../../packages/insider-vue#../../packages/insider-vue::hash=09b9bd&locator=example-insider-vue3%40workspace%3A." + resolution: "@passerelle/insider-vue@file:../../packages/insider-vue#../../packages/insider-vue::hash=e57fa9&locator=example-insider-vue3%40workspace%3A." dependencies: "@intlify/vue-router-bridge": ^1.0.1 "@passerelle/insider": ^1.0.0 @@ -263,7 +263,7 @@ __metadata: peerDependenciesMeta: "@vue/composition-api": optional: true - checksum: a83a34c9fc9c290ef64d63d940eea4165d99a14e15d3a4c9c1160bd718c63f1208ff4ddf522eeaa9bbb5fa36f1bced7e16afaa938d95436b3a6967517be3aa92 + checksum: 9c854534fd3792be75675f10384700d184b4005d612fe8a5c7ee276644da4fbd6d5a9236edd847fb9156071741cabaed3fbb3f7d470566ebf85d30f97d196d40 languageName: node linkType: hard @@ -854,8 +854,8 @@ __metadata: "fixtures-insider@file:../../fixtures/insider::locator=example-insider-vue3%40workspace%3A.": version: 0.0.0 - resolution: "fixtures-insider@file:../../fixtures/insider#../../fixtures/insider::hash=3b722d&locator=example-insider-vue3%40workspace%3A." - checksum: ae89a386e15994dfa33db6608ce97ff8fcc9f59c988638f0e402827a6be508d6f5134142d890e4a08f26f985657f6ad9f5fbaf560507a90d745c08d4787d6a25 + resolution: "fixtures-insider@file:../../fixtures/insider#../../fixtures/insider::hash=32f451&locator=example-insider-vue3%40workspace%3A." + checksum: c764ec50530cb9c647c8bb606dd29c07fb630ed2a453d9853dd677d2443af1a01ee1f1c78eea3ffa31721d858300c1011887cfa594a18c045b6050269af929dc languageName: node linkType: hard diff --git a/fixtures/enclosure/package.json b/fixtures/enclosure/package.json index 3fb065ff..d925b492 100644 --- a/fixtures/enclosure/package.json +++ b/fixtures/enclosure/package.json @@ -3,6 +3,9 @@ "private": true, "type": "module", "main": "./src/index.ts", + "scripts": { + "typecheck": "vue-tsc --noEmit --composite false" + }, "dependencies": { "json-editor-vue": "^0.10.19", "vanilla-jsoneditor": "^0.18.8" @@ -10,6 +13,7 @@ "devDependencies": { "@intlify/vue-router-bridge": "^1.0.1", "@passerelle/enclosure-vue": "^0.0.1", - "vue-demi": "^0.13.11" + "vue-demi": "^0.13.11", + "vue-tsc": "^1.6.5" } } diff --git a/fixtures/enclosure/src/internals/composition/DataSender.vue b/fixtures/enclosure/src/internals/composition/DataSender.vue index 641b716f..8d067df2 100644 --- a/fixtures/enclosure/src/internals/composition/DataSender.vue +++ b/fixtures/enclosure/src/internals/composition/DataSender.vue @@ -14,7 +14,7 @@ export default defineComponent({ } }, setup({ name }) { - const data = ref({} satisfies Json) + const data = ref({} satisfies Json) function send() { sendData(name, 'data-sender', data.value) diff --git a/fixtures/enclosure/src/internals/optional/TransitionLog.vue b/fixtures/enclosure/src/internals/optional/TransitionLog.vue index 93c9b741..0132bc88 100644 --- a/fixtures/enclosure/src/internals/optional/TransitionLog.vue +++ b/fixtures/enclosure/src/internals/optional/TransitionLog.vue @@ -75,7 +75,7 @@ export default defineComponent({ { timestamp: new Date().toISOString(), path, - params + params: params ?? {} } ] }, diff --git a/fixtures/insider/package.json b/fixtures/insider/package.json index d6046614..cafabb24 100644 --- a/fixtures/insider/package.json +++ b/fixtures/insider/package.json @@ -3,8 +3,12 @@ "private": true, "type": "module", "main": "./src/index.ts", + "scripts": { + "typecheck": "vue-tsc --noEmit --composite false" + }, "devDependencies": { "@passerelle/insider-vue": "^0.0.1", - "vue-demi": "^0.13.11" + "vue-demi": "^0.13.11", + "vue-tsc": "^1.6.5" } } diff --git a/fixtures/insider/src/internals/Tag.vue b/fixtures/insider/src/internals/Tag.vue index dd3c2feb..b2a64184 100644 --- a/fixtures/insider/src/internals/Tag.vue +++ b/fixtures/insider/src/internals/Tag.vue @@ -6,7 +6,7 @@ -