@atlaspack/transformer-babel 2.12.1-dev.3450 → 2.12.1-dev.3466
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/package.json +7 -7
- package/src/config.js +4 -4
- package/src/jsx.js +1 -1
- package/src/remapAstLocations.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaspack/transformer-babel",
|
|
3
|
-
"version": "2.12.1-dev.
|
|
3
|
+
"version": "2.12.1-dev.3466+9a12fb8bd",
|
|
4
4
|
"license": "(MIT OR Apache-2.0)",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -13,12 +13,12 @@
|
|
|
13
13
|
"source": "src/BabelTransformer.js",
|
|
14
14
|
"engines": {
|
|
15
15
|
"node": ">= 16.0.0",
|
|
16
|
-
"parcel": "^2.12.1-dev.
|
|
16
|
+
"parcel": "^2.12.1-dev.3466+9a12fb8bd"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@atlaspack/diagnostic": "2.12.1-dev.
|
|
20
|
-
"@atlaspack/plugin": "2.12.1-dev.
|
|
21
|
-
"@atlaspack/utils": "2.12.1-dev.
|
|
19
|
+
"@atlaspack/diagnostic": "2.12.1-dev.3466+9a12fb8bd",
|
|
20
|
+
"@atlaspack/plugin": "2.12.1-dev.3466+9a12fb8bd",
|
|
21
|
+
"@atlaspack/utils": "2.12.1-dev.3466+9a12fb8bd",
|
|
22
22
|
"@parcel/source-map": "^2.1.1",
|
|
23
23
|
"browserslist": "^4.6.6",
|
|
24
24
|
"json5": "^2.2.0",
|
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
"semver": "^7.5.2"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@atlaspack/types": "2.12.1-dev.
|
|
29
|
+
"@atlaspack/types": "2.12.1-dev.3466+9a12fb8bd",
|
|
30
30
|
"@babel/core": "^7.22.11",
|
|
31
31
|
"@babel/preset-env": "^7.22.14",
|
|
32
32
|
"@babel/types": "^7.22.11"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "9a12fb8bd1b72e407ed043e20337dc60fbec9cbe"
|
|
35
35
|
}
|
package/src/config.js
CHANGED
|
@@ -102,7 +102,7 @@ export async function load(
|
|
|
102
102
|
[string]: any,
|
|
103
103
|
|} = await babelCore.loadPartialConfigAsync(babelOptions);
|
|
104
104
|
|
|
105
|
-
let addIncludedFile = file => {
|
|
105
|
+
let addIncludedFile = (file) => {
|
|
106
106
|
if (JS_EXTNAME_RE.test(path.extname(file))) {
|
|
107
107
|
// We need to invalidate on startup in case the config is non-static,
|
|
108
108
|
// e.g. uses unknown environment variables, reads from the filesystem, etc.
|
|
@@ -241,7 +241,7 @@ async function buildDefaultBabelConfig(
|
|
|
241
241
|
|
|
242
242
|
function hasRequire(options) {
|
|
243
243
|
let configItems = [...options.presets, ...options.plugins];
|
|
244
|
-
return configItems.some(item => !item.file);
|
|
244
|
+
return configItems.some((item) => !item.file);
|
|
245
245
|
}
|
|
246
246
|
|
|
247
247
|
function definePluginDependencies(config, babelConfig: ?BabelConfig, options) {
|
|
@@ -294,7 +294,7 @@ async function warnOnRedundantPlugins(fs, babelConfig, logger) {
|
|
|
294
294
|
let plugins = babelConfig.options.plugins || [];
|
|
295
295
|
let foundRedundantPresets = new Set();
|
|
296
296
|
|
|
297
|
-
let filteredPresets = presets.filter(preset => {
|
|
297
|
+
let filteredPresets = presets.filter((preset) => {
|
|
298
298
|
if (redundantPresets.has(preset.file.request)) {
|
|
299
299
|
foundRedundantPresets.add(preset.file.request);
|
|
300
300
|
return false;
|
|
@@ -331,7 +331,7 @@ async function warnOnRedundantPlugins(fs, babelConfig, logger) {
|
|
|
331
331
|
diagnostics.push({
|
|
332
332
|
message: md`Parcel includes transpilation by default. Babel config __${filePath}__ includes the following redundant presets: ${[
|
|
333
333
|
...foundRedundantPresets,
|
|
334
|
-
].map(p =>
|
|
334
|
+
].map((p) =>
|
|
335
335
|
md.underline(p),
|
|
336
336
|
)}. Removing these may improve build performance.`,
|
|
337
337
|
codeFrames: [
|
package/src/jsx.js
CHANGED
|
@@ -30,7 +30,7 @@ export default async function isJSX(
|
|
|
30
30
|
} else {
|
|
31
31
|
// Find a dependency that implies JSX syntax.
|
|
32
32
|
return JSX_LIBRARIES.some(
|
|
33
|
-
libName =>
|
|
33
|
+
(libName) =>
|
|
34
34
|
pkg &&
|
|
35
35
|
((pkg.dependencies && pkg.dependencies[libName]) ||
|
|
36
36
|
(pkg.devDependencies && pkg.devDependencies[libName]) ||
|
package/src/remapAstLocations.js
CHANGED
|
@@ -12,7 +12,7 @@ export function remapAstLocations(
|
|
|
12
12
|
) {
|
|
13
13
|
// remap ast to original mappings
|
|
14
14
|
// This improves sourcemap accuracy and fixes sourcemaps when scope-hoisting
|
|
15
|
-
traverseAll(t, ast.program, node => {
|
|
15
|
+
traverseAll(t, ast.program, (node) => {
|
|
16
16
|
if (node.loc) {
|
|
17
17
|
if (node.loc?.start) {
|
|
18
18
|
let mapping = map.findClosestMapping(
|