diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2a9d89556..a663b485d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,10 +12,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - name: Use Node.js 20 + - name: Use Node.js 22 uses: actions/setup-node@v3 with: - node-version: 20 + node-version: 22 cache: yarn - name: Install dependencies run: yarn --frozen-lockfile @@ -27,7 +27,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node-version: [18, 20] + node-version: [20, 22] steps: - uses: actions/checkout@v3 - name: Use Node.js ${{ matrix.node-version }} @@ -44,7 +44,7 @@ jobs: name: E2E Tests strategy: matrix: - node-version: [18, 20] + node-version: [20, 22] os: [ubuntu-latest, macos-latest] runs-on: ${{ matrix.os }} defaults: diff --git a/__e2e__/__snapshots__/config.test.ts.snap b/__e2e__/__snapshots__/config.test.ts.snap index 73d1798dc..0faf89071 100644 --- a/__e2e__/__snapshots__/config.test.ts.snap +++ b/__e2e__/__snapshots__/config.test.ts.snap @@ -5,7 +5,36 @@ exports[`shows up current config without unnecessary output 1`] = ` "root": "<>/TestProject", "reactNativePath": "<>/TestProject/node_modules/react-native", "reactNativeVersion": "<>", - "dependencies": {}, + "dependencies": { + "react-native-safe-area-context": { + "root": "<>/TestProject/node_modules/react-native-safe-area-context", + "name": "react-native-safe-area-context", + "platforms": { + "ios": { + "podspecPath": "<>/TestProject/node_modules/react-native-safe-area-context/react-native-safe-area-context.podspec", + "version": "5.6.1", + "configurations": [], + "scriptPhases": [] + }, + "android": { + "sourceDir": "<>/TestProject/node_modules/react-native-safe-area-context/android", + "packageImportPath": "import com.th3rdwave.safeareacontext.SafeAreaContextPackage;", + "packageInstance": "new SafeAreaContextPackage()", + "buildTypes": [], + "libraryName": "safeareacontext", + "componentDescriptors": [ + "RNCSafeAreaProviderComponentDescriptor", + "RNCSafeAreaViewComponentDescriptor" + ], + "cmakeListsPath": "<>/TestProject/node_modules/react-native-safe-area-context/android/src/main/jni/CMakeLists.txt", + "cxxModuleCMakeListsModuleName": null, + "cxxModuleCMakeListsPath": null, + "cxxModuleHeaderName": null, + "isPureCxxDependency": false + } + } + } + }, "commands": [ { "name": "bundle", diff --git a/__e2e__/config.test.ts b/__e2e__/config.test.ts index 4b7e6b1ad..724c9c210 100644 --- a/__e2e__/config.test.ts +++ b/__e2e__/config.test.ts @@ -199,9 +199,7 @@ test('should fail if using require() in ES module in react-native.config.mjs', ( 'test-command-esm', ]); expect(stderr).toMatch('error Failed to load configuration of your project'); - expect(stdout).toMatch( - 'ReferenceError: require is not defined in ES module scope, you can use import instead', - ); + expect(stdout).toMatch(/Cannot require\(\) ES Module/); }); test('should fail if using require() in ES module with "type": "module" in package.json', () => { diff --git a/package.json b/package.json index bae3b2680..0980069c2 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ "@react-native-community/eslint-config": "^3.2.0", "@types/glob": "^7.1.1", "@types/jest": "^26.0.15", - "@types/node": "^18.0.0", + "@types/node": "^20.0.0", "babel-jest": "^26.6.2", "babel-plugin-module-resolver": "^3.2.0", "chalk": "^4.1.2", @@ -55,9 +55,6 @@ "string-length": "^2.0.0", "typescript": "^5.2.0" }, - "resolutions": { - "@types/node": "^18.0.0" - }, "lint-staged": { "./packages/**/*.ts": [ "yarn lint" diff --git a/packages/cli-tools/package.json b/packages/cli-tools/package.json index 4baa9b8d4..8f0e68a87 100644 --- a/packages/cli-tools/package.json +++ b/packages/cli-tools/package.json @@ -21,7 +21,7 @@ "devDependencies": { "@react-native-community/cli-types": "20.0.0", "@types/mime": "^2.0.1", - "@types/node": "^18.0.0", + "@types/node": "^20.0.0", "@types/prompts": "^2.4.4", "@types/shell-quote": "^1.7.1" }, diff --git a/packages/cli/package.json b/packages/cli/package.json index 75faa120d..8fa8a6b1c 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -18,7 +18,7 @@ ], "engineStrict": true, "engines": { - "node": ">=18" + "node": ">=20.19.4" }, "jest": { "testEnvironment": "node" diff --git a/yarn.lock b/yarn.lock index b298d7b3f..35e62f0f4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2236,13 +2236,20 @@ resolved "https://registry.yarnpkg.com/@types/minimist/-/minimist-1.2.0.tgz#69a23a3ad29caf0097f06eda59b361ee2f0639f6" integrity sha1-aaI6OtKcrwCX8G7aWbNh7i8GOfY= -"@types/node@*", "@types/node@^18.0.0": +"@types/node@*": version "18.19.31" resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.31.tgz#b7d4a00f7cb826b60a543cebdbda5d189aaecdcd" integrity sha512-ArgCD39YpyyrtFKIqMDvjz79jto5fcI/SVUs2HwB+f0dAzq68yqOdyaSivLiLugSziTpNXLQrVb7RZFmdZzbhA== dependencies: undici-types "~5.26.4" +"@types/node@^20.0.0": + version "20.19.11" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.19.11.tgz#728cab53092bd5f143beed7fbba7ba99de3c16c4" + integrity sha512-uug3FEEGv0r+jrecvUUpbY8lLisvIjg6AAic6a2bSP5OEOLeJsDSnvhCDov7ipFFMXS3orMpzlmi0ZcuGkBbow== + dependencies: + undici-types "~6.21.0" + "@types/normalize-package-data@^2.4.0": version "2.4.0" resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz#e486d0d97396d79beedd0a6e33f4534ff6b4973e" @@ -10330,6 +10337,11 @@ undici-types@~5.26.4: resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== +undici-types@~6.21.0: + version "6.21.0" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.21.0.tgz#691d00af3909be93a7faa13be61b3a5b50ef12cb" + integrity sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ== + unicode-canonical-property-names-ecmascript@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz#301acdc525631670d39f6146e0e77ff6bbdebddc"