Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: require Node >=18.0.0 #6939

Merged
merged 2 commits into from
Jul 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .changeset/purple-zoos-refuse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
"create-remix": major
"remix": major
"@remix-run/architect": major
"@remix-run/cloudflare": major
"@remix-run/cloudflare-pages": major
"@remix-run/cloudflare-workers": major
"@remix-run/css-bundle": major
"@remix-run/deno": major
"@remix-run/dev": major
"@remix-run/express": major
"@remix-run/netlify": major
"@remix-run/node": major
"@remix-run/react": major
"@remix-run/serve": major
"@remix-run/server-runtime": major
"@remix-run/testing": major
"@remix-run/vercel": major
---

Require Node >=18.0.0
2 changes: 1 addition & 1 deletion .github/workflows/release-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ jobs:
if: github.repository == 'remix-run/remix'
uses: ./.github/workflows/reusable-test.yml
with:
node_version: "[14, 16, 18]"
node_version: "[18, 20]"
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ jobs:
- name: ⎔ Setup node
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
cache: "npm"

- id: find_package_version
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
node_version:
required: true
# this is limited to string | boolean | number (https://github.saobby.my.eu.orgmunity/t/can-action-inputs-be-arrays/16457)
# but we want to pass an array (node_version: "[14, 16, 18]"),
# but we want to pass an array (node_version: "[18, 20]"),
# so we'll need to manually stringify it for now
type: string

Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/stacks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- name: ⎔ Setup node
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18

- name: ⚒️ Create new ${{ matrix.stack.name }} app with ${{ inputs.version }}
run: |
Expand Down Expand Up @@ -94,7 +94,7 @@ jobs:
- name: ⎔ Setup node and dependency caching
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
cache: npm
cache-dependency-path: ${{ matrix.stack.name }}/package.json

Expand Down Expand Up @@ -137,7 +137,7 @@ jobs:
- name: ⎔ Setup node and dependency caching
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
cache: npm
cache-dependency-path: ${{ matrix.stack.name }}/package.json

Expand Down Expand Up @@ -180,7 +180,7 @@ jobs:
- name: ⎔ Setup node and dependency caching
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
cache: npm
cache-dependency-path: ${{ matrix.stack.name }}/package.json

Expand Down Expand Up @@ -226,7 +226,7 @@ jobs:
- name: ⎔ Setup node and dependency caching
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
cache: npm
cache-dependency-path: ${{ matrix.stack.name }}/package.json

Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16
18
2 changes: 1 addition & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module.exports = {
"@babel/preset-env",
{
targets: {
node: "14",
node: "18",
},
},
],
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/typescript.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ The Remix compiler will not do any type checking (it simply removes the types).
"typescript": "^5.0.4"
},
"engines": {
"node": ">=14.0.0"
"node": ">=18.0.0"
}
}
```
Expand Down
4 changes: 2 additions & 2 deletions docs/tutorials/blog.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ Click this button to create a [Gitpod][gitpod] workspace with the project set up

If you want to follow this tutorial locally on your own computer, it is important for you to have these things installed:

- [Node.js][node-js] version (^14.17.0, or >=16.0.0)
- [Node.js][node-js] version (>=18.0.0)
- [npm][npm] 7 or greater
- A code editor ([VSCode][vs-code] is a nice one)

## Creating the project

<docs-warning>Make sure you are running at least Node v14 or greater</docs-warning>
<docs-warning>Make sure you are running at least Node v18 or greater</docs-warning>

💿 Initialize a new Remix project. We'll call ours "blog-tutorial" but you can call it something else if you'd like.

Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/jokes.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ You'll find links to the sections of the tutorial in the navbar (top of the page

You can follow along with this tutorial on [CodeSandbox][code-sandbox] (a fantastic in-browser editor) or locally on your own computer. If you use the CodeSandbox approach then all you need is a good internet connection and a modern browser. If you run things locally then you're going to need some things installed:

- [Node.js][node-js] version (^14.17.0, or >=16.0.0)
- [Node.js][node-js] version (>=18.0.0)
- [npm][npm] 7 or greater
- A code editor ([VSCode][vs-code] is a nice one)

Expand Down
2 changes: 1 addition & 1 deletion integration/compiler-mjs-output-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ test.beforeAll(async () => {
"typescript": "0.0.0-local-version"
},
"engines": {
"node": ">=14.0.0"
"node": ">=18.0.0"
}
}
`,
Expand Down
2 changes: 1 addition & 1 deletion integration/helpers/cf-template/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
"typescript": "0.0.0-local-version"
},
"engines": {
"node": ">=14.0.0"
"node": ">=18.0.0"
}
}
2 changes: 1 addition & 1 deletion integration/helpers/deno-template/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
"@remix-run/dev": "0.0.0-local-version"
},
"engines": {
"node": ">=14.0.0"
"node": ">=18.0.0"
}
}
2 changes: 1 addition & 1 deletion integration/helpers/node-template/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@
"typescript": "0.0.0-local-version"
},
"engines": {
"node": ">=14.0.0"
"node": ">=18.0.0"
}
}
2 changes: 1 addition & 1 deletion integration/hmr-log-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ let fixture = (options: { appPort: number; devPort: number }): FixtureInit => ({
typescript: "0.0.0-local-version",
},
engines: {
node: ">=14.0.0",
node: ">=18.0.0",
},
}),

Expand Down
2 changes: 1 addition & 1 deletion integration/hmr-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ let fixture = (options: { appPort: number; devPort: number }): FixtureInit => ({
typescript: "0.0.0-local-version",
},
engines: {
node: ">=14.0.0",
node: ">=18.0.0",
},
}),

