expo-module-scripts 3.3.0 → 3.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -10,6 +10,19 @@
10
10
 
11
11
  ### 💡 Others
12
12
 
13
+ ## 3.4.1 — 2024-02-01
14
+
15
+ ### 🐛 Bug fixes
16
+
17
+ - Use `node18` tsconfig in `expo-module-scripts` to match the dependencies. ([#26738](https://github.com/expo/expo/pull/26738)) by ([@krystofwoldrich](https://github.com/krystofwoldrich))
18
+
19
+ ## 3.4.0 — 2023-12-12
20
+
21
+ ### 🎉 New features
22
+
23
+ - Add Node-specific Babel and Jest configurations. ([#25458](https://github.com/expo/expo/pull/25458) by [@byCedric](https://github.com/byCedric))
24
+ - Add Node override in ESLint config for root configuraiton files. ([#25767](https://github.com/expo/expo/pull/25767) by [@byCedric](https://github.com/byCedric))
25
+
13
26
  ## 3.3.0 — 2023-11-14
14
27
 
15
28
  ### 🐛 Bug fixes
@@ -1,4 +1,4 @@
1
- module.exports = function(api) {
1
+ module.exports = function (api) {
2
2
  api.cache(true);
3
3
  return {
4
4
  presets: ['babel-preset-expo'],
@@ -0,0 +1,27 @@
1
+ module.exports = function (api) {
2
+ api.cache(true);
3
+ return {
4
+ presets: [
5
+ [
6
+ require('@babel/preset-env'),
7
+ {
8
+ modules: false, // Disable the default `modules-commonjs`, to enable lazy evaluation
9
+ targets: {
10
+ node: '12.0.0',
11
+ },
12
+ },
13
+ ],
14
+ require('@babel/preset-typescript'),
15
+ ],
16
+ plugins: [
17
+ require('babel-plugin-dynamic-import-node'),
18
+ require('@babel/plugin-proposal-export-namespace-from'),
19
+ [
20
+ require('@babel/plugin-transform-modules-commonjs'),
21
+ {
22
+ lazy: /* istanbul ignore next */ (source) => true,
23
+ },
24
+ ],
25
+ ],
26
+ };
27
+ };
@@ -1,6 +1,6 @@
1
- module.exports = function(api) {
1
+ module.exports = function (api) {
2
2
  api.cache(true);
3
3
  return {
4
- plugins: ['@babel/plugin-transform-flow-strip-types'],
4
+ plugins: ['@babel/plugin-transform-flow-strip-types'],
5
5
  };
6
6
  };
package/eslintrc.base.js CHANGED
@@ -7,6 +7,10 @@ module.exports = {
7
7
  env: { node: true },
8
8
  globals: { __DEV__: true },
9
9
  },
10
+ {
11
+ files: ['./*.config.js', './.*rc.js'],
12
+ extends: ['universe/node'],
13
+ },
10
14
  ],
11
15
  rules: {
12
16
  'no-restricted-imports': [
@@ -0,0 +1,12 @@
1
+ /** @type {import('jest').Config} */
2
+ module.exports = {
3
+ testEnvironment: 'node',
4
+ testRegex: '/__tests__/.*(test|spec)\\.[jt]sx?$',
5
+ transform: {
6
+ '^.+\\.[jt]sx?$': ['babel-jest', { configFile: require.resolve('./babel.config.cli.js') }],
7
+ },
8
+ watchPlugins: [
9
+ require.resolve('jest-watch-typeahead/filename'),
10
+ require.resolve('jest-watch-typeahead/testname'),
11
+ ],
12
+ };
@@ -1,4 +1,5 @@
1
- const nodePreset = {
1
+ /** @type {import('jest').Config} */
2
+ module.exports = {
2
3
  testEnvironment: 'node',
3
4
  testRegex: '/__tests__/.*(test|spec)\\.[jt]sx?$',
4
5
  transform: {
@@ -9,5 +10,3 @@ const nodePreset = {
9
10
  require.resolve('jest-watch-typeahead/testname'),
10
11
  ],
11
12
  };
12
-
13
- module.exports = nodePreset;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-module-scripts",
3
- "version": "3.3.0",
3
+ "version": "3.4.1",
4
4
  "description": "A private package for various tasks for Expo module packages like compiling and testing",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -27,11 +27,15 @@
27
27
  "homepage": "https://github.com/expo/expo/tree/main/packages/expo-module-scripts#readme",
28
28
  "dependencies": {
29
29
  "@babel/cli": "^7.1.2",
30
+ "@babel/plugin-proposal-export-namespace-from": "^7.18.9",
31
+ "@babel/preset-env": "^7.20.2",
32
+ "@babel/preset-typescript": "^7.12.12",
30
33
  "@expo/npm-proofread": "^1.0.1",
31
34
  "@testing-library/react-hooks": "^7.0.1",
32
35
  "@tsconfig/node18": "^18.2.2",
33
36
  "@types/jest": "^29.2.1",
34
- "babel-preset-expo": "~9.9.0",
37
+ "babel-plugin-dynamic-import-node": "^2.3.3",
38
+ "babel-preset-expo": "~10.0.0",
35
39
  "commander": "^2.19.0",
36
40
  "eslint-config-universe": "^12.0.0",
37
41
  "find-yarn-workspace-root": "^2.0.0",
@@ -41,5 +45,5 @@
41
45
  "ts-jest": "~29.0.4",
42
46
  "typescript": "^5.1.3"
43
47
  },
44
- "gitHead": "3142a086578deffd8704a8f1b6f0f661527d836c"
48
+ "gitHead": "9e4890b069b18598ea429734b5114b40e3afeabb"
45
49
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "extends": "@tsconfig/node14/tsconfig.json",
2
+ "extends": "@tsconfig/node18/tsconfig.json",
3
3
  "compilerOptions": {
4
4
  "declaration": true
5
5
  }