Skip to content
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
8 changes: 4 additions & 4 deletions packages/create-react-native-library/src/constants.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export const FALLBACK_BOB_VERSION = '0.41.0';
export const FALLBACK_NITRO_MODULES_VERSION = '0.35.3';
export const FALLBACK_BOB_VERSION = '0.43.0';
export const FALLBACK_NITRO_MODULES_VERSION = '0.36.5';
export const SUPPORTED_MONOREPO_CONFIG_VERSION = '0.4.0';
export const SUPPORTED_REACT_NATIVE_VERSION = '0.85.0';
export const SUPPORTED_EXPO_SDK_VERSION = '55';
export const SUPPORTED_REACT_NATIVE_VERSION = '0.86.2';
export const SUPPORTED_EXPO_SDK_VERSION = '57';
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ const PACKAGES_TO_REMOVE = [
];

const PACKAGES_TO_ADD_EXPO_WEB = {
'@expo/metro-runtime': '~5.0.4',
'react-native-web': '~0.21.1',
'@expo/metro-runtime': '~57.0.8',
'react-native-web': '~0.21.0',
};

const PACKAGES_TO_ADD_DEV_EXPO_NATIVE = {
'expo-dev-client': '~5.0.3',
'expo-dev-client': '~57.0.10',
};

async function fetchReactNativeVersion(version: string) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,16 +70,16 @@
},
"devDependencies": {
<% if (project.cpp) { -%>
"@react-native-community/cli": "^20.1.2",
"@react-native-community/cli": "20.2.0",
<% } -%>
"@react-native/babel-preset": "0.85.0",
"@react-native/babel-preset": "0.86.2",
"@types/react": "^19.2.0",
"del-cli": "^7.0.0",
<% if (project.moduleConfig === 'nitro-modules' || project.viewConfig === 'nitro-view') { -%>
"nitrogen": "^<%- versions.nitro %>",
<% } -%>
"react": "19.2.3",
"react-native": "0.85.0",
"react-native": "0.86.2",
"react-native-builder-bob": "^<%- versions.bob %>",
<% if (project.moduleConfig === 'nitro-modules' || project.viewConfig === 'nitro-view') { -%>
"react-native-nitro-modules": "^<%- versions.nitro %>",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
},
"devDependencies": {
"@eslint/compat": "^2.1.0",
"@eslint/eslintrc": "^3.3.5",
"@eslint/js": "^10.0.1",
"@react-native/eslint-config": "0.85.0",
"eslint": "^9.39.4",
"@eslint/eslintrc": "^3.3.6",
"@eslint/js": "^9.39.5",
"@react-native/eslint-config": "0.86.2",
"eslint": "^9.39.5",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-ft-flow": "^3.0.11",
"eslint-plugin-prettier": "^5.5.6",
"prettier": "^3.8.3"
"prettier": "^3.9.6"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
]
},
"devDependencies": {
"@react-native/jest-preset": "0.85.0",
"@react-native/jest-preset": "0.86.2",
"@jest/globals": "^29.7.0",
"jest": "^29.7.0"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"extends": ["@commitlint/config-conventional"]
},
"devDependencies": {
"@commitlint/config-conventional": "^21.0.2",
"commitlint": "^21.0.2",
"lefthook": "^2.1.9"
"@commitlint/config-conventional": "^21.2.0",
"commitlint": "^21.2.1",
"lefthook": "^2.1.10"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
}
},
"devDependencies": {
"@release-it/conventional-changelog": "^11.0.1",
"release-it": "^20.2.0"
"@release-it/conventional-changelog": "^12.0.0",
"release-it": "^21.0.1"
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"devDependencies": {
"turbo": "^2.9.16"
"turbo": "^2.10.8"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
"react-native-web": "~0.21.2"
},
"devDependencies": {
"@vitejs/plugin-react": "^5.0.0",
"vite": "^7.1.1",
"@vitejs/plugin-react": "^5.2.0",
"vite": "^7.3.6",
"vite-plugin-commonjs": "^0.10.4"
}
}
33 changes: 22 additions & 11 deletions scripts/upgrade-template-deps.mts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ const IGNORED_PACKAGES = [
/^@react-native\//,
];

const REACT_NATIVE_PACKAGE_REGEX = /^@react-native\//;

function readDevDependencies(filePath: string) {
const pkg = JSON.parse(fs.readFileSync(filePath, 'utf8')) as PackageJson;

Expand All @@ -41,9 +43,11 @@ function getDependencyChanges(

for (const [name, ncuVersion] of Object.entries(ncuDeps)) {
if (isIgnoredPackage(name)) {
// Sync the CLI-generated version back to the template, not the ncu upgrade.
// updateDeps will skip if the template already has this version.
changes[name] = { from: '', to: generatedDeps[name] ?? ncuVersion };
const generatedVersion = REACT_NATIVE_PACKAGE_REGEX.test(name)
? generatedDeps['react-native']
: generatedDeps[name];

changes[name] = { from: '', to: generatedVersion ?? ncuVersion };
} else if (generatedDeps[name] !== ncuVersion) {
changes[name] = { from: generatedDeps[name] ?? '', to: ncuVersion };
}
Expand Down Expand Up @@ -128,10 +132,12 @@ function main() {
'bob-upgrade-test',
'--description',
'test',
'--author-name',
'test',
'--type',
'turbo-module',
'--languages',
'kotlin-objc',
'cpp',
'--example',
'vanilla',
'--yes',
Expand All @@ -142,17 +148,22 @@ function main() {
}
);

const pkgPath = path.join(libDir, 'package.json');
const generatedDeps = readDevDependencies(pkgPath);
const pkgPaths = [
path.join(libDir, 'example', 'package.json'),
path.join(libDir, 'package.json'),
];
const generatedDeps = Object.assign({}, ...pkgPaths.map(readDevDependencies));

console.log('\nChecking for dependency upgrades...');

execSync('npx npm-check-updates -u', {
cwd: libDir,
stdio: 'inherit',
});
for (const pkgPath of pkgPaths) {
execSync('npx npm-check-updates -u', {
cwd: path.dirname(pkgPath),
stdio: 'inherit',
});
}

const ncuDeps = readDevDependencies(pkgPath);
const ncuDeps = Object.assign({}, ...pkgPaths.map(readDevDependencies));
const changes = getDependencyChanges(generatedDeps, ncuDeps);

if (Object.keys(changes).length === 0) {
Expand Down
Loading