Expand Down
2 changes: 1 addition & 1 deletion integration/server-entry-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ test.describe("Default Server Entry (React 17)", () => {
typescript: "0.0.0-local-version",
},
engines: {
node: ">=14.0.0",
node: ">=18.0.0",
},
}),
},
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,6 @@
"unist-util-visit": "^4.1.1"
},
"engines": {
"node": ">=14.0.0"
"node": ">=18.0.0"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
"dependencies": {},
"devDependencies": {},
"engines": {
"node": ">=14"
"node": ">=18.0.0"
}
}
2 changes: 1 addition & 1 deletion packages/create-remix/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"tiny-invariant": "^1.2.0"
},
"engines": {
"node": ">=14.0.0"
"node": ">=18.0.0"
},
"files": [
"dist/",
Expand Down
2 changes: 1 addition & 1 deletion packages/remix-architect/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"lambda-tester": "^4.0.1"
},
"engines": {
"node": ">=14.0.0"
"node": ">=18.0.0"
},
"files": [
"dist/",
Expand Down
2 changes: 1 addition & 1 deletion packages/remix-cloudflare-pages/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"@cloudflare/workers-types": "^4.0.0"
},
"engines": {
"node": ">=14.0.0"
"node": ">=18.0.0"
},
"files": [
"dist/",
Expand Down
2 changes: 1 addition & 1 deletion packages/remix-cloudflare-workers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"@cloudflare/workers-types": "^4.0.0"
},
"engines": {
"node": ">=14.0.0"
"node": ">=18.0.0"
},
"files": [
"dist/",
Expand Down
2 changes: 1 addition & 1 deletion packages/remix-cloudflare/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"@cloudflare/workers-types": "^4.0.0"
},
"engines": {
"node": ">=14.0.0"
"node": ">=18.0.0"
},
"files": [
"dist/",
Expand Down
2 changes: 1 addition & 1 deletion packages/remix-css-bundle/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
"module": "./dist/esm/index.js",
"typings": "./dist/index.d.ts",
"engines": {
"node": ">=14.0.0"
"node": ">=18.0.0"
}
}
2 changes: 1 addition & 1 deletion packages/remix-deno/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
"mime": "^3.0.0"
},
"engines": {
"node": ">=14.0.0"
"node": ">=18.0.0"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@
"wrangler": "^2.2.1"
},
"engines": {
"node": ">=16.13.0"
"node": ">=18.0.0"
}
}
2 changes: 1 addition & 1 deletion packages/remix-dev/__tests__/fixtures/deno/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@
"npm-run-all": "^4.1.5"
},
"engines": {
"node": ">=14.0.0"
"node": ">=18.0.0"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
"typescript": "^5.0.4"
},
"engines": {
"node": ">=14.0.0"
"node": ">=18.0.0"
}
}
2 changes: 1 addition & 1 deletion packages/remix-dev/__tests__/fixtures/node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@
"typescript": "^5.0.4"
},
"engines": {
"node": ">=14.0.0"
"node": ">=18.0.0"
}
}
2 changes: 1 addition & 1 deletion packages/remix-dev/__tests__/fixtures/stack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
"dependencies": {},
"devDependencies": {},
"engines": {
"node": ">=14.0.0"
"node": ">=18.0.0"
}
}
4 changes: 2 additions & 2 deletions packages/remix-dev/cli/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@ ${colors.logoBlue("R")} ${colors.logoGreen("E")} ${colors.logoYellow(
export async function run(argv: string[] = process.argv.slice(2)) {
// Check the node version
let versions = process.versions;
if (versions && versions.node && semver.major(versions.node) < 14) {
if (versions && versions.node && semver.major(versions.node) < 18) {
throw new Error(
`️🚨 Oops, Node v${versions.node} detected. Remix requires a Node version greater than 14.`
`️🚨 Oops, Node v${versions.node} detected. Remix requires a Node version greater than 18.`
);
}

Expand Down
2 changes: 1 addition & 1 deletion packages/remix-dev/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
}
},
"engines": {
"node": ">=14.0.0"
"node": ">=18.0.0"
},
"files": [
"dist/",
Expand Down
2 changes: 1 addition & 1 deletion packages/remix-eslint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,6 @@
}
},
"engines": {
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
"node": ">=18.0.0"
}
}
2 changes: 1 addition & 1 deletion packages/remix-express/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"express": "^4.17.1"
},
"engines": {
"node": ">=14.0.0"
"node": ">=18.0.0"
},
"files": [
"dist/",
Expand Down
2 changes: 1 addition & 1 deletion packages/remix-netlify/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"@netlify/functions": "^1.0.0"
},
"engines": {
"node": ">=14.0.0"
"node": ">=18.0.0"
},
"files": [
"dist/",
Expand Down
2 changes: 1 addition & 1 deletion packages/remix-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"@types/source-map-support": "^0.5.4"
},
"engines": {
"node": ">=14.0.0"
"node": ">=18.0.0"
},
"files": [
"dist/",
Expand Down
2 changes: 1 addition & 1 deletion packages/remix-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"react-dom": ">=16.8.0"
},
"engines": {
"node": ">=14.0.0"
"node": ">=18.0.0"
},
"files": [
"dist/",
Expand Down
2 changes: 1 addition & 1 deletion packages/remix-serve/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"@types/morgan": "^1.9.2"
},
"engines": {
"node": ">=14.0.0"
"node": ">=18.0.0"
},
"files": [
"dist/",
Expand Down
2 changes: 1 addition & 1 deletion packages/remix-server-runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"@types/set-cookie-parser": "^2.4.1"
},
"engines": {
"node": ">=14.0.0"
"node": ">=18.0.0"
},
"files": [
"dist/",
Expand Down
Loading