diff --git a/configure.ts b/configure.ts index 15343a4..9a2df1a 100644 --- a/configure.ts +++ b/configure.ts @@ -75,15 +75,8 @@ export const configureTsConfig = () => { // Ignored } - // Base package in our setup is ESM, type: module. if (typeof configuration.compilerOptions.module === 'undefined') { - configuration.compilerOptions.module = 'NodeNext' - } - - // Avoid the need to add (.js) file endings (already handled by Metro bundler). - // Currently set to NodeNext in official React Native TypeScript Configuration. - if (typeof configuration.compilerOptions.moduleResolution === 'undefined') { - configuration.compilerOptions.moduleResolution = 'node' + configuration.compilerOptions.module = 'ESNext' // RN default is ES2015?? } writeFileSync(tsconfigPath, JSON.stringify(configuration, null, 2)) diff --git a/template/app/package.json b/template/app/package.json index 8afb6fb..efed569 100644 --- a/template/app/package.json +++ b/template/app/package.json @@ -21,7 +21,7 @@ }, "devDependencies": { "@testing-library/jest-native": "^5.4.3", - "@testing-library/react-native": "^12.5.3", + "@testing-library/react-native": "^12.6.0", "@types/jest": "^29.5.12", "@types/react": "^18.3.3", "@types/react-native": "^0.73.0", @@ -29,7 +29,7 @@ "babel-jest": "^29.7.0", "icon-numic-plugin": "^1.4.4", "jest": "^29.7.0", - "numic": "^2.3.0", + "numic": "^2.4.1", "react-test-renderer": "^18.3.1", "typescript": "^5.5.4" }, diff --git a/template/app/tsconfig.json b/template/app/tsconfig.json index 500c354..f225cde 100644 --- a/template/app/tsconfig.json +++ b/template/app/tsconfig.json @@ -1,7 +1,7 @@ { "extends": "@react-native/typescript-config/tsconfig.json", "compilerOptions": { + "strict": false, "module": "ESNext" } } - \ No newline at end of file diff --git a/template/default/package.json b/template/default/package.json index 699ecbe..064ae53 100644 --- a/template/default/package.json +++ b/template/default/package.json @@ -24,7 +24,7 @@ "babel-jest": "^29.7.0", "icon-numic-plugin": "^1.4.4", "jest": "^29.7.0", - "numic": "^2.3.0", + "numic": "^2.4.1", "react-test-renderer": "18.2.0", "typescript": "^5.5.4" }, diff --git a/test/configuration.test.ts b/test/configuration.test.ts index a68f71b..96a4f8d 100644 --- a/test/configuration.test.ts +++ b/test/configuration.test.ts @@ -271,8 +271,8 @@ test('Extended tsconfig properties are removed.', async () => { // Always extend RN template config. expect(tsconfigContents.extends).toBe('@react-native/typescript-config/tsconfig.json') // Always added. - expect(tsconfigContents.compilerOptions.module).toBe('NodeNext') - expect(tsconfigContents.compilerOptions.moduleResolution).toBe('node') + expect(tsconfigContents.compilerOptions.module).toBe('ESNext') + expect(tsconfigContents.compilerOptions.moduleResolution).toBe(undefined) expect(tsconfigContents.compilerOptions.skipLibCheck).toBe(true) // Extended excludes removed. expect(tsconfigContents.exclude).toEqual(['node_modules', 'my-stuff']) @@ -309,7 +309,7 @@ test('tsconfig from package.json is merged in.', async () => { expect(tsconfigContents.extends).toBe('@react-native/typescript-config/tsconfig.json') // Always added. expect(tsconfigContents.compilerOptions.skipLibCheck).toBe(false) - expect(tsconfigContents.compilerOptions.moduleResolution).toBe('node') + expect(tsconfigContents.compilerOptions.moduleResolution).toBe(undefined) expect(tsconfigContents.include).toEqual(['global.d.ts']) expect(tsconfigContents.compilerOptions.module).toBe('esm') })