Skip to content

Commit

Permalink
refactor(config-types): replace @expo/babel-preset-cli with `expo-m…
Browse files Browse the repository at this point in the history
…odule-scripts` (expo#25426)

~~⚠️ On hold until all listed PRs are merged.~~ → ✅

~~⚠️ On hold until expo#25458 is merged.~~
→ ✅ merged & (re)based

# Why

We are deprecating the `@expo/babel-preset-cli`, and that means that
other packages need to move over to `expo-module-scripts`.

This is the final PR to get rid of `@expo/babel-preset-cli` from this
repository. But, as this is the only package adding this library to this
monorepo, _**we need to merge this as last one**_. Otherwise, all other
packages using `@expo/babel-preset-cli` will not install this package.

Other clean-up PRs:

- expo#25416
- expo#25417
- expo#25418
- expo#25420
- expo#25421
- expo#25422
- expo#25423
- expo#25424
- expo#25425

# How

- Added `expo-module-scripts@^3.3.0` to `devDependencies`
- Replaced **package.json** scripts with `expo-module-scripts`
equivalents

# Test Plan

See if CI passes.

# Checklist

<!--
Please check the appropriate items below if they apply to your diff.
This is required for changes to Expo modules.
-->

- [x] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [ ] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [ ] This diff will work correctly for `npx expo prebuild` & EAS Build
(eg: updated a module plugin).
  • Loading branch information
byCedric authored Nov 23, 2023
1 parent b94b06d commit e7d6a19
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
2 changes: 2 additions & 0 deletions packages/@expo/config-types/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// @generated by expo-module-scripts
module.exports = require('expo-module-scripts/eslintrc.base.js');
16 changes: 9 additions & 7 deletions packages/@expo/config-types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@
"types": "build/ExpoConfig.d.ts",
"main": "build/ExpoConfig.js",
"scripts": {
"watch": "tsc --watch --preserveWatchOutput",
"build": "tsc",
"build": "expo-module tsc",
"clean": "expo-module clean",
"generate": "ts-node ./scripts/generate.ts",
"prepare": "yarn run clean && yarn build",
"clean": "rimraf build ./tsconfig.tsbuildinfo",
"lint": "eslint . && npx prettier --write src/ExpoConfig.ts",
"test": "jest"
"lint": "expo-module lint",
"prepare": "expo-module clean && expo-module tsc",
"prepublishOnly": "expo-module prepublishOnly",
"test": "expo-module test",
"typecheck": "expo-module typecheck",
"watch": "expo-module tsc --watch --preserveWatchOutput"
},
"repository": {
"type": "git",
Expand All @@ -35,7 +37,7 @@
"build"
],
"devDependencies": {
"@expo/babel-preset-cli": "^0.2.24",
"expo-module-scripts": "^3.3.0",
"json-schema-to-typescript": "^10.0.0",
"ts-node": "^10.9.1"
},
Expand Down

0 comments on commit e7d6a19

Please sign in to comment.