update dependencies, include additional CORS header
parent
a4d24de1d1
commit
209908a1dc
1
index.js
1
index.js
|
@ -23,6 +23,7 @@ app.use(express.urlencoded({
|
||||||
|
|
||||||
function send_headers(res) {
|
function send_headers(res) {
|
||||||
res.header("Access-Control-Allow-Origin", '*');
|
res.header("Access-Control-Allow-Origin", '*');
|
||||||
|
res.header("Access-Control-Allow-Methods", 'GET, POST');
|
||||||
res.header("Access-Control-Expose-Headers", 'X-Title');
|
res.header("Access-Control-Expose-Headers", 'X-Title');
|
||||||
res.header("Content-Type", 'text/markdown');
|
res.header("Content-Type", 'text/markdown');
|
||||||
}
|
}
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
../acorn/bin/acorn
|
|
|
@ -0,0 +1 @@
|
||||||
|
../create-jest/bin/create-jest.js
|
|
@ -1 +0,0 @@
|
||||||
../escodegen/bin/escodegen.js
|
|
|
@ -1 +0,0 @@
|
||||||
../escodegen/bin/esgenerate.js
|
|
File diff suppressed because it is too large
Load Diff
|
@ -187,7 +187,7 @@
|
||||||
same "printed page" as the copyright notice for easier
|
same "printed page" as the copyright notice for easier
|
||||||
identification within third-party archives.
|
identification within third-party archives.
|
||||||
|
|
||||||
Copyright 2019 Google LLC
|
Copyright [yyyy] [name of copyright owner]
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
you may not use this file except in compliance with the License.
|
||||||
|
|
59
node_modules/@ampproject/remapping/dist/remapping.mjs
generated
vendored
Executable file → Normal file
59
node_modules/@ampproject/remapping/dist/remapping.mjs
generated
vendored
Executable file → Normal file
|
@ -1,20 +1,18 @@
|
||||||
import { decodedMappings, traceSegment, TraceMap } from '@jridgewell/trace-mapping';
|
import { decodedMappings, traceSegment, TraceMap } from '@jridgewell/trace-mapping';
|
||||||
import { GenMapping, addSegment, setSourceContent, decodedMap, encodedMap } from '@jridgewell/gen-mapping';
|
import { GenMapping, maybeAddSegment, setSourceContent, setIgnore, toDecodedMap, toEncodedMap } from '@jridgewell/gen-mapping';
|
||||||
|
|
||||||
const SOURCELESS_MAPPING = {
|
const SOURCELESS_MAPPING = /* #__PURE__ */ SegmentObject('', -1, -1, '', null, false);
|
||||||
source: null,
|
|
||||||
column: null,
|
|
||||||
line: null,
|
|
||||||
name: null,
|
|
||||||
content: null,
|
|
||||||
};
|
|
||||||
const EMPTY_SOURCES = [];
|
const EMPTY_SOURCES = [];
|
||||||
function Source(map, sources, source, content) {
|
function SegmentObject(source, line, column, name, content, ignore) {
|
||||||
|
return { source, line, column, name, content, ignore };
|
||||||
|
}
|
||||||
|
function Source(map, sources, source, content, ignore) {
|
||||||
return {
|
return {
|
||||||
map,
|
map,
|
||||||
sources,
|
sources,
|
||||||
source,
|
source,
|
||||||
content,
|
content,
|
||||||
|
ignore,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
@ -22,29 +20,28 @@ function Source(map, sources, source, content) {
|
||||||
* (which may themselves be SourceMapTrees).
|
* (which may themselves be SourceMapTrees).
|
||||||
*/
|
*/
|
||||||
function MapSource(map, sources) {
|
function MapSource(map, sources) {
|
||||||
return Source(map, sources, '', null);
|
return Source(map, sources, '', null, false);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* A "leaf" node in the sourcemap tree, representing an original, unmodified source file. Recursive
|
* A "leaf" node in the sourcemap tree, representing an original, unmodified source file. Recursive
|
||||||
* segment tracing ends at the `OriginalSource`.
|
* segment tracing ends at the `OriginalSource`.
|
||||||
*/
|
*/
|
||||||
function OriginalSource(source, content) {
|
function OriginalSource(source, content, ignore) {
|
||||||
return Source(null, EMPTY_SOURCES, source, content);
|
return Source(null, EMPTY_SOURCES, source, content, ignore);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* traceMappings is only called on the root level SourceMapTree, and begins the process of
|
* traceMappings is only called on the root level SourceMapTree, and begins the process of
|
||||||
* resolving each mapping in terms of the original source files.
|
* resolving each mapping in terms of the original source files.
|
||||||
*/
|
*/
|
||||||
function traceMappings(tree) {
|
function traceMappings(tree) {
|
||||||
|
// TODO: Eventually support sourceRoot, which has to be removed because the sources are already
|
||||||
|
// fully resolved. We'll need to make sources relative to the sourceRoot before adding them.
|
||||||
const gen = new GenMapping({ file: tree.map.file });
|
const gen = new GenMapping({ file: tree.map.file });
|
||||||
const { sources: rootSources, map } = tree;
|
const { sources: rootSources, map } = tree;
|
||||||
const rootNames = map.names;
|
const rootNames = map.names;
|
||||||
const rootMappings = decodedMappings(map);
|
const rootMappings = decodedMappings(map);
|
||||||
for (let i = 0; i < rootMappings.length; i++) {
|
for (let i = 0; i < rootMappings.length; i++) {
|
||||||
const segments = rootMappings[i];
|
const segments = rootMappings[i];
|
||||||
let lastSource = null;
|
|
||||||
let lastSourceLine = null;
|
|
||||||
let lastSourceColumn = null;
|
|
||||||
for (let j = 0; j < segments.length; j++) {
|
for (let j = 0; j < segments.length; j++) {
|
||||||
const segment = segments[j];
|
const segment = segments[j];
|
||||||
const genCol = segment[0];
|
const genCol = segment[0];
|
||||||
|
@ -59,19 +56,12 @@ function traceMappings(tree) {
|
||||||
if (traced == null)
|
if (traced == null)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// So we traced a segment down into its original source file. Now push a
|
const { column, line, name, content, source, ignore } = traced;
|
||||||
// new segment pointing to this location.
|
maybeAddSegment(gen, i, genCol, source, line, column, name);
|
||||||
const { column, line, name, content, source } = traced;
|
if (source && content != null)
|
||||||
if (line === lastSourceLine && column === lastSourceColumn && source === lastSource) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
lastSourceLine = line;
|
|
||||||
lastSourceColumn = column;
|
|
||||||
lastSource = source;
|
|
||||||
// Sigh, TypeScript can't figure out source/line/column are either all null, or all non-null...
|
|
||||||
addSegment(gen, i, genCol, source, line, column, name);
|
|
||||||
if (content != null)
|
|
||||||
setSourceContent(gen, source, content);
|
setSourceContent(gen, source, content);
|
||||||
|
if (ignore)
|
||||||
|
setIgnore(gen, source, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return gen;
|
return gen;
|
||||||
|
@ -82,7 +72,7 @@ function traceMappings(tree) {
|
||||||
*/
|
*/
|
||||||
function originalPositionFor(source, line, column, name) {
|
function originalPositionFor(source, line, column, name) {
|
||||||
if (!source.map) {
|
if (!source.map) {
|
||||||
return { column, line, name, source: source.source, content: source.content };
|
return SegmentObject(source.source, line, column, name, source.content, source.ignore);
|
||||||
}
|
}
|
||||||
const segment = traceSegment(source.map, line, column);
|
const segment = traceSegment(source.map, line, column);
|
||||||
// If we couldn't find a segment, then this doesn't exist in the sourcemap.
|
// If we couldn't find a segment, then this doesn't exist in the sourcemap.
|
||||||
|
@ -127,7 +117,7 @@ function buildSourceMapTree(input, loader) {
|
||||||
return tree;
|
return tree;
|
||||||
}
|
}
|
||||||
function build(map, loader, importer, importerDepth) {
|
function build(map, loader, importer, importerDepth) {
|
||||||
const { resolvedSources, sourcesContent } = map;
|
const { resolvedSources, sourcesContent, ignoreList } = map;
|
||||||
const depth = importerDepth + 1;
|
const depth = importerDepth + 1;
|
||||||
const children = resolvedSources.map((sourceFile, i) => {
|
const children = resolvedSources.map((sourceFile, i) => {
|
||||||
// The loading context gives the loader more information about why this file is being loaded
|
// The loading context gives the loader more information about why this file is being loaded
|
||||||
|
@ -139,20 +129,22 @@ function build(map, loader, importer, importerDepth) {
|
||||||
depth,
|
depth,
|
||||||
source: sourceFile || '',
|
source: sourceFile || '',
|
||||||
content: undefined,
|
content: undefined,
|
||||||
|
ignore: undefined,
|
||||||
};
|
};
|
||||||
// Use the provided loader callback to retrieve the file's sourcemap.
|
// Use the provided loader callback to retrieve the file's sourcemap.
|
||||||
// TODO: We should eventually support async loading of sourcemap files.
|
// TODO: We should eventually support async loading of sourcemap files.
|
||||||
const sourceMap = loader(ctx.source, ctx);
|
const sourceMap = loader(ctx.source, ctx);
|
||||||
const { source, content } = ctx;
|
const { source, content, ignore } = ctx;
|
||||||
// If there is a sourcemap, then we need to recurse into it to load its source files.
|
// If there is a sourcemap, then we need to recurse into it to load its source files.
|
||||||
if (sourceMap)
|
if (sourceMap)
|
||||||
return build(new TraceMap(sourceMap, source), loader, source, depth);
|
return build(new TraceMap(sourceMap, source), loader, source, depth);
|
||||||
// Else, it's an an unmodified source file.
|
// Else, it's an unmodified source file.
|
||||||
// The contents of this unmodified source file can be overridden via the loader context,
|
// The contents of this unmodified source file can be overridden via the loader context,
|
||||||
// allowing it to be explicitly null or a string. If it remains undefined, we fall back to
|
// allowing it to be explicitly null or a string. If it remains undefined, we fall back to
|
||||||
// the importing sourcemap's `sourcesContent` field.
|
// the importing sourcemap's `sourcesContent` field.
|
||||||
const sourceContent = content !== undefined ? content : sourcesContent ? sourcesContent[i] : null;
|
const sourceContent = content !== undefined ? content : sourcesContent ? sourcesContent[i] : null;
|
||||||
return OriginalSource(source, sourceContent);
|
const ignored = ignore !== undefined ? ignore : ignoreList ? ignoreList.includes(i) : false;
|
||||||
|
return OriginalSource(source, sourceContent, ignored);
|
||||||
});
|
});
|
||||||
return MapSource(map, children);
|
return MapSource(map, children);
|
||||||
}
|
}
|
||||||
|
@ -163,11 +155,12 @@ function build(map, loader, importer, importerDepth) {
|
||||||
*/
|
*/
|
||||||
class SourceMap {
|
class SourceMap {
|
||||||
constructor(map, options) {
|
constructor(map, options) {
|
||||||
const out = options.decodedMappings ? decodedMap(map) : encodedMap(map);
|
const out = options.decodedMappings ? toDecodedMap(map) : toEncodedMap(map);
|
||||||
this.version = out.version; // SourceMap spec says this should be first.
|
this.version = out.version; // SourceMap spec says this should be first.
|
||||||
this.file = out.file;
|
this.file = out.file;
|
||||||
this.mappings = out.mappings;
|
this.mappings = out.mappings;
|
||||||
this.names = out.names;
|
this.names = out.names;
|
||||||
|
this.ignoreList = out.ignoreList;
|
||||||
this.sourceRoot = out.sourceRoot;
|
this.sourceRoot = out.sourceRoot;
|
||||||
this.sources = out.sources;
|
this.sources = out.sources;
|
||||||
if (!options.excludeContent) {
|
if (!options.excludeContent) {
|
||||||
|
|
2
node_modules/@ampproject/remapping/dist/remapping.mjs.map
generated
vendored
Executable file → Normal file
2
node_modules/@ampproject/remapping/dist/remapping.mjs.map
generated
vendored
Executable file → Normal file
File diff suppressed because one or more lines are too long
57
node_modules/@ampproject/remapping/dist/remapping.umd.js
generated
vendored
Executable file → Normal file
57
node_modules/@ampproject/remapping/dist/remapping.umd.js
generated
vendored
Executable file → Normal file
|
@ -4,20 +4,18 @@
|
||||||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.remapping = factory(global.traceMapping, global.genMapping));
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.remapping = factory(global.traceMapping, global.genMapping));
|
||||||
})(this, (function (traceMapping, genMapping) { 'use strict';
|
})(this, (function (traceMapping, genMapping) { 'use strict';
|
||||||
|
|
||||||
const SOURCELESS_MAPPING = {
|
const SOURCELESS_MAPPING = /* #__PURE__ */ SegmentObject('', -1, -1, '', null, false);
|
||||||
source: null,
|
|
||||||
column: null,
|
|
||||||
line: null,
|
|
||||||
name: null,
|
|
||||||
content: null,
|
|
||||||
};
|
|
||||||
const EMPTY_SOURCES = [];
|
const EMPTY_SOURCES = [];
|
||||||
function Source(map, sources, source, content) {
|
function SegmentObject(source, line, column, name, content, ignore) {
|
||||||
|
return { source, line, column, name, content, ignore };
|
||||||
|
}
|
||||||
|
function Source(map, sources, source, content, ignore) {
|
||||||
return {
|
return {
|
||||||
map,
|
map,
|
||||||
sources,
|
sources,
|
||||||
source,
|
source,
|
||||||
content,
|
content,
|
||||||
|
ignore,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
@ -25,29 +23,28 @@
|
||||||
* (which may themselves be SourceMapTrees).
|
* (which may themselves be SourceMapTrees).
|
||||||
*/
|
*/
|
||||||
function MapSource(map, sources) {
|
function MapSource(map, sources) {
|
||||||
return Source(map, sources, '', null);
|
return Source(map, sources, '', null, false);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* A "leaf" node in the sourcemap tree, representing an original, unmodified source file. Recursive
|
* A "leaf" node in the sourcemap tree, representing an original, unmodified source file. Recursive
|
||||||
* segment tracing ends at the `OriginalSource`.
|
* segment tracing ends at the `OriginalSource`.
|
||||||
*/
|
*/
|
||||||
function OriginalSource(source, content) {
|
function OriginalSource(source, content, ignore) {
|
||||||
return Source(null, EMPTY_SOURCES, source, content);
|
return Source(null, EMPTY_SOURCES, source, content, ignore);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* traceMappings is only called on the root level SourceMapTree, and begins the process of
|
* traceMappings is only called on the root level SourceMapTree, and begins the process of
|
||||||
* resolving each mapping in terms of the original source files.
|
* resolving each mapping in terms of the original source files.
|
||||||
*/
|
*/
|
||||||
function traceMappings(tree) {
|
function traceMappings(tree) {
|
||||||
|
// TODO: Eventually support sourceRoot, which has to be removed because the sources are already
|
||||||
|
// fully resolved. We'll need to make sources relative to the sourceRoot before adding them.
|
||||||
const gen = new genMapping.GenMapping({ file: tree.map.file });
|
const gen = new genMapping.GenMapping({ file: tree.map.file });
|
||||||
const { sources: rootSources, map } = tree;
|
const { sources: rootSources, map } = tree;
|
||||||
const rootNames = map.names;
|
const rootNames = map.names;
|
||||||
const rootMappings = traceMapping.decodedMappings(map);
|
const rootMappings = traceMapping.decodedMappings(map);
|
||||||
for (let i = 0; i < rootMappings.length; i++) {
|
for (let i = 0; i < rootMappings.length; i++) {
|
||||||
const segments = rootMappings[i];
|
const segments = rootMappings[i];
|
||||||
let lastSource = null;
|
|
||||||
let lastSourceLine = null;
|
|
||||||
let lastSourceColumn = null;
|
|
||||||
for (let j = 0; j < segments.length; j++) {
|
for (let j = 0; j < segments.length; j++) {
|
||||||
const segment = segments[j];
|
const segment = segments[j];
|
||||||
const genCol = segment[0];
|
const genCol = segment[0];
|
||||||
|
@ -62,19 +59,12 @@
|
||||||
if (traced == null)
|
if (traced == null)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// So we traced a segment down into its original source file. Now push a
|
const { column, line, name, content, source, ignore } = traced;
|
||||||
// new segment pointing to this location.
|
genMapping.maybeAddSegment(gen, i, genCol, source, line, column, name);
|
||||||
const { column, line, name, content, source } = traced;
|
if (source && content != null)
|
||||||
if (line === lastSourceLine && column === lastSourceColumn && source === lastSource) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
lastSourceLine = line;
|
|
||||||
lastSourceColumn = column;
|
|
||||||
lastSource = source;
|
|
||||||
// Sigh, TypeScript can't figure out source/line/column are either all null, or all non-null...
|
|
||||||
genMapping.addSegment(gen, i, genCol, source, line, column, name);
|
|
||||||
if (content != null)
|
|
||||||
genMapping.setSourceContent(gen, source, content);
|
genMapping.setSourceContent(gen, source, content);
|
||||||
|
if (ignore)
|
||||||
|
genMapping.setIgnore(gen, source, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return gen;
|
return gen;
|
||||||
|
@ -85,7 +75,7 @@
|
||||||
*/
|
*/
|
||||||
function originalPositionFor(source, line, column, name) {
|
function originalPositionFor(source, line, column, name) {
|
||||||
if (!source.map) {
|
if (!source.map) {
|
||||||
return { column, line, name, source: source.source, content: source.content };
|
return SegmentObject(source.source, line, column, name, source.content, source.ignore);
|
||||||
}
|
}
|
||||||
const segment = traceMapping.traceSegment(source.map, line, column);
|
const segment = traceMapping.traceSegment(source.map, line, column);
|
||||||
// If we couldn't find a segment, then this doesn't exist in the sourcemap.
|
// If we couldn't find a segment, then this doesn't exist in the sourcemap.
|
||||||
|
@ -130,7 +120,7 @@
|
||||||
return tree;
|
return tree;
|
||||||
}
|
}
|
||||||
function build(map, loader, importer, importerDepth) {
|
function build(map, loader, importer, importerDepth) {
|
||||||
const { resolvedSources, sourcesContent } = map;
|
const { resolvedSources, sourcesContent, ignoreList } = map;
|
||||||
const depth = importerDepth + 1;
|
const depth = importerDepth + 1;
|
||||||
const children = resolvedSources.map((sourceFile, i) => {
|
const children = resolvedSources.map((sourceFile, i) => {
|
||||||
// The loading context gives the loader more information about why this file is being loaded
|
// The loading context gives the loader more information about why this file is being loaded
|
||||||
|
@ -142,20 +132,22 @@
|
||||||
depth,
|
depth,
|
||||||
source: sourceFile || '',
|
source: sourceFile || '',
|
||||||
content: undefined,
|
content: undefined,
|
||||||
|
ignore: undefined,
|
||||||
};
|
};
|
||||||
// Use the provided loader callback to retrieve the file's sourcemap.
|
// Use the provided loader callback to retrieve the file's sourcemap.
|
||||||
// TODO: We should eventually support async loading of sourcemap files.
|
// TODO: We should eventually support async loading of sourcemap files.
|
||||||
const sourceMap = loader(ctx.source, ctx);
|
const sourceMap = loader(ctx.source, ctx);
|
||||||
const { source, content } = ctx;
|
const { source, content, ignore } = ctx;
|
||||||
// If there is a sourcemap, then we need to recurse into it to load its source files.
|
// If there is a sourcemap, then we need to recurse into it to load its source files.
|
||||||
if (sourceMap)
|
if (sourceMap)
|
||||||
return build(new traceMapping.TraceMap(sourceMap, source), loader, source, depth);
|
return build(new traceMapping.TraceMap(sourceMap, source), loader, source, depth);
|
||||||
// Else, it's an an unmodified source file.
|
// Else, it's an unmodified source file.
|
||||||
// The contents of this unmodified source file can be overridden via the loader context,
|
// The contents of this unmodified source file can be overridden via the loader context,
|
||||||
// allowing it to be explicitly null or a string. If it remains undefined, we fall back to
|
// allowing it to be explicitly null or a string. If it remains undefined, we fall back to
|
||||||
// the importing sourcemap's `sourcesContent` field.
|
// the importing sourcemap's `sourcesContent` field.
|
||||||
const sourceContent = content !== undefined ? content : sourcesContent ? sourcesContent[i] : null;
|
const sourceContent = content !== undefined ? content : sourcesContent ? sourcesContent[i] : null;
|
||||||
return OriginalSource(source, sourceContent);
|
const ignored = ignore !== undefined ? ignore : ignoreList ? ignoreList.includes(i) : false;
|
||||||
|
return OriginalSource(source, sourceContent, ignored);
|
||||||
});
|
});
|
||||||
return MapSource(map, children);
|
return MapSource(map, children);
|
||||||
}
|
}
|
||||||
|
@ -166,11 +158,12 @@
|
||||||
*/
|
*/
|
||||||
class SourceMap {
|
class SourceMap {
|
||||||
constructor(map, options) {
|
constructor(map, options) {
|
||||||
const out = options.decodedMappings ? genMapping.decodedMap(map) : genMapping.encodedMap(map);
|
const out = options.decodedMappings ? genMapping.toDecodedMap(map) : genMapping.toEncodedMap(map);
|
||||||
this.version = out.version; // SourceMap spec says this should be first.
|
this.version = out.version; // SourceMap spec says this should be first.
|
||||||
this.file = out.file;
|
this.file = out.file;
|
||||||
this.mappings = out.mappings;
|
this.mappings = out.mappings;
|
||||||
this.names = out.names;
|
this.names = out.names;
|
||||||
|
this.ignoreList = out.ignoreList;
|
||||||
this.sourceRoot = out.sourceRoot;
|
this.sourceRoot = out.sourceRoot;
|
||||||
this.sources = out.sources;
|
this.sources = out.sources;
|
||||||
if (!options.excludeContent) {
|
if (!options.excludeContent) {
|
||||||
|
|
2
node_modules/@ampproject/remapping/dist/remapping.umd.js.map
generated
vendored
Executable file → Normal file
2
node_modules/@ampproject/remapping/dist/remapping.umd.js.map
generated
vendored
Executable file → Normal file
File diff suppressed because one or more lines are too long
0
node_modules/@ampproject/remapping/dist/types/build-source-map-tree.d.ts
generated
vendored
Executable file → Normal file
0
node_modules/@ampproject/remapping/dist/types/build-source-map-tree.d.ts
generated
vendored
Executable file → Normal file
1
node_modules/@ampproject/remapping/dist/types/remapping.d.ts
generated
vendored
Executable file → Normal file
1
node_modules/@ampproject/remapping/dist/types/remapping.d.ts
generated
vendored
Executable file → Normal file
|
@ -1,6 +1,7 @@
|
||||||
import SourceMap from './source-map';
|
import SourceMap from './source-map';
|
||||||
import type { SourceMapInput, SourceMapLoader, Options } from './types';
|
import type { SourceMapInput, SourceMapLoader, Options } from './types';
|
||||||
export type { SourceMapSegment, EncodedSourceMap, EncodedSourceMap as RawSourceMap, DecodedSourceMap, SourceMapInput, SourceMapLoader, LoaderContext, Options, } from './types';
|
export type { SourceMapSegment, EncodedSourceMap, EncodedSourceMap as RawSourceMap, DecodedSourceMap, SourceMapInput, SourceMapLoader, LoaderContext, Options, } from './types';
|
||||||
|
export type { SourceMap };
|
||||||
/**
|
/**
|
||||||
* Traces through all the mappings in the root sourcemap, through the sources
|
* Traces through all the mappings in the root sourcemap, through the sources
|
||||||
* (and their sourcemaps), all the way back to the original source location.
|
* (and their sourcemaps), all the way back to the original source location.
|
||||||
|
|
15
node_modules/@ampproject/remapping/dist/types/source-map-tree.d.ts
generated
vendored
Executable file → Normal file
15
node_modules/@ampproject/remapping/dist/types/source-map-tree.d.ts
generated
vendored
Executable file → Normal file
|
@ -6,24 +6,21 @@ export declare type SourceMapSegmentObject = {
|
||||||
name: string;
|
name: string;
|
||||||
source: string;
|
source: string;
|
||||||
content: string | null;
|
content: string | null;
|
||||||
} | {
|
ignore: boolean;
|
||||||
column: null;
|
|
||||||
line: null;
|
|
||||||
name: null;
|
|
||||||
source: null;
|
|
||||||
content: null;
|
|
||||||
};
|
};
|
||||||
export declare type OriginalSource = {
|
export declare type OriginalSource = {
|
||||||
map: TraceMap;
|
map: null;
|
||||||
sources: Sources[];
|
sources: Sources[];
|
||||||
source: string;
|
source: string;
|
||||||
content: string | null;
|
content: string | null;
|
||||||
|
ignore: boolean;
|
||||||
};
|
};
|
||||||
export declare type MapSource = {
|
export declare type MapSource = {
|
||||||
map: TraceMap;
|
map: TraceMap;
|
||||||
sources: Sources[];
|
sources: Sources[];
|
||||||
source: string;
|
source: string;
|
||||||
content: string | null;
|
content: null;
|
||||||
|
ignore: false;
|
||||||
};
|
};
|
||||||
export declare type Sources = OriginalSource | MapSource;
|
export declare type Sources = OriginalSource | MapSource;
|
||||||
/**
|
/**
|
||||||
|
@ -35,7 +32,7 @@ export declare function MapSource(map: TraceMap, sources: Sources[]): MapSource;
|
||||||
* A "leaf" node in the sourcemap tree, representing an original, unmodified source file. Recursive
|
* A "leaf" node in the sourcemap tree, representing an original, unmodified source file. Recursive
|
||||||
* segment tracing ends at the `OriginalSource`.
|
* segment tracing ends at the `OriginalSource`.
|
||||||
*/
|
*/
|
||||||
export declare function OriginalSource(source: string, content: string | null): OriginalSource;
|
export declare function OriginalSource(source: string, content: string | null, ignore: boolean): OriginalSource;
|
||||||
/**
|
/**
|
||||||
* traceMappings is only called on the root level SourceMapTree, and begins the process of
|
* traceMappings is only called on the root level SourceMapTree, and begins the process of
|
||||||
* resolving each mapping in terms of the original source files.
|
* resolving each mapping in terms of the original source files.
|
||||||
|
|
1
node_modules/@ampproject/remapping/dist/types/source-map.d.ts
generated
vendored
Executable file → Normal file
1
node_modules/@ampproject/remapping/dist/types/source-map.d.ts
generated
vendored
Executable file → Normal file
|
@ -12,6 +12,7 @@ export default class SourceMap {
|
||||||
sources: (string | null)[];
|
sources: (string | null)[];
|
||||||
sourcesContent?: (string | null)[];
|
sourcesContent?: (string | null)[];
|
||||||
version: 3;
|
version: 3;
|
||||||
|
ignoreList: number[] | undefined;
|
||||||
constructor(map: GenMapping, options: Options);
|
constructor(map: GenMapping, options: Options);
|
||||||
toString(): string;
|
toString(): string;
|
||||||
}
|
}
|
||||||
|
|
1
node_modules/@ampproject/remapping/dist/types/types.d.ts
generated
vendored
Executable file → Normal file
1
node_modules/@ampproject/remapping/dist/types/types.d.ts
generated
vendored
Executable file → Normal file
|
@ -6,6 +6,7 @@ export declare type LoaderContext = {
|
||||||
readonly depth: number;
|
readonly depth: number;
|
||||||
source: string;
|
source: string;
|
||||||
content: string | null | undefined;
|
content: string | null | undefined;
|
||||||
|
ignore: boolean | undefined;
|
||||||
};
|
};
|
||||||
export declare type SourceMapLoader = (file: string, ctx: LoaderContext) => SourceMapInput | null | undefined | void;
|
export declare type SourceMapLoader = (file: string, ctx: LoaderContext) => SourceMapInput | null | undefined | void;
|
||||||
export declare type Options = {
|
export declare type Options = {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@ampproject/remapping",
|
"name": "@ampproject/remapping",
|
||||||
"version": "2.2.0",
|
"version": "2.3.0",
|
||||||
"description": "Remap sequential sourcemaps through transformations to point at the original source code",
|
"description": "Remap sequential sourcemaps through transformations to point at the original source code",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"source",
|
"source",
|
||||||
|
@ -9,7 +9,19 @@
|
||||||
],
|
],
|
||||||
"main": "dist/remapping.umd.js",
|
"main": "dist/remapping.umd.js",
|
||||||
"module": "dist/remapping.mjs",
|
"module": "dist/remapping.mjs",
|
||||||
"typings": "dist/types/remapping.d.ts",
|
"types": "dist/types/remapping.d.ts",
|
||||||
|
"exports": {
|
||||||
|
".": [
|
||||||
|
{
|
||||||
|
"types": "./dist/types/remapping.d.ts",
|
||||||
|
"browser": "./dist/remapping.umd.js",
|
||||||
|
"require": "./dist/remapping.umd.js",
|
||||||
|
"import": "./dist/remapping.mjs"
|
||||||
|
},
|
||||||
|
"./dist/remapping.umd.js"
|
||||||
|
],
|
||||||
|
"./package.json": "./package.json"
|
||||||
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"dist"
|
"dist"
|
||||||
],
|
],
|
||||||
|
@ -57,7 +69,7 @@
|
||||||
"typescript": "4.6.3"
|
"typescript": "4.6.3"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@jridgewell/gen-mapping": "^0.1.0",
|
"@jridgewell/gen-mapping": "^0.3.5",
|
||||||
"@jridgewell/trace-mapping": "^0.3.9"
|
"@jridgewell/trace-mapping": "^0.3.24"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
> Generate errors that contain a code frame that point to source locations.
|
> Generate errors that contain a code frame that point to source locations.
|
||||||
|
|
||||||
See our website [@babel/code-frame](https://babeljs.io/docs/en/babel-code-frame) for more information.
|
See our website [@babel/code-frame](https://babeljs.io/docs/babel-code-frame) for more information.
|
||||||
|
|
||||||
## Install
|
## Install
|
||||||
|
|
||||||
|
|
|
@ -5,21 +5,30 @@ Object.defineProperty(exports, "__esModule", {
|
||||||
});
|
});
|
||||||
exports.codeFrameColumns = codeFrameColumns;
|
exports.codeFrameColumns = codeFrameColumns;
|
||||||
exports.default = _default;
|
exports.default = _default;
|
||||||
|
|
||||||
var _highlight = require("@babel/highlight");
|
var _highlight = require("@babel/highlight");
|
||||||
|
var _picocolors = _interopRequireWildcard(require("picocolors"), true);
|
||||||
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
||||||
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
||||||
|
const colors = typeof process === "object" && (process.env.FORCE_COLOR === "0" || process.env.FORCE_COLOR === "false") ? (0, _picocolors.createColors)(false) : _picocolors.default;
|
||||||
|
const compose = (f, g) => v => f(g(v));
|
||||||
|
let pcWithForcedColor = undefined;
|
||||||
|
function getColors(forceColor) {
|
||||||
|
if (forceColor) {
|
||||||
|
var _pcWithForcedColor;
|
||||||
|
(_pcWithForcedColor = pcWithForcedColor) != null ? _pcWithForcedColor : pcWithForcedColor = (0, _picocolors.createColors)(true);
|
||||||
|
return pcWithForcedColor;
|
||||||
|
}
|
||||||
|
return colors;
|
||||||
|
}
|
||||||
let deprecationWarningShown = false;
|
let deprecationWarningShown = false;
|
||||||
|
function getDefs(colors) {
|
||||||
function getDefs(chalk) {
|
|
||||||
return {
|
return {
|
||||||
gutter: chalk.grey,
|
gutter: colors.gray,
|
||||||
marker: chalk.red.bold,
|
marker: compose(colors.red, colors.bold),
|
||||||
message: chalk.red.bold
|
message: compose(colors.red, colors.bold)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
const NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
|
const NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
|
||||||
|
|
||||||
function getMarkerLines(loc, source, opts) {
|
function getMarkerLines(loc, source, opts) {
|
||||||
const startLoc = Object.assign({
|
const startLoc = Object.assign({
|
||||||
column: 0,
|
column: 0,
|
||||||
|
@ -36,22 +45,17 @@ function getMarkerLines(loc, source, opts) {
|
||||||
const endColumn = endLoc.column;
|
const endColumn = endLoc.column;
|
||||||
let start = Math.max(startLine - (linesAbove + 1), 0);
|
let start = Math.max(startLine - (linesAbove + 1), 0);
|
||||||
let end = Math.min(source.length, endLine + linesBelow);
|
let end = Math.min(source.length, endLine + linesBelow);
|
||||||
|
|
||||||
if (startLine === -1) {
|
if (startLine === -1) {
|
||||||
start = 0;
|
start = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (endLine === -1) {
|
if (endLine === -1) {
|
||||||
end = source.length;
|
end = source.length;
|
||||||
}
|
}
|
||||||
|
|
||||||
const lineDiff = endLine - startLine;
|
const lineDiff = endLine - startLine;
|
||||||
const markerLines = {};
|
const markerLines = {};
|
||||||
|
|
||||||
if (lineDiff) {
|
if (lineDiff) {
|
||||||
for (let i = 0; i <= lineDiff; i++) {
|
for (let i = 0; i <= lineDiff; i++) {
|
||||||
const lineNumber = i + startLine;
|
const lineNumber = i + startLine;
|
||||||
|
|
||||||
if (!startColumn) {
|
if (!startColumn) {
|
||||||
markerLines[lineNumber] = true;
|
markerLines[lineNumber] = true;
|
||||||
} else if (i === 0) {
|
} else if (i === 0) {
|
||||||
|
@ -75,23 +79,19 @@ function getMarkerLines(loc, source, opts) {
|
||||||
markerLines[startLine] = [startColumn, endColumn - startColumn];
|
markerLines[startLine] = [startColumn, endColumn - startColumn];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
start,
|
start,
|
||||||
end,
|
end,
|
||||||
markerLines
|
markerLines
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
function codeFrameColumns(rawLines, loc, opts = {}) {
|
function codeFrameColumns(rawLines, loc, opts = {}) {
|
||||||
const highlighted = (opts.highlightCode || opts.forceColor) && (0, _highlight.shouldHighlight)(opts);
|
const highlighted = (opts.highlightCode || opts.forceColor) && (0, _highlight.shouldHighlight)(opts);
|
||||||
const chalk = (0, _highlight.getChalk)(opts);
|
const colors = getColors(opts.forceColor);
|
||||||
const defs = getDefs(chalk);
|
const defs = getDefs(colors);
|
||||||
|
const maybeHighlight = (fmt, string) => {
|
||||||
const maybeHighlight = (chalkFn, string) => {
|
return highlighted ? fmt(string) : string;
|
||||||
return highlighted ? chalkFn(string) : string;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const lines = rawLines.split(NEWLINE);
|
const lines = rawLines.split(NEWLINE);
|
||||||
const {
|
const {
|
||||||
start,
|
start,
|
||||||
|
@ -107,42 +107,34 @@ function codeFrameColumns(rawLines, loc, opts = {}) {
|
||||||
const gutter = ` ${paddedNumber} |`;
|
const gutter = ` ${paddedNumber} |`;
|
||||||
const hasMarker = markerLines[number];
|
const hasMarker = markerLines[number];
|
||||||
const lastMarkerLine = !markerLines[number + 1];
|
const lastMarkerLine = !markerLines[number + 1];
|
||||||
|
|
||||||
if (hasMarker) {
|
if (hasMarker) {
|
||||||
let markerLine = "";
|
let markerLine = "";
|
||||||
|
|
||||||
if (Array.isArray(hasMarker)) {
|
if (Array.isArray(hasMarker)) {
|
||||||
const markerSpacing = line.slice(0, Math.max(hasMarker[0] - 1, 0)).replace(/[^\t]/g, " ");
|
const markerSpacing = line.slice(0, Math.max(hasMarker[0] - 1, 0)).replace(/[^\t]/g, " ");
|
||||||
const numberOfMarkers = hasMarker[1] || 1;
|
const numberOfMarkers = hasMarker[1] || 1;
|
||||||
markerLine = ["\n ", maybeHighlight(defs.gutter, gutter.replace(/\d/g, " ")), " ", markerSpacing, maybeHighlight(defs.marker, "^").repeat(numberOfMarkers)].join("");
|
markerLine = ["\n ", maybeHighlight(defs.gutter, gutter.replace(/\d/g, " ")), " ", markerSpacing, maybeHighlight(defs.marker, "^").repeat(numberOfMarkers)].join("");
|
||||||
|
|
||||||
if (lastMarkerLine && opts.message) {
|
if (lastMarkerLine && opts.message) {
|
||||||
markerLine += " " + maybeHighlight(defs.message, opts.message);
|
markerLine += " " + maybeHighlight(defs.message, opts.message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return [maybeHighlight(defs.marker, ">"), maybeHighlight(defs.gutter, gutter), line.length > 0 ? ` ${line}` : "", markerLine].join("");
|
return [maybeHighlight(defs.marker, ">"), maybeHighlight(defs.gutter, gutter), line.length > 0 ? ` ${line}` : "", markerLine].join("");
|
||||||
} else {
|
} else {
|
||||||
return ` ${maybeHighlight(defs.gutter, gutter)}${line.length > 0 ? ` ${line}` : ""}`;
|
return ` ${maybeHighlight(defs.gutter, gutter)}${line.length > 0 ? ` ${line}` : ""}`;
|
||||||
}
|
}
|
||||||
}).join("\n");
|
}).join("\n");
|
||||||
|
|
||||||
if (opts.message && !hasColumns) {
|
if (opts.message && !hasColumns) {
|
||||||
frame = `${" ".repeat(numberMaxWidth + 1)}${opts.message}\n${frame}`;
|
frame = `${" ".repeat(numberMaxWidth + 1)}${opts.message}\n${frame}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (highlighted) {
|
if (highlighted) {
|
||||||
return chalk.reset(frame);
|
return colors.reset(frame);
|
||||||
} else {
|
} else {
|
||||||
return frame;
|
return frame;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function _default(rawLines, lineNumber, colNumber, opts = {}) {
|
function _default(rawLines, lineNumber, colNumber, opts = {}) {
|
||||||
if (!deprecationWarningShown) {
|
if (!deprecationWarningShown) {
|
||||||
deprecationWarningShown = true;
|
deprecationWarningShown = true;
|
||||||
const message = "Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.";
|
const message = "Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.";
|
||||||
|
|
||||||
if (process.emitWarning) {
|
if (process.emitWarning) {
|
||||||
process.emitWarning(message, "DeprecationWarning");
|
process.emitWarning(message, "DeprecationWarning");
|
||||||
} else {
|
} else {
|
||||||
|
@ -151,7 +143,6 @@ function _default(rawLines, lineNumber, colNumber, opts = {}) {
|
||||||
console.warn(new Error(message));
|
console.warn(new Error(message));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
colNumber = Math.max(colNumber, 0);
|
colNumber = Math.max(colNumber, 0);
|
||||||
const location = {
|
const location = {
|
||||||
start: {
|
start: {
|
||||||
|
@ -160,4 +151,6 @@ function _default(rawLines, lineNumber, colNumber, opts = {}) {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
return codeFrameColumns(rawLines, location, opts);
|
return codeFrameColumns(rawLines, location, opts);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//# sourceMappingURL=index.js.map
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@babel/code-frame",
|
"name": "@babel/code-frame",
|
||||||
"version": "7.18.6",
|
"version": "7.24.2",
|
||||||
"description": "Generate errors that contain a code frame that point to source locations.",
|
"description": "Generate errors that contain a code frame that point to source locations.",
|
||||||
"author": "The Babel Team (https://babel.dev/team)",
|
"author": "The Babel Team (https://babel.dev/team)",
|
||||||
"homepage": "https://babel.dev/docs/en/next/babel-code-frame",
|
"homepage": "https://babel.dev/docs/en/next/babel-code-frame",
|
||||||
|
@ -16,11 +16,11 @@
|
||||||
},
|
},
|
||||||
"main": "./lib/index.js",
|
"main": "./lib/index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/highlight": "^7.18.6"
|
"@babel/highlight": "^7.24.2",
|
||||||
|
"picocolors": "^1.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/chalk": "^2.0.0",
|
"import-meta-resolve": "^4.0.0",
|
||||||
"chalk": "^2.0.0",
|
|
||||||
"strip-ansi": "^4.0.0"
|
"strip-ansi": "^4.0.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
>
|
>
|
||||||
|
|
||||||
See our website [@babel/compat-data](https://babeljs.io/docs/en/babel-compat-data) for more information.
|
See our website [@babel/compat-data](https://babeljs.io/docs/babel-compat-data) for more information.
|
||||||
|
|
||||||
## Install
|
## Install
|
||||||
|
|
||||||
|
|
1
node_modules/@babel/compat-data/corejs2-built-ins.js
generated
vendored
Executable file → Normal file
1
node_modules/@babel/compat-data/corejs2-built-ins.js
generated
vendored
Executable file → Normal file
|
@ -1 +1,2 @@
|
||||||
|
// Todo (Babel 8): remove this file as Babel 8 drop support of core-js 2
|
||||||
module.exports = require("./data/corejs2-built-ins.json");
|
module.exports = require("./data/corejs2-built-ins.json");
|
||||||
|
|
1
node_modules/@babel/compat-data/corejs3-shipped-proposals.js
generated
vendored
Executable file → Normal file
1
node_modules/@babel/compat-data/corejs3-shipped-proposals.js
generated
vendored
Executable file → Normal file
|
@ -1 +1,2 @@
|
||||||
|
// Todo (Babel 8): remove this file now that it is included in babel-plugin-polyfill-corejs3
|
||||||
module.exports = require("./data/corejs3-shipped-proposals.json");
|
module.exports = require("./data/corejs3-shipped-proposals.json");
|
||||||
|
|
146
node_modules/@babel/compat-data/data/corejs2-built-ins.json
generated
vendored
Executable file → Normal file
146
node_modules/@babel/compat-data/data/corejs2-built-ins.json
generated
vendored
Executable file → Normal file
File diff suppressed because it is too large
Load Diff
4
node_modules/@babel/compat-data/data/corejs3-shipped-proposals.json
generated
vendored
Executable file → Normal file
4
node_modules/@babel/compat-data/data/corejs3-shipped-proposals.json
generated
vendored
Executable file → Normal file
|
@ -1,5 +1,5 @@
|
||||||
[
|
[
|
||||||
"esnext.global-this",
|
|
||||||
"esnext.promise.all-settled",
|
"esnext.promise.all-settled",
|
||||||
"esnext.string.match-all"
|
"esnext.string.match-all",
|
||||||
|
"esnext.global-this"
|
||||||
]
|
]
|
||||||
|
|
2
node_modules/@babel/compat-data/data/native-modules.json
generated
vendored
Executable file → Normal file
2
node_modules/@babel/compat-data/data/native-modules.json
generated
vendored
Executable file → Normal file
|
@ -7,7 +7,7 @@
|
||||||
"and_ff": "60",
|
"and_ff": "60",
|
||||||
"node": "13.2.0",
|
"node": "13.2.0",
|
||||||
"opera": "48",
|
"opera": "48",
|
||||||
"op_mob": "48",
|
"op_mob": "45",
|
||||||
"safari": "10.1",
|
"safari": "10.1",
|
||||||
"ios": "10.3",
|
"ios": "10.3",
|
||||||
"samsung": "8.2",
|
"samsung": "8.2",
|
||||||
|
|
8
node_modules/@babel/compat-data/data/overlapping-plugins.json
generated
vendored
Executable file → Normal file
8
node_modules/@babel/compat-data/data/overlapping-plugins.json
generated
vendored
Executable file → Normal file
|
@ -21,5 +21,13 @@
|
||||||
],
|
],
|
||||||
"proposal-optional-chaining": [
|
"proposal-optional-chaining": [
|
||||||
"bugfix/transform-v8-spread-parameters-in-optional-chaining"
|
"bugfix/transform-v8-spread-parameters-in-optional-chaining"
|
||||||
|
],
|
||||||
|
"transform-class-properties": [
|
||||||
|
"bugfix/transform-v8-static-class-fields-redefine-readonly",
|
||||||
|
"bugfix/transform-firefox-class-in-computed-class-key"
|
||||||
|
],
|
||||||
|
"proposal-class-properties": [
|
||||||
|
"bugfix/transform-v8-static-class-fields-redefine-readonly",
|
||||||
|
"bugfix/transform-firefox-class-in-computed-class-key"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
37
node_modules/@babel/compat-data/data/plugin-bugfixes.json
generated
vendored
Executable file → Normal file
37
node_modules/@babel/compat-data/data/plugin-bugfixes.json
generated
vendored
Executable file → Normal file
|
@ -9,6 +9,7 @@
|
||||||
"deno": "1",
|
"deno": "1",
|
||||||
"ios": "11",
|
"ios": "11",
|
||||||
"samsung": "6",
|
"samsung": "6",
|
||||||
|
"opera_mobile": "42",
|
||||||
"electron": "1.6"
|
"electron": "1.6"
|
||||||
},
|
},
|
||||||
"bugfix/transform-edge-default-parameters": {
|
"bugfix/transform-edge-default-parameters": {
|
||||||
|
@ -21,6 +22,7 @@
|
||||||
"deno": "1",
|
"deno": "1",
|
||||||
"ios": "10",
|
"ios": "10",
|
||||||
"samsung": "5",
|
"samsung": "5",
|
||||||
|
"opera_mobile": "36",
|
||||||
"electron": "0.37"
|
"electron": "0.37"
|
||||||
},
|
},
|
||||||
"bugfix/transform-edge-function-name": {
|
"bugfix/transform-edge-function-name": {
|
||||||
|
@ -33,6 +35,7 @@
|
||||||
"deno": "1",
|
"deno": "1",
|
||||||
"ios": "10",
|
"ios": "10",
|
||||||
"samsung": "5",
|
"samsung": "5",
|
||||||
|
"opera_mobile": "41",
|
||||||
"electron": "1.2"
|
"electron": "1.2"
|
||||||
},
|
},
|
||||||
"bugfix/transform-safari-block-shadowing": {
|
"bugfix/transform-safari-block-shadowing": {
|
||||||
|
@ -46,6 +49,7 @@
|
||||||
"ie": "11",
|
"ie": "11",
|
||||||
"ios": "11",
|
"ios": "11",
|
||||||
"samsung": "5",
|
"samsung": "5",
|
||||||
|
"opera_mobile": "36",
|
||||||
"electron": "0.37"
|
"electron": "0.37"
|
||||||
},
|
},
|
||||||
"bugfix/transform-safari-for-shadowing": {
|
"bugfix/transform-safari-for-shadowing": {
|
||||||
|
@ -60,6 +64,7 @@
|
||||||
"ios": "11",
|
"ios": "11",
|
||||||
"samsung": "5",
|
"samsung": "5",
|
||||||
"rhino": "1.7.13",
|
"rhino": "1.7.13",
|
||||||
|
"opera_mobile": "36",
|
||||||
"electron": "0.37"
|
"electron": "0.37"
|
||||||
},
|
},
|
||||||
"bugfix/transform-safari-id-destructuring-collision-in-function-expression": {
|
"bugfix/transform-safari-id-destructuring-collision-in-function-expression": {
|
||||||
|
@ -67,9 +72,12 @@
|
||||||
"opera": "36",
|
"opera": "36",
|
||||||
"edge": "14",
|
"edge": "14",
|
||||||
"firefox": "2",
|
"firefox": "2",
|
||||||
|
"safari": "16.3",
|
||||||
"node": "6",
|
"node": "6",
|
||||||
"deno": "1",
|
"deno": "1",
|
||||||
|
"ios": "16.3",
|
||||||
"samsung": "5",
|
"samsung": "5",
|
||||||
|
"opera_mobile": "36",
|
||||||
"electron": "0.37"
|
"electron": "0.37"
|
||||||
},
|
},
|
||||||
"bugfix/transform-tagged-template-caching": {
|
"bugfix/transform-tagged-template-caching": {
|
||||||
|
@ -83,6 +91,7 @@
|
||||||
"ios": "13",
|
"ios": "13",
|
||||||
"samsung": "3.4",
|
"samsung": "3.4",
|
||||||
"rhino": "1.7.14",
|
"rhino": "1.7.14",
|
||||||
|
"opera_mobile": "28",
|
||||||
"electron": "0.21"
|
"electron": "0.21"
|
||||||
},
|
},
|
||||||
"bugfix/transform-v8-spread-parameters-in-optional-chaining": {
|
"bugfix/transform-v8-spread-parameters-in-optional-chaining": {
|
||||||
|
@ -95,8 +104,21 @@
|
||||||
"deno": "1.9",
|
"deno": "1.9",
|
||||||
"ios": "13.4",
|
"ios": "13.4",
|
||||||
"samsung": "16",
|
"samsung": "16",
|
||||||
|
"opera_mobile": "64",
|
||||||
"electron": "13.0"
|
"electron": "13.0"
|
||||||
},
|
},
|
||||||
|
"bugfix/transform-firefox-class-in-computed-class-key": {
|
||||||
|
"chrome": "74",
|
||||||
|
"opera": "62",
|
||||||
|
"edge": "79",
|
||||||
|
"safari": "14.1",
|
||||||
|
"node": "12",
|
||||||
|
"deno": "1",
|
||||||
|
"ios": "14.5",
|
||||||
|
"samsung": "11",
|
||||||
|
"opera_mobile": "53",
|
||||||
|
"electron": "6.0"
|
||||||
|
},
|
||||||
"transform-optional-chaining": {
|
"transform-optional-chaining": {
|
||||||
"chrome": "80",
|
"chrome": "80",
|
||||||
"opera": "67",
|
"opera": "67",
|
||||||
|
@ -107,6 +129,7 @@
|
||||||
"deno": "1",
|
"deno": "1",
|
||||||
"ios": "13.4",
|
"ios": "13.4",
|
||||||
"samsung": "13",
|
"samsung": "13",
|
||||||
|
"opera_mobile": "57",
|
||||||
"electron": "8.0"
|
"electron": "8.0"
|
||||||
},
|
},
|
||||||
"proposal-optional-chaining": {
|
"proposal-optional-chaining": {
|
||||||
|
@ -119,6 +142,7 @@
|
||||||
"deno": "1",
|
"deno": "1",
|
||||||
"ios": "13.4",
|
"ios": "13.4",
|
||||||
"samsung": "13",
|
"samsung": "13",
|
||||||
|
"opera_mobile": "57",
|
||||||
"electron": "8.0"
|
"electron": "8.0"
|
||||||
},
|
},
|
||||||
"transform-parameters": {
|
"transform-parameters": {
|
||||||
|
@ -131,6 +155,7 @@
|
||||||
"deno": "1",
|
"deno": "1",
|
||||||
"ios": "10",
|
"ios": "10",
|
||||||
"samsung": "5",
|
"samsung": "5",
|
||||||
|
"opera_mobile": "36",
|
||||||
"electron": "0.37"
|
"electron": "0.37"
|
||||||
},
|
},
|
||||||
"transform-async-to-generator": {
|
"transform-async-to-generator": {
|
||||||
|
@ -143,6 +168,7 @@
|
||||||
"deno": "1",
|
"deno": "1",
|
||||||
"ios": "10.3",
|
"ios": "10.3",
|
||||||
"samsung": "6",
|
"samsung": "6",
|
||||||
|
"opera_mobile": "42",
|
||||||
"electron": "1.6"
|
"electron": "1.6"
|
||||||
},
|
},
|
||||||
"transform-template-literals": {
|
"transform-template-literals": {
|
||||||
|
@ -155,6 +181,7 @@
|
||||||
"deno": "1",
|
"deno": "1",
|
||||||
"ios": "9",
|
"ios": "9",
|
||||||
"samsung": "3.4",
|
"samsung": "3.4",
|
||||||
|
"opera_mobile": "28",
|
||||||
"electron": "0.21"
|
"electron": "0.21"
|
||||||
},
|
},
|
||||||
"transform-function-name": {
|
"transform-function-name": {
|
||||||
|
@ -167,18 +194,20 @@
|
||||||
"deno": "1",
|
"deno": "1",
|
||||||
"ios": "10",
|
"ios": "10",
|
||||||
"samsung": "5",
|
"samsung": "5",
|
||||||
|
"opera_mobile": "41",
|
||||||
"electron": "1.2"
|
"electron": "1.2"
|
||||||
},
|
},
|
||||||
"transform-block-scoping": {
|
"transform-block-scoping": {
|
||||||
"chrome": "49",
|
"chrome": "50",
|
||||||
"opera": "36",
|
"opera": "37",
|
||||||
"edge": "14",
|
"edge": "14",
|
||||||
"firefox": "51",
|
"firefox": "53",
|
||||||
"safari": "10",
|
"safari": "10",
|
||||||
"node": "6",
|
"node": "6",
|
||||||
"deno": "1",
|
"deno": "1",
|
||||||
"ios": "10",
|
"ios": "10",
|
||||||
"samsung": "5",
|
"samsung": "5",
|
||||||
"electron": "0.37"
|
"opera_mobile": "37",
|
||||||
|
"electron": "1.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
122
node_modules/@babel/compat-data/data/plugins.json
generated
vendored
Executable file → Normal file
122
node_modules/@babel/compat-data/data/plugins.json
generated
vendored
Executable file → Normal file
|
@ -1,12 +1,51 @@
|
||||||
{
|
{
|
||||||
|
"transform-unicode-sets-regex": {
|
||||||
|
"chrome": "112",
|
||||||
|
"opera": "98",
|
||||||
|
"edge": "112",
|
||||||
|
"firefox": "116",
|
||||||
|
"safari": "tp",
|
||||||
|
"node": "20",
|
||||||
|
"deno": "1.32",
|
||||||
|
"opera_mobile": "75",
|
||||||
|
"electron": "24.0"
|
||||||
|
},
|
||||||
|
"bugfix/transform-v8-static-class-fields-redefine-readonly": {
|
||||||
|
"chrome": "98",
|
||||||
|
"opera": "84",
|
||||||
|
"edge": "98",
|
||||||
|
"firefox": "95",
|
||||||
|
"safari": "15",
|
||||||
|
"node": "12",
|
||||||
|
"deno": "1.18",
|
||||||
|
"ios": "15",
|
||||||
|
"samsung": "11",
|
||||||
|
"opera_mobile": "52",
|
||||||
|
"electron": "17.0"
|
||||||
|
},
|
||||||
|
"bugfix/transform-firefox-class-in-computed-class-key": {
|
||||||
|
"chrome": "74",
|
||||||
|
"opera": "62",
|
||||||
|
"edge": "79",
|
||||||
|
"safari": "14.1",
|
||||||
|
"node": "12",
|
||||||
|
"deno": "1",
|
||||||
|
"ios": "14.5",
|
||||||
|
"samsung": "11",
|
||||||
|
"opera_mobile": "53",
|
||||||
|
"electron": "6.0"
|
||||||
|
},
|
||||||
"transform-class-static-block": {
|
"transform-class-static-block": {
|
||||||
"chrome": "94",
|
"chrome": "94",
|
||||||
"opera": "80",
|
"opera": "80",
|
||||||
"edge": "94",
|
"edge": "94",
|
||||||
"firefox": "93",
|
"firefox": "93",
|
||||||
|
"safari": "16.4",
|
||||||
"node": "16.11",
|
"node": "16.11",
|
||||||
"deno": "1.14",
|
"deno": "1.14",
|
||||||
|
"ios": "16.4",
|
||||||
"samsung": "17",
|
"samsung": "17",
|
||||||
|
"opera_mobile": "66",
|
||||||
"electron": "15.0"
|
"electron": "15.0"
|
||||||
},
|
},
|
||||||
"proposal-class-static-block": {
|
"proposal-class-static-block": {
|
||||||
|
@ -14,9 +53,12 @@
|
||||||
"opera": "80",
|
"opera": "80",
|
||||||
"edge": "94",
|
"edge": "94",
|
||||||
"firefox": "93",
|
"firefox": "93",
|
||||||
|
"safari": "16.4",
|
||||||
"node": "16.11",
|
"node": "16.11",
|
||||||
"deno": "1.14",
|
"deno": "1.14",
|
||||||
|
"ios": "16.4",
|
||||||
"samsung": "17",
|
"samsung": "17",
|
||||||
|
"opera_mobile": "66",
|
||||||
"electron": "15.0"
|
"electron": "15.0"
|
||||||
},
|
},
|
||||||
"transform-private-property-in-object": {
|
"transform-private-property-in-object": {
|
||||||
|
@ -29,6 +71,7 @@
|
||||||
"deno": "1.9",
|
"deno": "1.9",
|
||||||
"ios": "15",
|
"ios": "15",
|
||||||
"samsung": "16",
|
"samsung": "16",
|
||||||
|
"opera_mobile": "64",
|
||||||
"electron": "13.0"
|
"electron": "13.0"
|
||||||
},
|
},
|
||||||
"proposal-private-property-in-object": {
|
"proposal-private-property-in-object": {
|
||||||
|
@ -41,6 +84,7 @@
|
||||||
"deno": "1.9",
|
"deno": "1.9",
|
||||||
"ios": "15",
|
"ios": "15",
|
||||||
"samsung": "16",
|
"samsung": "16",
|
||||||
|
"opera_mobile": "64",
|
||||||
"electron": "13.0"
|
"electron": "13.0"
|
||||||
},
|
},
|
||||||
"transform-class-properties": {
|
"transform-class-properties": {
|
||||||
|
@ -51,8 +95,9 @@
|
||||||
"safari": "14.1",
|
"safari": "14.1",
|
||||||
"node": "12",
|
"node": "12",
|
||||||
"deno": "1",
|
"deno": "1",
|
||||||
"ios": "15",
|
"ios": "14.5",
|
||||||
"samsung": "11",
|
"samsung": "11",
|
||||||
|
"opera_mobile": "53",
|
||||||
"electron": "6.0"
|
"electron": "6.0"
|
||||||
},
|
},
|
||||||
"proposal-class-properties": {
|
"proposal-class-properties": {
|
||||||
|
@ -63,8 +108,9 @@
|
||||||
"safari": "14.1",
|
"safari": "14.1",
|
||||||
"node": "12",
|
"node": "12",
|
||||||
"deno": "1",
|
"deno": "1",
|
||||||
"ios": "15",
|
"ios": "14.5",
|
||||||
"samsung": "11",
|
"samsung": "11",
|
||||||
|
"opera_mobile": "53",
|
||||||
"electron": "6.0"
|
"electron": "6.0"
|
||||||
},
|
},
|
||||||
"transform-private-methods": {
|
"transform-private-methods": {
|
||||||
|
@ -77,6 +123,7 @@
|
||||||
"deno": "1",
|
"deno": "1",
|
||||||
"ios": "15",
|
"ios": "15",
|
||||||
"samsung": "14",
|
"samsung": "14",
|
||||||
|
"opera_mobile": "60",
|
||||||
"electron": "10.0"
|
"electron": "10.0"
|
||||||
},
|
},
|
||||||
"proposal-private-methods": {
|
"proposal-private-methods": {
|
||||||
|
@ -89,6 +136,7 @@
|
||||||
"deno": "1",
|
"deno": "1",
|
||||||
"ios": "15",
|
"ios": "15",
|
||||||
"samsung": "14",
|
"samsung": "14",
|
||||||
|
"opera_mobile": "60",
|
||||||
"electron": "10.0"
|
"electron": "10.0"
|
||||||
},
|
},
|
||||||
"transform-numeric-separator": {
|
"transform-numeric-separator": {
|
||||||
|
@ -102,6 +150,7 @@
|
||||||
"ios": "13",
|
"ios": "13",
|
||||||
"samsung": "11",
|
"samsung": "11",
|
||||||
"rhino": "1.7.14",
|
"rhino": "1.7.14",
|
||||||
|
"opera_mobile": "54",
|
||||||
"electron": "6.0"
|
"electron": "6.0"
|
||||||
},
|
},
|
||||||
"proposal-numeric-separator": {
|
"proposal-numeric-separator": {
|
||||||
|
@ -115,6 +164,7 @@
|
||||||
"ios": "13",
|
"ios": "13",
|
||||||
"samsung": "11",
|
"samsung": "11",
|
||||||
"rhino": "1.7.14",
|
"rhino": "1.7.14",
|
||||||
|
"opera_mobile": "54",
|
||||||
"electron": "6.0"
|
"electron": "6.0"
|
||||||
},
|
},
|
||||||
"transform-logical-assignment-operators": {
|
"transform-logical-assignment-operators": {
|
||||||
|
@ -127,6 +177,7 @@
|
||||||
"deno": "1.2",
|
"deno": "1.2",
|
||||||
"ios": "14",
|
"ios": "14",
|
||||||
"samsung": "14",
|
"samsung": "14",
|
||||||
|
"opera_mobile": "60",
|
||||||
"electron": "10.0"
|
"electron": "10.0"
|
||||||
},
|
},
|
||||||
"proposal-logical-assignment-operators": {
|
"proposal-logical-assignment-operators": {
|
||||||
|
@ -139,6 +190,7 @@
|
||||||
"deno": "1.2",
|
"deno": "1.2",
|
||||||
"ios": "14",
|
"ios": "14",
|
||||||
"samsung": "14",
|
"samsung": "14",
|
||||||
|
"opera_mobile": "60",
|
||||||
"electron": "10.0"
|
"electron": "10.0"
|
||||||
},
|
},
|
||||||
"transform-nullish-coalescing-operator": {
|
"transform-nullish-coalescing-operator": {
|
||||||
|
@ -151,6 +203,7 @@
|
||||||
"deno": "1",
|
"deno": "1",
|
||||||
"ios": "13.4",
|
"ios": "13.4",
|
||||||
"samsung": "13",
|
"samsung": "13",
|
||||||
|
"opera_mobile": "57",
|
||||||
"electron": "8.0"
|
"electron": "8.0"
|
||||||
},
|
},
|
||||||
"proposal-nullish-coalescing-operator": {
|
"proposal-nullish-coalescing-operator": {
|
||||||
|
@ -163,6 +216,7 @@
|
||||||
"deno": "1",
|
"deno": "1",
|
||||||
"ios": "13.4",
|
"ios": "13.4",
|
||||||
"samsung": "13",
|
"samsung": "13",
|
||||||
|
"opera_mobile": "57",
|
||||||
"electron": "8.0"
|
"electron": "8.0"
|
||||||
},
|
},
|
||||||
"transform-optional-chaining": {
|
"transform-optional-chaining": {
|
||||||
|
@ -175,6 +229,7 @@
|
||||||
"deno": "1.9",
|
"deno": "1.9",
|
||||||
"ios": "13.4",
|
"ios": "13.4",
|
||||||
"samsung": "16",
|
"samsung": "16",
|
||||||
|
"opera_mobile": "64",
|
||||||
"electron": "13.0"
|
"electron": "13.0"
|
||||||
},
|
},
|
||||||
"proposal-optional-chaining": {
|
"proposal-optional-chaining": {
|
||||||
|
@ -187,6 +242,7 @@
|
||||||
"deno": "1.9",
|
"deno": "1.9",
|
||||||
"ios": "13.4",
|
"ios": "13.4",
|
||||||
"samsung": "16",
|
"samsung": "16",
|
||||||
|
"opera_mobile": "64",
|
||||||
"electron": "13.0"
|
"electron": "13.0"
|
||||||
},
|
},
|
||||||
"transform-json-strings": {
|
"transform-json-strings": {
|
||||||
|
@ -200,6 +256,7 @@
|
||||||
"ios": "12",
|
"ios": "12",
|
||||||
"samsung": "9",
|
"samsung": "9",
|
||||||
"rhino": "1.7.14",
|
"rhino": "1.7.14",
|
||||||
|
"opera_mobile": "47",
|
||||||
"electron": "3.0"
|
"electron": "3.0"
|
||||||
},
|
},
|
||||||
"proposal-json-strings": {
|
"proposal-json-strings": {
|
||||||
|
@ -213,6 +270,7 @@
|
||||||
"ios": "12",
|
"ios": "12",
|
||||||
"samsung": "9",
|
"samsung": "9",
|
||||||
"rhino": "1.7.14",
|
"rhino": "1.7.14",
|
||||||
|
"opera_mobile": "47",
|
||||||
"electron": "3.0"
|
"electron": "3.0"
|
||||||
},
|
},
|
||||||
"transform-optional-catch-binding": {
|
"transform-optional-catch-binding": {
|
||||||
|
@ -225,6 +283,7 @@
|
||||||
"deno": "1",
|
"deno": "1",
|
||||||
"ios": "11.3",
|
"ios": "11.3",
|
||||||
"samsung": "9",
|
"samsung": "9",
|
||||||
|
"opera_mobile": "47",
|
||||||
"electron": "3.0"
|
"electron": "3.0"
|
||||||
},
|
},
|
||||||
"proposal-optional-catch-binding": {
|
"proposal-optional-catch-binding": {
|
||||||
|
@ -237,6 +296,7 @@
|
||||||
"deno": "1",
|
"deno": "1",
|
||||||
"ios": "11.3",
|
"ios": "11.3",
|
||||||
"samsung": "9",
|
"samsung": "9",
|
||||||
|
"opera_mobile": "47",
|
||||||
"electron": "3.0"
|
"electron": "3.0"
|
||||||
},
|
},
|
||||||
"transform-parameters": {
|
"transform-parameters": {
|
||||||
|
@ -244,9 +304,12 @@
|
||||||
"opera": "36",
|
"opera": "36",
|
||||||
"edge": "18",
|
"edge": "18",
|
||||||
"firefox": "53",
|
"firefox": "53",
|
||||||
|
"safari": "16.3",
|
||||||
"node": "6",
|
"node": "6",
|
||||||
"deno": "1",
|
"deno": "1",
|
||||||
|
"ios": "16.3",
|
||||||
"samsung": "5",
|
"samsung": "5",
|
||||||
|
"opera_mobile": "36",
|
||||||
"electron": "0.37"
|
"electron": "0.37"
|
||||||
},
|
},
|
||||||
"transform-async-generator-functions": {
|
"transform-async-generator-functions": {
|
||||||
|
@ -259,6 +322,7 @@
|
||||||
"deno": "1",
|
"deno": "1",
|
||||||
"ios": "12",
|
"ios": "12",
|
||||||
"samsung": "8",
|
"samsung": "8",
|
||||||
|
"opera_mobile": "46",
|
||||||
"electron": "3.0"
|
"electron": "3.0"
|
||||||
},
|
},
|
||||||
"proposal-async-generator-functions": {
|
"proposal-async-generator-functions": {
|
||||||
|
@ -271,6 +335,7 @@
|
||||||
"deno": "1",
|
"deno": "1",
|
||||||
"ios": "12",
|
"ios": "12",
|
||||||
"samsung": "8",
|
"samsung": "8",
|
||||||
|
"opera_mobile": "46",
|
||||||
"electron": "3.0"
|
"electron": "3.0"
|
||||||
},
|
},
|
||||||
"transform-object-rest-spread": {
|
"transform-object-rest-spread": {
|
||||||
|
@ -283,6 +348,7 @@
|
||||||
"deno": "1",
|
"deno": "1",
|
||||||
"ios": "11.3",
|
"ios": "11.3",
|
||||||
"samsung": "8",
|
"samsung": "8",
|
||||||
|
"opera_mobile": "44",
|
||||||
"electron": "2.0"
|
"electron": "2.0"
|
||||||
},
|
},
|
||||||
"proposal-object-rest-spread": {
|
"proposal-object-rest-spread": {
|
||||||
|
@ -295,6 +361,7 @@
|
||||||
"deno": "1",
|
"deno": "1",
|
||||||
"ios": "11.3",
|
"ios": "11.3",
|
||||||
"samsung": "8",
|
"samsung": "8",
|
||||||
|
"opera_mobile": "44",
|
||||||
"electron": "2.0"
|
"electron": "2.0"
|
||||||
},
|
},
|
||||||
"transform-dotall-regex": {
|
"transform-dotall-regex": {
|
||||||
|
@ -307,6 +374,7 @@
|
||||||
"deno": "1",
|
"deno": "1",
|
||||||
"ios": "11.3",
|
"ios": "11.3",
|
||||||
"samsung": "8",
|
"samsung": "8",
|
||||||
|
"opera_mobile": "46",
|
||||||
"electron": "3.0"
|
"electron": "3.0"
|
||||||
},
|
},
|
||||||
"transform-unicode-property-regex": {
|
"transform-unicode-property-regex": {
|
||||||
|
@ -319,6 +387,7 @@
|
||||||
"deno": "1",
|
"deno": "1",
|
||||||
"ios": "11.3",
|
"ios": "11.3",
|
||||||
"samsung": "9",
|
"samsung": "9",
|
||||||
|
"opera_mobile": "47",
|
||||||
"electron": "3.0"
|
"electron": "3.0"
|
||||||
},
|
},
|
||||||
"proposal-unicode-property-regex": {
|
"proposal-unicode-property-regex": {
|
||||||
|
@ -331,6 +400,7 @@
|
||||||
"deno": "1",
|
"deno": "1",
|
||||||
"ios": "11.3",
|
"ios": "11.3",
|
||||||
"samsung": "9",
|
"samsung": "9",
|
||||||
|
"opera_mobile": "47",
|
||||||
"electron": "3.0"
|
"electron": "3.0"
|
||||||
},
|
},
|
||||||
"transform-named-capturing-groups-regex": {
|
"transform-named-capturing-groups-regex": {
|
||||||
|
@ -343,6 +413,7 @@
|
||||||
"deno": "1",
|
"deno": "1",
|
||||||
"ios": "11.3",
|
"ios": "11.3",
|
||||||
"samsung": "9",
|
"samsung": "9",
|
||||||
|
"opera_mobile": "47",
|
||||||
"electron": "3.0"
|
"electron": "3.0"
|
||||||
},
|
},
|
||||||
"transform-async-to-generator": {
|
"transform-async-to-generator": {
|
||||||
|
@ -355,6 +426,7 @@
|
||||||
"deno": "1",
|
"deno": "1",
|
||||||
"ios": "11",
|
"ios": "11",
|
||||||
"samsung": "6",
|
"samsung": "6",
|
||||||
|
"opera_mobile": "42",
|
||||||
"electron": "1.6"
|
"electron": "1.6"
|
||||||
},
|
},
|
||||||
"transform-exponentiation-operator": {
|
"transform-exponentiation-operator": {
|
||||||
|
@ -368,6 +440,7 @@
|
||||||
"ios": "10.3",
|
"ios": "10.3",
|
||||||
"samsung": "6",
|
"samsung": "6",
|
||||||
"rhino": "1.7.14",
|
"rhino": "1.7.14",
|
||||||
|
"opera_mobile": "41",
|
||||||
"electron": "1.3"
|
"electron": "1.3"
|
||||||
},
|
},
|
||||||
"transform-template-literals": {
|
"transform-template-literals": {
|
||||||
|
@ -380,6 +453,7 @@
|
||||||
"deno": "1",
|
"deno": "1",
|
||||||
"ios": "13",
|
"ios": "13",
|
||||||
"samsung": "3.4",
|
"samsung": "3.4",
|
||||||
|
"opera_mobile": "28",
|
||||||
"electron": "0.21"
|
"electron": "0.21"
|
||||||
},
|
},
|
||||||
"transform-literals": {
|
"transform-literals": {
|
||||||
|
@ -392,6 +466,7 @@
|
||||||
"deno": "1",
|
"deno": "1",
|
||||||
"ios": "9",
|
"ios": "9",
|
||||||
"samsung": "4",
|
"samsung": "4",
|
||||||
|
"opera_mobile": "32",
|
||||||
"electron": "0.30"
|
"electron": "0.30"
|
||||||
},
|
},
|
||||||
"transform-function-name": {
|
"transform-function-name": {
|
||||||
|
@ -404,6 +479,7 @@
|
||||||
"deno": "1",
|
"deno": "1",
|
||||||
"ios": "10",
|
"ios": "10",
|
||||||
"samsung": "5",
|
"samsung": "5",
|
||||||
|
"opera_mobile": "41",
|
||||||
"electron": "1.2"
|
"electron": "1.2"
|
||||||
},
|
},
|
||||||
"transform-arrow-functions": {
|
"transform-arrow-functions": {
|
||||||
|
@ -417,6 +493,7 @@
|
||||||
"ios": "10",
|
"ios": "10",
|
||||||
"samsung": "5",
|
"samsung": "5",
|
||||||
"rhino": "1.7.13",
|
"rhino": "1.7.13",
|
||||||
|
"opera_mobile": "34",
|
||||||
"electron": "0.36"
|
"electron": "0.36"
|
||||||
},
|
},
|
||||||
"transform-block-scoped-functions": {
|
"transform-block-scoped-functions": {
|
||||||
|
@ -430,6 +507,7 @@
|
||||||
"ie": "11",
|
"ie": "11",
|
||||||
"ios": "10",
|
"ios": "10",
|
||||||
"samsung": "3.4",
|
"samsung": "3.4",
|
||||||
|
"opera_mobile": "28",
|
||||||
"electron": "0.21"
|
"electron": "0.21"
|
||||||
},
|
},
|
||||||
"transform-classes": {
|
"transform-classes": {
|
||||||
|
@ -442,6 +520,7 @@
|
||||||
"deno": "1",
|
"deno": "1",
|
||||||
"ios": "10",
|
"ios": "10",
|
||||||
"samsung": "5",
|
"samsung": "5",
|
||||||
|
"opera_mobile": "33",
|
||||||
"electron": "0.36"
|
"electron": "0.36"
|
||||||
},
|
},
|
||||||
"transform-object-super": {
|
"transform-object-super": {
|
||||||
|
@ -454,6 +533,7 @@
|
||||||
"deno": "1",
|
"deno": "1",
|
||||||
"ios": "10",
|
"ios": "10",
|
||||||
"samsung": "5",
|
"samsung": "5",
|
||||||
|
"opera_mobile": "33",
|
||||||
"electron": "0.36"
|
"electron": "0.36"
|
||||||
},
|
},
|
||||||
"transform-shorthand-properties": {
|
"transform-shorthand-properties": {
|
||||||
|
@ -467,6 +547,7 @@
|
||||||
"ios": "9",
|
"ios": "9",
|
||||||
"samsung": "4",
|
"samsung": "4",
|
||||||
"rhino": "1.7.14",
|
"rhino": "1.7.14",
|
||||||
|
"opera_mobile": "30",
|
||||||
"electron": "0.27"
|
"electron": "0.27"
|
||||||
},
|
},
|
||||||
"transform-duplicate-keys": {
|
"transform-duplicate-keys": {
|
||||||
|
@ -479,6 +560,7 @@
|
||||||
"deno": "1",
|
"deno": "1",
|
||||||
"ios": "9",
|
"ios": "9",
|
||||||
"samsung": "3.4",
|
"samsung": "3.4",
|
||||||
|
"opera_mobile": "29",
|
||||||
"electron": "0.25"
|
"electron": "0.25"
|
||||||
},
|
},
|
||||||
"transform-computed-properties": {
|
"transform-computed-properties": {
|
||||||
|
@ -491,6 +573,7 @@
|
||||||
"deno": "1",
|
"deno": "1",
|
||||||
"ios": "8",
|
"ios": "8",
|
||||||
"samsung": "4",
|
"samsung": "4",
|
||||||
|
"opera_mobile": "32",
|
||||||
"electron": "0.30"
|
"electron": "0.30"
|
||||||
},
|
},
|
||||||
"transform-for-of": {
|
"transform-for-of": {
|
||||||
|
@ -503,6 +586,7 @@
|
||||||
"deno": "1",
|
"deno": "1",
|
||||||
"ios": "10",
|
"ios": "10",
|
||||||
"samsung": "5",
|
"samsung": "5",
|
||||||
|
"opera_mobile": "41",
|
||||||
"electron": "1.2"
|
"electron": "1.2"
|
||||||
},
|
},
|
||||||
"transform-sticky-regex": {
|
"transform-sticky-regex": {
|
||||||
|
@ -515,6 +599,7 @@
|
||||||
"deno": "1",
|
"deno": "1",
|
||||||
"ios": "10",
|
"ios": "10",
|
||||||
"samsung": "5",
|
"samsung": "5",
|
||||||
|
"opera_mobile": "36",
|
||||||
"electron": "0.37"
|
"electron": "0.37"
|
||||||
},
|
},
|
||||||
"transform-unicode-escapes": {
|
"transform-unicode-escapes": {
|
||||||
|
@ -527,6 +612,7 @@
|
||||||
"deno": "1",
|
"deno": "1",
|
||||||
"ios": "9",
|
"ios": "9",
|
||||||
"samsung": "4",
|
"samsung": "4",
|
||||||
|
"opera_mobile": "32",
|
||||||
"electron": "0.30"
|
"electron": "0.30"
|
||||||
},
|
},
|
||||||
"transform-unicode-regex": {
|
"transform-unicode-regex": {
|
||||||
|
@ -539,6 +625,7 @@
|
||||||
"deno": "1",
|
"deno": "1",
|
||||||
"ios": "12",
|
"ios": "12",
|
||||||
"samsung": "5",
|
"samsung": "5",
|
||||||
|
"opera_mobile": "37",
|
||||||
"electron": "1.1"
|
"electron": "1.1"
|
||||||
},
|
},
|
||||||
"transform-spread": {
|
"transform-spread": {
|
||||||
|
@ -551,6 +638,7 @@
|
||||||
"deno": "1",
|
"deno": "1",
|
||||||
"ios": "10",
|
"ios": "10",
|
||||||
"samsung": "5",
|
"samsung": "5",
|
||||||
|
"opera_mobile": "33",
|
||||||
"electron": "0.36"
|
"electron": "0.36"
|
||||||
},
|
},
|
||||||
"transform-destructuring": {
|
"transform-destructuring": {
|
||||||
|
@ -563,19 +651,21 @@
|
||||||
"deno": "1",
|
"deno": "1",
|
||||||
"ios": "10",
|
"ios": "10",
|
||||||
"samsung": "5",
|
"samsung": "5",
|
||||||
|
"opera_mobile": "41",
|
||||||
"electron": "1.2"
|
"electron": "1.2"
|
||||||
},
|
},
|
||||||
"transform-block-scoping": {
|
"transform-block-scoping": {
|
||||||
"chrome": "49",
|
"chrome": "50",
|
||||||
"opera": "36",
|
"opera": "37",
|
||||||
"edge": "14",
|
"edge": "14",
|
||||||
"firefox": "51",
|
"firefox": "53",
|
||||||
"safari": "11",
|
"safari": "11",
|
||||||
"node": "6",
|
"node": "6",
|
||||||
"deno": "1",
|
"deno": "1",
|
||||||
"ios": "11",
|
"ios": "11",
|
||||||
"samsung": "5",
|
"samsung": "5",
|
||||||
"electron": "0.37"
|
"opera_mobile": "37",
|
||||||
|
"electron": "1.1"
|
||||||
},
|
},
|
||||||
"transform-typeof-symbol": {
|
"transform-typeof-symbol": {
|
||||||
"chrome": "38",
|
"chrome": "38",
|
||||||
|
@ -588,6 +678,7 @@
|
||||||
"ios": "9",
|
"ios": "9",
|
||||||
"samsung": "3",
|
"samsung": "3",
|
||||||
"rhino": "1.7.13",
|
"rhino": "1.7.13",
|
||||||
|
"opera_mobile": "25",
|
||||||
"electron": "0.20"
|
"electron": "0.20"
|
||||||
},
|
},
|
||||||
"transform-new-target": {
|
"transform-new-target": {
|
||||||
|
@ -600,6 +691,7 @@
|
||||||
"deno": "1",
|
"deno": "1",
|
||||||
"ios": "10",
|
"ios": "10",
|
||||||
"samsung": "5",
|
"samsung": "5",
|
||||||
|
"opera_mobile": "33",
|
||||||
"electron": "0.36"
|
"electron": "0.36"
|
||||||
},
|
},
|
||||||
"transform-regenerator": {
|
"transform-regenerator": {
|
||||||
|
@ -612,6 +704,7 @@
|
||||||
"deno": "1",
|
"deno": "1",
|
||||||
"ios": "10",
|
"ios": "10",
|
||||||
"samsung": "5",
|
"samsung": "5",
|
||||||
|
"opera_mobile": "37",
|
||||||
"electron": "1.1"
|
"electron": "1.1"
|
||||||
},
|
},
|
||||||
"transform-member-expression-literals": {
|
"transform-member-expression-literals": {
|
||||||
|
@ -628,6 +721,7 @@
|
||||||
"phantom": "1.9",
|
"phantom": "1.9",
|
||||||
"samsung": "1",
|
"samsung": "1",
|
||||||
"rhino": "1.7.13",
|
"rhino": "1.7.13",
|
||||||
|
"opera_mobile": "12",
|
||||||
"electron": "0.20"
|
"electron": "0.20"
|
||||||
},
|
},
|
||||||
"transform-property-literals": {
|
"transform-property-literals": {
|
||||||
|
@ -644,6 +738,7 @@
|
||||||
"phantom": "1.9",
|
"phantom": "1.9",
|
||||||
"samsung": "1",
|
"samsung": "1",
|
||||||
"rhino": "1.7.13",
|
"rhino": "1.7.13",
|
||||||
|
"opera_mobile": "12",
|
||||||
"electron": "0.20"
|
"electron": "0.20"
|
||||||
},
|
},
|
||||||
"transform-reserved-words": {
|
"transform-reserved-words": {
|
||||||
|
@ -660,30 +755,33 @@
|
||||||
"phantom": "1.9",
|
"phantom": "1.9",
|
||||||
"samsung": "1",
|
"samsung": "1",
|
||||||
"rhino": "1.7.13",
|
"rhino": "1.7.13",
|
||||||
|
"opera_mobile": "10.1",
|
||||||
"electron": "0.20"
|
"electron": "0.20"
|
||||||
},
|
},
|
||||||
"transform-export-namespace-from": {
|
"transform-export-namespace-from": {
|
||||||
"chrome": "72",
|
"chrome": "72",
|
||||||
"and_chr": "72",
|
"deno": "1.0",
|
||||||
"edge": "79",
|
"edge": "79",
|
||||||
"firefox": "80",
|
"firefox": "80",
|
||||||
"and_ff": "80",
|
|
||||||
"node": "13.2",
|
"node": "13.2",
|
||||||
"opera": "60",
|
"opera": "60",
|
||||||
"op_mob": "51",
|
"opera_mobile": "51",
|
||||||
|
"safari": "14.1",
|
||||||
|
"ios": "14.5",
|
||||||
"samsung": "11.0",
|
"samsung": "11.0",
|
||||||
"android": "72",
|
"android": "72",
|
||||||
"electron": "5.0"
|
"electron": "5.0"
|
||||||
},
|
},
|
||||||
"proposal-export-namespace-from": {
|
"proposal-export-namespace-from": {
|
||||||
"chrome": "72",
|
"chrome": "72",
|
||||||
"and_chr": "72",
|
"deno": "1.0",
|
||||||
"edge": "79",
|
"edge": "79",
|
||||||
"firefox": "80",
|
"firefox": "80",
|
||||||
"and_ff": "80",
|
|
||||||
"node": "13.2",
|
"node": "13.2",
|
||||||
"opera": "60",
|
"opera": "60",
|
||||||
"op_mob": "51",
|
"opera_mobile": "51",
|
||||||
|
"safari": "14.1",
|
||||||
|
"ios": "14.5",
|
||||||
"samsung": "11.0",
|
"samsung": "11.0",
|
||||||
"android": "72",
|
"android": "72",
|
||||||
"electron": "5.0"
|
"electron": "5.0"
|
||||||
|
|
0
node_modules/@babel/compat-data/native-modules.js
generated
vendored
Executable file → Normal file
0
node_modules/@babel/compat-data/native-modules.js
generated
vendored
Executable file → Normal file
0
node_modules/@babel/compat-data/overlapping-plugins.js
generated
vendored
Executable file → Normal file
0
node_modules/@babel/compat-data/overlapping-plugins.js
generated
vendored
Executable file → Normal file
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@babel/compat-data",
|
"name": "@babel/compat-data",
|
||||||
"version": "7.20.10",
|
"version": "7.24.4",
|
||||||
"author": "The Babel Team (https://babel.dev/team)",
|
"author": "The Babel Team (https://babel.dev/team)",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"description": "",
|
"description": "",
|
||||||
|
@ -29,9 +29,9 @@
|
||||||
"compat-data"
|
"compat-data"
|
||||||
],
|
],
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@mdn/browser-compat-data": "^4.0.10",
|
"@mdn/browser-compat-data": "^5.3.0",
|
||||||
"core-js-compat": "^3.25.1",
|
"core-js-compat": "^3.31.0",
|
||||||
"electron-to-chromium": "^1.4.248"
|
"electron-to-chromium": "^1.4.441"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.9.0"
|
"node": ">=6.9.0"
|
||||||
|
|
0
node_modules/@babel/compat-data/plugin-bugfixes.js
generated
vendored
Executable file → Normal file
0
node_modules/@babel/compat-data/plugin-bugfixes.js
generated
vendored
Executable file → Normal file
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
> Babel compiler core.
|
> Babel compiler core.
|
||||||
|
|
||||||
See our website [@babel/core](https://babeljs.io/docs/en/babel-core) for more information or the [issues](https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A%20core%22+is%3Aopen) associated with this package.
|
See our website [@babel/core](https://babeljs.io/docs/babel-core) for more information or the [issues](https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A%20core%22+is%3Aopen) associated with this package.
|
||||||
|
|
||||||
## Install
|
## Install
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,14 @@
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
const babelP = import("./lib/index.js");
|
const babelP = import("./lib/index.js");
|
||||||
|
let babel = null;
|
||||||
|
Object.defineProperty(exports, "__ initialize @babel/core cjs proxy __", {
|
||||||
|
set(val) {
|
||||||
|
babel = val;
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
exports.version = require("./package.json").version;
|
||||||
|
|
||||||
const functionNames = [
|
const functionNames = [
|
||||||
"createConfigItem",
|
"createConfigItem",
|
||||||
|
@ -11,13 +19,15 @@ const functionNames = [
|
||||||
"transformFromAst",
|
"transformFromAst",
|
||||||
"parse",
|
"parse",
|
||||||
];
|
];
|
||||||
|
const propertyNames = [
|
||||||
|
"buildExternalHelpers",
|
||||||
|
"types",
|
||||||
|
"tokTypes",
|
||||||
|
"traverse",
|
||||||
|
"template",
|
||||||
|
];
|
||||||
|
|
||||||
for (const name of functionNames) {
|
for (const name of functionNames) {
|
||||||
exports[`${name}Sync`] = function () {
|
|
||||||
throw new Error(
|
|
||||||
`"${name}Sync" is not supported when loading @babel/core using require()`
|
|
||||||
);
|
|
||||||
};
|
|
||||||
exports[name] = function (...args) {
|
exports[name] = function (...args) {
|
||||||
babelP.then(babel => {
|
babelP.then(babel => {
|
||||||
babel[name](...args);
|
babel[name](...args);
|
||||||
|
@ -26,4 +36,24 @@ for (const name of functionNames) {
|
||||||
exports[`${name}Async`] = function (...args) {
|
exports[`${name}Async`] = function (...args) {
|
||||||
return babelP.then(babel => babel[`${name}Async`](...args));
|
return babelP.then(babel => babel[`${name}Async`](...args));
|
||||||
};
|
};
|
||||||
|
exports[`${name}Sync`] = function (...args) {
|
||||||
|
if (!babel) throw notLoadedError(`${name}Sync`, "callable");
|
||||||
|
return babel[`${name}Sync`](...args);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
for (const name of propertyNames) {
|
||||||
|
Object.defineProperty(exports, name, {
|
||||||
|
get() {
|
||||||
|
if (!babel) throw notLoadedError(name, "accessible");
|
||||||
|
return babel[name];
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function notLoadedError(name, keyword) {
|
||||||
|
return new Error(
|
||||||
|
`The \`${name}\` export of @babel/core is only ${keyword}` +
|
||||||
|
` from the CommonJS version after that the ESM version is loaded.`
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
0
node_modules/@babel/core/lib/config/cache-contexts.js
generated
vendored
Executable file → Normal file
0
node_modules/@babel/core/lib/config/cache-contexts.js
generated
vendored
Executable file → Normal file
2
node_modules/@babel/core/lib/config/cache-contexts.js.map
generated
vendored
Executable file → Normal file
2
node_modules/@babel/core/lib/config/cache-contexts.js.map
generated
vendored
Executable file → Normal file
|
@ -1 +1 @@
|
||||||
{"version":3,"names":[],"sources":["../../src/config/cache-contexts.ts"],"sourcesContent":["import type { Targets } from \"@babel/helper-compilation-targets\";\n\nimport type { ConfigContext } from \"./config-chain\";\nimport type { CallerMetadata } from \"./validation/options\";\n\nexport type { ConfigContext as FullConfig };\n\nexport type FullPreset = {\n targets: Targets;\n} & ConfigContext;\nexport type FullPlugin = {\n assumptions: { [name: string]: boolean };\n} & FullPreset;\n\n// Context not including filename since it is used in places that cannot\n// process 'ignore'/'only' and other filename-based logic.\nexport type SimpleConfig = {\n envName: string;\n caller: CallerMetadata | undefined;\n};\nexport type SimplePreset = {\n targets: Targets;\n} & SimpleConfig;\nexport type SimplePlugin = {\n assumptions: {\n [name: string]: boolean;\n };\n} & SimplePreset;\n"],"mappings":""}
|
{"version":3,"names":[],"sources":["../../src/config/cache-contexts.ts"],"sourcesContent":["import type { Targets } from \"@babel/helper-compilation-targets\";\n\nimport type { ConfigContext } from \"./config-chain.ts\";\nimport type { CallerMetadata } from \"./validation/options.ts\";\n\nexport type { ConfigContext as FullConfig };\n\nexport type FullPreset = {\n targets: Targets;\n} & ConfigContext;\nexport type FullPlugin = {\n assumptions: { [name: string]: boolean };\n} & FullPreset;\n\n// Context not including filename since it is used in places that cannot\n// process 'ignore'/'only' and other filename-based logic.\nexport type SimpleConfig = {\n envName: string;\n caller: CallerMetadata | undefined;\n};\nexport type SimplePreset = {\n targets: Targets;\n} & SimpleConfig;\nexport type SimplePlugin = {\n assumptions: {\n [name: string]: boolean;\n };\n} & SimplePreset;\n"],"mappings":"","ignoreList":[]}
|
|
@ -15,12 +15,11 @@ function _gensync() {
|
||||||
};
|
};
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
var _async = require("../gensync-utils/async");
|
var _async = require("../gensync-utils/async.js");
|
||||||
var _util = require("./util");
|
var _util = require("./util.js");
|
||||||
const synchronize = gen => {
|
const synchronize = gen => {
|
||||||
return _gensync()(gen).sync;
|
return _gensync()(gen).sync;
|
||||||
};
|
};
|
||||||
|
|
||||||
function* genTrue() {
|
function* genTrue() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -36,7 +35,6 @@ function makeStrongCache(handler) {
|
||||||
function makeStrongCacheSync(handler) {
|
function makeStrongCacheSync(handler) {
|
||||||
return synchronize(makeStrongCache(handler));
|
return synchronize(makeStrongCache(handler));
|
||||||
}
|
}
|
||||||
|
|
||||||
function makeCachedFunction(CallCache, handler) {
|
function makeCachedFunction(CallCache, handler) {
|
||||||
const callCacheSync = new CallCache();
|
const callCacheSync = new CallCache();
|
||||||
const callCacheAsync = new CallCache();
|
const callCacheAsync = new CallCache();
|
||||||
|
@ -235,7 +233,6 @@ function makeSimpleConfigurator(cache) {
|
||||||
cacheFn.invalidate = cb => cache.invalidate(() => assertSimpleType(cb()));
|
cacheFn.invalidate = cb => cache.invalidate(() => assertSimpleType(cb()));
|
||||||
return cacheFn;
|
return cacheFn;
|
||||||
}
|
}
|
||||||
|
|
||||||
function assertSimpleType(value) {
|
function assertSimpleType(value) {
|
||||||
if ((0, _async.isThenable)(value)) {
|
if ((0, _async.isThenable)(value)) {
|
||||||
throw new Error(`You appear to be using an async cache handler, ` + `which your current version of Babel does not support. ` + `We may add support for this in the future, ` + `but if you're on the most recent version of @babel/core and still ` + `seeing this error, then you'll need to synchronously handle your caching logic.`);
|
throw new Error(`You appear to be using an async cache handler, ` + `which your current version of Babel does not support. ` + `We may add support for this in the future, ` + `but if you're on the most recent version of @babel/core and still ` + `seeing this error, then you'll need to synchronously handle your caching logic.`);
|
||||||
|
|
2
node_modules/@babel/core/lib/config/caching.js.map
generated
vendored
Executable file → Normal file
2
node_modules/@babel/core/lib/config/caching.js.map
generated
vendored
Executable file → Normal file
File diff suppressed because one or more lines are too long
61
node_modules/@babel/core/lib/config/config-chain.js
generated
vendored
Executable file → Normal file
61
node_modules/@babel/core/lib/config/config-chain.js
generated
vendored
Executable file → Normal file
|
@ -20,15 +20,14 @@ function _debug() {
|
||||||
};
|
};
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
var _options = require("./validation/options");
|
var _options = require("./validation/options.js");
|
||||||
var _patternToRegex = require("./pattern-to-regex");
|
var _patternToRegex = require("./pattern-to-regex.js");
|
||||||
var _printer = require("./printer");
|
var _printer = require("./printer.js");
|
||||||
var _rewriteStackTrace = require("../errors/rewrite-stack-trace");
|
var _rewriteStackTrace = require("../errors/rewrite-stack-trace.js");
|
||||||
var _configError = require("../errors/config-error");
|
var _configError = require("../errors/config-error.js");
|
||||||
var _files = require("./files");
|
var _index = require("./files/index.js");
|
||||||
var _caching = require("./caching");
|
var _caching = require("./caching.js");
|
||||||
var _configDescriptors = require("./config-descriptors");
|
var _configDescriptors = require("./config-descriptors.js");
|
||||||
|
|
||||||
const debug = _debug()("babel:config:config-chain");
|
const debug = _debug()("babel:config:config-chain");
|
||||||
function* buildPresetChain(arg, context) {
|
function* buildPresetChain(arg, context) {
|
||||||
const chain = yield* buildPresetChainWalker(arg, context);
|
const chain = yield* buildPresetChainWalker(arg, context);
|
||||||
|
@ -40,14 +39,13 @@ function* buildPresetChain(arg, context) {
|
||||||
files: new Set()
|
files: new Set()
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
const buildPresetChainWalker = makeChainWalker({
|
const buildPresetChainWalker = exports.buildPresetChainWalker = makeChainWalker({
|
||||||
root: preset => loadPresetDescriptors(preset),
|
root: preset => loadPresetDescriptors(preset),
|
||||||
env: (preset, envName) => loadPresetEnvDescriptors(preset)(envName),
|
env: (preset, envName) => loadPresetEnvDescriptors(preset)(envName),
|
||||||
overrides: (preset, index) => loadPresetOverridesDescriptors(preset)(index),
|
overrides: (preset, index) => loadPresetOverridesDescriptors(preset)(index),
|
||||||
overridesEnv: (preset, index, envName) => loadPresetOverridesEnvDescriptors(preset)(index)(envName),
|
overridesEnv: (preset, index, envName) => loadPresetOverridesEnvDescriptors(preset)(index)(envName),
|
||||||
createLogger: () => () => {}
|
createLogger: () => () => {}
|
||||||
});
|
});
|
||||||
exports.buildPresetChainWalker = buildPresetChainWalker;
|
|
||||||
const loadPresetDescriptors = (0, _caching.makeWeakCacheSync)(preset => buildRootDescriptors(preset, preset.alias, _configDescriptors.createUncachedDescriptors));
|
const loadPresetDescriptors = (0, _caching.makeWeakCacheSync)(preset => buildRootDescriptors(preset, preset.alias, _configDescriptors.createUncachedDescriptors));
|
||||||
const loadPresetEnvDescriptors = (0, _caching.makeWeakCacheSync)(preset => (0, _caching.makeStrongCacheSync)(envName => buildEnvDescriptors(preset, preset.alias, _configDescriptors.createUncachedDescriptors, envName)));
|
const loadPresetEnvDescriptors = (0, _caching.makeWeakCacheSync)(preset => (0, _caching.makeStrongCacheSync)(envName => buildEnvDescriptors(preset, preset.alias, _configDescriptors.createUncachedDescriptors, envName)));
|
||||||
const loadPresetOverridesDescriptors = (0, _caching.makeWeakCacheSync)(preset => (0, _caching.makeStrongCacheSync)(index => buildOverrideDescriptors(preset, preset.alias, _configDescriptors.createUncachedDescriptors, index)));
|
const loadPresetOverridesDescriptors = (0, _caching.makeWeakCacheSync)(preset => (0, _caching.makeStrongCacheSync)(index => buildOverrideDescriptors(preset, preset.alias, _configDescriptors.createUncachedDescriptors, index)));
|
||||||
|
@ -63,9 +61,9 @@ function* buildRootChain(opts, context) {
|
||||||
const programmaticReport = yield* programmaticLogger.output();
|
const programmaticReport = yield* programmaticLogger.output();
|
||||||
let configFile;
|
let configFile;
|
||||||
if (typeof opts.configFile === "string") {
|
if (typeof opts.configFile === "string") {
|
||||||
configFile = yield* (0, _files.loadConfig)(opts.configFile, context.cwd, context.envName, context.caller);
|
configFile = yield* (0, _index.loadConfig)(opts.configFile, context.cwd, context.envName, context.caller);
|
||||||
} else if (opts.configFile !== false) {
|
} else if (opts.configFile !== false) {
|
||||||
configFile = yield* (0, _files.findRootConfig)(context.root, context.envName, context.caller);
|
configFile = yield* (0, _index.findRootConfig)(context.root, context.envName, context.caller);
|
||||||
}
|
}
|
||||||
let {
|
let {
|
||||||
babelrc,
|
babelrc,
|
||||||
|
@ -79,7 +77,6 @@ function* buildRootChain(opts, context) {
|
||||||
const result = yield* loadFileChain(validatedFile, context, undefined, configFileLogger);
|
const result = yield* loadFileChain(validatedFile, context, undefined, configFileLogger);
|
||||||
if (!result) return null;
|
if (!result) return null;
|
||||||
configReport = yield* configFileLogger.output();
|
configReport = yield* configFileLogger.output();
|
||||||
|
|
||||||
if (babelrc === undefined) {
|
if (babelrc === undefined) {
|
||||||
babelrc = validatedFile.options.babelrc;
|
babelrc = validatedFile.options.babelrc;
|
||||||
}
|
}
|
||||||
|
@ -93,12 +90,12 @@ function* buildRootChain(opts, context) {
|
||||||
let isIgnored = false;
|
let isIgnored = false;
|
||||||
const fileChain = emptyChain();
|
const fileChain = emptyChain();
|
||||||
if ((babelrc === true || babelrc === undefined) && typeof context.filename === "string") {
|
if ((babelrc === true || babelrc === undefined) && typeof context.filename === "string") {
|
||||||
const pkgData = yield* (0, _files.findPackageData)(context.filename);
|
const pkgData = yield* (0, _index.findPackageData)(context.filename);
|
||||||
if (pkgData && babelrcLoadEnabled(context, pkgData, babelrcRoots, babelrcRootsDirectory)) {
|
if (pkgData && babelrcLoadEnabled(context, pkgData, babelrcRoots, babelrcRootsDirectory)) {
|
||||||
({
|
({
|
||||||
ignore: ignoreFile,
|
ignore: ignoreFile,
|
||||||
config: babelrcFile
|
config: babelrcFile
|
||||||
} = yield* (0, _files.findRelativeConfig)(pkgData, context.envName, context.caller));
|
} = yield* (0, _index.findRelativeConfig)(pkgData, context.envName, context.caller));
|
||||||
if (ignoreFile) {
|
if (ignoreFile) {
|
||||||
fileChain.files.add(ignoreFile.filepath);
|
fileChain.files.add(ignoreFile.filepath);
|
||||||
}
|
}
|
||||||
|
@ -122,8 +119,7 @@ function* buildRootChain(opts, context) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (context.showConfig) {
|
if (context.showConfig) {
|
||||||
console.log(`Babel configs on "${context.filename}" (ascending priority):\n` +
|
console.log(`Babel configs on "${context.filename}" (ascending priority):\n` + [configReport, babelRcReport, programmaticReport].filter(x => !!x).join("\n\n") + "\n-----End Babel configs-----");
|
||||||
[configReport, babelRcReport, programmaticReport].filter(x => !!x).join("\n\n") + "\n-----End Babel configs-----");
|
|
||||||
}
|
}
|
||||||
const chain = mergeChain(mergeChain(mergeChain(emptyChain(), configFileChain), fileChain), programmaticChain);
|
const chain = mergeChain(mergeChain(mergeChain(emptyChain(), configFileChain), fileChain), programmaticChain);
|
||||||
return {
|
return {
|
||||||
|
@ -140,7 +136,6 @@ function* buildRootChain(opts, context) {
|
||||||
function babelrcLoadEnabled(context, pkgData, babelrcRoots, babelrcRootsDirectory) {
|
function babelrcLoadEnabled(context, pkgData, babelrcRoots, babelrcRootsDirectory) {
|
||||||
if (typeof babelrcRoots === "boolean") return babelrcRoots;
|
if (typeof babelrcRoots === "boolean") return babelrcRoots;
|
||||||
const absoluteRoot = context.root;
|
const absoluteRoot = context.root;
|
||||||
|
|
||||||
if (babelrcRoots === undefined) {
|
if (babelrcRoots === undefined) {
|
||||||
return pkgData.directories.indexOf(absoluteRoot) !== -1;
|
return pkgData.directories.indexOf(absoluteRoot) !== -1;
|
||||||
}
|
}
|
||||||
|
@ -151,7 +146,6 @@ function babelrcLoadEnabled(context, pkgData, babelrcRoots, babelrcRootsDirector
|
||||||
babelrcPatterns = babelrcPatterns.map(pat => {
|
babelrcPatterns = babelrcPatterns.map(pat => {
|
||||||
return typeof pat === "string" ? _path().resolve(babelrcRootsDirectory, pat) : pat;
|
return typeof pat === "string" ? _path().resolve(babelrcRootsDirectory, pat) : pat;
|
||||||
});
|
});
|
||||||
|
|
||||||
if (babelrcPatterns.length === 1 && babelrcPatterns[0] === absoluteRoot) {
|
if (babelrcPatterns.length === 1 && babelrcPatterns[0] === absoluteRoot) {
|
||||||
return pkgData.directories.indexOf(absoluteRoot) !== -1;
|
return pkgData.directories.indexOf(absoluteRoot) !== -1;
|
||||||
}
|
}
|
||||||
|
@ -179,7 +173,6 @@ const validateExtendFile = (0, _caching.makeWeakCacheSync)(file => ({
|
||||||
dirname: file.dirname,
|
dirname: file.dirname,
|
||||||
options: (0, _options.validate)("extendsfile", file.options, file.filepath)
|
options: (0, _options.validate)("extendsfile", file.options, file.filepath)
|
||||||
}));
|
}));
|
||||||
|
|
||||||
const loadProgrammaticChain = makeChainWalker({
|
const loadProgrammaticChain = makeChainWalker({
|
||||||
root: input => buildRootDescriptors(input, "base", _configDescriptors.createCachedDescriptors),
|
root: input => buildRootDescriptors(input, "base", _configDescriptors.createCachedDescriptors),
|
||||||
env: (input, envName) => buildEnvDescriptors(input, "base", _configDescriptors.createCachedDescriptors, envName),
|
env: (input, envName) => buildEnvDescriptors(input, "base", _configDescriptors.createCachedDescriptors, envName),
|
||||||
|
@ -187,7 +180,6 @@ const loadProgrammaticChain = makeChainWalker({
|
||||||
overridesEnv: (input, index, envName) => buildOverrideEnvDescriptors(input, "base", _configDescriptors.createCachedDescriptors, index, envName),
|
overridesEnv: (input, index, envName) => buildOverrideEnvDescriptors(input, "base", _configDescriptors.createCachedDescriptors, index, envName),
|
||||||
createLogger: (input, context, baseLogger) => buildProgrammaticLogger(input, context, baseLogger)
|
createLogger: (input, context, baseLogger) => buildProgrammaticLogger(input, context, baseLogger)
|
||||||
});
|
});
|
||||||
|
|
||||||
const loadFileChainWalker = makeChainWalker({
|
const loadFileChainWalker = makeChainWalker({
|
||||||
root: file => loadFileDescriptors(file),
|
root: file => loadFileDescriptors(file),
|
||||||
env: (file, envName) => loadFileEnvDescriptors(file)(envName),
|
env: (file, envName) => loadFileEnvDescriptors(file)(envName),
|
||||||
|
@ -197,9 +189,7 @@ const loadFileChainWalker = makeChainWalker({
|
||||||
});
|
});
|
||||||
function* loadFileChain(input, context, files, baseLogger) {
|
function* loadFileChain(input, context, files, baseLogger) {
|
||||||
const chain = yield* loadFileChainWalker(input, context, files, baseLogger);
|
const chain = yield* loadFileChainWalker(input, context, files, baseLogger);
|
||||||
if (chain) {
|
chain == null || chain.files.add(input.filepath);
|
||||||
chain.files.add(input.filepath);
|
|
||||||
}
|
|
||||||
return chain;
|
return chain;
|
||||||
}
|
}
|
||||||
const loadFileDescriptors = (0, _caching.makeWeakCacheSync)(file => buildRootDescriptors(file, file.filepath, _configDescriptors.createUncachedDescriptors));
|
const loadFileDescriptors = (0, _caching.makeWeakCacheSync)(file => buildRootDescriptors(file, file.filepath, _configDescriptors.createUncachedDescriptors));
|
||||||
|
@ -233,14 +223,16 @@ function buildEnvDescriptors({
|
||||||
dirname,
|
dirname,
|
||||||
options
|
options
|
||||||
}, alias, descriptors, envName) {
|
}, alias, descriptors, envName) {
|
||||||
const opts = options.env && options.env[envName];
|
var _options$env;
|
||||||
|
const opts = (_options$env = options.env) == null ? void 0 : _options$env[envName];
|
||||||
return opts ? descriptors(dirname, opts, `${alias}.env["${envName}"]`) : null;
|
return opts ? descriptors(dirname, opts, `${alias}.env["${envName}"]`) : null;
|
||||||
}
|
}
|
||||||
function buildOverrideDescriptors({
|
function buildOverrideDescriptors({
|
||||||
dirname,
|
dirname,
|
||||||
options
|
options
|
||||||
}, alias, descriptors, index) {
|
}, alias, descriptors, index) {
|
||||||
const opts = options.overrides && options.overrides[index];
|
var _options$overrides;
|
||||||
|
const opts = (_options$overrides = options.overrides) == null ? void 0 : _options$overrides[index];
|
||||||
if (!opts) throw new Error("Assertion failure - missing override");
|
if (!opts) throw new Error("Assertion failure - missing override");
|
||||||
return descriptors(dirname, opts, `${alias}.overrides[${index}]`);
|
return descriptors(dirname, opts, `${alias}.overrides[${index}]`);
|
||||||
}
|
}
|
||||||
|
@ -248,9 +240,10 @@ function buildOverrideEnvDescriptors({
|
||||||
dirname,
|
dirname,
|
||||||
options
|
options
|
||||||
}, alias, descriptors, index, envName) {
|
}, alias, descriptors, index, envName) {
|
||||||
const override = options.overrides && options.overrides[index];
|
var _options$overrides2, _override$env;
|
||||||
|
const override = (_options$overrides2 = options.overrides) == null ? void 0 : _options$overrides2[index];
|
||||||
if (!override) throw new Error("Assertion failure - missing override");
|
if (!override) throw new Error("Assertion failure - missing override");
|
||||||
const opts = override.env && override.env[envName];
|
const opts = (_override$env = override.env) == null ? void 0 : _override$env[envName];
|
||||||
return opts ? descriptors(dirname, opts, `${alias}.overrides[${index}].env["${envName}"]`) : null;
|
return opts ? descriptors(dirname, opts, `${alias}.overrides[${index}].env["${envName}"]`) : null;
|
||||||
}
|
}
|
||||||
function makeChainWalker({
|
function makeChainWalker({
|
||||||
|
@ -299,7 +292,6 @@ function makeChainWalker({
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (flattenedConfigs.some(({
|
if (flattenedConfigs.some(({
|
||||||
config: {
|
config: {
|
||||||
options: {
|
options: {
|
||||||
|
@ -328,7 +320,7 @@ function makeChainWalker({
|
||||||
}
|
}
|
||||||
function* mergeExtendsChain(chain, opts, dirname, context, files, baseLogger) {
|
function* mergeExtendsChain(chain, opts, dirname, context, files, baseLogger) {
|
||||||
if (opts.extends === undefined) return true;
|
if (opts.extends === undefined) return true;
|
||||||
const file = yield* (0, _files.loadConfig)(opts.extends, dirname, context.envName, context.caller);
|
const file = yield* (0, _index.loadConfig)(opts.extends, dirname, context.envName, context.caller);
|
||||||
if (files.has(file)) {
|
if (files.has(file)) {
|
||||||
throw new Error(`Configuration cycle detected loading ${file.filepath}.\n` + `File already loaded following the config chain:\n` + Array.from(files, file => ` - ${file.filepath}`).join("\n"));
|
throw new Error(`Configuration cycle detected loading ${file.filepath}.\n` + `File already loaded following the config chain:\n` + Array.from(files, file => ` - ${file.filepath}`).join("\n"));
|
||||||
}
|
}
|
||||||
|
@ -379,8 +371,7 @@ function normalizeOptions(opts) {
|
||||||
delete options.test;
|
delete options.test;
|
||||||
delete options.include;
|
delete options.include;
|
||||||
delete options.exclude;
|
delete options.exclude;
|
||||||
|
if (hasOwnProperty.call(options, "sourceMap")) {
|
||||||
if (Object.prototype.hasOwnProperty.call(options, "sourceMap")) {
|
|
||||||
options.sourceMaps = options.sourceMap;
|
options.sourceMaps = options.sourceMap;
|
||||||
delete options.sourceMap;
|
delete options.sourceMap;
|
||||||
}
|
}
|
||||||
|
@ -403,7 +394,6 @@ function dedupDescriptors(items) {
|
||||||
value: item
|
value: item
|
||||||
};
|
};
|
||||||
descriptors.push(desc);
|
descriptors.push(desc);
|
||||||
|
|
||||||
if (!item.ownPass) nameMap.set(item.name, desc);
|
if (!item.ownPass) nameMap.set(item.name, desc);
|
||||||
} else {
|
} else {
|
||||||
desc.value = item;
|
desc.value = item;
|
||||||
|
@ -428,14 +418,12 @@ function configFieldIsApplicable(context, test, dirname, configName) {
|
||||||
const patterns = Array.isArray(test) ? test : [test];
|
const patterns = Array.isArray(test) ? test : [test];
|
||||||
return matchesPatterns(context, patterns, dirname, configName);
|
return matchesPatterns(context, patterns, dirname, configName);
|
||||||
}
|
}
|
||||||
|
|
||||||
function ignoreListReplacer(_key, value) {
|
function ignoreListReplacer(_key, value) {
|
||||||
if (value instanceof RegExp) {
|
if (value instanceof RegExp) {
|
||||||
return String(value);
|
return String(value);
|
||||||
}
|
}
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
function shouldIgnore(context, ignore, only, dirname) {
|
function shouldIgnore(context, ignore, only, dirname) {
|
||||||
if (ignore && matchesPatterns(context, ignore, dirname)) {
|
if (ignore && matchesPatterns(context, ignore, dirname)) {
|
||||||
var _context$filename;
|
var _context$filename;
|
||||||
|
@ -457,7 +445,6 @@ function shouldIgnore(context, ignore, only, dirname) {
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function matchesPatterns(context, patterns, dirname, configName) {
|
function matchesPatterns(context, patterns, dirname, configName) {
|
||||||
return patterns.some(pattern => matchPattern(pattern, dirname, context.filename, context, configName));
|
return patterns.some(pattern => matchPattern(pattern, dirname, context.filename, context, configName));
|
||||||
}
|
}
|
||||||
|
|
2
node_modules/@babel/core/lib/config/config-chain.js.map
generated
vendored
Executable file → Normal file
2
node_modules/@babel/core/lib/config/config-chain.js.map
generated
vendored
Executable file → Normal file
File diff suppressed because one or more lines are too long
32
node_modules/@babel/core/lib/config/config-descriptors.js
generated
vendored
Executable file → Normal file
32
node_modules/@babel/core/lib/config/config-descriptors.js
generated
vendored
Executable file → Normal file
|
@ -13,13 +13,14 @@ function _gensync() {
|
||||||
};
|
};
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
var _functional = require("../gensync-utils/functional");
|
var _functional = require("../gensync-utils/functional.js");
|
||||||
var _files = require("./files");
|
var _index = require("./files/index.js");
|
||||||
var _item = require("./item");
|
var _item = require("./item.js");
|
||||||
var _caching = require("./caching");
|
var _caching = require("./caching.js");
|
||||||
var _resolveTargets = require("./resolve-targets");
|
var _resolveTargets = require("./resolve-targets.js");
|
||||||
function isEqualDescriptor(a, b) {
|
function isEqualDescriptor(a, b) {
|
||||||
return a.name === b.name && a.value === b.value && a.options === b.options && a.dirname === b.dirname && a.alias === b.alias && a.ownPass === b.ownPass && (a.file && a.file.request) === (b.file && b.file.request) && (a.file && a.file.resolved) === (b.file && b.file.resolved);
|
var _a$file, _b$file, _a$file2, _b$file2;
|
||||||
|
return a.name === b.name && a.value === b.value && a.options === b.options && a.dirname === b.dirname && a.alias === b.alias && a.ownPass === b.ownPass && ((_a$file = a.file) == null ? void 0 : _a$file.request) === ((_b$file = b.file) == null ? void 0 : _b$file.request) && ((_a$file2 = a.file) == null ? void 0 : _a$file2.resolved) === ((_b$file2 = b.file) == null ? void 0 : _b$file2.resolved);
|
||||||
}
|
}
|
||||||
function* handlerOf(value) {
|
function* handlerOf(value) {
|
||||||
return value;
|
return value;
|
||||||
|
@ -30,7 +31,6 @@ function optionsWithResolvedBrowserslistConfigFile(options, dirname) {
|
||||||
}
|
}
|
||||||
return options;
|
return options;
|
||||||
}
|
}
|
||||||
|
|
||||||
function createCachedDescriptors(dirname, options, alias) {
|
function createCachedDescriptors(dirname, options, alias) {
|
||||||
const {
|
const {
|
||||||
plugins,
|
plugins,
|
||||||
|
@ -39,13 +39,10 @@ function createCachedDescriptors(dirname, options, alias) {
|
||||||
} = options;
|
} = options;
|
||||||
return {
|
return {
|
||||||
options: optionsWithResolvedBrowserslistConfigFile(options, dirname),
|
options: optionsWithResolvedBrowserslistConfigFile(options, dirname),
|
||||||
plugins: plugins ? () =>
|
plugins: plugins ? () => createCachedPluginDescriptors(plugins, dirname)(alias) : () => handlerOf([]),
|
||||||
createCachedPluginDescriptors(plugins, dirname)(alias) : () => handlerOf([]),
|
presets: presets ? () => createCachedPresetDescriptors(presets, dirname)(alias)(!!passPerPreset) : () => handlerOf([])
|
||||||
presets: presets ? () =>
|
|
||||||
createCachedPresetDescriptors(presets, dirname)(alias)(!!passPerPreset) : () => handlerOf([])
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
function createUncachedDescriptors(dirname, options, alias) {
|
function createUncachedDescriptors(dirname, options, alias) {
|
||||||
return {
|
return {
|
||||||
options: optionsWithResolvedBrowserslistConfigFile(options, dirname),
|
options: optionsWithResolvedBrowserslistConfigFile(options, dirname),
|
||||||
|
@ -58,8 +55,7 @@ const createCachedPresetDescriptors = (0, _caching.makeWeakCacheSync)((items, ca
|
||||||
const dirname = cache.using(dir => dir);
|
const dirname = cache.using(dir => dir);
|
||||||
return (0, _caching.makeStrongCacheSync)(alias => (0, _caching.makeStrongCache)(function* (passPerPreset) {
|
return (0, _caching.makeStrongCacheSync)(alias => (0, _caching.makeStrongCache)(function* (passPerPreset) {
|
||||||
const descriptors = yield* createPresetDescriptors(items, dirname, alias, passPerPreset);
|
const descriptors = yield* createPresetDescriptors(items, dirname, alias, passPerPreset);
|
||||||
return descriptors.map(
|
return descriptors.map(desc => loadCachedDescriptor(PRESET_DESCRIPTOR_CACHE, desc));
|
||||||
desc => loadCachedDescriptor(PRESET_DESCRIPTOR_CACHE, desc));
|
|
||||||
}));
|
}));
|
||||||
});
|
});
|
||||||
const PLUGIN_DESCRIPTOR_CACHE = new WeakMap();
|
const PLUGIN_DESCRIPTOR_CACHE = new WeakMap();
|
||||||
|
@ -67,13 +63,10 @@ const createCachedPluginDescriptors = (0, _caching.makeWeakCacheSync)((items, ca
|
||||||
const dirname = cache.using(dir => dir);
|
const dirname = cache.using(dir => dir);
|
||||||
return (0, _caching.makeStrongCache)(function* (alias) {
|
return (0, _caching.makeStrongCache)(function* (alias) {
|
||||||
const descriptors = yield* createPluginDescriptors(items, dirname, alias);
|
const descriptors = yield* createPluginDescriptors(items, dirname, alias);
|
||||||
return descriptors.map(
|
return descriptors.map(desc => loadCachedDescriptor(PLUGIN_DESCRIPTOR_CACHE, desc));
|
||||||
desc => loadCachedDescriptor(PLUGIN_DESCRIPTOR_CACHE, desc));
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
const DEFAULT_OPTIONS = {};
|
const DEFAULT_OPTIONS = {};
|
||||||
|
|
||||||
function loadCachedDescriptor(cache, desc) {
|
function loadCachedDescriptor(cache, desc) {
|
||||||
const {
|
const {
|
||||||
value,
|
value,
|
||||||
|
@ -114,7 +107,6 @@ function* createDescriptors(type, items, dirname, alias, ownPass) {
|
||||||
assertNoDuplicates(descriptors);
|
assertNoDuplicates(descriptors);
|
||||||
return descriptors;
|
return descriptors;
|
||||||
}
|
}
|
||||||
|
|
||||||
function* createDescriptor(pair, dirname, {
|
function* createDescriptor(pair, dirname, {
|
||||||
type,
|
type,
|
||||||
alias,
|
alias,
|
||||||
|
@ -140,7 +132,7 @@ function* createDescriptor(pair, dirname, {
|
||||||
if (typeof type !== "string") {
|
if (typeof type !== "string") {
|
||||||
throw new Error("To resolve a string-based item, the type of item must be given");
|
throw new Error("To resolve a string-based item, the type of item must be given");
|
||||||
}
|
}
|
||||||
const resolver = type === "plugin" ? _files.loadPlugin : _files.loadPreset;
|
const resolver = type === "plugin" ? _index.loadPlugin : _index.loadPreset;
|
||||||
const request = value;
|
const request = value;
|
||||||
({
|
({
|
||||||
filepath,
|
filepath,
|
||||||
|
|
2
node_modules/@babel/core/lib/config/config-descriptors.js.map
generated
vendored
Executable file → Normal file
2
node_modules/@babel/core/lib/config/config-descriptors.js.map
generated
vendored
Executable file → Normal file
File diff suppressed because one or more lines are too long
116
node_modules/@babel/core/lib/config/files/configuration.js
generated
vendored
Executable file → Normal file
116
node_modules/@babel/core/lib/config/files/configuration.js
generated
vendored
Executable file → Normal file
|
@ -44,69 +44,62 @@ function _gensync() {
|
||||||
};
|
};
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
var _caching = require("../caching");
|
var _caching = require("../caching.js");
|
||||||
var _configApi = require("../helpers/config-api");
|
var _configApi = require("../helpers/config-api.js");
|
||||||
var _utils = require("./utils");
|
var _utils = require("./utils.js");
|
||||||
var _moduleTypes = require("./module-types");
|
var _moduleTypes = require("./module-types.js");
|
||||||
var _patternToRegex = require("../pattern-to-regex");
|
var _patternToRegex = require("../pattern-to-regex.js");
|
||||||
var _configError = require("../../errors/config-error");
|
var _configError = require("../../errors/config-error.js");
|
||||||
var fs = require("../../gensync-utils/fs");
|
var fs = require("../../gensync-utils/fs.js");
|
||||||
function _module() {
|
var _rewriteStackTrace = require("../../errors/rewrite-stack-trace.js");
|
||||||
const data = require("module");
|
|
||||||
_module = function () {
|
|
||||||
return data;
|
|
||||||
};
|
|
||||||
return data;
|
|
||||||
}
|
|
||||||
var _rewriteStackTrace = require("../../errors/rewrite-stack-trace");
|
|
||||||
const debug = _debug()("babel:config:loading:files:configuration");
|
const debug = _debug()("babel:config:loading:files:configuration");
|
||||||
const ROOT_CONFIG_FILENAMES = ["babel.config.js", "babel.config.cjs", "babel.config.mjs", "babel.config.json"];
|
const ROOT_CONFIG_FILENAMES = exports.ROOT_CONFIG_FILENAMES = ["babel.config.js", "babel.config.cjs", "babel.config.mjs", "babel.config.json", "babel.config.cts"];
|
||||||
exports.ROOT_CONFIG_FILENAMES = ROOT_CONFIG_FILENAMES;
|
const RELATIVE_CONFIG_FILENAMES = [".babelrc", ".babelrc.js", ".babelrc.cjs", ".babelrc.mjs", ".babelrc.json", ".babelrc.cts"];
|
||||||
const RELATIVE_CONFIG_FILENAMES = [".babelrc", ".babelrc.js", ".babelrc.cjs", ".babelrc.mjs", ".babelrc.json"];
|
|
||||||
const BABELIGNORE_FILENAME = ".babelignore";
|
const BABELIGNORE_FILENAME = ".babelignore";
|
||||||
const LOADING_CONFIGS = new Set();
|
const runConfig = (0, _caching.makeWeakCache)(function* runConfig(options, cache) {
|
||||||
const readConfigJS = (0, _caching.makeStrongCache)(function* readConfigJS(filepath, cache) {
|
yield* [];
|
||||||
if (!_fs().existsSync(filepath)) {
|
return {
|
||||||
cache.never();
|
options: (0, _rewriteStackTrace.endHiddenCallStack)(options)((0, _configApi.makeConfigAPI)(cache)),
|
||||||
return null;
|
cacheNeedsConfiguration: !cache.configured()
|
||||||
}
|
};
|
||||||
|
});
|
||||||
if (LOADING_CONFIGS.has(filepath)) {
|
function* readConfigCode(filepath, data) {
|
||||||
cache.never();
|
if (!_fs().existsSync(filepath)) return null;
|
||||||
debug("Auto-ignoring usage of config %o.", filepath);
|
let options = yield* (0, _moduleTypes.default)(filepath, "You appear to be using a native ECMAScript module configuration " + "file, which is only supported when running Babel asynchronously.");
|
||||||
return {
|
let cacheNeedsConfiguration = false;
|
||||||
filepath,
|
|
||||||
dirname: _path().dirname(filepath),
|
|
||||||
options: {}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
let options;
|
|
||||||
try {
|
|
||||||
LOADING_CONFIGS.add(filepath);
|
|
||||||
options = yield* (0, _moduleTypes.default)(filepath, "You appear to be using a native ECMAScript module configuration " + "file, which is only supported when running Babel asynchronously.");
|
|
||||||
} finally {
|
|
||||||
LOADING_CONFIGS.delete(filepath);
|
|
||||||
}
|
|
||||||
let assertCache = false;
|
|
||||||
if (typeof options === "function") {
|
if (typeof options === "function") {
|
||||||
yield* [];
|
({
|
||||||
options = (0, _rewriteStackTrace.endHiddenCallStack)(options)((0, _configApi.makeConfigAPI)(cache));
|
options,
|
||||||
assertCache = true;
|
cacheNeedsConfiguration
|
||||||
|
} = yield* runConfig(options, data));
|
||||||
}
|
}
|
||||||
if (!options || typeof options !== "object" || Array.isArray(options)) {
|
if (!options || typeof options !== "object" || Array.isArray(options)) {
|
||||||
throw new _configError.default(`Configuration should be an exported JavaScript object.`, filepath);
|
throw new _configError.default(`Configuration should be an exported JavaScript object.`, filepath);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (typeof options.then === "function") {
|
if (typeof options.then === "function") {
|
||||||
|
options.catch == null || options.catch(() => {});
|
||||||
throw new _configError.default(`You appear to be using an async configuration, ` + `which your current version of Babel does not support. ` + `We may add support for this in the future, ` + `but if you're on the most recent version of @babel/core and still ` + `seeing this error, then you'll need to synchronously return your config.`, filepath);
|
throw new _configError.default(`You appear to be using an async configuration, ` + `which your current version of Babel does not support. ` + `We may add support for this in the future, ` + `but if you're on the most recent version of @babel/core and still ` + `seeing this error, then you'll need to synchronously return your config.`, filepath);
|
||||||
}
|
}
|
||||||
if (assertCache && !cache.configured()) throwConfigError(filepath);
|
if (cacheNeedsConfiguration) throwConfigError(filepath);
|
||||||
return {
|
return buildConfigFileObject(options, filepath);
|
||||||
filepath,
|
}
|
||||||
dirname: _path().dirname(filepath),
|
const cfboaf = new WeakMap();
|
||||||
options
|
function buildConfigFileObject(options, filepath) {
|
||||||
};
|
let configFilesByFilepath = cfboaf.get(options);
|
||||||
});
|
if (!configFilesByFilepath) {
|
||||||
|
cfboaf.set(options, configFilesByFilepath = new Map());
|
||||||
|
}
|
||||||
|
let configFile = configFilesByFilepath.get(filepath);
|
||||||
|
if (!configFile) {
|
||||||
|
configFile = {
|
||||||
|
filepath,
|
||||||
|
dirname: _path().dirname(filepath),
|
||||||
|
options
|
||||||
|
};
|
||||||
|
configFilesByFilepath.set(filepath, configFile);
|
||||||
|
}
|
||||||
|
return configFile;
|
||||||
|
}
|
||||||
const packageToBabelConfig = (0, _caching.makeWeakCacheSync)(file => {
|
const packageToBabelConfig = (0, _caching.makeWeakCacheSync)(file => {
|
||||||
const babel = file.options["babel"];
|
const babel = file.options["babel"];
|
||||||
if (typeof babel === "undefined") return null;
|
if (typeof babel === "undefined") return null;
|
||||||
|
@ -225,13 +218,20 @@ function* loadConfig(name, dirname, envName, caller) {
|
||||||
debug("Loaded config %o from %o.", name, dirname);
|
debug("Loaded config %o from %o.", name, dirname);
|
||||||
return conf;
|
return conf;
|
||||||
}
|
}
|
||||||
|
|
||||||
function readConfig(filepath, envName, caller) {
|
function readConfig(filepath, envName, caller) {
|
||||||
const ext = _path().extname(filepath);
|
const ext = _path().extname(filepath);
|
||||||
return ext === ".js" || ext === ".cjs" || ext === ".mjs" ? readConfigJS(filepath, {
|
switch (ext) {
|
||||||
envName,
|
case ".js":
|
||||||
caller
|
case ".cjs":
|
||||||
}) : readConfigJSON5(filepath);
|
case ".mjs":
|
||||||
|
case ".cts":
|
||||||
|
return readConfigCode(filepath, {
|
||||||
|
envName,
|
||||||
|
caller
|
||||||
|
});
|
||||||
|
default:
|
||||||
|
return readConfigJSON5(filepath);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
function* resolveShowConfigPath(dirname) {
|
function* resolveShowConfigPath(dirname) {
|
||||||
const targetPath = process.env.BABEL_SHOW_CONFIG_FOR;
|
const targetPath = process.env.BABEL_SHOW_CONFIG_FOR;
|
||||||
|
|
2
node_modules/@babel/core/lib/config/files/configuration.js.map
generated
vendored
Executable file → Normal file
2
node_modules/@babel/core/lib/config/files/configuration.js.map
generated
vendored
Executable file → Normal file
File diff suppressed because one or more lines are too long
|
@ -1,35 +0,0 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
Object.defineProperty(exports, "__esModule", {
|
|
||||||
value: true
|
|
||||||
});
|
|
||||||
exports.default = resolve;
|
|
||||||
function _module() {
|
|
||||||
const data = require("module");
|
|
||||||
_module = function () {
|
|
||||||
return data;
|
|
||||||
};
|
|
||||||
return data;
|
|
||||||
}
|
|
||||||
var _importMetaResolve = require("../../vendor/import-meta-resolve");
|
|
||||||
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
||||||
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
||||||
let import_;
|
|
||||||
try {
|
|
||||||
import_ = require("./import.cjs");
|
|
||||||
} catch (_unused) {}
|
|
||||||
|
|
||||||
const importMetaResolveP = import_ &&
|
|
||||||
process.execArgv.includes("--experimental-import-meta-resolve") ? import_("data:text/javascript,export default import.meta.resolve").then(m => m.default || _importMetaResolve.resolve, () => _importMetaResolve.resolve) : Promise.resolve(_importMetaResolve.resolve);
|
|
||||||
function resolve(_x, _x2) {
|
|
||||||
return _resolve.apply(this, arguments);
|
|
||||||
}
|
|
||||||
function _resolve() {
|
|
||||||
_resolve = _asyncToGenerator(function* (specifier, parent) {
|
|
||||||
return (yield importMetaResolveP)(specifier, parent);
|
|
||||||
});
|
|
||||||
return _resolve.apply(this, arguments);
|
|
||||||
}
|
|
||||||
0 && 0;
|
|
||||||
|
|
||||||
//# sourceMappingURL=import-meta-resolve.js.map
|
|
|
@ -1 +0,0 @@
|
||||||
{"version":3,"names":["import_","require","importMetaResolveP","process","execArgv","includes","then","m","default","polyfill","Promise","resolve","specifier","parent"],"sources":["../../../src/config/files/import-meta-resolve.ts"],"sourcesContent":["import { createRequire } from \"module\";\nimport { resolve as polyfill } from \"../../vendor/import-meta-resolve\";\n\nconst require = createRequire(import.meta.url);\n\nlet import_;\ntry {\n // Node < 13.3 doesn't support import() syntax.\n import_ = require(\"./import.cjs\");\n} catch {}\n\n// import.meta.resolve is only available in ESM, but this file is compiled to CJS.\n// We can extract it using dynamic import.\nconst importMetaResolveP: Promise<ImportMeta[\"resolve\"]> =\n import_ &&\n // Due to a Node.js/V8 bug (https://github.com/nodejs/node/issues/35889), we cannot\n // use always dynamic import because it segfaults when running in a Node.js `vm` context,\n // which is used by the default Jest environment and by webpack-cli.\n //\n // However, import.meta.resolve is experimental and only enabled when Node.js is run\n // with the `--experimental-import-meta-resolve` flag: we can avoid calling import()\n // when that flag is not enabled, so that the default behavior never segfaults.\n //\n // Hopefully, before Node.js unflags import.meta.resolve, either:\n // - we will move to ESM, so that we have direct access to import.meta.resolve, or\n // - the V8 bug will be fixed so that we can safely use dynamic import by default.\n //\n // I (@nicolo-ribaudo) am really anoyed by this bug, because there is no known\n // work-around other than \"don't use dynamic import if you are running in a `vm` context\",\n // but there is no reliable way to detect it (you cannot try/catch segfaults).\n //\n // This is the only place where we *need* to use dynamic import because we need to access\n // an ES module. All the other places will first try using require() and *then*, if\n // it throws because it's a module, will fallback to import().\n process.execArgv.includes(\"--experimental-import-meta-resolve\")\n ? import_(\"data:text/javascript,export default import.meta.resolve\").then(\n (m: { default: ImportMeta[\"resolve\"] | undefined }) =>\n m.default || polyfill,\n () => polyfill,\n )\n : Promise.resolve(polyfill);\n\nexport default async function resolve(\n specifier: Parameters<ImportMeta[\"resolve\"]>[0],\n parent?: Parameters<ImportMeta[\"resolve\"]>[1],\n): ReturnType<ImportMeta[\"resolve\"]> {\n return (await importMetaResolveP)(specifier, parent);\n}\n"],"mappings":";;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;AAAuE;AAAA;AAIvE,IAAIA,OAAO;AACX,IAAI;EAEFA,OAAO,GAAGC,OAAO,CAAC,cAAc,CAAC;AACnC,CAAC,CAAC,gBAAM,CAAC;;AAIT,MAAMC,kBAAkD,GACtDF,OAAO;AAoBPG,OAAO,CAACC,QAAQ,CAACC,QAAQ,CAAC,oCAAoC,CAAC,GAC3DL,OAAO,CAAC,yDAAyD,CAAC,CAACM,IAAI,CACpEC,CAAiD,IAChDA,CAAC,CAACC,OAAO,IAAIC,0BAAQ,EACvB,MAAMA,0BAAQ,CACf,GACDC,OAAO,CAACC,OAAO,CAACF,0BAAQ,CAAC;AAAC,SAEFE,OAAO;EAAA;AAAA;AAAA;EAAA,6BAAtB,WACbC,SAA+C,EAC/CC,MAA6C,EACV;IACnC,OAAO,OAAOX,kBAAkB,EAAEU,SAAS,EAAEC,MAAM,CAAC;EACtD,CAAC;EAAA;AAAA;AAAA"}
|
|
2
node_modules/@babel/core/lib/config/files/import.cjs
generated
vendored
Executable file → Normal file
2
node_modules/@babel/core/lib/config/files/import.cjs
generated
vendored
Executable file → Normal file
|
@ -1,5 +1,3 @@
|
||||||
|
|
||||||
|
|
||||||
module.exports = function import_(filepath) {
|
module.exports = function import_(filepath) {
|
||||||
return import(filepath);
|
return import(filepath);
|
||||||
};
|
};
|
||||||
|
|
2
node_modules/@babel/core/lib/config/files/import.cjs.map
generated
vendored
Executable file → Normal file
2
node_modules/@babel/core/lib/config/files/import.cjs.map
generated
vendored
Executable file → Normal file
|
@ -1 +1 @@
|
||||||
{"version":3,"names":["module","exports","import_","filepath"],"sources":["../../../src/config/files/import.cjs"],"sourcesContent":["// We keep this in a separate file so that in older node versions, where\n// import() isn't supported, we can try/catch around the require() call\n// when loading this file.\n\nmodule.exports = function import_(filepath) {\n return import(filepath);\n};\n"],"mappings":";;AAIAA,MAAM,CAACC,OAAO,GAAG,SAASC,OAAO,CAACC,QAAQ,EAAE;EAC1C,OAAO,MAAM,CAACA,QAAQ,CAAC;AACzB,CAAC;AAAC"}
|
{"version":3,"names":["module","exports","import_","filepath"],"sources":["../../../src/config/files/import.cjs"],"sourcesContent":["// We keep this in a separate file so that in older node versions, where\n// import() isn't supported, we can try/catch around the require() call\n// when loading this file.\n\nmodule.exports = function import_(filepath) {\n return import(filepath);\n};\n"],"mappings":"AAIAA,MAAM,CAACC,OAAO,GAAG,SAASC,OAAOA,CAACC,QAAQ,EAAE;EAC1C,OAAO,OAAOA,QAAQ,CAAC;AACzB,CAAC;AAAC","ignoreList":[]}
|
30
node_modules/@babel/core/lib/config/files/index-browser.js
generated
vendored
Executable file → Normal file
30
node_modules/@babel/core/lib/config/files/index-browser.js
generated
vendored
Executable file → Normal file
|
@ -14,11 +14,9 @@ exports.loadPreset = loadPreset;
|
||||||
exports.resolvePlugin = resolvePlugin;
|
exports.resolvePlugin = resolvePlugin;
|
||||||
exports.resolvePreset = resolvePreset;
|
exports.resolvePreset = resolvePreset;
|
||||||
exports.resolveShowConfigPath = resolveShowConfigPath;
|
exports.resolveShowConfigPath = resolveShowConfigPath;
|
||||||
function findConfigUpwards(
|
function findConfigUpwards(rootDir) {
|
||||||
rootDir) {
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
function* findPackageData(filepath) {
|
function* findPackageData(filepath) {
|
||||||
return {
|
return {
|
||||||
filepath,
|
filepath,
|
||||||
|
@ -27,41 +25,25 @@ function* findPackageData(filepath) {
|
||||||
isPackage: false
|
isPackage: false
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
function* findRelativeConfig(pkgData, envName, caller) {
|
||||||
function* findRelativeConfig(
|
|
||||||
pkgData,
|
|
||||||
envName,
|
|
||||||
caller) {
|
|
||||||
return {
|
return {
|
||||||
config: null,
|
config: null,
|
||||||
ignore: null
|
ignore: null
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
function* findRootConfig(dirname, envName, caller) {
|
||||||
function* findRootConfig(
|
|
||||||
dirname,
|
|
||||||
envName,
|
|
||||||
caller) {
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
function* loadConfig(name, dirname, envName, caller) {
|
||||||
function* loadConfig(name, dirname,
|
|
||||||
envName,
|
|
||||||
caller) {
|
|
||||||
throw new Error(`Cannot load ${name} relative to ${dirname} in a browser`);
|
throw new Error(`Cannot load ${name} relative to ${dirname} in a browser`);
|
||||||
}
|
}
|
||||||
|
function* resolveShowConfigPath(dirname) {
|
||||||
function* resolveShowConfigPath(
|
|
||||||
dirname) {
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
const ROOT_CONFIG_FILENAMES = [];
|
const ROOT_CONFIG_FILENAMES = exports.ROOT_CONFIG_FILENAMES = [];
|
||||||
|
|
||||||
exports.ROOT_CONFIG_FILENAMES = ROOT_CONFIG_FILENAMES;
|
|
||||||
function resolvePlugin(name, dirname) {
|
function resolvePlugin(name, dirname) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
function resolvePreset(name, dirname) {
|
function resolvePreset(name, dirname) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
2
node_modules/@babel/core/lib/config/files/index-browser.js.map
generated
vendored
Executable file → Normal file
2
node_modules/@babel/core/lib/config/files/index-browser.js.map
generated
vendored
Executable file → Normal file
|
@ -1 +1 @@
|
||||||
{"version":3,"names":["findConfigUpwards","rootDir","findPackageData","filepath","directories","pkg","isPackage","findRelativeConfig","pkgData","envName","caller","config","ignore","findRootConfig","dirname","loadConfig","name","Error","resolveShowConfigPath","ROOT_CONFIG_FILENAMES","resolvePlugin","resolvePreset","loadPlugin","loadPreset"],"sources":["../../../src/config/files/index-browser.ts"],"sourcesContent":["import type { Handler } from \"gensync\";\n\nimport type {\n ConfigFile,\n IgnoreFile,\n RelativeConfig,\n FilePackageData,\n} from \"./types\";\n\nimport type { CallerMetadata } from \"../validation/options\";\n\nexport type { ConfigFile, IgnoreFile, RelativeConfig, FilePackageData };\n\nexport function findConfigUpwards(\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n rootDir: string,\n): string | null {\n return null;\n}\n\n// eslint-disable-next-line require-yield\nexport function* findPackageData(filepath: string): Handler<FilePackageData> {\n return {\n filepath,\n directories: [],\n pkg: null,\n isPackage: false,\n };\n}\n\n// eslint-disable-next-line require-yield\nexport function* findRelativeConfig(\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n pkgData: FilePackageData,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n envName: string,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n caller: CallerMetadata | undefined,\n): Handler<RelativeConfig> {\n return { config: null, ignore: null };\n}\n\n// eslint-disable-next-line require-yield\nexport function* findRootConfig(\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n dirname: string,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n envName: string,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n caller: CallerMetadata | undefined,\n): Handler<ConfigFile | null> {\n return null;\n}\n\n// eslint-disable-next-line require-yield\nexport function* loadConfig(\n name: string,\n dirname: string,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n envName: string,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n caller: CallerMetadata | undefined,\n): Handler<ConfigFile> {\n throw new Error(`Cannot load ${name} relative to ${dirname} in a browser`);\n}\n\n// eslint-disable-next-line require-yield\nexport function* resolveShowConfigPath(\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n dirname: string,\n): Handler<string | null> {\n return null;\n}\n\nexport const ROOT_CONFIG_FILENAMES: string[] = [];\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function resolvePlugin(name: string, dirname: string): string | null {\n return null;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function resolvePreset(name: string, dirname: string): string | null {\n return null;\n}\n\nexport function loadPlugin(\n name: string,\n dirname: string,\n): Handler<{\n filepath: string;\n value: unknown;\n}> {\n throw new Error(\n `Cannot load plugin ${name} relative to ${dirname} in a browser`,\n );\n}\n\nexport function loadPreset(\n name: string,\n dirname: string,\n): Handler<{\n filepath: string;\n value: unknown;\n}> {\n throw new Error(\n `Cannot load preset ${name} relative to ${dirname} in a browser`,\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAaO,SAASA,iBAAiB;AAE/BC,OAAe,EACA;EACf,OAAO,IAAI;AACb;;AAGO,UAAUC,eAAe,CAACC,QAAgB,EAA4B;EAC3E,OAAO;IACLA,QAAQ;IACRC,WAAW,EAAE,EAAE;IACfC,GAAG,EAAE,IAAI;IACTC,SAAS,EAAE;EACb,CAAC;AACH;;AAGO,UAAUC,kBAAkB;AAEjCC,OAAwB;AAExBC,OAAe;AAEfC,MAAkC,EACT;EACzB,OAAO;IAAEC,MAAM,EAAE,IAAI;IAAEC,MAAM,EAAE;EAAK,CAAC;AACvC;;AAGO,UAAUC,cAAc;AAE7BC,OAAe;AAEfL,OAAe;AAEfC,MAAkC,EACN;EAC5B,OAAO,IAAI;AACb;;AAGO,UAAUK,UAAU,CACzBC,IAAY,EACZF,OAAe;AAEfL,OAAe;AAEfC,MAAkC,EACb;EACrB,MAAM,IAAIO,KAAK,CAAE,eAAcD,IAAK,gBAAeF,OAAQ,eAAc,CAAC;AAC5E;;AAGO,UAAUI,qBAAqB;AAEpCJ,OAAe,EACS;EACxB,OAAO,IAAI;AACb;AAEO,MAAMK,qBAA+B,GAAG,EAAE;;AAAC;AAG3C,SAASC,aAAa,CAACJ,IAAY,EAAEF,OAAe,EAAiB;EAC1E,OAAO,IAAI;AACb;;AAGO,SAASO,aAAa,CAACL,IAAY,EAAEF,OAAe,EAAiB;EAC1E,OAAO,IAAI;AACb;AAEO,SAASQ,UAAU,CACxBN,IAAY,EACZF,OAAe,EAId;EACD,MAAM,IAAIG,KAAK,CACZ,sBAAqBD,IAAK,gBAAeF,OAAQ,eAAc,CACjE;AACH;AAEO,SAASS,UAAU,CACxBP,IAAY,EACZF,OAAe,EAId;EACD,MAAM,IAAIG,KAAK,CACZ,sBAAqBD,IAAK,gBAAeF,OAAQ,eAAc,CACjE;AACH;AAAC"}
|
{"version":3,"names":["findConfigUpwards","rootDir","findPackageData","filepath","directories","pkg","isPackage","findRelativeConfig","pkgData","envName","caller","config","ignore","findRootConfig","dirname","loadConfig","name","Error","resolveShowConfigPath","ROOT_CONFIG_FILENAMES","exports","resolvePlugin","resolvePreset","loadPlugin","loadPreset"],"sources":["../../../src/config/files/index-browser.ts"],"sourcesContent":["import type { Handler } from \"gensync\";\n\nimport type {\n ConfigFile,\n IgnoreFile,\n RelativeConfig,\n FilePackageData,\n} from \"./types.ts\";\n\nimport type { CallerMetadata } from \"../validation/options.ts\";\n\nexport type { ConfigFile, IgnoreFile, RelativeConfig, FilePackageData };\n\nexport function findConfigUpwards(\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n rootDir: string,\n): string | null {\n return null;\n}\n\n// eslint-disable-next-line require-yield\nexport function* findPackageData(filepath: string): Handler<FilePackageData> {\n return {\n filepath,\n directories: [],\n pkg: null,\n isPackage: false,\n };\n}\n\n// eslint-disable-next-line require-yield\nexport function* findRelativeConfig(\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n pkgData: FilePackageData,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n envName: string,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n caller: CallerMetadata | undefined,\n): Handler<RelativeConfig> {\n return { config: null, ignore: null };\n}\n\n// eslint-disable-next-line require-yield\nexport function* findRootConfig(\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n dirname: string,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n envName: string,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n caller: CallerMetadata | undefined,\n): Handler<ConfigFile | null> {\n return null;\n}\n\n// eslint-disable-next-line require-yield\nexport function* loadConfig(\n name: string,\n dirname: string,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n envName: string,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n caller: CallerMetadata | undefined,\n): Handler<ConfigFile> {\n throw new Error(`Cannot load ${name} relative to ${dirname} in a browser`);\n}\n\n// eslint-disable-next-line require-yield\nexport function* resolveShowConfigPath(\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n dirname: string,\n): Handler<string | null> {\n return null;\n}\n\nexport const ROOT_CONFIG_FILENAMES: string[] = [];\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function resolvePlugin(name: string, dirname: string): string | null {\n return null;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function resolvePreset(name: string, dirname: string): string | null {\n return null;\n}\n\nexport function loadPlugin(\n name: string,\n dirname: string,\n): Handler<{\n filepath: string;\n value: unknown;\n}> {\n throw new Error(\n `Cannot load plugin ${name} relative to ${dirname} in a browser`,\n );\n}\n\nexport function loadPreset(\n name: string,\n dirname: string,\n): Handler<{\n filepath: string;\n value: unknown;\n}> {\n throw new Error(\n `Cannot load preset ${name} relative to ${dirname} in a browser`,\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAaO,SAASA,iBAAiBA,CAE/BC,OAAe,EACA;EACf,OAAO,IAAI;AACb;AAGO,UAAUC,eAAeA,CAACC,QAAgB,EAA4B;EAC3E,OAAO;IACLA,QAAQ;IACRC,WAAW,EAAE,EAAE;IACfC,GAAG,EAAE,IAAI;IACTC,SAAS,EAAE;EACb,CAAC;AACH;AAGO,UAAUC,kBAAkBA,CAEjCC,OAAwB,EAExBC,OAAe,EAEfC,MAAkC,EACT;EACzB,OAAO;IAAEC,MAAM,EAAE,IAAI;IAAEC,MAAM,EAAE;EAAK,CAAC;AACvC;AAGO,UAAUC,cAAcA,CAE7BC,OAAe,EAEfL,OAAe,EAEfC,MAAkC,EACN;EAC5B,OAAO,IAAI;AACb;AAGO,UAAUK,UAAUA,CACzBC,IAAY,EACZF,OAAe,EAEfL,OAAe,EAEfC,MAAkC,EACb;EACrB,MAAM,IAAIO,KAAK,CAAE,eAAcD,IAAK,gBAAeF,OAAQ,eAAc,CAAC;AAC5E;AAGO,UAAUI,qBAAqBA,CAEpCJ,OAAe,EACS;EACxB,OAAO,IAAI;AACb;AAEO,MAAMK,qBAA+B,GAAAC,OAAA,CAAAD,qBAAA,GAAG,EAAE;AAG1C,SAASE,aAAaA,CAACL,IAAY,EAAEF,OAAe,EAAiB;EAC1E,OAAO,IAAI;AACb;AAGO,SAASQ,aAAaA,CAACN,IAAY,EAAEF,OAAe,EAAiB;EAC1E,OAAO,IAAI;AACb;AAEO,SAASS,UAAUA,CACxBP,IAAY,EACZF,OAAe,EAId;EACD,MAAM,IAAIG,KAAK,CACZ,sBAAqBD,IAAK,gBAAeF,OAAQ,eACpD,CAAC;AACH;AAEO,SAASU,UAAUA,CACxBR,IAAY,EACZF,OAAe,EAId;EACD,MAAM,IAAIG,KAAK,CACZ,sBAAqBD,IAAK,gBAAeF,OAAQ,eACpD,CAAC;AACH;AAAC","ignoreList":[]}
|
34
node_modules/@babel/core/lib/config/files/index.js
generated
vendored
Executable file → Normal file
34
node_modules/@babel/core/lib/config/files/index.js
generated
vendored
Executable file → Normal file
|
@ -42,37 +42,37 @@ Object.defineProperty(exports, "loadConfig", {
|
||||||
Object.defineProperty(exports, "loadPlugin", {
|
Object.defineProperty(exports, "loadPlugin", {
|
||||||
enumerable: true,
|
enumerable: true,
|
||||||
get: function () {
|
get: function () {
|
||||||
return plugins.loadPlugin;
|
return _plugins.loadPlugin;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
Object.defineProperty(exports, "loadPreset", {
|
Object.defineProperty(exports, "loadPreset", {
|
||||||
enumerable: true,
|
enumerable: true,
|
||||||
get: function () {
|
get: function () {
|
||||||
return plugins.loadPreset;
|
return _plugins.loadPreset;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
Object.defineProperty(exports, "resolvePlugin", {
|
||||||
|
enumerable: true,
|
||||||
|
get: function () {
|
||||||
|
return _plugins.resolvePlugin;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
Object.defineProperty(exports, "resolvePreset", {
|
||||||
|
enumerable: true,
|
||||||
|
get: function () {
|
||||||
|
return _plugins.resolvePreset;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
exports.resolvePreset = exports.resolvePlugin = void 0;
|
|
||||||
Object.defineProperty(exports, "resolveShowConfigPath", {
|
Object.defineProperty(exports, "resolveShowConfigPath", {
|
||||||
enumerable: true,
|
enumerable: true,
|
||||||
get: function () {
|
get: function () {
|
||||||
return _configuration.resolveShowConfigPath;
|
return _configuration.resolveShowConfigPath;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
var _package = require("./package");
|
var _package = require("./package.js");
|
||||||
var _configuration = require("./configuration");
|
var _configuration = require("./configuration.js");
|
||||||
var plugins = require("./plugins");
|
var _plugins = require("./plugins.js");
|
||||||
function _gensync() {
|
|
||||||
const data = require("gensync");
|
|
||||||
_gensync = function () {
|
|
||||||
return data;
|
|
||||||
};
|
|
||||||
return data;
|
|
||||||
}
|
|
||||||
({});
|
({});
|
||||||
const resolvePlugin = _gensync()(plugins.resolvePlugin).sync;
|
|
||||||
exports.resolvePlugin = resolvePlugin;
|
|
||||||
const resolvePreset = _gensync()(plugins.resolvePreset).sync;
|
|
||||||
exports.resolvePreset = resolvePreset;
|
|
||||||
0 && 0;
|
0 && 0;
|
||||||
|
|
||||||
//# sourceMappingURL=index.js.map
|
//# sourceMappingURL=index.js.map
|
||||||
|
|
2
node_modules/@babel/core/lib/config/files/index.js.map
generated
vendored
Executable file → Normal file
2
node_modules/@babel/core/lib/config/files/index.js.map
generated
vendored
Executable file → Normal file
|
@ -1 +1 @@
|
||||||
{"version":3,"names":["resolvePlugin","gensync","plugins","sync","resolvePreset"],"sources":["../../../src/config/files/index.ts"],"sourcesContent":["type indexBrowserType = typeof import(\"./index-browser\");\ntype indexType = typeof import(\"./index\");\n\n// Kind of gross, but essentially asserting that the exports of this module are the same as the\n// exports of index-browser, since this file may be replaced at bundle time with index-browser.\n({} as any as indexBrowserType as indexType);\n\nexport { findPackageData } from \"./package\";\n\nexport {\n findConfigUpwards,\n findRelativeConfig,\n findRootConfig,\n loadConfig,\n resolveShowConfigPath,\n ROOT_CONFIG_FILENAMES,\n} from \"./configuration\";\nexport type {\n ConfigFile,\n IgnoreFile,\n RelativeConfig,\n FilePackageData,\n} from \"./types\";\nexport { loadPlugin, loadPreset } from \"./plugins\";\n\nimport gensync from \"gensync\";\nimport * as plugins from \"./plugins\";\n\nexport const resolvePlugin = gensync(plugins.resolvePlugin).sync;\nexport const resolvePreset = gensync(plugins.resolvePreset).sync;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA;AAEA;AAcA;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AApBA,CAAC,CAAC,CAAC;AAuBI,MAAMA,aAAa,GAAGC,UAAO,CAACC,OAAO,CAACF,aAAa,CAAC,CAACG,IAAI;AAAC;AAC1D,MAAMC,aAAa,GAAGH,UAAO,CAACC,OAAO,CAACE,aAAa,CAAC,CAACD,IAAI;AAAC;AAAA"}
|
{"version":3,"names":["_package","require","_configuration","_plugins"],"sources":["../../../src/config/files/index.ts"],"sourcesContent":["type indexBrowserType = typeof import(\"./index-browser\");\ntype indexType = typeof import(\"./index\");\n\n// Kind of gross, but essentially asserting that the exports of this module are the same as the\n// exports of index-browser, since this file may be replaced at bundle time with index-browser.\n({}) as any as indexBrowserType as indexType;\n\nexport { findPackageData } from \"./package.ts\";\n\nexport {\n findConfigUpwards,\n findRelativeConfig,\n findRootConfig,\n loadConfig,\n resolveShowConfigPath,\n ROOT_CONFIG_FILENAMES,\n} from \"./configuration.ts\";\nexport type {\n ConfigFile,\n IgnoreFile,\n RelativeConfig,\n FilePackageData,\n} from \"./types.ts\";\nexport {\n loadPlugin,\n loadPreset,\n resolvePlugin,\n resolvePreset,\n} from \"./plugins.ts\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,IAAAA,QAAA,GAAAC,OAAA;AAEA,IAAAC,cAAA,GAAAD,OAAA;AAcA,IAAAE,QAAA,GAAAF,OAAA;AAlBA,CAAC,CAAC,CAAC;AAA0C","ignoreList":[]}
|
191
node_modules/@babel/core/lib/config/files/module-types.js
generated
vendored
Executable file → Normal file
191
node_modules/@babel/core/lib/config/files/module-types.js
generated
vendored
Executable file → Normal file
|
@ -3,9 +3,9 @@
|
||||||
Object.defineProperty(exports, "__esModule", {
|
Object.defineProperty(exports, "__esModule", {
|
||||||
value: true
|
value: true
|
||||||
});
|
});
|
||||||
exports.default = loadCjsOrMjsDefault;
|
exports.default = loadCodeDefault;
|
||||||
exports.supportsESM = void 0;
|
exports.supportsESM = void 0;
|
||||||
var _async = require("../../gensync-utils/async");
|
var _async = require("../../gensync-utils/async.js");
|
||||||
function _path() {
|
function _path() {
|
||||||
const data = require("path");
|
const data = require("path");
|
||||||
_path = function () {
|
_path = function () {
|
||||||
|
@ -20,13 +20,6 @@ function _url() {
|
||||||
};
|
};
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
function _module() {
|
|
||||||
const data = require("module");
|
|
||||||
_module = function () {
|
|
||||||
return data;
|
|
||||||
};
|
|
||||||
return data;
|
|
||||||
}
|
|
||||||
function _semver() {
|
function _semver() {
|
||||||
const data = require("semver");
|
const data = require("semver");
|
||||||
_semver = function () {
|
_semver = function () {
|
||||||
|
@ -34,63 +27,149 @@ function _semver() {
|
||||||
};
|
};
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
var _rewriteStackTrace = require("../../errors/rewrite-stack-trace");
|
function _debug() {
|
||||||
var _configError = require("../../errors/config-error");
|
const data = require("debug");
|
||||||
|
_debug = function () {
|
||||||
|
return data;
|
||||||
|
};
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
var _rewriteStackTrace = require("../../errors/rewrite-stack-trace.js");
|
||||||
|
var _configError = require("../../errors/config-error.js");
|
||||||
|
var _transformFile = require("../../transform-file.js");
|
||||||
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
||||||
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
||||||
let import_;
|
const debug = _debug()("babel:config:loading:files:module-types");
|
||||||
try {
|
{
|
||||||
import_ = require("./import.cjs");
|
try {
|
||||||
} catch (_unused) {}
|
var import_ = require("./import.cjs");
|
||||||
const supportsESM = _semver().satisfies(process.versions.node,
|
} catch (_unused) {}
|
||||||
"^12.17 || >=13.2");
|
}
|
||||||
exports.supportsESM = supportsESM;
|
const supportsESM = exports.supportsESM = _semver().satisfies(process.versions.node, "^12.17 || >=13.2");
|
||||||
function* loadCjsOrMjsDefault(filepath, asyncError,
|
function* loadCodeDefault(filepath, asyncError) {
|
||||||
fallbackToTranspiledModule = false) {
|
switch (_path().extname(filepath)) {
|
||||||
switch (guessJSModuleType(filepath)) {
|
case ".cjs":
|
||||||
case "cjs":
|
{
|
||||||
return loadCjsDefault(filepath, fallbackToTranspiledModule);
|
return loadCjsDefault(filepath, arguments[2]);
|
||||||
case "unknown":
|
}
|
||||||
|
case ".mjs":
|
||||||
|
break;
|
||||||
|
case ".cts":
|
||||||
|
return loadCtsDefault(filepath);
|
||||||
|
default:
|
||||||
try {
|
try {
|
||||||
return loadCjsDefault(filepath, fallbackToTranspiledModule);
|
{
|
||||||
|
return loadCjsDefault(filepath, arguments[2]);
|
||||||
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (e.code !== "ERR_REQUIRE_ESM") throw e;
|
if (e.code !== "ERR_REQUIRE_ESM") throw e;
|
||||||
}
|
}
|
||||||
case "mjs":
|
}
|
||||||
if (yield* (0, _async.isAsync)()) {
|
if (yield* (0, _async.isAsync)()) {
|
||||||
return yield* (0, _async.waitFor)(loadMjsDefault(filepath));
|
return yield* (0, _async.waitFor)(loadMjsDefault(filepath));
|
||||||
|
}
|
||||||
|
throw new _configError.default(asyncError, filepath);
|
||||||
|
}
|
||||||
|
function loadCtsDefault(filepath) {
|
||||||
|
const ext = ".cts";
|
||||||
|
const hasTsSupport = !!(require.extensions[".ts"] || require.extensions[".cts"] || require.extensions[".mts"]);
|
||||||
|
let handler;
|
||||||
|
if (!hasTsSupport) {
|
||||||
|
const opts = {
|
||||||
|
babelrc: false,
|
||||||
|
configFile: false,
|
||||||
|
sourceType: "unambiguous",
|
||||||
|
sourceMaps: "inline",
|
||||||
|
sourceFileName: _path().basename(filepath),
|
||||||
|
presets: [[getTSPreset(filepath), Object.assign({
|
||||||
|
onlyRemoveTypeImports: true,
|
||||||
|
optimizeConstEnums: true
|
||||||
|
}, {
|
||||||
|
allowDeclareFields: true
|
||||||
|
})]]
|
||||||
|
};
|
||||||
|
handler = function (m, filename) {
|
||||||
|
if (handler && filename.endsWith(ext)) {
|
||||||
|
try {
|
||||||
|
return m._compile((0, _transformFile.transformFileSync)(filename, Object.assign({}, opts, {
|
||||||
|
filename
|
||||||
|
})).code, filename);
|
||||||
|
} catch (error) {
|
||||||
|
if (!hasTsSupport) {
|
||||||
|
const packageJson = require("@babel/preset-typescript/package.json");
|
||||||
|
if (_semver().lt(packageJson.version, "7.21.4")) {
|
||||||
|
console.error("`.cts` configuration file failed to load, please try to update `@babel/preset-typescript`.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
throw error;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
throw new _configError.default(asyncError, filepath);
|
return require.extensions[".js"](m, filename);
|
||||||
|
};
|
||||||
|
require.extensions[ext] = handler;
|
||||||
}
|
}
|
||||||
}
|
try {
|
||||||
function guessJSModuleType(filename) {
|
return loadCjsDefault(filepath);
|
||||||
switch (_path().extname(filename)) {
|
} finally {
|
||||||
case ".cjs":
|
if (!hasTsSupport) {
|
||||||
return "cjs";
|
if (require.extensions[ext] === handler) delete require.extensions[ext];
|
||||||
case ".mjs":
|
handler = undefined;
|
||||||
return "mjs";
|
}
|
||||||
default:
|
}
|
||||||
return "unknown";
|
}
|
||||||
}
|
const LOADING_CJS_FILES = new Set();
|
||||||
}
|
function loadCjsDefault(filepath) {
|
||||||
function loadCjsDefault(filepath, fallbackToTranspiledModule) {
|
if (LOADING_CJS_FILES.has(filepath)) {
|
||||||
const module = (0, _rewriteStackTrace.endHiddenCallStack)(require)(filepath);
|
debug("Auto-ignoring usage of config %o.", filepath);
|
||||||
return module != null && module.__esModule ?
|
return {};
|
||||||
module.default || (fallbackToTranspiledModule ? module : undefined) : module;
|
}
|
||||||
}
|
let module;
|
||||||
function loadMjsDefault(_x) {
|
try {
|
||||||
return _loadMjsDefault.apply(this, arguments);
|
LOADING_CJS_FILES.add(filepath);
|
||||||
}
|
module = (0, _rewriteStackTrace.endHiddenCallStack)(require)(filepath);
|
||||||
function _loadMjsDefault() {
|
} finally {
|
||||||
_loadMjsDefault = _asyncToGenerator(function* (filepath) {
|
LOADING_CJS_FILES.delete(filepath);
|
||||||
if (!import_) {
|
}
|
||||||
throw new _configError.default("Internal error: Native ECMAScript modules aren't supported" + " by this platform.\n", filepath);
|
{
|
||||||
|
var _module;
|
||||||
|
return (_module = module) != null && _module.__esModule ? module.default || (arguments[1] ? module : undefined) : module;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const loadMjsDefault = (0, _rewriteStackTrace.endHiddenCallStack)(function () {
|
||||||
|
var _loadMjsDefault = _asyncToGenerator(function* (filepath) {
|
||||||
|
const url = (0, _url().pathToFileURL)(filepath).toString();
|
||||||
|
{
|
||||||
|
if (!import_) {
|
||||||
|
throw new _configError.default("Internal error: Native ECMAScript modules aren't supported by this platform.\n", filepath);
|
||||||
|
}
|
||||||
|
return (yield import_(url)).default;
|
||||||
}
|
}
|
||||||
|
|
||||||
const module = yield (0, _rewriteStackTrace.endHiddenCallStack)(import_)((0, _url().pathToFileURL)(filepath));
|
|
||||||
return module.default;
|
|
||||||
});
|
});
|
||||||
return _loadMjsDefault.apply(this, arguments);
|
function loadMjsDefault(_x) {
|
||||||
|
return _loadMjsDefault.apply(this, arguments);
|
||||||
|
}
|
||||||
|
return loadMjsDefault;
|
||||||
|
}());
|
||||||
|
function getTSPreset(filepath) {
|
||||||
|
try {
|
||||||
|
return require("@babel/preset-typescript");
|
||||||
|
} catch (error) {
|
||||||
|
if (error.code !== "MODULE_NOT_FOUND") throw error;
|
||||||
|
let message = "You appear to be using a .cts file as Babel configuration, but the `@babel/preset-typescript` package was not found: please install it!";
|
||||||
|
{
|
||||||
|
if (process.versions.pnp) {
|
||||||
|
message += `
|
||||||
|
If you are using Yarn Plug'n'Play, you may also need to add the following configuration to your .yarnrc.yml file:
|
||||||
|
|
||||||
|
packageExtensions:
|
||||||
|
\t"@babel/core@*":
|
||||||
|
\t\tpeerDependencies:
|
||||||
|
\t\t\t"@babel/preset-typescript": "*"
|
||||||
|
`;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
throw new _configError.default(message, filepath);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
0 && 0;
|
0 && 0;
|
||||||
|
|
||||||
|
|
2
node_modules/@babel/core/lib/config/files/module-types.js.map
generated
vendored
Executable file → Normal file
2
node_modules/@babel/core/lib/config/files/module-types.js.map
generated
vendored
Executable file → Normal file
File diff suppressed because one or more lines are too long
5
node_modules/@babel/core/lib/config/files/package.js
generated
vendored
Executable file → Normal file
5
node_modules/@babel/core/lib/config/files/package.js
generated
vendored
Executable file → Normal file
|
@ -11,8 +11,8 @@ function _path() {
|
||||||
};
|
};
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
var _utils = require("./utils");
|
var _utils = require("./utils.js");
|
||||||
var _configError = require("../../errors/config-error");
|
var _configError = require("../../errors/config-error.js");
|
||||||
const PACKAGE_FILENAME = "package.json";
|
const PACKAGE_FILENAME = "package.json";
|
||||||
const readConfigPackage = (0, _utils.makeStaticFileCache)((filepath, content) => {
|
const readConfigPackage = (0, _utils.makeStaticFileCache)((filepath, content) => {
|
||||||
let options;
|
let options;
|
||||||
|
@ -34,7 +34,6 @@ const readConfigPackage = (0, _utils.makeStaticFileCache)((filepath, content) =>
|
||||||
options
|
options
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
function* findPackageData(filepath) {
|
function* findPackageData(filepath) {
|
||||||
let pkg = null;
|
let pkg = null;
|
||||||
const directories = [];
|
const directories = [];
|
||||||
|
|
2
node_modules/@babel/core/lib/config/files/package.js.map
generated
vendored
Executable file → Normal file
2
node_modules/@babel/core/lib/config/files/package.js.map
generated
vendored
Executable file → Normal file
|
@ -1 +1 @@
|
||||||
{"version":3,"names":["PACKAGE_FILENAME","readConfigPackage","makeStaticFileCache","filepath","content","options","JSON","parse","err","ConfigError","message","Error","Array","isArray","dirname","path","findPackageData","pkg","directories","isPackage","basename","push","join","nextLoc"],"sources":["../../../src/config/files/package.ts"],"sourcesContent":["import path from \"path\";\nimport type { Handler } from \"gensync\";\nimport { makeStaticFileCache } from \"./utils\";\n\nimport type { ConfigFile, FilePackageData } from \"./types\";\n\nimport ConfigError from \"../../errors/config-error\";\n\nconst PACKAGE_FILENAME = \"package.json\";\n\nconst readConfigPackage = makeStaticFileCache(\n (filepath, content): ConfigFile => {\n let options;\n try {\n options = JSON.parse(content) as unknown;\n } catch (err) {\n throw new ConfigError(\n `Error while parsing JSON - ${err.message}`,\n filepath,\n );\n }\n\n if (!options) throw new Error(`${filepath}: No config detected`);\n\n if (typeof options !== \"object\") {\n throw new ConfigError(\n `Config returned typeof ${typeof options}`,\n filepath,\n );\n }\n if (Array.isArray(options)) {\n throw new ConfigError(`Expected config object but found array`, filepath);\n }\n\n return {\n filepath,\n dirname: path.dirname(filepath),\n options,\n };\n },\n);\n\n/**\n * Find metadata about the package that this file is inside of. Resolution\n * of Babel's config requires general package information to decide when to\n * search for .babelrc files\n */\nexport function* findPackageData(filepath: string): Handler<FilePackageData> {\n let pkg = null;\n const directories = [];\n let isPackage = true;\n\n let dirname = path.dirname(filepath);\n while (!pkg && path.basename(dirname) !== \"node_modules\") {\n directories.push(dirname);\n\n pkg = yield* readConfigPackage(path.join(dirname, PACKAGE_FILENAME));\n\n const nextLoc = path.dirname(dirname);\n if (dirname === nextLoc) {\n isPackage = false;\n break;\n }\n dirname = nextLoc;\n }\n\n return { filepath, directories, pkg, isPackage };\n}\n"],"mappings":";;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;AAIA;AAEA,MAAMA,gBAAgB,GAAG,cAAc;AAEvC,MAAMC,iBAAiB,GAAG,IAAAC,0BAAmB,EAC3C,CAACC,QAAQ,EAAEC,OAAO,KAAiB;EACjC,IAAIC,OAAO;EACX,IAAI;IACFA,OAAO,GAAGC,IAAI,CAACC,KAAK,CAACH,OAAO,CAAY;EAC1C,CAAC,CAAC,OAAOI,GAAG,EAAE;IACZ,MAAM,IAAIC,oBAAW,CAClB,8BAA6BD,GAAG,CAACE,OAAQ,EAAC,EAC3CP,QAAQ,CACT;EACH;EAEA,IAAI,CAACE,OAAO,EAAE,MAAM,IAAIM,KAAK,CAAE,GAAER,QAAS,sBAAqB,CAAC;EAEhE,IAAI,OAAOE,OAAO,KAAK,QAAQ,EAAE;IAC/B,MAAM,IAAII,oBAAW,CAClB,0BAAyB,OAAOJ,OAAQ,EAAC,EAC1CF,QAAQ,CACT;EACH;EACA,IAAIS,KAAK,CAACC,OAAO,CAACR,OAAO,CAAC,EAAE;IAC1B,MAAM,IAAII,oBAAW,CAAE,wCAAuC,EAAEN,QAAQ,CAAC;EAC3E;EAEA,OAAO;IACLA,QAAQ;IACRW,OAAO,EAAEC,OAAI,CAACD,OAAO,CAACX,QAAQ,CAAC;IAC/BE;EACF,CAAC;AACH,CAAC,CACF;;AAOM,UAAUW,eAAe,CAACb,QAAgB,EAA4B;EAC3E,IAAIc,GAAG,GAAG,IAAI;EACd,MAAMC,WAAW,GAAG,EAAE;EACtB,IAAIC,SAAS,GAAG,IAAI;EAEpB,IAAIL,OAAO,GAAGC,OAAI,CAACD,OAAO,CAACX,QAAQ,CAAC;EACpC,OAAO,CAACc,GAAG,IAAIF,OAAI,CAACK,QAAQ,CAACN,OAAO,CAAC,KAAK,cAAc,EAAE;IACxDI,WAAW,CAACG,IAAI,CAACP,OAAO,CAAC;IAEzBG,GAAG,GAAG,OAAOhB,iBAAiB,CAACc,OAAI,CAACO,IAAI,CAACR,OAAO,EAAEd,gBAAgB,CAAC,CAAC;IAEpE,MAAMuB,OAAO,GAAGR,OAAI,CAACD,OAAO,CAACA,OAAO,CAAC;IACrC,IAAIA,OAAO,KAAKS,OAAO,EAAE;MACvBJ,SAAS,GAAG,KAAK;MACjB;IACF;IACAL,OAAO,GAAGS,OAAO;EACnB;EAEA,OAAO;IAAEpB,QAAQ;IAAEe,WAAW;IAAED,GAAG;IAAEE;EAAU,CAAC;AAClD;AAAC"}
|
{"version":3,"names":["_path","data","require","_utils","_configError","PACKAGE_FILENAME","readConfigPackage","makeStaticFileCache","filepath","content","options","JSON","parse","err","ConfigError","message","Error","Array","isArray","dirname","path","findPackageData","pkg","directories","isPackage","basename","push","join","nextLoc"],"sources":["../../../src/config/files/package.ts"],"sourcesContent":["import path from \"path\";\nimport type { Handler } from \"gensync\";\nimport { makeStaticFileCache } from \"./utils.ts\";\n\nimport type { ConfigFile, FilePackageData } from \"./types.ts\";\n\nimport ConfigError from \"../../errors/config-error.ts\";\n\nconst PACKAGE_FILENAME = \"package.json\";\n\nconst readConfigPackage = makeStaticFileCache(\n (filepath, content): ConfigFile => {\n let options;\n try {\n options = JSON.parse(content) as unknown;\n } catch (err) {\n throw new ConfigError(\n `Error while parsing JSON - ${err.message}`,\n filepath,\n );\n }\n\n if (!options) throw new Error(`${filepath}: No config detected`);\n\n if (typeof options !== \"object\") {\n throw new ConfigError(\n `Config returned typeof ${typeof options}`,\n filepath,\n );\n }\n if (Array.isArray(options)) {\n throw new ConfigError(`Expected config object but found array`, filepath);\n }\n\n return {\n filepath,\n dirname: path.dirname(filepath),\n options,\n };\n },\n);\n\n/**\n * Find metadata about the package that this file is inside of. Resolution\n * of Babel's config requires general package information to decide when to\n * search for .babelrc files\n */\nexport function* findPackageData(filepath: string): Handler<FilePackageData> {\n let pkg = null;\n const directories = [];\n let isPackage = true;\n\n let dirname = path.dirname(filepath);\n while (!pkg && path.basename(dirname) !== \"node_modules\") {\n directories.push(dirname);\n\n pkg = yield* readConfigPackage(path.join(dirname, PACKAGE_FILENAME));\n\n const nextLoc = path.dirname(dirname);\n if (dirname === nextLoc) {\n isPackage = false;\n break;\n }\n dirname = nextLoc;\n }\n\n return { filepath, directories, pkg, isPackage };\n}\n"],"mappings":";;;;;;AAAA,SAAAA,MAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,KAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,IAAAE,MAAA,GAAAD,OAAA;AAIA,IAAAE,YAAA,GAAAF,OAAA;AAEA,MAAMG,gBAAgB,GAAG,cAAc;AAEvC,MAAMC,iBAAiB,GAAG,IAAAC,0BAAmB,EAC3C,CAACC,QAAQ,EAAEC,OAAO,KAAiB;EACjC,IAAIC,OAAO;EACX,IAAI;IACFA,OAAO,GAAGC,IAAI,CAACC,KAAK,CAACH,OAAO,CAAY;EAC1C,CAAC,CAAC,OAAOI,GAAG,EAAE;IACZ,MAAM,IAAIC,oBAAW,CAClB,8BAA6BD,GAAG,CAACE,OAAQ,EAAC,EAC3CP,QACF,CAAC;EACH;EAEA,IAAI,CAACE,OAAO,EAAE,MAAM,IAAIM,KAAK,CAAE,GAAER,QAAS,sBAAqB,CAAC;EAEhE,IAAI,OAAOE,OAAO,KAAK,QAAQ,EAAE;IAC/B,MAAM,IAAII,oBAAW,CAClB,0BAAyB,OAAOJ,OAAQ,EAAC,EAC1CF,QACF,CAAC;EACH;EACA,IAAIS,KAAK,CAACC,OAAO,CAACR,OAAO,CAAC,EAAE;IAC1B,MAAM,IAAII,oBAAW,CAAE,wCAAuC,EAAEN,QAAQ,CAAC;EAC3E;EAEA,OAAO;IACLA,QAAQ;IACRW,OAAO,EAAEC,MAAGA,CAAC,CAACD,OAAO,CAACX,QAAQ,CAAC;IAC/BE;EACF,CAAC;AACH,CACF,CAAC;AAOM,UAAUW,eAAeA,CAACb,QAAgB,EAA4B;EAC3E,IAAIc,GAAG,GAAG,IAAI;EACd,MAAMC,WAAW,GAAG,EAAE;EACtB,IAAIC,SAAS,GAAG,IAAI;EAEpB,IAAIL,OAAO,GAAGC,MAAGA,CAAC,CAACD,OAAO,CAACX,QAAQ,CAAC;EACpC,OAAO,CAACc,GAAG,IAAIF,MAAGA,CAAC,CAACK,QAAQ,CAACN,OAAO,CAAC,KAAK,cAAc,EAAE;IACxDI,WAAW,CAACG,IAAI,CAACP,OAAO,CAAC;IAEzBG,GAAG,GAAG,OAAOhB,iBAAiB,CAACc,MAAGA,CAAC,CAACO,IAAI,CAACR,OAAO,EAAEd,gBAAgB,CAAC,CAAC;IAEpE,MAAMuB,OAAO,GAAGR,MAAGA,CAAC,CAACD,OAAO,CAACA,OAAO,CAAC;IACrC,IAAIA,OAAO,KAAKS,OAAO,EAAE;MACvBJ,SAAS,GAAG,KAAK;MACjB;IACF;IACAL,OAAO,GAAGS,OAAO;EACnB;EAEA,OAAO;IAAEpB,QAAQ;IAAEe,WAAW;IAAED,GAAG;IAAEE;EAAU,CAAC;AAClD;AAAC","ignoreList":[]}
|
199
node_modules/@babel/core/lib/config/files/plugins.js
generated
vendored
Executable file → Normal file
199
node_modules/@babel/core/lib/config/files/plugins.js
generated
vendored
Executable file → Normal file
|
@ -5,8 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
||||||
});
|
});
|
||||||
exports.loadPlugin = loadPlugin;
|
exports.loadPlugin = loadPlugin;
|
||||||
exports.loadPreset = loadPreset;
|
exports.loadPreset = loadPreset;
|
||||||
exports.resolvePlugin = resolvePlugin;
|
exports.resolvePreset = exports.resolvePlugin = void 0;
|
||||||
exports.resolvePreset = resolvePreset;
|
|
||||||
function _debug() {
|
function _debug() {
|
||||||
const data = require("debug");
|
const data = require("debug");
|
||||||
_debug = function () {
|
_debug = function () {
|
||||||
|
@ -21,15 +20,8 @@ function _path() {
|
||||||
};
|
};
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
function _gensync() {
|
var _async = require("../../gensync-utils/async.js");
|
||||||
const data = require("gensync");
|
var _moduleTypes = require("./module-types.js");
|
||||||
_gensync = function () {
|
|
||||||
return data;
|
|
||||||
};
|
|
||||||
return data;
|
|
||||||
}
|
|
||||||
var _async = require("../../gensync-utils/async");
|
|
||||||
var _moduleTypes = require("./module-types");
|
|
||||||
function _url() {
|
function _url() {
|
||||||
const data = require("url");
|
const data = require("url");
|
||||||
_url = function () {
|
_url = function () {
|
||||||
|
@ -37,16 +29,14 @@ function _url() {
|
||||||
};
|
};
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
var _importMetaResolve = require("./import-meta-resolve");
|
var _importMetaResolve = require("../../vendor/import-meta-resolve.js");
|
||||||
function _module() {
|
function _fs() {
|
||||||
const data = require("module");
|
const data = require("fs");
|
||||||
_module = function () {
|
_fs = function () {
|
||||||
return data;
|
return data;
|
||||||
};
|
};
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
||||||
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
||||||
const debug = _debug()("babel:config:loading:files:plugins");
|
const debug = _debug()("babel:config:loading:files:plugins");
|
||||||
const EXACT_RE = /^module:/;
|
const EXACT_RE = /^module:/;
|
||||||
const BABEL_PLUGIN_PREFIX_RE = /^(?!@|module:|[^/]+\/|babel-plugin-)/;
|
const BABEL_PLUGIN_PREFIX_RE = /^(?!@|module:|[^/]+\/|babel-plugin-)/;
|
||||||
|
@ -56,14 +46,10 @@ const BABEL_PRESET_ORG_RE = /^(@babel\/)(?!preset-|[^/]+\/)/;
|
||||||
const OTHER_PLUGIN_ORG_RE = /^(@(?!babel\/)[^/]+\/)(?![^/]*babel-plugin(?:-|\/|$)|[^/]+\/)/;
|
const OTHER_PLUGIN_ORG_RE = /^(@(?!babel\/)[^/]+\/)(?![^/]*babel-plugin(?:-|\/|$)|[^/]+\/)/;
|
||||||
const OTHER_PRESET_ORG_RE = /^(@(?!babel\/)[^/]+\/)(?![^/]*babel-preset(?:-|\/|$)|[^/]+\/)/;
|
const OTHER_PRESET_ORG_RE = /^(@(?!babel\/)[^/]+\/)(?![^/]*babel-preset(?:-|\/|$)|[^/]+\/)/;
|
||||||
const OTHER_ORG_DEFAULT_RE = /^(@(?!babel$)[^/]+)$/;
|
const OTHER_ORG_DEFAULT_RE = /^(@(?!babel$)[^/]+)$/;
|
||||||
function* resolvePlugin(name, dirname) {
|
const resolvePlugin = exports.resolvePlugin = resolveStandardizedName.bind(null, "plugin");
|
||||||
return yield* resolveStandardizedName("plugin", name, dirname);
|
const resolvePreset = exports.resolvePreset = resolveStandardizedName.bind(null, "preset");
|
||||||
}
|
|
||||||
function* resolvePreset(name, dirname) {
|
|
||||||
return yield* resolveStandardizedName("preset", name, dirname);
|
|
||||||
}
|
|
||||||
function* loadPlugin(name, dirname) {
|
function* loadPlugin(name, dirname) {
|
||||||
const filepath = yield* resolvePlugin(name, dirname);
|
const filepath = resolvePlugin(name, dirname, yield* (0, _async.isAsync)());
|
||||||
const value = yield* requireModule("plugin", filepath);
|
const value = yield* requireModule("plugin", filepath);
|
||||||
debug("Loaded plugin %o from %o.", name, dirname);
|
debug("Loaded plugin %o from %o.", name, dirname);
|
||||||
return {
|
return {
|
||||||
|
@ -72,7 +58,7 @@ function* loadPlugin(name, dirname) {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
function* loadPreset(name, dirname) {
|
function* loadPreset(name, dirname) {
|
||||||
const filepath = yield* resolvePreset(name, dirname);
|
const filepath = resolvePreset(name, dirname, yield* (0, _async.isAsync)());
|
||||||
const value = yield* requireModule("preset", filepath);
|
const value = yield* requireModule("preset", filepath);
|
||||||
debug("Loaded preset %o from %o.", name, dirname);
|
debug("Loaded preset %o from %o.", name, dirname);
|
||||||
return {
|
return {
|
||||||
|
@ -83,12 +69,7 @@ function* loadPreset(name, dirname) {
|
||||||
function standardizeName(type, name) {
|
function standardizeName(type, name) {
|
||||||
if (_path().isAbsolute(name)) return name;
|
if (_path().isAbsolute(name)) return name;
|
||||||
const isPreset = type === "preset";
|
const isPreset = type === "preset";
|
||||||
return name
|
return name.replace(isPreset ? BABEL_PRESET_PREFIX_RE : BABEL_PLUGIN_PREFIX_RE, `babel-${type}-`).replace(isPreset ? BABEL_PRESET_ORG_RE : BABEL_PLUGIN_ORG_RE, `$1${type}-`).replace(isPreset ? OTHER_PRESET_ORG_RE : OTHER_PLUGIN_ORG_RE, `$1babel-${type}-`).replace(OTHER_ORG_DEFAULT_RE, `$1/babel-${type}`).replace(EXACT_RE, "");
|
||||||
.replace(isPreset ? BABEL_PRESET_PREFIX_RE : BABEL_PLUGIN_PREFIX_RE, `babel-${type}-`)
|
|
||||||
.replace(isPreset ? BABEL_PRESET_ORG_RE : BABEL_PLUGIN_ORG_RE, `$1${type}-`)
|
|
||||||
.replace(isPreset ? OTHER_PRESET_ORG_RE : OTHER_PLUGIN_ORG_RE, `$1babel-${type}-`)
|
|
||||||
.replace(OTHER_ORG_DEFAULT_RE, `$1/babel-${type}`)
|
|
||||||
.replace(EXACT_RE, "");
|
|
||||||
}
|
}
|
||||||
function* resolveAlternativesHelper(type, name) {
|
function* resolveAlternativesHelper(type, name) {
|
||||||
const standardizedName = standardizeName(type, name);
|
const standardizedName = standardizeName(type, name);
|
||||||
|
@ -97,7 +78,6 @@ function* resolveAlternativesHelper(type, name) {
|
||||||
value
|
value
|
||||||
} = yield standardizedName;
|
} = yield standardizedName;
|
||||||
if (!error) return value;
|
if (!error) return value;
|
||||||
|
|
||||||
if (error.code !== "MODULE_NOT_FOUND") throw error;
|
if (error.code !== "MODULE_NOT_FOUND") throw error;
|
||||||
if (standardizedName !== name && !(yield name).error) {
|
if (standardizedName !== name && !(yield name).error) {
|
||||||
error.message += `\n- If you want to resolve "${name}", use "module:${name}"`;
|
error.message += `\n- If you want to resolve "${name}", use "module:${name}"`;
|
||||||
|
@ -109,25 +89,57 @@ function* resolveAlternativesHelper(type, name) {
|
||||||
if (!(yield standardizeName(oppositeType, name)).error) {
|
if (!(yield standardizeName(oppositeType, name)).error) {
|
||||||
error.message += `\n- Did you accidentally pass a ${oppositeType} as a ${type}?`;
|
error.message += `\n- Did you accidentally pass a ${oppositeType} as a ${type}?`;
|
||||||
}
|
}
|
||||||
|
if (type === "plugin") {
|
||||||
|
const transformName = standardizedName.replace("-proposal-", "-transform-");
|
||||||
|
if (transformName !== standardizedName && !(yield transformName).error) {
|
||||||
|
error.message += `\n- Did you mean "${transformName}"?`;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
error.message += `\n
|
||||||
|
Make sure that all the Babel plugins and presets you are using
|
||||||
|
are defined as dependencies or devDependencies in your package.json
|
||||||
|
file. It's possible that the missing plugin is loaded by a preset
|
||||||
|
you are using that forgot to add the plugin to its dependencies: you
|
||||||
|
can workaround this problem by explicitly adding the missing package
|
||||||
|
to your top-level package.json.
|
||||||
|
`;
|
||||||
throw error;
|
throw error;
|
||||||
}
|
}
|
||||||
function tryRequireResolve(id, {
|
function tryRequireResolve(id, dirname) {
|
||||||
paths: [dirname]
|
try {
|
||||||
}) {
|
if (dirname) {
|
||||||
|
return {
|
||||||
|
error: null,
|
||||||
|
value: (((v, w) => (v = v.split("."), w = w.split("."), +v[0] > +w[0] || v[0] == w[0] && +v[1] >= +w[1]))(process.versions.node, "8.9") ? require.resolve : (r, {
|
||||||
|
paths: [b]
|
||||||
|
}, M = require("module")) => {
|
||||||
|
let f = M._findPath(r, M._nodeModulePaths(b).concat(b));
|
||||||
|
if (f) return f;
|
||||||
|
f = new Error(`Cannot resolve module '${r}'`);
|
||||||
|
f.code = "MODULE_NOT_FOUND";
|
||||||
|
throw f;
|
||||||
|
})(id, {
|
||||||
|
paths: [dirname]
|
||||||
|
})
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
return {
|
||||||
|
error: null,
|
||||||
|
value: require.resolve(id)
|
||||||
|
};
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
return {
|
||||||
|
error,
|
||||||
|
value: null
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function tryImportMetaResolve(id, options) {
|
||||||
try {
|
try {
|
||||||
return {
|
return {
|
||||||
error: null,
|
error: null,
|
||||||
value: (((v, w) => (v = v.split("."), w = w.split("."), +v[0] > +w[0] || v[0] == w[0] && +v[1] >= +w[1]))(process.versions.node, "8.9") ? require.resolve : (r, {
|
value: (0, _importMetaResolve.resolve)(id, options)
|
||||||
paths: [b]
|
|
||||||
}, M = require("module")) => {
|
|
||||||
let f = M._findPath(r, M._nodeModulePaths(b).concat(b));
|
|
||||||
if (f) return f;
|
|
||||||
f = new Error(`Cannot resolve module '${r}'`);
|
|
||||||
f.code = "MODULE_NOT_FOUND";
|
|
||||||
throw f;
|
|
||||||
})(id, {
|
|
||||||
paths: [dirname]
|
|
||||||
})
|
|
||||||
};
|
};
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
return {
|
return {
|
||||||
|
@ -136,73 +148,45 @@ function tryRequireResolve(id, {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function tryImportMetaResolve(_x, _x2) {
|
|
||||||
return _tryImportMetaResolve.apply(this, arguments);
|
|
||||||
}
|
|
||||||
function _tryImportMetaResolve() {
|
|
||||||
_tryImportMetaResolve = _asyncToGenerator(function* (id, options) {
|
|
||||||
try {
|
|
||||||
return {
|
|
||||||
error: null,
|
|
||||||
value: yield (0, _importMetaResolve.default)(id, options)
|
|
||||||
};
|
|
||||||
} catch (error) {
|
|
||||||
return {
|
|
||||||
error,
|
|
||||||
value: null
|
|
||||||
};
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return _tryImportMetaResolve.apply(this, arguments);
|
|
||||||
}
|
|
||||||
function resolveStandardizedNameForRequire(type, name, dirname) {
|
function resolveStandardizedNameForRequire(type, name, dirname) {
|
||||||
const it = resolveAlternativesHelper(type, name);
|
const it = resolveAlternativesHelper(type, name);
|
||||||
let res = it.next();
|
let res = it.next();
|
||||||
while (!res.done) {
|
while (!res.done) {
|
||||||
res = it.next(tryRequireResolve(res.value, {
|
res = it.next(tryRequireResolve(res.value, dirname));
|
||||||
paths: [dirname]
|
|
||||||
}));
|
|
||||||
}
|
}
|
||||||
return res.value;
|
return res.value;
|
||||||
}
|
}
|
||||||
function resolveStandardizedNameForImport(_x3, _x4, _x5) {
|
function resolveStandardizedNameForImport(type, name, dirname) {
|
||||||
return _resolveStandardizedNameForImport.apply(this, arguments);
|
const parentUrl = (0, _url().pathToFileURL)(_path().join(dirname, "./babel-virtual-resolve-base.js")).href;
|
||||||
}
|
const it = resolveAlternativesHelper(type, name);
|
||||||
function _resolveStandardizedNameForImport() {
|
let res = it.next();
|
||||||
_resolveStandardizedNameForImport = _asyncToGenerator(function* (type, name, dirname) {
|
while (!res.done) {
|
||||||
const parentUrl = (0, _url().pathToFileURL)(_path().join(dirname, "./babel-virtual-resolve-base.js")).href;
|
res = it.next(tryImportMetaResolve(res.value, parentUrl));
|
||||||
const it = resolveAlternativesHelper(type, name);
|
|
||||||
let res = it.next();
|
|
||||||
while (!res.done) {
|
|
||||||
res = it.next(yield tryImportMetaResolve(res.value, parentUrl));
|
|
||||||
}
|
|
||||||
return (0, _url().fileURLToPath)(res.value);
|
|
||||||
});
|
|
||||||
return _resolveStandardizedNameForImport.apply(this, arguments);
|
|
||||||
}
|
|
||||||
const resolveStandardizedName = _gensync()({
|
|
||||||
sync(type, name, dirname = process.cwd()) {
|
|
||||||
return resolveStandardizedNameForRequire(type, name, dirname);
|
|
||||||
},
|
|
||||||
async(type, name, dirname = process.cwd()) {
|
|
||||||
return _asyncToGenerator(function* () {
|
|
||||||
if (!_moduleTypes.supportsESM) {
|
|
||||||
return resolveStandardizedNameForRequire(type, name, dirname);
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
return yield resolveStandardizedNameForImport(type, name, dirname);
|
|
||||||
} catch (e) {
|
|
||||||
try {
|
|
||||||
return resolveStandardizedNameForRequire(type, name, dirname);
|
|
||||||
} catch (e2) {
|
|
||||||
if (e.type === "MODULE_NOT_FOUND") throw e;
|
|
||||||
if (e2.type === "MODULE_NOT_FOUND") throw e2;
|
|
||||||
throw e;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})();
|
|
||||||
}
|
}
|
||||||
});
|
return (0, _url().fileURLToPath)(res.value);
|
||||||
|
}
|
||||||
|
function resolveStandardizedName(type, name, dirname, resolveESM) {
|
||||||
|
if (!_moduleTypes.supportsESM || !resolveESM) {
|
||||||
|
return resolveStandardizedNameForRequire(type, name, dirname);
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
const resolved = resolveStandardizedNameForImport(type, name, dirname);
|
||||||
|
if (!(0, _fs().existsSync)(resolved)) {
|
||||||
|
throw Object.assign(new Error(`Could not resolve "${name}" in file ${dirname}.`), {
|
||||||
|
type: "MODULE_NOT_FOUND"
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return resolved;
|
||||||
|
} catch (e) {
|
||||||
|
try {
|
||||||
|
return resolveStandardizedNameForRequire(type, name, dirname);
|
||||||
|
} catch (e2) {
|
||||||
|
if (e.type === "MODULE_NOT_FOUND") throw e;
|
||||||
|
if (e2.type === "MODULE_NOT_FOUND") throw e2;
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
{
|
{
|
||||||
var LOADING_MODULES = new Set();
|
var LOADING_MODULES = new Set();
|
||||||
}
|
}
|
||||||
|
@ -216,8 +200,9 @@ function* requireModule(type, name) {
|
||||||
{
|
{
|
||||||
LOADING_MODULES.add(name);
|
LOADING_MODULES.add(name);
|
||||||
}
|
}
|
||||||
return yield* (0, _moduleTypes.default)(name, `You appear to be using a native ECMAScript module ${type}, ` + "which is only supported when running Babel asynchronously.",
|
{
|
||||||
true);
|
return yield* (0, _moduleTypes.default)(name, `You appear to be using a native ECMAScript module ${type}, ` + "which is only supported when running Babel asynchronously.", true);
|
||||||
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
err.message = `[BABEL]: ${err.message} (While processing: ${name})`;
|
err.message = `[BABEL]: ${err.message} (While processing: ${name})`;
|
||||||
throw err;
|
throw err;
|
||||||
|
|
2
node_modules/@babel/core/lib/config/files/plugins.js.map
generated
vendored
Executable file → Normal file
2
node_modules/@babel/core/lib/config/files/plugins.js.map
generated
vendored
Executable file → Normal file
File diff suppressed because one or more lines are too long
0
node_modules/@babel/core/lib/config/files/types.js
generated
vendored
Executable file → Normal file
0
node_modules/@babel/core/lib/config/files/types.js
generated
vendored
Executable file → Normal file
2
node_modules/@babel/core/lib/config/files/types.js.map
generated
vendored
Executable file → Normal file
2
node_modules/@babel/core/lib/config/files/types.js.map
generated
vendored
Executable file → Normal file
|
@ -1 +1 @@
|
||||||
{"version":3,"names":[],"sources":["../../../src/config/files/types.ts"],"sourcesContent":["import type { InputOptions } from \"..\";\n\nexport type ConfigFile = {\n filepath: string;\n dirname: string;\n options: InputOptions & { babel?: unknown };\n};\n\nexport type IgnoreFile = {\n filepath: string;\n dirname: string;\n ignore: Array<RegExp>;\n};\n\nexport type RelativeConfig = {\n // The actual config, either from package.json#babel, .babelrc, or\n // .babelrc.js, if there was one.\n config: ConfigFile | null;\n // The .babelignore, if there was one.\n ignore: IgnoreFile | null;\n};\n\nexport type FilePackageData = {\n // The file in the package.\n filepath: string;\n // Any ancestor directories of the file that are within the package.\n directories: Array<string>;\n // The contents of the package.json. May not be found if the package just\n // terminated at a node_modules folder without finding one.\n pkg: ConfigFile | null;\n // True if a package.json or node_modules folder was found while traversing\n // the directory structure.\n isPackage: boolean;\n};\n"],"mappings":""}
|
{"version":3,"names":[],"sources":["../../../src/config/files/types.ts"],"sourcesContent":["import type { InputOptions } from \"../index.ts\";\n\nexport type ConfigFile = {\n filepath: string;\n dirname: string;\n options: InputOptions & { babel?: unknown };\n};\n\nexport type IgnoreFile = {\n filepath: string;\n dirname: string;\n ignore: Array<RegExp>;\n};\n\nexport type RelativeConfig = {\n // The actual config, either from package.json#babel, .babelrc, or\n // .babelrc.js, if there was one.\n config: ConfigFile | null;\n // The .babelignore, if there was one.\n ignore: IgnoreFile | null;\n};\n\nexport type FilePackageData = {\n // The file in the package.\n filepath: string;\n // Any ancestor directories of the file that are within the package.\n directories: Array<string>;\n // The contents of the package.json. May not be found if the package just\n // terminated at a node_modules folder without finding one.\n pkg: ConfigFile | null;\n // True if a package.json or node_modules folder was found while traversing\n // the directory structure.\n isPackage: boolean;\n};\n"],"mappings":"","ignoreList":[]}
|
4
node_modules/@babel/core/lib/config/files/utils.js
generated
vendored
Executable file → Normal file
4
node_modules/@babel/core/lib/config/files/utils.js
generated
vendored
Executable file → Normal file
|
@ -4,8 +4,8 @@ Object.defineProperty(exports, "__esModule", {
|
||||||
value: true
|
value: true
|
||||||
});
|
});
|
||||||
exports.makeStaticFileCache = makeStaticFileCache;
|
exports.makeStaticFileCache = makeStaticFileCache;
|
||||||
var _caching = require("../caching");
|
var _caching = require("../caching.js");
|
||||||
var fs = require("../../gensync-utils/fs");
|
var fs = require("../../gensync-utils/fs.js");
|
||||||
function _fs2() {
|
function _fs2() {
|
||||||
const data = require("fs");
|
const data = require("fs");
|
||||||
_fs2 = function () {
|
_fs2 = function () {
|
||||||
|
|
2
node_modules/@babel/core/lib/config/files/utils.js.map
generated
vendored
Executable file → Normal file
2
node_modules/@babel/core/lib/config/files/utils.js.map
generated
vendored
Executable file → Normal file
|
@ -1 +1 @@
|
||||||
{"version":3,"names":["makeStaticFileCache","fn","makeStrongCache","filepath","cache","cached","invalidate","fileMtime","fs","readFile","nodeFs","existsSync","statSync","mtime","e","code"],"sources":["../../../src/config/files/utils.ts"],"sourcesContent":["import type { Handler } from \"gensync\";\n\nimport { makeStrongCache } from \"../caching\";\nimport type { CacheConfigurator } from \"../caching\";\nimport * as fs from \"../../gensync-utils/fs\";\nimport nodeFs from \"fs\";\n\nexport function makeStaticFileCache<T>(\n fn: (filepath: string, contents: string) => T,\n) {\n return makeStrongCache(function* (\n filepath: string,\n cache: CacheConfigurator<void>,\n ): Handler<null | T> {\n const cached = cache.invalidate(() => fileMtime(filepath));\n\n if (cached === null) {\n return null;\n }\n\n return fn(filepath, yield* fs.readFile(filepath, \"utf8\"));\n });\n}\n\nfunction fileMtime(filepath: string): number | null {\n if (!nodeFs.existsSync(filepath)) return null;\n\n try {\n return +nodeFs.statSync(filepath).mtime;\n } catch (e) {\n if (e.code !== \"ENOENT\" && e.code !== \"ENOTDIR\") throw e;\n }\n\n return null;\n}\n"],"mappings":";;;;;;AAEA;AAEA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEO,SAASA,mBAAmB,CACjCC,EAA6C,EAC7C;EACA,OAAO,IAAAC,wBAAe,EAAC,WACrBC,QAAgB,EAChBC,KAA8B,EACX;IACnB,MAAMC,MAAM,GAAGD,KAAK,CAACE,UAAU,CAAC,MAAMC,SAAS,CAACJ,QAAQ,CAAC,CAAC;IAE1D,IAAIE,MAAM,KAAK,IAAI,EAAE;MACnB,OAAO,IAAI;IACb;IAEA,OAAOJ,EAAE,CAACE,QAAQ,EAAE,OAAOK,EAAE,CAACC,QAAQ,CAACN,QAAQ,EAAE,MAAM,CAAC,CAAC;EAC3D,CAAC,CAAC;AACJ;AAEA,SAASI,SAAS,CAACJ,QAAgB,EAAiB;EAClD,IAAI,CAACO,MAAM,CAACC,UAAU,CAACR,QAAQ,CAAC,EAAE,OAAO,IAAI;EAE7C,IAAI;IACF,OAAO,CAACO,MAAM,CAACE,QAAQ,CAACT,QAAQ,CAAC,CAACU,KAAK;EACzC,CAAC,CAAC,OAAOC,CAAC,EAAE;IACV,IAAIA,CAAC,CAACC,IAAI,KAAK,QAAQ,IAAID,CAAC,CAACC,IAAI,KAAK,SAAS,EAAE,MAAMD,CAAC;EAC1D;EAEA,OAAO,IAAI;AACb;AAAC"}
|
{"version":3,"names":["_caching","require","fs","_fs2","data","makeStaticFileCache","fn","makeStrongCache","filepath","cache","cached","invalidate","fileMtime","readFile","nodeFs","existsSync","statSync","mtime","e","code"],"sources":["../../../src/config/files/utils.ts"],"sourcesContent":["import type { Handler } from \"gensync\";\n\nimport { makeStrongCache } from \"../caching.ts\";\nimport type { CacheConfigurator } from \"../caching.ts\";\nimport * as fs from \"../../gensync-utils/fs.ts\";\nimport nodeFs from \"fs\";\n\nexport function makeStaticFileCache<T>(\n fn: (filepath: string, contents: string) => T,\n) {\n return makeStrongCache(function* (\n filepath: string,\n cache: CacheConfigurator<void>,\n ): Handler<null | T> {\n const cached = cache.invalidate(() => fileMtime(filepath));\n\n if (cached === null) {\n return null;\n }\n\n return fn(filepath, yield* fs.readFile(filepath, \"utf8\"));\n });\n}\n\nfunction fileMtime(filepath: string): number | null {\n if (!nodeFs.existsSync(filepath)) return null;\n\n try {\n return +nodeFs.statSync(filepath).mtime;\n } catch (e) {\n if (e.code !== \"ENOENT\" && e.code !== \"ENOTDIR\") throw e;\n }\n\n return null;\n}\n"],"mappings":";;;;;;AAEA,IAAAA,QAAA,GAAAC,OAAA;AAEA,IAAAC,EAAA,GAAAD,OAAA;AACA,SAAAE,KAAA;EAAA,MAAAC,IAAA,GAAAH,OAAA;EAAAE,IAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEO,SAASC,mBAAmBA,CACjCC,EAA6C,EAC7C;EACA,OAAO,IAAAC,wBAAe,EAAC,WACrBC,QAAgB,EAChBC,KAA8B,EACX;IACnB,MAAMC,MAAM,GAAGD,KAAK,CAACE,UAAU,CAAC,MAAMC,SAAS,CAACJ,QAAQ,CAAC,CAAC;IAE1D,IAAIE,MAAM,KAAK,IAAI,EAAE;MACnB,OAAO,IAAI;IACb;IAEA,OAAOJ,EAAE,CAACE,QAAQ,EAAE,OAAON,EAAE,CAACW,QAAQ,CAACL,QAAQ,EAAE,MAAM,CAAC,CAAC;EAC3D,CAAC,CAAC;AACJ;AAEA,SAASI,SAASA,CAACJ,QAAgB,EAAiB;EAClD,IAAI,CAACM,KAAKA,CAAC,CAACC,UAAU,CAACP,QAAQ,CAAC,EAAE,OAAO,IAAI;EAE7C,IAAI;IACF,OAAO,CAACM,KAAKA,CAAC,CAACE,QAAQ,CAACR,QAAQ,CAAC,CAACS,KAAK;EACzC,CAAC,CAAC,OAAOC,CAAC,EAAE;IACV,IAAIA,CAAC,CAACC,IAAI,KAAK,QAAQ,IAAID,CAAC,CAACC,IAAI,KAAK,SAAS,EAAE,MAAMD,CAAC;EAC1D;EAEA,OAAO,IAAI;AACb;AAAC","ignoreList":[]}
|
|
@ -11,13 +11,13 @@ function _gensync() {
|
||||||
};
|
};
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
var _async = require("../gensync-utils/async");
|
var _async = require("../gensync-utils/async.js");
|
||||||
var _util = require("./util");
|
var _util = require("./util.js");
|
||||||
var context = require("../index");
|
var context = require("../index.js");
|
||||||
var _plugin = require("./plugin");
|
var _plugin = require("./plugin.js");
|
||||||
var _item = require("./item");
|
var _item = require("./item.js");
|
||||||
var _configChain = require("./config-chain");
|
var _configChain = require("./config-chain.js");
|
||||||
var _deepArray = require("./helpers/deep-array");
|
var _deepArray = require("./helpers/deep-array.js");
|
||||||
function _traverse() {
|
function _traverse() {
|
||||||
const data = require("@babel/traverse");
|
const data = require("@babel/traverse");
|
||||||
_traverse = function () {
|
_traverse = function () {
|
||||||
|
@ -25,13 +25,13 @@ function _traverse() {
|
||||||
};
|
};
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
var _caching = require("./caching");
|
var _caching = require("./caching.js");
|
||||||
var _options = require("./validation/options");
|
var _options = require("./validation/options.js");
|
||||||
var _plugins = require("./validation/plugins");
|
var _plugins = require("./validation/plugins.js");
|
||||||
var _configApi = require("./helpers/config-api");
|
var _configApi = require("./helpers/config-api.js");
|
||||||
var _partial = require("./partial");
|
var _partial = require("./partial.js");
|
||||||
var _configError = require("../errors/config-error");
|
var _configError = require("../errors/config-error.js");
|
||||||
var _default = _gensync()(function* loadFullConfig(inputOpts) {
|
var _default = exports.default = _gensync()(function* loadFullConfig(inputOpts) {
|
||||||
var _opts$assumptions;
|
var _opts$assumptions;
|
||||||
const result = yield* (0, _partial.default)(inputOpts);
|
const result = yield* (0, _partial.default)(inputOpts);
|
||||||
if (!result) {
|
if (!result) {
|
||||||
|
@ -82,7 +82,6 @@ var _default = _gensync()(function* loadFullConfig(inputOpts) {
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
externalDependencies.push(preset.externalDependencies);
|
externalDependencies.push(preset.externalDependencies);
|
||||||
|
|
||||||
if (descriptor.ownPass) {
|
if (descriptor.ownPass) {
|
||||||
presets.push({
|
presets.push({
|
||||||
preset: preset.chain,
|
preset: preset.chain,
|
||||||
|
@ -96,7 +95,6 @@ var _default = _gensync()(function* loadFullConfig(inputOpts) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (presets.length > 0) {
|
if (presets.length > 0) {
|
||||||
pluginDescriptorsByPass.splice(1, 0, ...presets.map(o => o.pass).filter(p => p !== pluginDescriptorsPass));
|
pluginDescriptorsByPass.splice(1, 0, ...presets.map(o => o.pass).filter(p => p !== pluginDescriptorsPass));
|
||||||
for (const {
|
for (const {
|
||||||
|
@ -152,7 +150,6 @@ var _default = _gensync()(function* loadFullConfig(inputOpts) {
|
||||||
externalDependencies: (0, _deepArray.finalize)(externalDependencies)
|
externalDependencies: (0, _deepArray.finalize)(externalDependencies)
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
exports.default = _default;
|
|
||||||
function enhanceError(context, fn) {
|
function enhanceError(context, fn) {
|
||||||
return function* (arg1, arg2) {
|
return function* (arg1, arg2) {
|
||||||
try {
|
try {
|
||||||
|
@ -166,7 +163,6 @@ function enhanceError(context, fn) {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
const makeDescriptorLoader = apiFactory => (0, _caching.makeWeakCache)(function* ({
|
const makeDescriptorLoader = apiFactory => (0, _caching.makeWeakCache)(function* ({
|
||||||
value,
|
value,
|
||||||
options,
|
options,
|
||||||
|
@ -253,7 +249,6 @@ const instantiatePlugin = (0, _caching.makeWeakCache)(function* ({
|
||||||
}
|
}
|
||||||
return new _plugin.default(plugin, options, alias, externalDependencies);
|
return new _plugin.default(plugin, options, alias, externalDependencies);
|
||||||
});
|
});
|
||||||
|
|
||||||
function* loadPluginDescriptor(descriptor, context) {
|
function* loadPluginDescriptor(descriptor, context) {
|
||||||
if (descriptor.value instanceof _plugin.default) {
|
if (descriptor.value instanceof _plugin.default) {
|
||||||
if (descriptor.options) {
|
if (descriptor.options) {
|
||||||
|
@ -272,13 +267,12 @@ const validateIfOptionNeedsFilename = (options, descriptor) => {
|
||||||
};
|
};
|
||||||
const validatePreset = (preset, context, descriptor) => {
|
const validatePreset = (preset, context, descriptor) => {
|
||||||
if (!context.filename) {
|
if (!context.filename) {
|
||||||
|
var _options$overrides;
|
||||||
const {
|
const {
|
||||||
options
|
options
|
||||||
} = preset;
|
} = preset;
|
||||||
validateIfOptionNeedsFilename(options, descriptor);
|
validateIfOptionNeedsFilename(options, descriptor);
|
||||||
if (options.overrides) {
|
(_options$overrides = options.overrides) == null || _options$overrides.forEach(overrideOptions => validateIfOptionNeedsFilename(overrideOptions, descriptor));
|
||||||
options.overrides.forEach(overrideOptions => validateIfOptionNeedsFilename(overrideOptions, descriptor));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const instantiatePreset = (0, _caching.makeWeakCacheSync)(({
|
const instantiatePreset = (0, _caching.makeWeakCacheSync)(({
|
||||||
|
@ -294,7 +288,6 @@ const instantiatePreset = (0, _caching.makeWeakCacheSync)(({
|
||||||
externalDependencies
|
externalDependencies
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
function* loadPresetDescriptor(descriptor, context) {
|
function* loadPresetDescriptor(descriptor, context) {
|
||||||
const preset = instantiatePreset(yield* presetDescriptorLoader(descriptor, context));
|
const preset = instantiatePreset(yield* presetDescriptorLoader(descriptor, context));
|
||||||
validatePreset(preset, context, descriptor);
|
validatePreset(preset, context, descriptor);
|
||||||
|
|
File diff suppressed because one or more lines are too long
15
node_modules/@babel/core/lib/config/helpers/config-api.js
generated
vendored
Executable file → Normal file
15
node_modules/@babel/core/lib/config/helpers/config-api.js
generated
vendored
Executable file → Normal file
|
@ -13,8 +13,8 @@ function _semver() {
|
||||||
};
|
};
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
var _ = require("../../");
|
var _index = require("../../index.js");
|
||||||
var _caching = require("../caching");
|
var _caching = require("../caching.js");
|
||||||
function makeConfigAPI(cache) {
|
function makeConfigAPI(cache) {
|
||||||
const env = value => cache.using(data => {
|
const env = value => cache.using(data => {
|
||||||
if (typeof value === "undefined") return data.envName;
|
if (typeof value === "undefined") return data.envName;
|
||||||
|
@ -30,7 +30,7 @@ function makeConfigAPI(cache) {
|
||||||
});
|
});
|
||||||
const caller = cb => cache.using(data => (0, _caching.assertSimpleType)(cb(data.caller)));
|
const caller = cb => cache.using(data => (0, _caching.assertSimpleType)(cb(data.caller)));
|
||||||
return {
|
return {
|
||||||
version: _.version,
|
version: _index.version,
|
||||||
cache: cache.simple(),
|
cache: cache.simple(),
|
||||||
env,
|
env,
|
||||||
async: () => false,
|
async: () => false,
|
||||||
|
@ -39,8 +39,7 @@ function makeConfigAPI(cache) {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
function makePresetAPI(cache, externalDependencies) {
|
function makePresetAPI(cache, externalDependencies) {
|
||||||
const targets = () =>
|
const targets = () => JSON.parse(cache.using(data => JSON.stringify(data.targets)));
|
||||||
JSON.parse(cache.using(data => JSON.stringify(data.targets)));
|
|
||||||
const addExternalDependency = ref => {
|
const addExternalDependency = ref => {
|
||||||
externalDependencies.push(ref);
|
externalDependencies.push(ref);
|
||||||
};
|
};
|
||||||
|
@ -65,18 +64,18 @@ function assertVersion(range) {
|
||||||
if (typeof range !== "string") {
|
if (typeof range !== "string") {
|
||||||
throw new Error("Expected string or integer value.");
|
throw new Error("Expected string or integer value.");
|
||||||
}
|
}
|
||||||
if (_semver().satisfies(_.version, range)) return;
|
if (range === "*" || _semver().satisfies(_index.version, range)) return;
|
||||||
const limit = Error.stackTraceLimit;
|
const limit = Error.stackTraceLimit;
|
||||||
if (typeof limit === "number" && limit < 25) {
|
if (typeof limit === "number" && limit < 25) {
|
||||||
Error.stackTraceLimit = 25;
|
Error.stackTraceLimit = 25;
|
||||||
}
|
}
|
||||||
const err = new Error(`Requires Babel "${range}", but was loaded with "${_.version}". ` + `If you are sure you have a compatible version of @babel/core, ` + `it is likely that something in your build process is loading the ` + `wrong version. Inspect the stack trace of this error to look for ` + `the first entry that doesn't mention "@babel/core" or "babel-core" ` + `to see what is calling Babel.`);
|
const err = new Error(`Requires Babel "${range}", but was loaded with "${_index.version}". ` + `If you are sure you have a compatible version of @babel/core, ` + `it is likely that something in your build process is loading the ` + `wrong version. Inspect the stack trace of this error to look for ` + `the first entry that doesn't mention "@babel/core" or "babel-core" ` + `to see what is calling Babel.`);
|
||||||
if (typeof limit === "number") {
|
if (typeof limit === "number") {
|
||||||
Error.stackTraceLimit = limit;
|
Error.stackTraceLimit = limit;
|
||||||
}
|
}
|
||||||
throw Object.assign(err, {
|
throw Object.assign(err, {
|
||||||
code: "BABEL_VERSION_UNSUPPORTED",
|
code: "BABEL_VERSION_UNSUPPORTED",
|
||||||
version: _.version,
|
version: _index.version,
|
||||||
range
|
range
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
2
node_modules/@babel/core/lib/config/helpers/config-api.js.map
generated
vendored
Executable file → Normal file
2
node_modules/@babel/core/lib/config/helpers/config-api.js.map
generated
vendored
Executable file → Normal file
File diff suppressed because one or more lines are too long
1
node_modules/@babel/core/lib/config/helpers/deep-array.js
generated
vendored
Executable file → Normal file
1
node_modules/@babel/core/lib/config/helpers/deep-array.js
generated
vendored
Executable file → Normal file
|
@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
||||||
});
|
});
|
||||||
exports.finalize = finalize;
|
exports.finalize = finalize;
|
||||||
exports.flattenToSet = flattenToSet;
|
exports.flattenToSet = flattenToSet;
|
||||||
|
|
||||||
function finalize(deepArr) {
|
function finalize(deepArr) {
|
||||||
return Object.freeze(deepArr);
|
return Object.freeze(deepArr);
|
||||||
}
|
}
|
||||||
|
|
2
node_modules/@babel/core/lib/config/helpers/deep-array.js.map
generated
vendored
Executable file → Normal file
2
node_modules/@babel/core/lib/config/helpers/deep-array.js.map
generated
vendored
Executable file → Normal file
|
@ -1 +1 @@
|
||||||
{"version":3,"names":["finalize","deepArr","Object","freeze","flattenToSet","arr","result","Set","stack","length","el","pop","Array","isArray","push","add"],"sources":["../../../src/config/helpers/deep-array.ts"],"sourcesContent":["export type DeepArray<T> = Array<T | ReadonlyDeepArray<T>>;\n\n// Just to make sure that DeepArray<T> is not assignable to ReadonlyDeepArray<T>\ndeclare const __marker: unique symbol;\nexport type ReadonlyDeepArray<T> = ReadonlyArray<T | ReadonlyDeepArray<T>> & {\n [__marker]: true;\n};\n\nexport function finalize<T>(deepArr: DeepArray<T>): ReadonlyDeepArray<T> {\n return Object.freeze(deepArr) as ReadonlyDeepArray<T>;\n}\n\nexport function flattenToSet<T extends string>(\n arr: ReadonlyDeepArray<T>,\n): Set<T> {\n const result = new Set<T>();\n const stack = [arr];\n while (stack.length > 0) {\n for (const el of stack.pop()) {\n if (Array.isArray(el)) stack.push(el as ReadonlyDeepArray<T>);\n else result.add(el as T);\n }\n }\n return result;\n}\n"],"mappings":";;;;;;;;AAQO,SAASA,QAAQ,CAAIC,OAAqB,EAAwB;EACvE,OAAOC,MAAM,CAACC,MAAM,CAACF,OAAO,CAAC;AAC/B;AAEO,SAASG,YAAY,CAC1BC,GAAyB,EACjB;EACR,MAAMC,MAAM,GAAG,IAAIC,GAAG,EAAK;EAC3B,MAAMC,KAAK,GAAG,CAACH,GAAG,CAAC;EACnB,OAAOG,KAAK,CAACC,MAAM,GAAG,CAAC,EAAE;IACvB,KAAK,MAAMC,EAAE,IAAIF,KAAK,CAACG,GAAG,EAAE,EAAE;MAC5B,IAAIC,KAAK,CAACC,OAAO,CAACH,EAAE,CAAC,EAAEF,KAAK,CAACM,IAAI,CAACJ,EAAE,CAAyB,CAAC,KACzDJ,MAAM,CAACS,GAAG,CAACL,EAAE,CAAM;IAC1B;EACF;EACA,OAAOJ,MAAM;AACf;AAAC"}
|
{"version":3,"names":["finalize","deepArr","Object","freeze","flattenToSet","arr","result","Set","stack","length","el","pop","Array","isArray","push","add"],"sources":["../../../src/config/helpers/deep-array.ts"],"sourcesContent":["export type DeepArray<T> = Array<T | ReadonlyDeepArray<T>>;\n\n// Just to make sure that DeepArray<T> is not assignable to ReadonlyDeepArray<T>\ndeclare const __marker: unique symbol;\nexport type ReadonlyDeepArray<T> = ReadonlyArray<T | ReadonlyDeepArray<T>> & {\n [__marker]: true;\n};\n\nexport function finalize<T>(deepArr: DeepArray<T>): ReadonlyDeepArray<T> {\n return Object.freeze(deepArr) as ReadonlyDeepArray<T>;\n}\n\nexport function flattenToSet<T extends string>(\n arr: ReadonlyDeepArray<T>,\n): Set<T> {\n const result = new Set<T>();\n const stack = [arr];\n while (stack.length > 0) {\n for (const el of stack.pop()) {\n if (Array.isArray(el)) stack.push(el as ReadonlyDeepArray<T>);\n else result.add(el as T);\n }\n }\n return result;\n}\n"],"mappings":";;;;;;;AAQO,SAASA,QAAQA,CAAIC,OAAqB,EAAwB;EACvE,OAAOC,MAAM,CAACC,MAAM,CAACF,OAAO,CAAC;AAC/B;AAEO,SAASG,YAAYA,CAC1BC,GAAyB,EACjB;EACR,MAAMC,MAAM,GAAG,IAAIC,GAAG,CAAI,CAAC;EAC3B,MAAMC,KAAK,GAAG,CAACH,GAAG,CAAC;EACnB,OAAOG,KAAK,CAACC,MAAM,GAAG,CAAC,EAAE;IACvB,KAAK,MAAMC,EAAE,IAAIF,KAAK,CAACG,GAAG,CAAC,CAAC,EAAE;MAC5B,IAAIC,KAAK,CAACC,OAAO,CAACH,EAAE,CAAC,EAAEF,KAAK,CAACM,IAAI,CAACJ,EAA0B,CAAC,CAAC,KACzDJ,MAAM,CAACS,GAAG,CAACL,EAAO,CAAC;IAC1B;EACF;EACA,OAAOJ,MAAM;AACf;AAAC","ignoreList":[]}
|
0
node_modules/@babel/core/lib/config/helpers/environment.js
generated
vendored
Executable file → Normal file
0
node_modules/@babel/core/lib/config/helpers/environment.js
generated
vendored
Executable file → Normal file
2
node_modules/@babel/core/lib/config/helpers/environment.js.map
generated
vendored
Executable file → Normal file
2
node_modules/@babel/core/lib/config/helpers/environment.js.map
generated
vendored
Executable file → Normal file
|
@ -1 +1 @@
|
||||||
{"version":3,"names":["getEnv","defaultValue","process","env","BABEL_ENV","NODE_ENV"],"sources":["../../../src/config/helpers/environment.ts"],"sourcesContent":["export function getEnv(defaultValue: string = \"development\"): string {\n return process.env.BABEL_ENV || process.env.NODE_ENV || defaultValue;\n}\n"],"mappings":";;;;;;AAAO,SAASA,MAAM,CAACC,YAAoB,GAAG,aAAa,EAAU;EACnE,OAAOC,OAAO,CAACC,GAAG,CAACC,SAAS,IAAIF,OAAO,CAACC,GAAG,CAACE,QAAQ,IAAIJ,YAAY;AACtE;AAAC"}
|
{"version":3,"names":["getEnv","defaultValue","process","env","BABEL_ENV","NODE_ENV"],"sources":["../../../src/config/helpers/environment.ts"],"sourcesContent":["export function getEnv(defaultValue: string = \"development\"): string {\n return process.env.BABEL_ENV || process.env.NODE_ENV || defaultValue;\n}\n"],"mappings":";;;;;;AAAO,SAASA,MAAMA,CAACC,YAAoB,GAAG,aAAa,EAAU;EACnE,OAAOC,OAAO,CAACC,GAAG,CAACC,SAAS,IAAIF,OAAO,CAACC,GAAG,CAACE,QAAQ,IAAIJ,YAAY;AACtE;AAAC","ignoreList":[]}
|
|
@ -4,14 +4,20 @@ Object.defineProperty(exports, "__esModule", {
|
||||||
value: true
|
value: true
|
||||||
});
|
});
|
||||||
exports.createConfigItem = createConfigItem;
|
exports.createConfigItem = createConfigItem;
|
||||||
exports.createConfigItemSync = exports.createConfigItemAsync = void 0;
|
exports.createConfigItemAsync = createConfigItemAsync;
|
||||||
|
exports.createConfigItemSync = createConfigItemSync;
|
||||||
Object.defineProperty(exports, "default", {
|
Object.defineProperty(exports, "default", {
|
||||||
enumerable: true,
|
enumerable: true,
|
||||||
get: function () {
|
get: function () {
|
||||||
return _full.default;
|
return _full.default;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
exports.loadPartialConfigSync = exports.loadPartialConfigAsync = exports.loadPartialConfig = exports.loadOptionsSync = exports.loadOptionsAsync = exports.loadOptions = void 0;
|
exports.loadOptions = loadOptions;
|
||||||
|
exports.loadOptionsAsync = loadOptionsAsync;
|
||||||
|
exports.loadOptionsSync = loadOptionsSync;
|
||||||
|
exports.loadPartialConfig = loadPartialConfig;
|
||||||
|
exports.loadPartialConfigAsync = loadPartialConfigAsync;
|
||||||
|
exports.loadPartialConfigSync = loadPartialConfigSync;
|
||||||
function _gensync() {
|
function _gensync() {
|
||||||
const data = require("gensync");
|
const data = require("gensync");
|
||||||
_gensync = function () {
|
_gensync = function () {
|
||||||
|
@ -19,50 +25,67 @@ function _gensync() {
|
||||||
};
|
};
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
var _full = require("./full");
|
var _full = require("./full.js");
|
||||||
var _partial = require("./partial");
|
var _partial = require("./partial.js");
|
||||||
var _item = require("./item");
|
var _item = require("./item.js");
|
||||||
const loadOptionsRunner = _gensync()(function* (opts) {
|
var _rewriteStackTrace = require("../errors/rewrite-stack-trace.js");
|
||||||
|
const loadPartialConfigRunner = _gensync()(_partial.loadPartialConfig);
|
||||||
|
function loadPartialConfigAsync(...args) {
|
||||||
|
return (0, _rewriteStackTrace.beginHiddenCallStack)(loadPartialConfigRunner.async)(...args);
|
||||||
|
}
|
||||||
|
function loadPartialConfigSync(...args) {
|
||||||
|
return (0, _rewriteStackTrace.beginHiddenCallStack)(loadPartialConfigRunner.sync)(...args);
|
||||||
|
}
|
||||||
|
function loadPartialConfig(opts, callback) {
|
||||||
|
if (callback !== undefined) {
|
||||||
|
(0, _rewriteStackTrace.beginHiddenCallStack)(loadPartialConfigRunner.errback)(opts, callback);
|
||||||
|
} else if (typeof opts === "function") {
|
||||||
|
(0, _rewriteStackTrace.beginHiddenCallStack)(loadPartialConfigRunner.errback)(undefined, opts);
|
||||||
|
} else {
|
||||||
|
{
|
||||||
|
return loadPartialConfigSync(opts);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function* loadOptionsImpl(opts) {
|
||||||
var _config$options;
|
var _config$options;
|
||||||
const config = yield* (0, _full.default)(opts);
|
const config = yield* (0, _full.default)(opts);
|
||||||
return (_config$options = config == null ? void 0 : config.options) != null ? _config$options : null;
|
return (_config$options = config == null ? void 0 : config.options) != null ? _config$options : null;
|
||||||
});
|
}
|
||||||
const createConfigItemRunner = _gensync()(_item.createConfigItem);
|
const loadOptionsRunner = _gensync()(loadOptionsImpl);
|
||||||
const maybeErrback = runner => (argOrCallback, maybeCallback) => {
|
function loadOptionsAsync(...args) {
|
||||||
let arg;
|
return (0, _rewriteStackTrace.beginHiddenCallStack)(loadOptionsRunner.async)(...args);
|
||||||
let callback;
|
}
|
||||||
if (maybeCallback === undefined && typeof argOrCallback === "function") {
|
function loadOptionsSync(...args) {
|
||||||
callback = argOrCallback;
|
return (0, _rewriteStackTrace.beginHiddenCallStack)(loadOptionsRunner.sync)(...args);
|
||||||
arg = undefined;
|
}
|
||||||
|
function loadOptions(opts, callback) {
|
||||||
|
if (callback !== undefined) {
|
||||||
|
(0, _rewriteStackTrace.beginHiddenCallStack)(loadOptionsRunner.errback)(opts, callback);
|
||||||
|
} else if (typeof opts === "function") {
|
||||||
|
(0, _rewriteStackTrace.beginHiddenCallStack)(loadOptionsRunner.errback)(undefined, opts);
|
||||||
} else {
|
} else {
|
||||||
callback = maybeCallback;
|
{
|
||||||
arg = argOrCallback;
|
return loadOptionsSync(opts);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return callback ? runner.errback(arg, callback) : runner.sync(arg);
|
}
|
||||||
};
|
const createConfigItemRunner = _gensync()(_item.createConfigItem);
|
||||||
const loadPartialConfig = maybeErrback(_partial.loadPartialConfig);
|
function createConfigItemAsync(...args) {
|
||||||
exports.loadPartialConfig = loadPartialConfig;
|
return (0, _rewriteStackTrace.beginHiddenCallStack)(createConfigItemRunner.async)(...args);
|
||||||
const loadPartialConfigSync = _partial.loadPartialConfig.sync;
|
}
|
||||||
exports.loadPartialConfigSync = loadPartialConfigSync;
|
function createConfigItemSync(...args) {
|
||||||
const loadPartialConfigAsync = _partial.loadPartialConfig.async;
|
return (0, _rewriteStackTrace.beginHiddenCallStack)(createConfigItemRunner.sync)(...args);
|
||||||
exports.loadPartialConfigAsync = loadPartialConfigAsync;
|
}
|
||||||
const loadOptions = maybeErrback(loadOptionsRunner);
|
|
||||||
exports.loadOptions = loadOptions;
|
|
||||||
const loadOptionsSync = loadOptionsRunner.sync;
|
|
||||||
exports.loadOptionsSync = loadOptionsSync;
|
|
||||||
const loadOptionsAsync = loadOptionsRunner.async;
|
|
||||||
exports.loadOptionsAsync = loadOptionsAsync;
|
|
||||||
const createConfigItemSync = createConfigItemRunner.sync;
|
|
||||||
exports.createConfigItemSync = createConfigItemSync;
|
|
||||||
const createConfigItemAsync = createConfigItemRunner.async;
|
|
||||||
exports.createConfigItemAsync = createConfigItemAsync;
|
|
||||||
function createConfigItem(target, options, callback) {
|
function createConfigItem(target, options, callback) {
|
||||||
if (callback !== undefined) {
|
if (callback !== undefined) {
|
||||||
return createConfigItemRunner.errback(target, options, callback);
|
(0, _rewriteStackTrace.beginHiddenCallStack)(createConfigItemRunner.errback)(target, options, callback);
|
||||||
} else if (typeof options === "function") {
|
} else if (typeof options === "function") {
|
||||||
return createConfigItemRunner.errback(target, undefined, callback);
|
(0, _rewriteStackTrace.beginHiddenCallStack)(createConfigItemRunner.errback)(target, undefined, callback);
|
||||||
} else {
|
} else {
|
||||||
return createConfigItemRunner.sync(target, options);
|
{
|
||||||
|
return createConfigItemSync(target, options);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
0 && 0;
|
0 && 0;
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -13,11 +13,10 @@ function _path() {
|
||||||
};
|
};
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
var _configDescriptors = require("./config-descriptors");
|
var _configDescriptors = require("./config-descriptors.js");
|
||||||
function createItemFromDescriptor(desc) {
|
function createItemFromDescriptor(desc) {
|
||||||
return new ConfigItem(desc);
|
return new ConfigItem(desc);
|
||||||
}
|
}
|
||||||
|
|
||||||
function* createConfigItem(value, {
|
function* createConfigItem(value, {
|
||||||
dirname = ".",
|
dirname = ".",
|
||||||
type
|
type
|
||||||
|
@ -36,7 +35,6 @@ function getItemDescriptor(item) {
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
class ConfigItem {
|
class ConfigItem {
|
||||||
|
|
||||||
constructor(descriptor) {
|
constructor(descriptor) {
|
||||||
this._descriptor = void 0;
|
this._descriptor = void 0;
|
||||||
this[CONFIG_ITEM_BRAND] = true;
|
this[CONFIG_ITEM_BRAND] = true;
|
||||||
|
@ -60,7 +58,6 @@ class ConfigItem {
|
||||||
request: this._descriptor.file.request,
|
request: this._descriptor.file.request,
|
||||||
resolved: this._descriptor.file.resolved
|
resolved: this._descriptor.file.resolved
|
||||||
} : undefined;
|
} : undefined;
|
||||||
|
|
||||||
Object.freeze(this);
|
Object.freeze(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
||||||
value: true
|
value: true
|
||||||
});
|
});
|
||||||
exports.default = loadPrivatePartialConfig;
|
exports.default = loadPrivatePartialConfig;
|
||||||
exports.loadPartialConfig = void 0;
|
exports.loadPartialConfig = loadPartialConfig;
|
||||||
function _path() {
|
function _path() {
|
||||||
const data = require("path");
|
const data = require("path");
|
||||||
_path = function () {
|
_path = function () {
|
||||||
|
@ -12,21 +12,14 @@ function _path() {
|
||||||
};
|
};
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
function _gensync() {
|
var _plugin = require("./plugin.js");
|
||||||
const data = require("gensync");
|
var _util = require("./util.js");
|
||||||
_gensync = function () {
|
var _item = require("./item.js");
|
||||||
return data;
|
var _configChain = require("./config-chain.js");
|
||||||
};
|
var _environment = require("./helpers/environment.js");
|
||||||
return data;
|
var _options = require("./validation/options.js");
|
||||||
}
|
var _index = require("./files/index.js");
|
||||||
var _plugin = require("./plugin");
|
var _resolveTargets = require("./resolve-targets.js");
|
||||||
var _util = require("./util");
|
|
||||||
var _item = require("./item");
|
|
||||||
var _configChain = require("./config-chain");
|
|
||||||
var _environment = require("./helpers/environment");
|
|
||||||
var _options = require("./validation/options");
|
|
||||||
var _files = require("./files");
|
|
||||||
var _resolveTargets = require("./resolve-targets");
|
|
||||||
const _excluded = ["showIgnoredFiles"];
|
const _excluded = ["showIgnoredFiles"];
|
||||||
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
||||||
function resolveRootMode(rootDir, rootMode) {
|
function resolveRootMode(rootDir, rootMode) {
|
||||||
|
@ -35,14 +28,14 @@ function resolveRootMode(rootDir, rootMode) {
|
||||||
return rootDir;
|
return rootDir;
|
||||||
case "upward-optional":
|
case "upward-optional":
|
||||||
{
|
{
|
||||||
const upwardRootDir = (0, _files.findConfigUpwards)(rootDir);
|
const upwardRootDir = (0, _index.findConfigUpwards)(rootDir);
|
||||||
return upwardRootDir === null ? rootDir : upwardRootDir;
|
return upwardRootDir === null ? rootDir : upwardRootDir;
|
||||||
}
|
}
|
||||||
case "upward":
|
case "upward":
|
||||||
{
|
{
|
||||||
const upwardRootDir = (0, _files.findConfigUpwards)(rootDir);
|
const upwardRootDir = (0, _index.findConfigUpwards)(rootDir);
|
||||||
if (upwardRootDir !== null) return upwardRootDir;
|
if (upwardRootDir !== null) return upwardRootDir;
|
||||||
throw Object.assign(new Error(`Babel was run with rootMode:"upward" but a root could not ` + `be found when searching upward from "${rootDir}".\n` + `One of the following config files must be in the directory tree: ` + `"${_files.ROOT_CONFIG_FILENAMES.join(", ")}".`), {
|
throw Object.assign(new Error(`Babel was run with rootMode:"upward" but a root could not ` + `be found when searching upward from "${rootDir}".\n` + `One of the following config files must be in the directory tree: ` + `"${_index.ROOT_CONFIG_FILENAMES.join(", ")}".`), {
|
||||||
code: "BABEL_ROOT_NOT_FOUND",
|
code: "BABEL_ROOT_NOT_FOUND",
|
||||||
dirname: rootDir
|
dirname: rootDir
|
||||||
});
|
});
|
||||||
|
@ -67,7 +60,7 @@ function* loadPrivatePartialConfig(inputOpts) {
|
||||||
const absoluteCwd = _path().resolve(cwd);
|
const absoluteCwd = _path().resolve(cwd);
|
||||||
const absoluteRootDir = resolveRootMode(_path().resolve(absoluteCwd, rootDir), rootMode);
|
const absoluteRootDir = resolveRootMode(_path().resolve(absoluteCwd, rootDir), rootMode);
|
||||||
const filename = typeof args.filename === "string" ? _path().resolve(cwd, args.filename) : undefined;
|
const filename = typeof args.filename === "string" ? _path().resolve(cwd, args.filename) : undefined;
|
||||||
const showConfigPath = yield* (0, _files.resolveShowConfigPath)(absoluteCwd);
|
const showConfigPath = yield* (0, _index.resolveShowConfigPath)(absoluteCwd);
|
||||||
const context = {
|
const context = {
|
||||||
filename,
|
filename,
|
||||||
cwd: absoluteCwd,
|
cwd: absoluteCwd,
|
||||||
|
@ -109,7 +102,7 @@ function* loadPrivatePartialConfig(inputOpts) {
|
||||||
files: configChain.files
|
files: configChain.files
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
const loadPartialConfig = _gensync()(function* (opts) {
|
function* loadPartialConfig(opts) {
|
||||||
let showIgnoredFiles = false;
|
let showIgnoredFiles = false;
|
||||||
if (typeof opts === "object" && opts !== null && !Array.isArray(opts)) {
|
if (typeof opts === "object" && opts !== null && !Array.isArray(opts)) {
|
||||||
var _opts = opts;
|
var _opts = opts;
|
||||||
|
@ -138,10 +131,8 @@ const loadPartialConfig = _gensync()(function* (opts) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return new PartialConfig(options, babelrc ? babelrc.filepath : undefined, ignore ? ignore.filepath : undefined, config ? config.filepath : undefined, fileHandling, files);
|
return new PartialConfig(options, babelrc ? babelrc.filepath : undefined, ignore ? ignore.filepath : undefined, config ? config.filepath : undefined, fileHandling, files);
|
||||||
});
|
}
|
||||||
exports.loadPartialConfig = loadPartialConfig;
|
|
||||||
class PartialConfig {
|
class PartialConfig {
|
||||||
|
|
||||||
constructor(options, babelrc, ignore, config, fileHandling, files) {
|
constructor(options, babelrc, ignore, config, fileHandling, files) {
|
||||||
this.options = void 0;
|
this.options = void 0;
|
||||||
this.babelrc = void 0;
|
this.babelrc = void 0;
|
||||||
|
@ -155,10 +146,8 @@ class PartialConfig {
|
||||||
this.config = config;
|
this.config = config;
|
||||||
this.fileHandling = fileHandling;
|
this.fileHandling = fileHandling;
|
||||||
this.files = files;
|
this.files = files;
|
||||||
|
|
||||||
Object.freeze(this);
|
Object.freeze(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
hasFilesystemConfig() {
|
hasFilesystemConfig() {
|
||||||
return this.babelrc !== undefined || this.config !== undefined;
|
return this.babelrc !== undefined || this.config !== undefined;
|
||||||
}
|
}
|
||||||
|
|
2
node_modules/@babel/core/lib/config/partial.js.map
generated
vendored
Executable file → Normal file
2
node_modules/@babel/core/lib/config/partial.js.map
generated
vendored
Executable file → Normal file
File diff suppressed because one or more lines are too long
5
node_modules/@babel/core/lib/config/pattern-to-regex.js
generated
vendored
Executable file → Normal file
5
node_modules/@babel/core/lib/config/pattern-to-regex.js
generated
vendored
Executable file → Normal file
|
@ -21,20 +21,15 @@ const starStarPatLast = `${starPat}*?${starPatLast}?`;
|
||||||
function escapeRegExp(string) {
|
function escapeRegExp(string) {
|
||||||
return string.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&");
|
return string.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&");
|
||||||
}
|
}
|
||||||
|
|
||||||
function pathToPattern(pattern, dirname) {
|
function pathToPattern(pattern, dirname) {
|
||||||
const parts = _path().resolve(dirname, pattern).split(_path().sep);
|
const parts = _path().resolve(dirname, pattern).split(_path().sep);
|
||||||
return new RegExp(["^", ...parts.map((part, i) => {
|
return new RegExp(["^", ...parts.map((part, i) => {
|
||||||
const last = i === parts.length - 1;
|
const last = i === parts.length - 1;
|
||||||
|
|
||||||
if (part === "**") return last ? starStarPatLast : starStarPat;
|
if (part === "**") return last ? starStarPatLast : starStarPat;
|
||||||
|
|
||||||
if (part === "*") return last ? starPatLast : starPat;
|
if (part === "*") return last ? starPatLast : starPat;
|
||||||
|
|
||||||
if (part.indexOf("*.") === 0) {
|
if (part.indexOf("*.") === 0) {
|
||||||
return substitution + escapeRegExp(part.slice(1)) + (last ? endSep : sep);
|
return substitution + escapeRegExp(part.slice(1)) + (last ? endSep : sep);
|
||||||
}
|
}
|
||||||
|
|
||||||
return escapeRegExp(part) + (last ? endSep : sep);
|
return escapeRegExp(part) + (last ? endSep : sep);
|
||||||
})].join(""));
|
})].join(""));
|
||||||
}
|
}
|
||||||
|
|
2
node_modules/@babel/core/lib/config/pattern-to-regex.js.map
generated
vendored
Executable file → Normal file
2
node_modules/@babel/core/lib/config/pattern-to-regex.js.map
generated
vendored
Executable file → Normal file
|
@ -1 +1 @@
|
||||||
{"version":3,"names":["sep","path","endSep","substitution","starPat","starPatLast","starStarPat","starStarPatLast","escapeRegExp","string","replace","pathToPattern","pattern","dirname","parts","resolve","split","RegExp","map","part","i","last","length","indexOf","slice","join"],"sources":["../../src/config/pattern-to-regex.ts"],"sourcesContent":["import path from \"path\";\n\nconst sep = `\\\\${path.sep}`;\nconst endSep = `(?:${sep}|$)`;\n\nconst substitution = `[^${sep}]+`;\n\nconst starPat = `(?:${substitution}${sep})`;\nconst starPatLast = `(?:${substitution}${endSep})`;\n\nconst starStarPat = `${starPat}*?`;\nconst starStarPatLast = `${starPat}*?${starPatLast}?`;\n\nfunction escapeRegExp(string: string) {\n return string.replace(/[|\\\\{}()[\\]^$+*?.]/g, \"\\\\$&\");\n}\n\n/**\n * Implement basic pattern matching that will allow users to do the simple\n * tests with * and **. If users want full complex pattern matching, then can\n * always use regex matching, or function validation.\n */\nexport default function pathToPattern(\n pattern: string,\n dirname: string,\n): RegExp {\n const parts = path.resolve(dirname, pattern).split(path.sep);\n\n return new RegExp(\n [\n \"^\",\n ...parts.map((part, i) => {\n const last = i === parts.length - 1;\n\n // ** matches 0 or more path parts.\n if (part === \"**\") return last ? starStarPatLast : starStarPat;\n\n // * matches 1 path part.\n if (part === \"*\") return last ? starPatLast : starPat;\n\n // *.ext matches a wildcard with an extension.\n if (part.indexOf(\"*.\") === 0) {\n return (\n substitution + escapeRegExp(part.slice(1)) + (last ? endSep : sep)\n );\n }\n\n // Otherwise match the pattern text.\n return escapeRegExp(part) + (last ? endSep : sep);\n }),\n ].join(\"\"),\n );\n}\n"],"mappings":";;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA,MAAMA,GAAG,GAAI,KAAIC,OAAI,CAACD,GAAI,EAAC;AAC3B,MAAME,MAAM,GAAI,MAAKF,GAAI,KAAI;AAE7B,MAAMG,YAAY,GAAI,KAAIH,GAAI,IAAG;AAEjC,MAAMI,OAAO,GAAI,MAAKD,YAAa,GAAEH,GAAI,GAAE;AAC3C,MAAMK,WAAW,GAAI,MAAKF,YAAa,GAAED,MAAO,GAAE;AAElD,MAAMI,WAAW,GAAI,GAAEF,OAAQ,IAAG;AAClC,MAAMG,eAAe,GAAI,GAAEH,OAAQ,KAAIC,WAAY,GAAE;AAErD,SAASG,YAAY,CAACC,MAAc,EAAE;EACpC,OAAOA,MAAM,CAACC,OAAO,CAAC,qBAAqB,EAAE,MAAM,CAAC;AACtD;;AAOe,SAASC,aAAa,CACnCC,OAAe,EACfC,OAAe,EACP;EACR,MAAMC,KAAK,GAAGb,OAAI,CAACc,OAAO,CAACF,OAAO,EAAED,OAAO,CAAC,CAACI,KAAK,CAACf,OAAI,CAACD,GAAG,CAAC;EAE5D,OAAO,IAAIiB,MAAM,CACf,CACE,GAAG,EACH,GAAGH,KAAK,CAACI,GAAG,CAAC,CAACC,IAAI,EAAEC,CAAC,KAAK;IACxB,MAAMC,IAAI,GAAGD,CAAC,KAAKN,KAAK,CAACQ,MAAM,GAAG,CAAC;;IAGnC,IAAIH,IAAI,KAAK,IAAI,EAAE,OAAOE,IAAI,GAAGd,eAAe,GAAGD,WAAW;;IAG9D,IAAIa,IAAI,KAAK,GAAG,EAAE,OAAOE,IAAI,GAAGhB,WAAW,GAAGD,OAAO;;IAGrD,IAAIe,IAAI,CAACI,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE;MAC5B,OACEpB,YAAY,GAAGK,YAAY,CAACW,IAAI,CAACK,KAAK,CAAC,CAAC,CAAC,CAAC,IAAIH,IAAI,GAAGnB,MAAM,GAAGF,GAAG,CAAC;IAEtE;;IAGA,OAAOQ,YAAY,CAACW,IAAI,CAAC,IAAIE,IAAI,GAAGnB,MAAM,GAAGF,GAAG,CAAC;EACnD,CAAC,CAAC,CACH,CAACyB,IAAI,CAAC,EAAE,CAAC,CACX;AACH;AAAC"}
|
{"version":3,"names":["_path","data","require","sep","path","endSep","substitution","starPat","starPatLast","starStarPat","starStarPatLast","escapeRegExp","string","replace","pathToPattern","pattern","dirname","parts","resolve","split","RegExp","map","part","i","last","length","indexOf","slice","join"],"sources":["../../src/config/pattern-to-regex.ts"],"sourcesContent":["import path from \"path\";\n\nconst sep = `\\\\${path.sep}`;\nconst endSep = `(?:${sep}|$)`;\n\nconst substitution = `[^${sep}]+`;\n\nconst starPat = `(?:${substitution}${sep})`;\nconst starPatLast = `(?:${substitution}${endSep})`;\n\nconst starStarPat = `${starPat}*?`;\nconst starStarPatLast = `${starPat}*?${starPatLast}?`;\n\nfunction escapeRegExp(string: string) {\n return string.replace(/[|\\\\{}()[\\]^$+*?.]/g, \"\\\\$&\");\n}\n\n/**\n * Implement basic pattern matching that will allow users to do the simple\n * tests with * and **. If users want full complex pattern matching, then can\n * always use regex matching, or function validation.\n */\nexport default function pathToPattern(\n pattern: string,\n dirname: string,\n): RegExp {\n const parts = path.resolve(dirname, pattern).split(path.sep);\n\n return new RegExp(\n [\n \"^\",\n ...parts.map((part, i) => {\n const last = i === parts.length - 1;\n\n // ** matches 0 or more path parts.\n if (part === \"**\") return last ? starStarPatLast : starStarPat;\n\n // * matches 1 path part.\n if (part === \"*\") return last ? starPatLast : starPat;\n\n // *.ext matches a wildcard with an extension.\n if (part.indexOf(\"*.\") === 0) {\n return (\n substitution + escapeRegExp(part.slice(1)) + (last ? endSep : sep)\n );\n }\n\n // Otherwise match the pattern text.\n return escapeRegExp(part) + (last ? endSep : sep);\n }),\n ].join(\"\"),\n );\n}\n"],"mappings":";;;;;;AAAA,SAAAA,MAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,KAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,MAAME,GAAG,GAAI,KAAIC,MAAGA,CAAC,CAACD,GAAI,EAAC;AAC3B,MAAME,MAAM,GAAI,MAAKF,GAAI,KAAI;AAE7B,MAAMG,YAAY,GAAI,KAAIH,GAAI,IAAG;AAEjC,MAAMI,OAAO,GAAI,MAAKD,YAAa,GAAEH,GAAI,GAAE;AAC3C,MAAMK,WAAW,GAAI,MAAKF,YAAa,GAAED,MAAO,GAAE;AAElD,MAAMI,WAAW,GAAI,GAAEF,OAAQ,IAAG;AAClC,MAAMG,eAAe,GAAI,GAAEH,OAAQ,KAAIC,WAAY,GAAE;AAErD,SAASG,YAAYA,CAACC,MAAc,EAAE;EACpC,OAAOA,MAAM,CAACC,OAAO,CAAC,qBAAqB,EAAE,MAAM,CAAC;AACtD;AAOe,SAASC,aAAaA,CACnCC,OAAe,EACfC,OAAe,EACP;EACR,MAAMC,KAAK,GAAGb,MAAGA,CAAC,CAACc,OAAO,CAACF,OAAO,EAAED,OAAO,CAAC,CAACI,KAAK,CAACf,MAAGA,CAAC,CAACD,GAAG,CAAC;EAE5D,OAAO,IAAIiB,MAAM,CACf,CACE,GAAG,EACH,GAAGH,KAAK,CAACI,GAAG,CAAC,CAACC,IAAI,EAAEC,CAAC,KAAK;IACxB,MAAMC,IAAI,GAAGD,CAAC,KAAKN,KAAK,CAACQ,MAAM,GAAG,CAAC;IAGnC,IAAIH,IAAI,KAAK,IAAI,EAAE,OAAOE,IAAI,GAAGd,eAAe,GAAGD,WAAW;IAG9D,IAAIa,IAAI,KAAK,GAAG,EAAE,OAAOE,IAAI,GAAGhB,WAAW,GAAGD,OAAO;IAGrD,IAAIe,IAAI,CAACI,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE;MAC5B,OACEpB,YAAY,GAAGK,YAAY,CAACW,IAAI,CAACK,KAAK,CAAC,CAAC,CAAC,CAAC,IAAIH,IAAI,GAAGnB,MAAM,GAAGF,GAAG,CAAC;IAEtE;IAGA,OAAOQ,YAAY,CAACW,IAAI,CAAC,IAAIE,IAAI,GAAGnB,MAAM,GAAGF,GAAG,CAAC;EACnD,CAAC,CAAC,CACH,CAACyB,IAAI,CAAC,EAAE,CACX,CAAC;AACH;AAAC","ignoreList":[]}
|
|
@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
||||||
value: true
|
value: true
|
||||||
});
|
});
|
||||||
exports.default = void 0;
|
exports.default = void 0;
|
||||||
var _deepArray = require("./helpers/deep-array");
|
var _deepArray = require("./helpers/deep-array.js");
|
||||||
class Plugin {
|
class Plugin {
|
||||||
constructor(plugin, options, key, externalDependencies = (0, _deepArray.finalize)([])) {
|
constructor(plugin, options, key, externalDependencies = (0, _deepArray.finalize)([])) {
|
||||||
this.key = void 0;
|
this.key = void 0;
|
||||||
|
|
2
node_modules/@babel/core/lib/config/plugin.js.map
generated
vendored
Executable file → Normal file
2
node_modules/@babel/core/lib/config/plugin.js.map
generated
vendored
Executable file → Normal file
|
@ -1 +1 @@
|
||||||
{"version":3,"names":["Plugin","constructor","plugin","options","key","externalDependencies","finalize","manipulateOptions","post","pre","visitor","parserOverride","generatorOverride","name"],"sources":["../../src/config/plugin.ts"],"sourcesContent":["import { finalize } from \"./helpers/deep-array\";\nimport type { ReadonlyDeepArray } from \"./helpers/deep-array\";\nimport type { PluginObject } from \"./validation/plugins\";\n\nexport default class Plugin {\n key: string | undefined | null;\n manipulateOptions?: (options: unknown, parserOpts: unknown) => void;\n post?: PluginObject[\"post\"];\n pre?: PluginObject[\"pre\"];\n visitor: PluginObject[\"visitor\"];\n\n parserOverride?: Function;\n generatorOverride?: Function;\n\n options: {};\n\n externalDependencies: ReadonlyDeepArray<string>;\n\n constructor(\n plugin: PluginObject,\n options: {},\n key?: string,\n externalDependencies: ReadonlyDeepArray<string> = finalize([]),\n ) {\n this.key = plugin.name || key;\n\n this.manipulateOptions = plugin.manipulateOptions;\n this.post = plugin.post;\n this.pre = plugin.pre;\n this.visitor = plugin.visitor || {};\n this.parserOverride = plugin.parserOverride;\n this.generatorOverride = plugin.generatorOverride;\n\n this.options = options;\n this.externalDependencies = externalDependencies;\n }\n}\n"],"mappings":";;;;;;AAAA;AAIe,MAAMA,MAAM,CAAC;EAc1BC,WAAW,CACTC,MAAoB,EACpBC,OAAW,EACXC,GAAY,EACZC,oBAA+C,GAAG,IAAAC,mBAAQ,EAAC,EAAE,CAAC,EAC9D;IAAA,KAlBFF,GAAG;IAAA,KACHG,iBAAiB;IAAA,KACjBC,IAAI;IAAA,KACJC,GAAG;IAAA,KACHC,OAAO;IAAA,KAEPC,cAAc;IAAA,KACdC,iBAAiB;IAAA,KAEjBT,OAAO;IAAA,KAEPE,oBAAoB;IAQlB,IAAI,CAACD,GAAG,GAAGF,MAAM,CAACW,IAAI,IAAIT,GAAG;IAE7B,IAAI,CAACG,iBAAiB,GAAGL,MAAM,CAACK,iBAAiB;IACjD,IAAI,CAACC,IAAI,GAAGN,MAAM,CAACM,IAAI;IACvB,IAAI,CAACC,GAAG,GAAGP,MAAM,CAACO,GAAG;IACrB,IAAI,CAACC,OAAO,GAAGR,MAAM,CAACQ,OAAO,IAAI,CAAC,CAAC;IACnC,IAAI,CAACC,cAAc,GAAGT,MAAM,CAACS,cAAc;IAC3C,IAAI,CAACC,iBAAiB,GAAGV,MAAM,CAACU,iBAAiB;IAEjD,IAAI,CAACT,OAAO,GAAGA,OAAO;IACtB,IAAI,CAACE,oBAAoB,GAAGA,oBAAoB;EAClD;AACF;AAAC;AAAA"}
|
{"version":3,"names":["_deepArray","require","Plugin","constructor","plugin","options","key","externalDependencies","finalize","manipulateOptions","post","pre","visitor","parserOverride","generatorOverride","name","exports","default"],"sources":["../../src/config/plugin.ts"],"sourcesContent":["import { finalize } from \"./helpers/deep-array.ts\";\nimport type { ReadonlyDeepArray } from \"./helpers/deep-array.ts\";\nimport type { PluginObject } from \"./validation/plugins.ts\";\n\nexport default class Plugin {\n key: string | undefined | null;\n manipulateOptions?: (options: unknown, parserOpts: unknown) => void;\n post?: PluginObject[\"post\"];\n pre?: PluginObject[\"pre\"];\n visitor: PluginObject[\"visitor\"];\n\n parserOverride?: Function;\n generatorOverride?: Function;\n\n options: {};\n\n externalDependencies: ReadonlyDeepArray<string>;\n\n constructor(\n plugin: PluginObject,\n options: {},\n key?: string,\n externalDependencies: ReadonlyDeepArray<string> = finalize([]),\n ) {\n this.key = plugin.name || key;\n\n this.manipulateOptions = plugin.manipulateOptions;\n this.post = plugin.post;\n this.pre = plugin.pre;\n this.visitor = plugin.visitor || {};\n this.parserOverride = plugin.parserOverride;\n this.generatorOverride = plugin.generatorOverride;\n\n this.options = options;\n this.externalDependencies = externalDependencies;\n }\n}\n"],"mappings":";;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AAIe,MAAMC,MAAM,CAAC;EAc1BC,WAAWA,CACTC,MAAoB,EACpBC,OAAW,EACXC,GAAY,EACZC,oBAA+C,GAAG,IAAAC,mBAAQ,EAAC,EAAE,CAAC,EAC9D;IAAA,KAlBFF,GAAG;IAAA,KACHG,iBAAiB;IAAA,KACjBC,IAAI;IAAA,KACJC,GAAG;IAAA,KACHC,OAAO;IAAA,KAEPC,cAAc;IAAA,KACdC,iBAAiB;IAAA,KAEjBT,OAAO;IAAA,KAEPE,oBAAoB;IAQlB,IAAI,CAACD,GAAG,GAAGF,MAAM,CAACW,IAAI,IAAIT,GAAG;IAE7B,IAAI,CAACG,iBAAiB,GAAGL,MAAM,CAACK,iBAAiB;IACjD,IAAI,CAACC,IAAI,GAAGN,MAAM,CAACM,IAAI;IACvB,IAAI,CAACC,GAAG,GAAGP,MAAM,CAACO,GAAG;IACrB,IAAI,CAACC,OAAO,GAAGR,MAAM,CAACQ,OAAO,IAAI,CAAC,CAAC;IACnC,IAAI,CAACC,cAAc,GAAGT,MAAM,CAACS,cAAc;IAC3C,IAAI,CAACC,iBAAiB,GAAGV,MAAM,CAACU,iBAAiB;IAEjD,IAAI,CAACT,OAAO,GAAGA,OAAO;IACtB,IAAI,CAACE,oBAAoB,GAAGA,oBAAoB;EAClD;AACF;AAACS,OAAA,CAAAC,OAAA,GAAAf,MAAA;AAAA","ignoreList":[]}
|
|
@ -11,11 +11,10 @@ function _gensync() {
|
||||||
};
|
};
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
const ChainFormatter = {
|
const ChainFormatter = exports.ChainFormatter = {
|
||||||
Programmatic: 0,
|
Programmatic: 0,
|
||||||
Config: 1
|
Config: 1
|
||||||
};
|
};
|
||||||
exports.ChainFormatter = ChainFormatter;
|
|
||||||
const Formatter = {
|
const Formatter = {
|
||||||
title(type, callerName, filepath) {
|
title(type, callerName, filepath) {
|
||||||
let title = "";
|
let title = "";
|
||||||
|
|
2
node_modules/@babel/core/lib/config/printer.js.map
generated
vendored
Executable file → Normal file
2
node_modules/@babel/core/lib/config/printer.js.map
generated
vendored
Executable file → Normal file
File diff suppressed because one or more lines are too long
7
node_modules/@babel/core/lib/config/resolve-targets-browser.js
generated
vendored
Executable file → Normal file
7
node_modules/@babel/core/lib/config/resolve-targets-browser.js
generated
vendored
Executable file → Normal file
|
@ -12,13 +12,10 @@ function _helperCompilationTargets() {
|
||||||
};
|
};
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
function resolveBrowserslistConfigFile(
|
function resolveBrowserslistConfigFile(browserslistConfigFile, configFilePath) {
|
||||||
browserslistConfigFile,
|
|
||||||
configFilePath) {
|
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
function resolveTargets(options,
|
function resolveTargets(options, root) {
|
||||||
root) {
|
|
||||||
const optTargets = options.targets;
|
const optTargets = options.targets;
|
||||||
let targets;
|
let targets;
|
||||||
if (typeof optTargets === "string" || Array.isArray(optTargets)) {
|
if (typeof optTargets === "string" || Array.isArray(optTargets)) {
|
||||||
|
|
2
node_modules/@babel/core/lib/config/resolve-targets-browser.js.map
generated
vendored
Executable file → Normal file
2
node_modules/@babel/core/lib/config/resolve-targets-browser.js.map
generated
vendored
Executable file → Normal file
|
@ -1 +1 @@
|
||||||
{"version":3,"names":["resolveBrowserslistConfigFile","browserslistConfigFile","configFilePath","undefined","resolveTargets","options","root","optTargets","targets","Array","isArray","browsers","esmodules","getTargets","ignoreBrowserslistConfig","browserslistEnv"],"sources":["../../src/config/resolve-targets-browser.ts"],"sourcesContent":["import type { ValidatedOptions } from \"./validation/options\";\nimport getTargets, {\n type InputTargets,\n} from \"@babel/helper-compilation-targets\";\n\nimport type { Targets } from \"@babel/helper-compilation-targets\";\n\nexport function resolveBrowserslistConfigFile(\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n browserslistConfigFile: string,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n configFilePath: string,\n): string | void {\n return undefined;\n}\n\nexport function resolveTargets(\n options: ValidatedOptions,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n root: string,\n): Targets {\n const optTargets = options.targets;\n let targets: InputTargets;\n\n if (typeof optTargets === \"string\" || Array.isArray(optTargets)) {\n targets = { browsers: optTargets };\n } else if (optTargets) {\n if (\"esmodules\" in optTargets) {\n targets = { ...optTargets, esmodules: \"intersect\" };\n } else {\n // https://github.com/microsoft/TypeScript/issues/17002\n targets = optTargets as InputTargets;\n }\n }\n\n return getTargets(targets, {\n ignoreBrowserslistConfig: true,\n browserslistEnv: options.browserslistEnv,\n });\n}\n"],"mappings":";;;;;;;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAMO,SAASA,6BAA6B;AAE3CC,sBAA8B;AAE9BC,cAAsB,EACP;EACf,OAAOC,SAAS;AAClB;AAEO,SAASC,cAAc,CAC5BC,OAAyB;AAEzBC,IAAY,EACH;EACT,MAAMC,UAAU,GAAGF,OAAO,CAACG,OAAO;EAClC,IAAIA,OAAqB;EAEzB,IAAI,OAAOD,UAAU,KAAK,QAAQ,IAAIE,KAAK,CAACC,OAAO,CAACH,UAAU,CAAC,EAAE;IAC/DC,OAAO,GAAG;MAAEG,QAAQ,EAAEJ;IAAW,CAAC;EACpC,CAAC,MAAM,IAAIA,UAAU,EAAE;IACrB,IAAI,WAAW,IAAIA,UAAU,EAAE;MAC7BC,OAAO,qBAAQD,UAAU;QAAEK,SAAS,EAAE;MAAW,EAAE;IACrD,CAAC,MAAM;MAELJ,OAAO,GAAGD,UAA0B;IACtC;EACF;EAEA,OAAO,IAAAM,mCAAU,EAACL,OAAO,EAAE;IACzBM,wBAAwB,EAAE,IAAI;IAC9BC,eAAe,EAAEV,OAAO,CAACU;EAC3B,CAAC,CAAC;AACJ;AAAC"}
|
{"version":3,"names":["_helperCompilationTargets","data","require","resolveBrowserslistConfigFile","browserslistConfigFile","configFilePath","undefined","resolveTargets","options","root","optTargets","targets","Array","isArray","browsers","Object","assign","esmodules","getTargets","ignoreBrowserslistConfig","browserslistEnv"],"sources":["../../src/config/resolve-targets-browser.ts"],"sourcesContent":["import type { ValidatedOptions } from \"./validation/options.ts\";\nimport getTargets, {\n type InputTargets,\n} from \"@babel/helper-compilation-targets\";\n\nimport type { Targets } from \"@babel/helper-compilation-targets\";\n\nexport function resolveBrowserslistConfigFile(\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n browserslistConfigFile: string,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n configFilePath: string,\n): string | void {\n return undefined;\n}\n\nexport function resolveTargets(\n options: ValidatedOptions,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n root: string,\n): Targets {\n const optTargets = options.targets;\n let targets: InputTargets;\n\n if (typeof optTargets === \"string\" || Array.isArray(optTargets)) {\n targets = { browsers: optTargets };\n } else if (optTargets) {\n if (\"esmodules\" in optTargets) {\n targets = { ...optTargets, esmodules: \"intersect\" };\n } else {\n // https://github.com/microsoft/TypeScript/issues/17002\n targets = optTargets as InputTargets;\n }\n }\n\n return getTargets(targets, {\n ignoreBrowserslistConfig: true,\n browserslistEnv: options.browserslistEnv,\n });\n}\n"],"mappings":";;;;;;;AACA,SAAAA,0BAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,yBAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAMO,SAASE,6BAA6BA,CAE3CC,sBAA8B,EAE9BC,cAAsB,EACP;EACf,OAAOC,SAAS;AAClB;AAEO,SAASC,cAAcA,CAC5BC,OAAyB,EAEzBC,IAAY,EACH;EACT,MAAMC,UAAU,GAAGF,OAAO,CAACG,OAAO;EAClC,IAAIA,OAAqB;EAEzB,IAAI,OAAOD,UAAU,KAAK,QAAQ,IAAIE,KAAK,CAACC,OAAO,CAACH,UAAU,CAAC,EAAE;IAC/DC,OAAO,GAAG;MAAEG,QAAQ,EAAEJ;IAAW,CAAC;EACpC,CAAC,MAAM,IAAIA,UAAU,EAAE;IACrB,IAAI,WAAW,IAAIA,UAAU,EAAE;MAC7BC,OAAO,GAAAI,MAAA,CAAAC,MAAA,KAAQN,UAAU;QAAEO,SAAS,EAAE;MAAW,EAAE;IACrD,CAAC,MAAM;MAELN,OAAO,GAAGD,UAA0B;IACtC;EACF;EAEA,OAAO,IAAAQ,mCAAU,EAACP,OAAO,EAAE;IACzBQ,wBAAwB,EAAE,IAAI;IAC9BC,eAAe,EAAEZ,OAAO,CAACY;EAC3B,CAAC,CAAC;AACJ;AAAC","ignoreList":[]}
|
0
node_modules/@babel/core/lib/config/resolve-targets.js
generated
vendored
Executable file → Normal file
0
node_modules/@babel/core/lib/config/resolve-targets.js
generated
vendored
Executable file → Normal file
2
node_modules/@babel/core/lib/config/resolve-targets.js.map
generated
vendored
Executable file → Normal file
2
node_modules/@babel/core/lib/config/resolve-targets.js.map
generated
vendored
Executable file → Normal file
|
@ -1 +1 @@
|
||||||
{"version":3,"names":["resolveBrowserslistConfigFile","browserslistConfigFile","configFileDir","path","resolve","resolveTargets","options","root","optTargets","targets","Array","isArray","browsers","esmodules","configFile","ignoreBrowserslistConfig","getTargets","configPath","browserslistEnv"],"sources":["../../src/config/resolve-targets.ts"],"sourcesContent":["type browserType = typeof import(\"./resolve-targets-browser\");\ntype nodeType = typeof import(\"./resolve-targets\");\n\n// Kind of gross, but essentially asserting that the exports of this module are the same as the\n// exports of index-browser, since this file may be replaced at bundle time with index-browser.\n({} as any as browserType as nodeType);\n\nimport type { ValidatedOptions } from \"./validation/options\";\nimport path from \"path\";\nimport getTargets, {\n type InputTargets,\n} from \"@babel/helper-compilation-targets\";\n\nimport type { Targets } from \"@babel/helper-compilation-targets\";\n\nexport function resolveBrowserslistConfigFile(\n browserslistConfigFile: string,\n configFileDir: string,\n): string | undefined {\n return path.resolve(configFileDir, browserslistConfigFile);\n}\n\nexport function resolveTargets(\n options: ValidatedOptions,\n root: string,\n): Targets {\n const optTargets = options.targets;\n let targets: InputTargets;\n\n if (typeof optTargets === \"string\" || Array.isArray(optTargets)) {\n targets = { browsers: optTargets };\n } else if (optTargets) {\n if (\"esmodules\" in optTargets) {\n targets = { ...optTargets, esmodules: \"intersect\" };\n } else {\n // https://github.com/microsoft/TypeScript/issues/17002\n targets = optTargets as InputTargets;\n }\n }\n\n const { browserslistConfigFile } = options;\n let configFile;\n let ignoreBrowserslistConfig = false;\n if (typeof browserslistConfigFile === \"string\") {\n configFile = browserslistConfigFile;\n } else {\n ignoreBrowserslistConfig = browserslistConfigFile === false;\n }\n\n return getTargets(targets, {\n ignoreBrowserslistConfig,\n configFile,\n configPath: root,\n browserslistEnv: options.browserslistEnv,\n });\n}\n"],"mappings":";;;;;;;AAQA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAJA,CAAC,CAAC,CAAC;AAUI,SAASA,6BAA6B,CAC3CC,sBAA8B,EAC9BC,aAAqB,EACD;EACpB,OAAOC,OAAI,CAACC,OAAO,CAACF,aAAa,EAAED,sBAAsB,CAAC;AAC5D;AAEO,SAASI,cAAc,CAC5BC,OAAyB,EACzBC,IAAY,EACH;EACT,MAAMC,UAAU,GAAGF,OAAO,CAACG,OAAO;EAClC,IAAIA,OAAqB;EAEzB,IAAI,OAAOD,UAAU,KAAK,QAAQ,IAAIE,KAAK,CAACC,OAAO,CAACH,UAAU,CAAC,EAAE;IAC/DC,OAAO,GAAG;MAAEG,QAAQ,EAAEJ;IAAW,CAAC;EACpC,CAAC,MAAM,IAAIA,UAAU,EAAE;IACrB,IAAI,WAAW,IAAIA,UAAU,EAAE;MAC7BC,OAAO,qBAAQD,UAAU;QAAEK,SAAS,EAAE;MAAW,EAAE;IACrD,CAAC,MAAM;MAELJ,OAAO,GAAGD,UAA0B;IACtC;EACF;EAEA,MAAM;IAAEP;EAAuB,CAAC,GAAGK,OAAO;EAC1C,IAAIQ,UAAU;EACd,IAAIC,wBAAwB,GAAG,KAAK;EACpC,IAAI,OAAOd,sBAAsB,KAAK,QAAQ,EAAE;IAC9Ca,UAAU,GAAGb,sBAAsB;EACrC,CAAC,MAAM;IACLc,wBAAwB,GAAGd,sBAAsB,KAAK,KAAK;EAC7D;EAEA,OAAO,IAAAe,mCAAU,EAACP,OAAO,EAAE;IACzBM,wBAAwB;IACxBD,UAAU;IACVG,UAAU,EAAEV,IAAI;IAChBW,eAAe,EAAEZ,OAAO,CAACY;EAC3B,CAAC,CAAC;AACJ;AAAC"}
|
{"version":3,"names":["_path","data","require","_helperCompilationTargets","resolveBrowserslistConfigFile","browserslistConfigFile","configFileDir","path","resolve","resolveTargets","options","root","optTargets","targets","Array","isArray","browsers","Object","assign","esmodules","configFile","ignoreBrowserslistConfig","getTargets","configPath","browserslistEnv"],"sources":["../../src/config/resolve-targets.ts"],"sourcesContent":["type browserType = typeof import(\"./resolve-targets-browser\");\ntype nodeType = typeof import(\"./resolve-targets\");\n\n// Kind of gross, but essentially asserting that the exports of this module are the same as the\n// exports of index-browser, since this file may be replaced at bundle time with index-browser.\n({}) as any as browserType as nodeType;\n\nimport type { ValidatedOptions } from \"./validation/options.ts\";\nimport path from \"path\";\nimport getTargets, {\n type InputTargets,\n} from \"@babel/helper-compilation-targets\";\n\nimport type { Targets } from \"@babel/helper-compilation-targets\";\n\nexport function resolveBrowserslistConfigFile(\n browserslistConfigFile: string,\n configFileDir: string,\n): string | undefined {\n return path.resolve(configFileDir, browserslistConfigFile);\n}\n\nexport function resolveTargets(\n options: ValidatedOptions,\n root: string,\n): Targets {\n const optTargets = options.targets;\n let targets: InputTargets;\n\n if (typeof optTargets === \"string\" || Array.isArray(optTargets)) {\n targets = { browsers: optTargets };\n } else if (optTargets) {\n if (\"esmodules\" in optTargets) {\n targets = { ...optTargets, esmodules: \"intersect\" };\n } else {\n // https://github.com/microsoft/TypeScript/issues/17002\n targets = optTargets as InputTargets;\n }\n }\n\n const { browserslistConfigFile } = options;\n let configFile;\n let ignoreBrowserslistConfig = false;\n if (typeof browserslistConfigFile === \"string\") {\n configFile = browserslistConfigFile;\n } else {\n ignoreBrowserslistConfig = browserslistConfigFile === false;\n }\n\n return getTargets(targets, {\n ignoreBrowserslistConfig,\n configFile,\n configPath: root,\n browserslistEnv: options.browserslistEnv,\n });\n}\n"],"mappings":";;;;;;;AAQA,SAAAA,MAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,KAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,0BAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,yBAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAJA,CAAC,CAAC,CAAC;AAUI,SAASG,6BAA6BA,CAC3CC,sBAA8B,EAC9BC,aAAqB,EACD;EACpB,OAAOC,MAAGA,CAAC,CAACC,OAAO,CAACF,aAAa,EAAED,sBAAsB,CAAC;AAC5D;AAEO,SAASI,cAAcA,CAC5BC,OAAyB,EACzBC,IAAY,EACH;EACT,MAAMC,UAAU,GAAGF,OAAO,CAACG,OAAO;EAClC,IAAIA,OAAqB;EAEzB,IAAI,OAAOD,UAAU,KAAK,QAAQ,IAAIE,KAAK,CAACC,OAAO,CAACH,UAAU,CAAC,EAAE;IAC/DC,OAAO,GAAG;MAAEG,QAAQ,EAAEJ;IAAW,CAAC;EACpC,CAAC,MAAM,IAAIA,UAAU,EAAE;IACrB,IAAI,WAAW,IAAIA,UAAU,EAAE;MAC7BC,OAAO,GAAAI,MAAA,CAAAC,MAAA,KAAQN,UAAU;QAAEO,SAAS,EAAE;MAAW,EAAE;IACrD,CAAC,MAAM;MAELN,OAAO,GAAGD,UAA0B;IACtC;EACF;EAEA,MAAM;IAAEP;EAAuB,CAAC,GAAGK,OAAO;EAC1C,IAAIU,UAAU;EACd,IAAIC,wBAAwB,GAAG,KAAK;EACpC,IAAI,OAAOhB,sBAAsB,KAAK,QAAQ,EAAE;IAC9Ce,UAAU,GAAGf,sBAAsB;EACrC,CAAC,MAAM;IACLgB,wBAAwB,GAAGhB,sBAAsB,KAAK,KAAK;EAC7D;EAEA,OAAO,IAAAiB,mCAAU,EAACT,OAAO,EAAE;IACzBQ,wBAAwB;IACxBD,UAAU;IACVG,UAAU,EAAEZ,IAAI;IAChBa,eAAe,EAAEd,OAAO,CAACc;EAC3B,CAAC,CAAC;AACJ;AAAC","ignoreList":[]}
|
|
@ -1 +1 @@
|
||||||
{"version":3,"names":["mergeOptions","target","source","k","Object","keys","parserOpts","targetObj","mergeDefaultFields","val","undefined","isIterableIterator","value","next","Symbol","iterator"],"sources":["../../src/config/util.ts"],"sourcesContent":["import type { ValidatedOptions, NormalizedOptions } from \"./validation/options\";\n\nexport function mergeOptions(\n target: ValidatedOptions,\n source: ValidatedOptions | NormalizedOptions,\n): void {\n for (const k of Object.keys(source)) {\n if (\n (k === \"parserOpts\" || k === \"generatorOpts\" || k === \"assumptions\") &&\n source[k]\n ) {\n const parserOpts = source[k];\n const targetObj = target[k] || (target[k] = {});\n mergeDefaultFields(targetObj, parserOpts);\n } else {\n //@ts-expect-error k must index source\n const val = source[k];\n //@ts-expect-error assigning source to target\n if (val !== undefined) target[k] = val as any;\n }\n }\n}\n\nfunction mergeDefaultFields<T extends {}>(target: T, source: T) {\n for (const k of Object.keys(source) as (keyof T)[]) {\n const val = source[k];\n if (val !== undefined) target[k] = val;\n }\n}\n\nexport function isIterableIterator(value: any): value is IterableIterator<any> {\n return (\n !!value &&\n typeof value.next === \"function\" &&\n typeof value[Symbol.iterator] === \"function\"\n );\n}\n"],"mappings":";;;;;;;AAEO,SAASA,YAAY,CAC1BC,MAAwB,EACxBC,MAA4C,EACtC;EACN,KAAK,MAAMC,CAAC,IAAIC,MAAM,CAACC,IAAI,CAACH,MAAM,CAAC,EAAE;IACnC,IACE,CAACC,CAAC,KAAK,YAAY,IAAIA,CAAC,KAAK,eAAe,IAAIA,CAAC,KAAK,aAAa,KACnED,MAAM,CAACC,CAAC,CAAC,EACT;MACA,MAAMG,UAAU,GAAGJ,MAAM,CAACC,CAAC,CAAC;MAC5B,MAAMI,SAAS,GAAGN,MAAM,CAACE,CAAC,CAAC,KAAKF,MAAM,CAACE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;MAC/CK,kBAAkB,CAACD,SAAS,EAAED,UAAU,CAAC;IAC3C,CAAC,MAAM;MAEL,MAAMG,GAAG,GAAGP,MAAM,CAACC,CAAC,CAAC;MAErB,IAAIM,GAAG,KAAKC,SAAS,EAAET,MAAM,CAACE,CAAC,CAAC,GAAGM,GAAU;IAC/C;EACF;AACF;AAEA,SAASD,kBAAkB,CAAeP,MAAS,EAAEC,MAAS,EAAE;EAC9D,KAAK,MAAMC,CAAC,IAAIC,MAAM,CAACC,IAAI,CAACH,MAAM,CAAC,EAAiB;IAClD,MAAMO,GAAG,GAAGP,MAAM,CAACC,CAAC,CAAC;IACrB,IAAIM,GAAG,KAAKC,SAAS,EAAET,MAAM,CAACE,CAAC,CAAC,GAAGM,GAAG;EACxC;AACF;AAEO,SAASE,kBAAkB,CAACC,KAAU,EAAkC;EAC7E,OACE,CAAC,CAACA,KAAK,IACP,OAAOA,KAAK,CAACC,IAAI,KAAK,UAAU,IAChC,OAAOD,KAAK,CAACE,MAAM,CAACC,QAAQ,CAAC,KAAK,UAAU;AAEhD;AAAC"}
|
{"version":3,"names":["mergeOptions","target","source","k","Object","keys","parserOpts","targetObj","mergeDefaultFields","val","undefined","isIterableIterator","value","next","Symbol","iterator"],"sources":["../../src/config/util.ts"],"sourcesContent":["import type {\n ValidatedOptions,\n NormalizedOptions,\n} from \"./validation/options.ts\";\n\nexport function mergeOptions(\n target: ValidatedOptions,\n source: ValidatedOptions | NormalizedOptions,\n): void {\n for (const k of Object.keys(source)) {\n if (\n (k === \"parserOpts\" || k === \"generatorOpts\" || k === \"assumptions\") &&\n source[k]\n ) {\n const parserOpts = source[k];\n const targetObj = target[k] || (target[k] = {});\n mergeDefaultFields(targetObj, parserOpts);\n } else {\n //@ts-expect-error k must index source\n const val = source[k];\n //@ts-expect-error assigning source to target\n if (val !== undefined) target[k] = val as any;\n }\n }\n}\n\nfunction mergeDefaultFields<T extends {}>(target: T, source: T) {\n for (const k of Object.keys(source) as (keyof T)[]) {\n const val = source[k];\n if (val !== undefined) target[k] = val;\n }\n}\n\nexport function isIterableIterator(value: any): value is IterableIterator<any> {\n return (\n !!value &&\n typeof value.next === \"function\" &&\n typeof value[Symbol.iterator] === \"function\"\n );\n}\n"],"mappings":";;;;;;;AAKO,SAASA,YAAYA,CAC1BC,MAAwB,EACxBC,MAA4C,EACtC;EACN,KAAK,MAAMC,CAAC,IAAIC,MAAM,CAACC,IAAI,CAACH,MAAM,CAAC,EAAE;IACnC,IACE,CAACC,CAAC,KAAK,YAAY,IAAIA,CAAC,KAAK,eAAe,IAAIA,CAAC,KAAK,aAAa,KACnED,MAAM,CAACC,CAAC,CAAC,EACT;MACA,MAAMG,UAAU,GAAGJ,MAAM,CAACC,CAAC,CAAC;MAC5B,MAAMI,SAAS,GAAGN,MAAM,CAACE,CAAC,CAAC,KAAKF,MAAM,CAACE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;MAC/CK,kBAAkB,CAACD,SAAS,EAAED,UAAU,CAAC;IAC3C,CAAC,MAAM;MAEL,MAAMG,GAAG,GAAGP,MAAM,CAACC,CAAC,CAAC;MAErB,IAAIM,GAAG,KAAKC,SAAS,EAAET,MAAM,CAACE,CAAC,CAAC,GAAGM,GAAU;IAC/C;EACF;AACF;AAEA,SAASD,kBAAkBA,CAAeP,MAAS,EAAEC,MAAS,EAAE;EAC9D,KAAK,MAAMC,CAAC,IAAIC,MAAM,CAACC,IAAI,CAACH,MAAM,CAAC,EAAiB;IAClD,MAAMO,GAAG,GAAGP,MAAM,CAACC,CAAC,CAAC;IACrB,IAAIM,GAAG,KAAKC,SAAS,EAAET,MAAM,CAACE,CAAC,CAAC,GAAGM,GAAG;EACxC;AACF;AAEO,SAASE,kBAAkBA,CAACC,KAAU,EAAkC;EAC7E,OACE,CAAC,CAACA,KAAK,IACP,OAAOA,KAAK,CAACC,IAAI,KAAK,UAAU,IAChC,OAAOD,KAAK,CAACE,MAAM,CAACC,QAAQ,CAAC,KAAK,UAAU;AAEhD;AAAC","ignoreList":[]}
|
11
node_modules/@babel/core/lib/config/validation/option-assertions.js
generated
vendored
Executable file → Normal file
11
node_modules/@babel/core/lib/config/validation/option-assertions.js
generated
vendored
Executable file → Normal file
|
@ -30,7 +30,7 @@ function _helperCompilationTargets() {
|
||||||
};
|
};
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
var _options = require("./options");
|
var _options = require("./options.js");
|
||||||
function msg(loc) {
|
function msg(loc) {
|
||||||
switch (loc.type) {
|
switch (loc.type) {
|
||||||
case "root":
|
case "root":
|
||||||
|
@ -132,9 +132,7 @@ function assertArray(loc, value) {
|
||||||
}
|
}
|
||||||
function assertIgnoreList(loc, value) {
|
function assertIgnoreList(loc, value) {
|
||||||
const arr = assertArray(loc, value);
|
const arr = assertArray(loc, value);
|
||||||
if (arr) {
|
arr == null || arr.forEach((item, i) => assertIgnoreItem(access(loc, i), item));
|
||||||
arr.forEach((item, i) => assertIgnoreItem(access(loc, i), item));
|
|
||||||
}
|
|
||||||
return arr;
|
return arr;
|
||||||
}
|
}
|
||||||
function assertIgnoreItem(loc, value) {
|
function assertIgnoreItem(loc, value) {
|
||||||
|
@ -213,7 +211,6 @@ function assertPluginItem(loc, value) {
|
||||||
} else {
|
} else {
|
||||||
assertPluginTarget(loc, value);
|
assertPluginTarget(loc, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
function assertPluginTarget(loc, value) {
|
function assertPluginTarget(loc, value) {
|
||||||
|
@ -234,7 +231,7 @@ function assertTargets(loc, value) {
|
||||||
for (const key of Object.keys(value)) {
|
for (const key of Object.keys(value)) {
|
||||||
const val = value[key];
|
const val = value[key];
|
||||||
const subLoc = access(loc, key);
|
const subLoc = access(loc, key);
|
||||||
if (key === "esmodules") assertBoolean(subLoc, val);else if (key === "browsers") assertBrowsersList(subLoc, val);else if (!Object.hasOwnProperty.call(_helperCompilationTargets().TargetNames, key)) {
|
if (key === "esmodules") assertBoolean(subLoc, val);else if (key === "browsers") assertBrowsersList(subLoc, val);else if (!hasOwnProperty.call(_helperCompilationTargets().TargetNames, key)) {
|
||||||
const validTargets = Object.keys(_helperCompilationTargets().TargetNames).join(", ");
|
const validTargets = Object.keys(_helperCompilationTargets().TargetNames).join(", ");
|
||||||
throw new Error(`${msg(subLoc)} is not a valid target. Supported targets are ${validTargets}`);
|
throw new Error(`${msg(subLoc)} is not a valid target. Supported targets are ${validTargets}`);
|
||||||
} else assertBrowserVersion(subLoc, val);
|
} else assertBrowserVersion(subLoc, val);
|
||||||
|
@ -256,7 +253,6 @@ function assertAssumptions(loc, value) {
|
||||||
if (typeof value !== "object" || value === null) {
|
if (typeof value !== "object" || value === null) {
|
||||||
throw new Error(`${msg(loc)} must be an object or undefined.`);
|
throw new Error(`${msg(loc)} must be an object or undefined.`);
|
||||||
}
|
}
|
||||||
|
|
||||||
let root = loc;
|
let root = loc;
|
||||||
do {
|
do {
|
||||||
root = root.parent;
|
root = root.parent;
|
||||||
|
@ -274,7 +270,6 @@ function assertAssumptions(loc, value) {
|
||||||
throw new Error(`${msg(subLoc)} cannot be set to 'false' inside presets.`);
|
throw new Error(`${msg(subLoc)} cannot be set to 'false' inside presets.`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
0 && 0;
|
0 && 0;
|
||||||
|
|
2
node_modules/@babel/core/lib/config/validation/option-assertions.js.map
generated
vendored
Executable file → Normal file
2
node_modules/@babel/core/lib/config/validation/option-assertions.js.map
generated
vendored
Executable file → Normal file
File diff suppressed because one or more lines are too long
16
node_modules/@babel/core/lib/config/validation/options.js
generated
vendored
Executable file → Normal file
16
node_modules/@babel/core/lib/config/validation/options.js
generated
vendored
Executable file → Normal file
|
@ -6,9 +6,9 @@ Object.defineProperty(exports, "__esModule", {
|
||||||
exports.assumptionsNames = void 0;
|
exports.assumptionsNames = void 0;
|
||||||
exports.checkNoUnwrappedItemOptionPairs = checkNoUnwrappedItemOptionPairs;
|
exports.checkNoUnwrappedItemOptionPairs = checkNoUnwrappedItemOptionPairs;
|
||||||
exports.validate = validate;
|
exports.validate = validate;
|
||||||
var _removed = require("./removed");
|
var _removed = require("./removed.js");
|
||||||
var _optionAssertions = require("./option-assertions");
|
var _optionAssertions = require("./option-assertions.js");
|
||||||
var _configError = require("../../errors/config-error");
|
var _configError = require("../../errors/config-error.js");
|
||||||
const ROOT_VALIDATORS = {
|
const ROOT_VALIDATORS = {
|
||||||
cwd: _optionAssertions.assertString,
|
cwd: _optionAssertions.assertString,
|
||||||
root: _optionAssertions.assertString,
|
root: _optionAssertions.assertString,
|
||||||
|
@ -70,9 +70,8 @@ const COMMON_VALIDATORS = {
|
||||||
moduleId: _optionAssertions.assertString
|
moduleId: _optionAssertions.assertString
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
const knownAssumptions = ["arrayLikeIsIterable", "constantReexports", "constantSuper", "enumerableModuleMeta", "ignoreFunctionLength", "ignoreToPrimitiveHint", "iterableIsArray", "mutableTemplateObject", "noClassCalls", "noDocumentAll", "noIncompleteNsImportDetection", "noNewArrows", "objectRestNoSymbols", "privateFieldsAsProperties", "pureGetters", "setClassMethods", "setComputedProperties", "setPublicClassFields", "setSpreadProperties", "skipForOfIteratorClosing", "superIsCallableConstructor"];
|
const knownAssumptions = ["arrayLikeIsIterable", "constantReexports", "constantSuper", "enumerableModuleMeta", "ignoreFunctionLength", "ignoreToPrimitiveHint", "iterableIsArray", "mutableTemplateObject", "noClassCalls", "noDocumentAll", "noIncompleteNsImportDetection", "noNewArrows", "noUninitializedPrivateFieldAccess", "objectRestNoSymbols", "privateFieldsAsSymbols", "privateFieldsAsProperties", "pureGetters", "setClassMethods", "setComputedProperties", "setPublicClassFields", "setSpreadProperties", "skipForOfIteratorClosing", "superIsCallableConstructor"];
|
||||||
const assumptionsNames = new Set(knownAssumptions);
|
const assumptionsNames = exports.assumptionsNames = new Set(knownAssumptions);
|
||||||
exports.assumptionsNames = assumptionsNames;
|
|
||||||
function getSource(loc) {
|
function getSource(loc) {
|
||||||
return loc.type === "root" ? loc.source : getSource(loc.parent);
|
return loc.type === "root" ? loc.source : getSource(loc.parent);
|
||||||
}
|
}
|
||||||
|
@ -128,11 +127,8 @@ function throwUnknownError(loc) {
|
||||||
throw unknownOptErr;
|
throw unknownOptErr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function has(obj, key) {
|
|
||||||
return Object.prototype.hasOwnProperty.call(obj, key);
|
|
||||||
}
|
|
||||||
function assertNoDuplicateSourcemap(opts) {
|
function assertNoDuplicateSourcemap(opts) {
|
||||||
if (has(opts, "sourceMap") && has(opts, "sourceMaps")) {
|
if (hasOwnProperty.call(opts, "sourceMap") && hasOwnProperty.call(opts, "sourceMaps")) {
|
||||||
throw new Error(".sourceMap is an alias for .sourceMaps, cannot use both");
|
throw new Error(".sourceMap is an alias for .sourceMaps, cannot use both");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
2
node_modules/@babel/core/lib/config/validation/options.js.map
generated
vendored
Executable file → Normal file
2
node_modules/@babel/core/lib/config/validation/options.js.map
generated
vendored
Executable file → Normal file
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue