From e7d6a19ee444469f07731a1c76780c2a771394a1 Mon Sep 17 00:00:00 2001 From: Cedric van Putten Date: Thu, 23 Nov 2023 11:06:15 +0100 Subject: [PATCH] refactor(config-types): replace `@expo/babel-preset-cli` with `expo-module-scripts` (#25426) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ~~⚠️ On hold until all listed PRs are merged.~~ → ✅ ~~⚠️ On hold until https://github.com/expo/expo/pull/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: - https://github.com/expo/expo/pull/25416 - https://github.com/expo/expo/pull/25417 - https://github.com/expo/expo/pull/25418 - https://github.com/expo/expo/pull/25420 - https://github.com/expo/expo/pull/25421 - https://github.com/expo/expo/pull/25422 - https://github.com/expo/expo/pull/25423 - https://github.com/expo/expo/pull/25424 - https://github.com/expo/expo/pull/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 - [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). --- packages/@expo/config-types/.eslintrc.js | 2 ++ packages/@expo/config-types/package.json | 16 +++++++++------- 2 files changed, 11 insertions(+), 7 deletions(-) create mode 100644 packages/@expo/config-types/.eslintrc.js diff --git a/packages/@expo/config-types/.eslintrc.js b/packages/@expo/config-types/.eslintrc.js new file mode 100644 index 00000000000000..2720197860feb8 --- /dev/null +++ b/packages/@expo/config-types/.eslintrc.js @@ -0,0 +1,2 @@ +// @generated by expo-module-scripts +module.exports = require('expo-module-scripts/eslintrc.base.js'); diff --git a/packages/@expo/config-types/package.json b/packages/@expo/config-types/package.json index 7dd0590ad9a5c3..b88e9c64c2672c 100644 --- a/packages/@expo/config-types/package.json +++ b/packages/@expo/config-types/package.json @@ -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", @@ -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" },