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

[BREAKING] chore: update minimum node version to 18 #430

Merged
merged 12 commits into from
Nov 17, 2023
7 changes: 7 additions & 0 deletions .changeset/fast-geckos-wonder.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@callstack/repack-dev-server": major
"@callstack/repack-init": major
"@callstack/repack": major
---

BREAKING CHANGE: Upgrade to Node 18, drop support for Node 16.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node_version: ['16', '18', '20']
node_version: ['18', '20']
os: [ubuntu-latest]

steps:
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ We want this community to be friendly and respectful to each other. Please read

## Requirements

- Node 14+ (__recommended Node 16+__)
- Node 18+
- Yarn 3

## Our Development Process
Expand All @@ -15,7 +15,7 @@ All development is done directly on GitHub, and all work is public.

### Development workflow

> **Working on your first pull request?** You can learn how from this *free* series: [How to Contribute to an Open Source Project on GitHub](https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github).
> **Working on your first pull request?** You can learn how from this _free_ series: [How to Contribute to an Open Source Project on GitHub](https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github).

1. Fork the repo and create your branch from default branch (usually `main`) (a guide on [how to fork a repository](https://help.github.com/articles/fork-a-repo/)).
2. Run `yarn install` to install & set up the development environment.
Expand Down
2 changes: 1 addition & 1 deletion packages/dev-server/babel.config.cjs
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,
},
modules: false,
},
Expand Down
4 changes: 2 additions & 2 deletions packages/dev-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
],
"author": "zamotany <[email protected]>",
"engines": {
"node": ">=14.x"
"node": ">=18"
},
"publishConfig": {
"registry": "https://registry.npmjs.org/",
Expand Down Expand Up @@ -66,7 +66,7 @@
"@babel/preset-typescript": "^7.17.12",
"@callstack/eslint-config": "^12.0.2",
"@types/babel__code-frame": "^7.0.3",
"@types/node": "14",
"@types/node": "18",
"@types/ws": "^8.5.3",
"babel-plugin-add-import-extension": "^1.6.0",
"eslint": "^8.16.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/init/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
],
"engineStrict": true,
"engines": {
"node": ">=16"
"node": ">=18"
},
"type": "module",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion packages/repack/babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const defaultConfig = {
'@babel/preset-env',
{
targets: {
node: 14,
node: 18,
},
// Disable CJS transform and add it manually.
// Otherwise it will replace `import(...)` with `require(...)`, which
Expand Down
5 changes: 2 additions & 3 deletions packages/repack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"author": "zamotany <[email protected]>",
"license": "MIT",
"engines": {
"node": ">=14.x"
"node": ">=18"
},
"publishConfig": {
"registry": "https://registry.npmjs.org/",
Expand Down Expand Up @@ -79,7 +79,6 @@
"react-refresh": "^0.14.0",
"schema-utils": "^3.0.0",
"shallowequal": "^1.1.0",
"string.prototype.replaceall": "^1.0.6",
"tapable": "^2.1.1"
},
"devDependencies": {
Expand All @@ -97,7 +96,7 @@
"@types/jsonwebtoken": "^9.0.0",
"@types/lodash.throttle": "^4.1.7",
"@types/mime-types": "^2.1.1",
"@types/node": "^14.14.28",
"@types/node": "^18",
"@types/react-dom": "^17.0.7",
"@types/react-native": "^0.67.8",
"@types/shallowequal": "^1.1.1",
Expand Down
1 change: 0 additions & 1 deletion packages/repack/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import './shims';
export * as plugins from './webpack/plugins';
export * from './webpack/plugins/RepackPlugin';
export * from './webpack/utils';
Expand Down
5 changes: 0 additions & 5 deletions packages/repack/src/shims.ts

This file was deleted.

4 changes: 2 additions & 2 deletions website/docs/getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ If you're already familiar with JavaScript, React Native and Webpack, then you'l

## Minimum requirements

- `react-native` >= 0.69.0
- Node >= 16 (**recommended Node 18 or newer**)
- `react-native` >= 0.70.0
- Node >= 18 (**recommended Node 20 or newer**)

If you're using older versions of React Native, you can still try using Re.Pack, but your mileage may vary as they are not officially supported.

Expand Down
34 changes: 6 additions & 28 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4855,7 +4855,7 @@ __metadata:
"@fastify/sensible": ^4.1.0
"@fastify/static": ^5.0.2
"@types/babel__code-frame": ^7.0.3
"@types/node": 14
"@types/node": 18
"@types/ws": ^8.5.3
babel-plugin-add-import-extension: ^1.6.0
eslint: ^8.16.0
Expand Down Expand Up @@ -4920,7 +4920,7 @@ __metadata:
"@types/jsonwebtoken": ^9.0.0
"@types/lodash.throttle": ^4.1.7
"@types/mime-types": ^2.1.1
"@types/node": ^14.14.28
"@types/node": ^18
"@types/react-dom": ^17.0.7
"@types/react-native": ^0.67.8
"@types/shallowequal": ^1.1.1
Expand Down Expand Up @@ -4948,7 +4948,6 @@ __metadata:
react-refresh: ^0.14.0
schema-utils: ^3.0.0
shallowequal: ^1.1.0
string.prototype.replaceall: ^1.0.6
tapable: ^2.1.1
terser-webpack-plugin: ^5.1.3
typedoc: ^0.22.17
Expand Down Expand Up @@ -9001,10 +9000,10 @@ __metadata:
languageName: node
linkType: hard

"@types/node@npm:14":
version: 14.18.18
resolution: "@types/node@npm:14.18.18"
checksum: a165225cd2603f6e62af8407449e4a4407305e03b41c1adf6b186fdf546e1a03c8214217659b5b36c556947c0c06234993ac880d4db6378136a7a810d47e0742
"@types/node@npm:18, @types/node@npm:^18":
version: 18.18.0
resolution: "@types/node@npm:18.18.0"
checksum: 61bcffa28eb713e7a4c66fd369df603369c3f834a783faeced95fe3e78903faa25f1a704d49e054f41d71b7915eeb066d10a37cc699421fcf5dd267f96ad5808
languageName: node
linkType: hard

Expand All @@ -9015,13 +9014,6 @@ __metadata:
languageName: node
linkType: hard

"@types/node@npm:^14.14.28":
version: 14.17.5
resolution: "@types/node@npm:14.17.5"
checksum: 8fba22a8df7bcea75039f08e00fcff8e331f6d367739a9631d3457bc3e8e5ddfdd60e1a5d685d9420312e9ed7cf2f2146d37224ec9f7d578fe8dd32ce3821e62
languageName: node
linkType: hard

"@types/node@npm:^16.0.0":
version: 16.11.41
resolution: "@types/node@npm:16.11.41"
Expand Down Expand Up @@ -30258,20 +30250,6 @@ __metadata:
languageName: node
linkType: hard

"string.prototype.replaceall@npm:^1.0.6":
version: 1.0.6
resolution: "string.prototype.replaceall@npm:1.0.6"
dependencies:
call-bind: ^1.0.2
define-properties: ^1.1.3
es-abstract: ^1.19.1
get-intrinsic: ^1.1.1
has-symbols: ^1.0.2
is-regex: ^1.1.4
checksum: 5020755c7bc8931fc7fb8c73b2f5b3600bbc6ce0fc1df7fef834798f6623e49b57afc2b997e83a69d50686b94b2d47304571435a6adbe59ca53c02a9ceec3422
languageName: node
linkType: hard

"string.prototype.trim@npm:^1.2.7":
version: 1.2.7
resolution: "string.prototype.trim@npm:1.2.7"
Expand Down