Skip to content

Commit d91a816

Browse files
fpapadosverweij
andauthored
feat: allows usage with TypeScript v6 (#1049)
## Description This PR add support for TypeScript 6.0, which is currently in Beta. TypeScript 6.0 has no depcruiser-affecting breakage that I could see, and is mostly about aligning the config and some defaults with tsgo ([see the notes here](https://devblogs.microsoft.com/typescript/announcing-typescript-6-0-beta/)). The change mostly involves increasing the range to include `< 7.0.0` as the upper bound. I mirrored the changes in both package.json and the generated meta.cjs. (7.0 will most likely be another can of worms, I'd be happy to poke at that closer to prime time 😌) ## Motivation and Context I was testing compatibility with 6.0 at work and noticed that depcruiser was silently giving me very small graphs. I traced this down to the transpiler allowlist in `meta.cjs`. Aside: [I also saw this issue about giving a warning on missing transpilers, which would also be relevant](#1048). ## How Has This Been Tested? - [x] green ci ## Types of changes - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] Documentation only change - [ ] Refactor (non-breaking change which fixes an issue without changing functionality) - [x] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) ## Checklist - [x] 📖 - My change doesn't require a documentation update, the TypeScript ranges are not really specified in the docs, as far as I could see. - [x] ⚖️ - The contribution will be subject to [The MIT license](https://github.com/sverweij/dependency-cruiser/blob/main/LICENSE), and I'm OK with that. - The contribution is my own original work. - I am ok with the stuff in [**CONTRIBUTING.md**](https://github.com/sverweij/dependency-cruiser/blob/main/.github/CONTRIBUTING.md). --------- Co-authored-by: sverweij <sverweij@users.noreply.github.com>
1 parent e1843a6 commit d91a816

File tree

6 files changed

+305
-70
lines changed

6 files changed

+305
-70
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,10 @@ jobs:
5656
run: |
5757
sudo apt-get update
5858
sudo apt-get install graphviz
59-
npm install
59+
# legacy peer deps because otherwise typescript-eslint hard-complains
60+
# as it can't find a suitable typescript compiler (we're on 6 now,
61+
# ts-eslint isn't yet)
62+
npm install --legacy-peer-deps
6063
npm run build
6164
- name: lint (run on node ${{env.NODE_LATEST}} only)
6265
if: matrix.node-version == env.NODE_LATEST
@@ -116,7 +119,10 @@ jobs:
116119
- name: install & build
117120
run: |
118121
choco install graphviz
119-
npm install
122+
# legacy peer deps because otherwise typescript-eslint hard-complains
123+
# as it can't find a suitable typescript compiler (we're on 6 now,
124+
# ts-eslint isn't yet)
125+
npm install --legacy-peer-deps
120126
npm run build
121127
- run: npm run depcruise
122128
- run: npx mocha --invert --fgrep "#do-not-run-on-windows"

.github/workflows/release.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@ jobs:
2121
with:
2222
node-version: 24.x
2323
registry-url: https://registry.npmjs.org
24-
- run: npm clean-install
24+
# legacy peer deps because otherwise typescript-eslint hard-complains
25+
# as it can't find a suitable typescript compiler (we're on 6 now,
26+
# ts-eslint isn't yet)
27+
- run: npm clean-install --legacy-peer-deps
2528
- name: publish as latest
2629
run: npm publish --provenance --access public
2730
if: github.event.release.prerelease == false

0 commit comments

Comments
 (0)