Skip to content

Commit

Permalink
fix(snackager): build with newer typescript syntax (#522)
Browse files Browse the repository at this point in the history
* chore(ci): define `--openssl-legacy-provider` in snackager bundle workflow

* fix(snackager): upgrade `metro-react-native-babel-preset` and babel related plugins

* fix(snackager): add missing `@babel/preset-typescript`

* chore: update lockfile and add `postinstall` script

* chore: drop postinstall script

* test(snackager): update snapshots for newer syntax and bump versions of failing packages
  • Loading branch information
byCedric committed Jan 20, 2024
1 parent 4ab2dad commit 18f0a89
Show file tree
Hide file tree
Showing 9 changed files with 3,911 additions and 391 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/snackager-bundle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ jobs:

- name: 🏗 Setup snackager
uses: ./.github/actions/setup-snackager
with:
node-version: 16.x

- name: 🛠 Bundle package
run: |
Expand All @@ -37,3 +35,5 @@ jobs:
PLATFORMS="${{ github.event.inputs.platforms }}"
yarn bundle "$NAME@$VERSION?platforms=$PLATFORMS" | yarn bunyan --level DEBUG
env:
NODE_OPTIONS: --openssl-legacy-provider
12 changes: 7 additions & 5 deletions snackager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@
"lint": "tsc --noEmit && eslint ."
},
"dependencies": {
"@babel/core": "^7.14.6",
"@babel/generator": "^7.14.5",
"@babel/plugin-proposal-export-namespace-from": "^7.17.12",
"@babel/core": "^7.23.6",
"@babel/generator": "^7.23.6",
"@babel/plugin-transform-export-namespace-from": "7.23.4",
"@babel/plugin-transform-runtime": "^7.23.6",
"@babel/preset-typescript": "^7.23.3",
"@expo/config": "^3.3.28",
"@expo/spawn-async": "^1.5.0",
"aws-sdk": "^2.487.0",
"babel-loader": "^8.2.2",
"babel-loader": "^8.2.5",
"bunyan": "^1.8.12",
"bunyan-middleware": "^1.0.0",
"cors": "^2.8.5",
Expand All @@ -34,7 +36,7 @@
"lodash": "^4.17.11",
"md5": "^2.2.1",
"memory-fs": "^0.4.1",
"metro-react-native-babel-preset": "^0.66.1",
"metro-react-native-babel-preset": "^0.76.8",
"node-fetch": "^2.6.0",
"querystring": "^0.2.0",
"raven": "^2.6.4",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Object {
"react",
"react-native",
],
"size": 51000,
"size": 54000,
},
},
"ios": Object {
Expand All @@ -60,7 +60,7 @@ Object {
"react",
"react-native",
],
"size": 48000,
"size": 51000,
},
},
"web": Object {
Expand All @@ -69,7 +69,7 @@ Object {
"react",
"react-native",
],
"size": 108000,
"size": 111000,
},
},
},
Expand Down Expand Up @@ -152,7 +152,7 @@ Object {
"react-native-safe-area-context",
"react-native-screens",
],
"size": 90000,
"size": 105000,
},
},
"ios": Object {
Expand Down Expand Up @@ -185,7 +185,7 @@ Object {
"react-native-safe-area-context",
"react-native-screens",
],
"size": 90000,
"size": 105000,
},
},
"web": Object {
Expand All @@ -204,7 +204,7 @@ Object {
"react-native-safe-area-context",
"react-native-screens",
],
"size": 99000,
"size": 114000,
},
},
},
Expand Down Expand Up @@ -235,7 +235,7 @@ Object {
"react-native/Libraries/Core/Devtools/symbolicateStackTrace",
"react-native/Libraries/Utilities/PolyfillFunctions",
],
"size": 312000,
"size": 303000,
},
},
"ios": Object {
Expand All @@ -248,7 +248,7 @@ Object {
"react-native/Libraries/Core/Devtools/symbolicateStackTrace",
"react-native/Libraries/Utilities/PolyfillFunctions",
],
"size": 312000,
"size": 303000,
},
},
"web": Object {
Expand All @@ -261,7 +261,7 @@ Object {
"react-native/Libraries/Core/Devtools/symbolicateStackTrace",
"react-native/Libraries/Utilities/PolyfillFunctions",
],
"size": 312000,
"size": 303000,
},
},
},
Expand Down Expand Up @@ -360,7 +360,7 @@ Object {
"react-native",
"react-native/Libraries/Renderer/shims/ReactNative",
],
"size": 432000,
"size": 423000,
},
},
"ios": Object {
Expand All @@ -370,7 +370,7 @@ Object {
"react-native",
"react-native/Libraries/Renderer/shims/ReactNative",
],
"size": 432000,
"size": 423000,
},
},
"web": Object {
Expand All @@ -379,7 +379,7 @@ Object {
"react",
"react-native",
],
"size": 420000,
"size": 414000,
},
},
},
Expand Down Expand Up @@ -450,17 +450,19 @@ Object {
"react",
"react-native",
"react-native/Libraries/BatchedBridge/BatchedBridge",
"react-native/Libraries/Utilities/codegenNativeCommands",
],
"size": 9000,
"size": 453000,
},
},
"ios": Object {
"bundle.js": Object {
"externals": Array [
"react",
"react-native",
"react-native/Libraries/Utilities/codegenNativeCommands",
],
"size": 9000,
"size": 459000,
},
},
"web": Object {
Expand All @@ -475,9 +477,10 @@ Object {
},
"name": "react-native-webview",
"peerDependencies": Object {
"react-native": "0.64.0",
"react": "*",
"react-native": "*",
},
"version": "10.9.1",
"version": "13.2.2",
}
`;

Expand Down Expand Up @@ -508,7 +511,7 @@ Object {
"react",
"react-native",
],
"size": 90000,
"size": 93000,
},
},
},
Expand Down Expand Up @@ -560,7 +563,7 @@ Object {
"expo-constants",
"react-native",
],
"size": 12000,
"size": 6000,
},
},
"ios": Object {
Expand All @@ -571,7 +574,7 @@ Object {
"expo-constants",
"react-native",
],
"size": 12000,
"size": 6000,
},
},
"web": Object {
Expand All @@ -582,7 +585,7 @@ Object {
"expo-constants",
"react-native",
],
"size": 12000,
"size": 6000,
},
},
},
Expand Down Expand Up @@ -684,7 +687,7 @@ Object {
"react-native-gesture-handler/DrawerLayout",
"react-native-screens",
],
"size": 201000,
"size": 219000,
},
},
},
Expand All @@ -706,7 +709,7 @@ Object {
"externals": Array [
"react-native",
],
"size": 12000,
"size": 3000,
},
},
"ios": Object {
Expand Down Expand Up @@ -745,38 +748,35 @@ Object {
"externals": Array [
"react",
"react-native",
"react-native/Libraries/Utilities/dismissKeyboard",
],
"size": 3000,
"size": 6000,
},
},
"ios": Object {
"bundle.js": Object {
"externals": Array [
"react",
"react-native",
"react-native/Libraries/Utilities/dismissKeyboard",
],
"size": 3000,
"size": 6000,
},
},
"web": Object {
"bundle.js": Object {
"externals": Array [
"react",
"react-native",
"react-native/Libraries/Utilities/dismissKeyboard",
],
"size": 3000,
"size": 6000,
},
},
},
"name": "@react-native-community/viewpager",
"peerDependencies": Object {
"react": "16.0.0",
"react-native": "^0.57.0",
"react": "*",
"react-native": "*",
},
"version": "4.2.0",
"version": "5.0.11",
}
`;

Expand Down

This file was deleted.

Loading

0 comments on commit 18f0a89

Please sign in to comment.