Skip to content

Commit

Permalink
fix(template): update app dependencies and remove debug statements
Browse files Browse the repository at this point in the history
Release action should no longer require custom npm version as current node LTS on GitHub actions comes with npm > 9.5. release-npm
  • Loading branch information
tobua committed Oct 22, 2023
1 parent 3cb2f1e commit b383444
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 23 deletions.
1 change: 0 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ jobs:
run: npm test
- name: 🚧 Build
run: npm run build
- run: npm install -g npm@latest
- uses: tobua/release-npm-action@v2
with:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,7 @@
"sideEffects": true,
"main": "dist/index.js",
"exports": {
".": "./dist/index.js",
"./package.json": "./package.json"
".": "./dist/index.js"
},
"bin": "./dist/index.js",
"types": "./dist/index.d.ts",
Expand Down
8 changes: 2 additions & 6 deletions template-cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,13 @@ const removeExpiredTemplates = (version: string) => {
// TODO Remove appNames if more than 10, by statSync => atimeMs (access time)

templateVersions.forEach((templateVersion) =>
rmSync(join(cacheDirectory, templateVersion), { recursive: true })
rmSync(join(cacheDirectory, templateVersion), { recursive: true }),
)
}

export const cacheTemplate = (nativeOptions: NativeOptions) => {
const directory = join(cacheDirectory, nativeOptions.version, nativeOptions.appName)

console.log(directory)

removeExpiredTemplates(nativeOptions.version)

if (existsSync(directory)) {
Expand All @@ -51,11 +49,9 @@ export const cacheTemplate = (nativeOptions: NativeOptions) => {
encoding: 'utf8',
// Write output to console if in debug mode.
stdio: nativeOptions.debug ? 'inherit' : 'pipe',
}
},
)
} catch (error) {
console.log(error)
console.log(error.stdout)
log(`Failed to install React Native template.\n\n${error.stdout}`, 'warning')
}

Expand Down
14 changes: 7 additions & 7 deletions template/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
}
},
"dependencies": {
"epic-language": "^0.3.0",
"epic-language": "^0.4.0",
"mobx": "^6.10.2",
"mobx-react-lite": "^4.0.5",
"react": "^18.2.0",
"react-native": "^0.72.5",
"react-native": "^0.72.6",
"reactigation": "^4.0.1",
"responsive-react-native": "^1.0.1"
},
Expand All @@ -27,13 +27,13 @@
"@testing-library/jest-native": "^5.4.3",
"@testing-library/react-native": "^12.3.0",
"@tsconfig/react-native": "^3.0.2",
"@types/jest": "^29.5.5",
"@types/react-native": "^0.72.3",
"@typescript-eslint/eslint-plugin": "^6.7.5",
"@typescript-eslint/parser": "^6.7.5",
"@types/jest": "^29.5.6",
"@types/react-native": "^0.72.5",
"@typescript-eslint/eslint-plugin": "^6.8.0",
"@typescript-eslint/parser": "^6.8.0",
"android-sdk-numic-plugin": "^1.0.3",
"babel-jest": "^29.7.0",
"eslint": "^8.51.0",
"eslint": "^8.52.0",
"eslint-plugin-prettier": "^5.0.1",
"icon-numic-plugin": "^1.4.3",
"jest": "^29.7.0",
Expand Down
14 changes: 7 additions & 7 deletions template/default/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,20 @@
},
"dependencies": {
"react": "^18.2.0",
"react-native": "^0.72.5"
"react-native": "^0.72.6"
},
"type": "module",
"devDependencies": {
"@react-native/eslint-config": "^0.74.0",
"@tsconfig/react-native": "^3.0.2",
"@types/jest": "^29.5.5",
"@types/react-native": "^0.72.3",
"@types/react-test-renderer": "^18.0.3",
"@typescript-eslint/eslint-plugin": "^6.7.5",
"@typescript-eslint/parser": "^6.7.5",
"@types/jest": "^29.5.6",
"@types/react-native": "^0.72.5",
"@types/react-test-renderer": "^18.0.5",
"@typescript-eslint/eslint-plugin": "^6.8.0",
"@typescript-eslint/parser": "^6.8.0",
"android-sdk-numic-plugin": "^1.0.3",
"babel-jest": "^29.7.0",
"eslint": "^8.51.0",
"eslint": "^8.52.0",
"eslint-plugin-prettier": "^5.0.1",
"icon-numic-plugin": "^1.4.3",
"jest": "^29.7.0",
Expand Down

1 comment on commit b383444

@vercel
Copy link

@vercel vercel bot commented on b383444 Oct 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

numic – ./

numic.vercel.app
numic-tobua.vercel.app
numic-git-main-tobua.vercel.app

Please sign in to comment.