@atlaspack/transformer-babel 2.14.21-typescript-b27501580.0 → 2.14.21-typescript-e99c742e9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/BabelTransformer.d.ts +3 -0
- package/lib/babel7.d.ts +11 -0
- package/lib/babelErrorUtils.d.ts +10 -0
- package/lib/config.d.ts +10 -0
- package/lib/constants.d.ts +1 -0
- package/lib/flow.d.ts +6 -0
- package/lib/jsx.d.ts +6 -0
- package/lib/remapAstLocations.d.ts +3 -0
- package/lib/types.d.ts +4 -0
- package/lib/utils.d.ts +3 -0
- package/package.json +6 -6
package/lib/babel7.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { MutableAsset, AST, PluginOptions, PluginTracer, PluginLogger } from '@atlaspack/types';
|
|
2
|
+
type Babel7TransformOptions = {
|
|
3
|
+
asset: MutableAsset;
|
|
4
|
+
options: PluginOptions;
|
|
5
|
+
logger: PluginLogger;
|
|
6
|
+
babelOptions: any;
|
|
7
|
+
additionalPlugins?: Array<any>;
|
|
8
|
+
tracer: PluginTracer;
|
|
9
|
+
};
|
|
10
|
+
export default function babel7(opts: Babel7TransformOptions): Promise<AST | null | undefined>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { BaseAsset } from '@atlaspack/types';
|
|
2
|
+
export type BabelError = Error & {
|
|
3
|
+
loc?: {
|
|
4
|
+
line: number;
|
|
5
|
+
column: number;
|
|
6
|
+
};
|
|
7
|
+
source?: string;
|
|
8
|
+
filePath?: string;
|
|
9
|
+
};
|
|
10
|
+
export declare function babelErrorEnhancer(error: BabelError, asset: BaseAsset): Promise<BabelError>;
|
package/lib/config.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Config, PluginOptions, PluginLogger } from '@atlaspack/types';
|
|
2
|
+
import type { BabelConfig } from './types';
|
|
3
|
+
type BabelConfigResult = {
|
|
4
|
+
internal: boolean;
|
|
5
|
+
config: BabelConfig;
|
|
6
|
+
targets?: unknown;
|
|
7
|
+
syntaxPlugins?: unknown;
|
|
8
|
+
};
|
|
9
|
+
export declare function load(config: Config, options: PluginOptions, logger: PluginLogger): Promise<BabelConfigResult | null | undefined>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const BABEL_CORE_RANGE = "^7.12.0";
|
package/lib/flow.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Config, PluginOptions } from '@atlaspack/types';
|
|
2
|
+
import type { BabelConfig } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Generates a babel config for stripping away Flow types.
|
|
5
|
+
*/
|
|
6
|
+
export default function getFlowOptions(config: Config, options: PluginOptions): Promise<BabelConfig | null | undefined>;
|
package/lib/jsx.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Config, PluginOptions } from '@atlaspack/types';
|
|
2
|
+
/**
|
|
3
|
+
* Returns whether an asset is likely JSX. Attempts to detect react or react-like libraries
|
|
4
|
+
* along with
|
|
5
|
+
*/
|
|
6
|
+
export default function isJSX(options: PluginOptions, config: Config): Promise<boolean>;
|
package/lib/types.d.ts
ADDED
package/lib/utils.d.ts
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaspack/transformer-babel",
|
|
3
|
-
"version": "2.14.21-typescript-
|
|
3
|
+
"version": "2.14.21-typescript-e99c742e9.0",
|
|
4
4
|
"license": "(MIT OR Apache-2.0)",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
"node": ">= 16.0.0"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@atlaspack/diagnostic": "2.14.2-typescript-
|
|
20
|
-
"@atlaspack/plugin": "2.14.21-typescript-
|
|
21
|
-
"@atlaspack/utils": "2.17.3-typescript-
|
|
19
|
+
"@atlaspack/diagnostic": "2.14.2-typescript-e99c742e9.0",
|
|
20
|
+
"@atlaspack/plugin": "2.14.21-typescript-e99c742e9.0",
|
|
21
|
+
"@atlaspack/utils": "2.17.3-typescript-e99c742e9.0",
|
|
22
22
|
"@parcel/source-map": "^2.1.1",
|
|
23
23
|
"browserslist": "^4.6.6",
|
|
24
24
|
"json5": "^2.2.0",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"semver": "^7.5.2"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@atlaspack/types": "2.15.11-typescript-
|
|
29
|
+
"@atlaspack/types": "2.15.11-typescript-e99c742e9.0",
|
|
30
30
|
"@babel/core": "^7.22.11",
|
|
31
31
|
"@babel/preset-env": "^7.22.14",
|
|
32
32
|
"@babel/types": "^7.22.11"
|
|
@@ -35,5 +35,5 @@
|
|
|
35
35
|
"scripts": {
|
|
36
36
|
"check-ts": "tsc --emitDeclarationOnly --rootDir src"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "e99c742e92175ac411d807daf2ba45d5bacebb58"
|
|
39
39
|
}
|