diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2a6376e3e..ab76207fc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: with: node-version: ${{ matrix.node }} - name: Install - run: npm ci --legacy-peer-deps + run: npm ci - name: Build run: npm run build - name: Test @@ -43,7 +43,7 @@ jobs: - name: Upgrade npm run: npm i -g npm@latest - name: Install - run: npm ci --legacy-peer-deps + run: npm ci - name: Build run: npm run build - name: Test diff --git a/.github/workflows/publish-beta.yml b/.github/workflows/publish-beta.yml index 5cd574a14..e1e145bbf 100644 --- a/.github/workflows/publish-beta.yml +++ b/.github/workflows/publish-beta.yml @@ -24,7 +24,7 @@ jobs: run: npm i -g npm@latest - name: Install if: steps.check.outputs.changed == 'true' && contains(steps.check.outputs.version, 'beta') - run: npm ci --legacy-peer-deps + run: npm ci - name: Setup publish token if: steps.check.outputs.changed == 'true' && contains(steps.check.outputs.version, 'beta') run: echo "//registry.npmjs.org/:_authToken=${NPM_AUTH_TOKEN}" > .npmrc diff --git a/.github/workflows/publish-lts.yml b/.github/workflows/publish-lts.yml index 9da809558..ea18050b5 100644 --- a/.github/workflows/publish-lts.yml +++ b/.github/workflows/publish-lts.yml @@ -24,7 +24,7 @@ jobs: run: npm i -g npm@latest - name: Install if: steps.check.outputs.changed == 'true' - run: npm ci --legacy-peer-deps + run: npm ci - name: Setup publish token if: steps.check.outputs.changed == 'true' run: echo "//registry.npmjs.org/:_authToken=${NPM_AUTH_TOKEN}" > .npmrc diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 8ae7ac85d..3c896c383 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -23,7 +23,7 @@ jobs: node-version: "18" - name: Install if: steps.check.outputs.changed == 'true' - run: npm ci --legacy-peer-deps + run: npm ci - name: Setup publish token if: steps.check.outputs.changed == 'true' run: echo "//registry.npmjs.org/:_authToken=${NPM_AUTH_TOKEN}" > .npmrc diff --git a/.github/workflows/visual-regression.yml b/.github/workflows/visual-regression.yml index 4fb679276..e92988cac 100644 --- a/.github/workflows/visual-regression.yml +++ b/.github/workflows/visual-regression.yml @@ -16,7 +16,7 @@ jobs: run: | git fetch git checkout origin/$GITHUB_BASE_REF - npm ci --legacy-peer-deps + npm ci npm run build node dist/test/capture-screenshots.js npm run test:visual:accept @@ -24,7 +24,7 @@ jobs: - name: Get current screenshots run: | git checkout $GITHUB_SHA - npm ci --legacy-peer-deps + npm ci npm run build node dist/test/capture-screenshots.js - name: Test diff --git a/.npmrc b/.npmrc index 0683edb0a..b241adc44 100644 --- a/.npmrc +++ b/.npmrc @@ -3,3 +3,6 @@ # an install, so just turn it off. We can still check for findings # with npm audit --production. audit = false + +# While we're on the TS beta, need this flag. +legacy-peer-deps = true diff --git a/package-lock.json b/package-lock.json index cc774638e..473872010 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,7 +12,7 @@ "lunr": "^2.3.9", "markdown-it": "^14.1.0", "minimatch": "^9.0.4", - "shiki": "^1.3.0" + "shiki": "^1.4.0" }, "bin": { "typedoc": "bin/typedoc" @@ -278,9 +278,9 @@ } }, "node_modules/@shikijs/core": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@shikijs/core/-/core-1.3.0.tgz", - "integrity": "sha512-7fedsBfuILDTBmrYZNFI8B6ATTxhQAasUHllHmjvSZPnoq4bULWoTpHwmuQvZ8Aq03/tAa2IGo6RXqWtHdWaCA==" + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@shikijs/core/-/core-1.4.0.tgz", + "integrity": "sha512-CxpKLntAi64h3j+TwWqVIQObPTED0FyXLHTTh3MKXtqiQNn2JGcMQQ362LftDbc9kYbDtrksNMNoVmVXzKFYUQ==" }, "node_modules/@tsconfig/node10": { "version": "1.0.9", @@ -2726,11 +2726,11 @@ } }, "node_modules/shiki": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/shiki/-/shiki-1.3.0.tgz", - "integrity": "sha512-9aNdQy/etMXctnPzsje1h1XIGm9YfRcSksKOGqZWXA/qP9G18/8fpz5Bjpma8bOgz3tqIpjERAd6/lLjFyzoww==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/shiki/-/shiki-1.4.0.tgz", + "integrity": "sha512-5WIn0OL8PWm7JhnTwRWXniy6eEDY234mRrERVlFa646V2ErQqwIFd2UML7e0Pq9eqSKLoMa3Ke+xbsF+DAuy+Q==", "dependencies": { - "@shikijs/core": "1.3.0" + "@shikijs/core": "1.4.0" } }, "node_modules/signal-exit": { diff --git a/package.json b/package.json index 5e67749d6..edc2fd322 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "lunr": "^2.3.9", "markdown-it": "^14.1.0", "minimatch": "^9.0.4", - "shiki": "^1.3.0" + "shiki": "^1.4.0" }, "peerDependencies": { "typescript": "4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x" diff --git a/src/lib/types/shiki/shiki.d.ts b/src/lib/types/shiki/shiki.d.ts new file mode 100644 index 000000000..4034f072c --- /dev/null +++ b/src/lib/types/shiki/shiki.d.ts @@ -0,0 +1,19 @@ +// Shiki 1.x declares a `loadWasm` function which takes these types as input. +// They are declared in the DOM library, but since TypeDoc doesn't use that library, +// we have to declare some shims, intentionally crafted to not be accidentally +// constructed. + +declare namespace WebAssembly { + interface Instance { + __shikiHack: never; + exports: unknown; + } + interface WebAssemblyInstantiatedSource { + __shikiHack: never; + } + type ImportValue = unknown; +} + +interface Response { + __shikiHack: never; +} diff --git a/tsconfig.json b/tsconfig.json index 271954e70..70152b588 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -10,8 +10,7 @@ // Speed up dev compilation time "incremental": true, "tsBuildInfoFile": "dist/.tsbuildinfo", - // Shiki's types are broken again, https://github.com/shikijs/shiki/issues/665 - "skipLibCheck": true, + "skipLibCheck": false, "strict": true, "alwaysStrict": true,