Skip to content

Commit

Permalink
feat(TypeScript): generate projects with Node.js 22 types by default
Browse files Browse the repository at this point in the history
As it became the active LTS on 2024-10-29
  • Loading branch information
haoqunjiang authored and cexbrayat committed Nov 7, 2024
1 parent 1950a1c commit 498766e
Show file tree
Hide file tree
Showing 10 changed files with 98 additions and 156 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- uses: pnpm/action-setup@v3
- uses: actions/setup-node@v4
with:
node-version: 18
node-version: 22
cache: 'pnpm'
- run: pnpm install
env:
Expand Down Expand Up @@ -53,12 +53,12 @@ jobs:
# Skip ESLint/Prettier tests as we've reached the limit of job numbers
# TODO: Find a way to test them without adding new jobs

node-version: [18]
node-version: [22]
os: [ubuntu-latest]

# Run a few tests on other systems and Node.js versions
include:
- node-version: 18
- node-version: 22
os: windows-latest
flag-for-ts: '--typescript'
flag-for-jsx: '--jsx'
Expand All @@ -68,7 +68,7 @@ jobs:
flag-for-e2e: '--cypress'
flag-for-eslint: '--eslint'

- node-version: 18
- node-version: 22
os: macos-latest
flag-for-ts: '--typescript'
flag-for-jsx: '--jsx'
Expand All @@ -78,7 +78,7 @@ jobs:
flag-for-e2e: '--cypress'
flag-for-eslint: '--eslint'

- node-version: 20
- node-version: 18
os: ubuntu-latest
flag-for-ts: '--typescript'
flag-for-jsx: '--jsx'
Expand All @@ -88,7 +88,7 @@ jobs:
flag-for-e2e: '--cypress'
flag-for-eslint: '--eslint'

- node-version: 22
- node-version: 20
os: ubuntu-latest
flag-for-ts: '--typescript'
flag-for-jsx: '--jsx'
Expand Down
11 changes: 11 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,14 @@ This repo is a monorepo using pnpm workspaces. The package manager used to insta
- Checkout a topic branch from a base branch, e.g. `main`, and merge back against that branch.
- For any non-trivial new features or bug fixes, please open an issue first and have it approved before working on it.
- Don't include the `playground` directory in the commits. It will be updated automatically after each release.

## Node.js Compatibility

This project should be able to run on all maintained Node.js LTS versions.
This is ensured by GitHub Actions running the test suite on multiple Node.js versions.
Once an LTS version reaches its end-of-life, we will drop support for it.

We encourage users to use the latest *active LTS* version for development.
Consequently, the `@tsconfig/node*` and `@types/node` dependencies used in the generated TypeScript projects are set to be in sync with the latest *active LTS* Node.js version.

The Node.js release schedule can be found at [Node.js Release Working Group](https://github.com/nodejs/release#release-schedule).
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@
},
"homepage": "https://github.com/vuejs/create-vue#readme",
"devDependencies": {
"@tsconfig/node20": "^20.1.4",
"@tsconfig/node22": "^22.0.0",
"@types/eslint": "^9.6.1",
"@types/node": "^20.17.6",
"@types/node": "^22.9.0",
"@types/prompts": "^2.4.9",
"@vue/create-eslint-config": "^0.6.0",
"@vue/tsconfig": "^0.5.1",
Expand Down
Loading

0 comments on commit 498766e

Please sign in to comment.