@react-native/metro-babel-transformer 0.73.8 → 0.73.10

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/BUCK ADDED
@@ -0,0 +1,16 @@
1
+ load("@fbsource//tools/build_defs/third_party:yarn_defs.bzl", "yarn_workspace")
2
+
3
+ oncall("react_native")
4
+
5
+ yarn_workspace(
6
+ name = "yarn-workspace",
7
+ srcs = glob(
8
+ ["src/**/*.js"],
9
+ exclude = [
10
+ "**/__fixtures__/**",
11
+ "**/__mocks__/**",
12
+ "**/__tests__/**",
13
+ ],
14
+ ),
15
+ visibility = ["PUBLIC"],
16
+ )
package/index.flow.js ADDED
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ * @format
8
+ * @oncall react_native
9
+ */
10
+
11
+ export * from './src';
package/package.json CHANGED
@@ -1,14 +1,11 @@
1
1
  {
2
2
  "name": "@react-native/metro-babel-transformer",
3
- "version": "0.73.8",
3
+ "version": "0.73.10",
4
4
  "description": "Babel transformer for React Native applications.",
5
5
  "exports": {
6
6
  ".": "./src/index.js",
7
7
  "./package.json": "./package.json"
8
8
  },
9
- "files": [
10
- "src"
11
- ],
12
9
  "repository": {
13
10
  "type": "git",
14
11
  "url": "git@github.com:facebook/react-native.git",
@@ -24,7 +21,7 @@
24
21
  "@babel/core": "^7.20.0",
25
22
  "@react-native/babel-preset": "*",
26
23
  "babel-preset-fbjs": "^3.4.0",
27
- "hermes-parser": "0.14.0",
24
+ "hermes-parser": "0.15.0",
28
25
  "nullthrows": "^1.1.1"
29
26
  },
30
27
  "peerDependencies": {
@@ -1,53 +0,0 @@
1
- /**
2
- * Copyright (c) Meta Platforms, Inc. and affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- *
7
- * @flow strict-local
8
- * @format
9
- */
10
-
11
- 'use strict';
12
-
13
- const {transform} = require('../index.js');
14
- const path = require('path');
15
-
16
- const PROJECT_ROOT = path.sep === '/' ? '/my/project' : 'C:\\my\\project';
17
-
18
- it('exposes the correct absolute path to a source file to plugins', () => {
19
- let visitorFilename;
20
- let pluginCwd;
21
- transform({
22
- filename: 'foo.js',
23
- src: 'console.log("foo");',
24
- plugins: [
25
- (babel, opts, cwd) => {
26
- pluginCwd = cwd;
27
- return {
28
- visitor: {
29
- CallExpression: {
30
- enter: (_, state) => {
31
- visitorFilename = state.filename;
32
- },
33
- },
34
- },
35
- };
36
- },
37
- ],
38
- options: {
39
- dev: true,
40
- enableBabelRuntime: false,
41
- enableBabelRCLookup: false,
42
- globalPrefix: '__metro__',
43
- hot: false,
44
- inlineRequires: false,
45
- minify: false,
46
- platform: null,
47
- publicPath: 'test',
48
- projectRoot: PROJECT_ROOT,
49
- },
50
- });
51
- expect(pluginCwd).toEqual(PROJECT_ROOT);
52
- expect(visitorFilename).toEqual(path.resolve(PROJECT_ROOT, 'foo.js'));
53
- });