@atlaspack/types-internal 2.12.1-dev.3367 → 2.12.1-dev.3398
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/index.d.ts +16 -9
- package/package.json +4 -4
- package/src/index.js +17 -9
package/lib/index.d.ts
CHANGED
|
@@ -41,12 +41,13 @@ export type Semver = string;
|
|
|
41
41
|
/** A pipeline as specified in the config mapping to <code>T</code> */
|
|
42
42
|
export type GlobMap<T> = Record<Glob, T>;
|
|
43
43
|
export type RawAtlaspackConfigPipeline = Array<PackageName>;
|
|
44
|
+
export type RawParcelConfigPipeline = RawAtlaspackConfigPipeline;
|
|
44
45
|
export type HMROptions = {
|
|
45
46
|
port?: number;
|
|
46
47
|
host?: string;
|
|
47
48
|
};
|
|
48
49
|
|
|
49
|
-
/** The format of .
|
|
50
|
+
/** The format of .parcelrc */
|
|
50
51
|
export type RawAtlaspackConfig = {
|
|
51
52
|
extends?: PackageName | FilePath | Array<PackageName | FilePath>;
|
|
52
53
|
resolvers?: RawAtlaspackConfigPipeline;
|
|
@@ -60,19 +61,21 @@ export type RawAtlaspackConfig = {
|
|
|
60
61
|
reporters?: RawAtlaspackConfigPipeline;
|
|
61
62
|
validators?: Record<Glob, RawAtlaspackConfigPipeline>;
|
|
62
63
|
};
|
|
64
|
+
export type RawParcelConfig = RawAtlaspackConfig;
|
|
63
65
|
|
|
64
|
-
/** A .
|
|
66
|
+
/** A .parcelrc where all package names are resolved */
|
|
65
67
|
export type ResolvedAtlaspackConfigFile = RawAtlaspackConfig & {
|
|
66
68
|
readonly filePath: FilePath;
|
|
67
69
|
readonly resolveFrom?: FilePath;
|
|
68
70
|
};
|
|
71
|
+
export type ResolvedParcelConfigFile = ResolvedAtlaspackConfigFile;
|
|
69
72
|
|
|
70
73
|
/** Corresponds to <code>pkg#engines</code> */
|
|
71
74
|
export type Engines = {
|
|
72
75
|
readonly browsers?: string | Array<string>;
|
|
73
76
|
readonly electron?: SemverRange;
|
|
74
77
|
readonly node?: SemverRange;
|
|
75
|
-
readonly
|
|
78
|
+
readonly parcel?: SemverRange;
|
|
76
79
|
};
|
|
77
80
|
|
|
78
81
|
/** Corresponds to <code>pkg#targets.*.sourceMap</code> */
|
|
@@ -298,6 +301,7 @@ export type InitialAtlaspackOptionsInternal<WorkerFarm> = {
|
|
|
298
301
|
// global?
|
|
299
302
|
|
|
300
303
|
};
|
|
304
|
+
export type InitialParcelOptionsInternal<WorkerFarm> = InitialAtlaspackOptionsInternal<WorkerFarm>;
|
|
301
305
|
export type InitialServerOptions = {
|
|
302
306
|
readonly publicUrl?: string;
|
|
303
307
|
readonly host?: string;
|
|
@@ -306,7 +310,7 @@ export type InitialServerOptions = {
|
|
|
306
310
|
};
|
|
307
311
|
export interface PluginOptions {
|
|
308
312
|
readonly mode: BuildMode;
|
|
309
|
-
readonly
|
|
313
|
+
readonly parcelVersion: string;
|
|
310
314
|
readonly env: EnvMap;
|
|
311
315
|
readonly hmrOptions: HMROptions | null | undefined;
|
|
312
316
|
readonly serveOptions: ServerOptions | false;
|
|
@@ -497,7 +501,7 @@ export type DependencyOptions = {
|
|
|
497
501
|
/** Plugin-specific metadata for the dependency. */
|
|
498
502
|
readonly meta?: Meta;
|
|
499
503
|
|
|
500
|
-
/** The pipeline defined in .
|
|
504
|
+
/** The pipeline defined in .parcelrc that the dependency should be processed with. */
|
|
501
505
|
readonly pipeline?: string;
|
|
502
506
|
|
|
503
507
|
/**
|
|
@@ -614,7 +618,7 @@ export interface Dependency {
|
|
|
614
618
|
/** The semver version range expected for the dependency. */
|
|
615
619
|
readonly range: SemverRange | null | undefined;
|
|
616
620
|
|
|
617
|
-
/** The pipeline defined in .
|
|
621
|
+
/** The pipeline defined in .parcelrc that the dependency should be processed with. */
|
|
618
622
|
readonly pipeline: string | null | undefined;
|
|
619
623
|
// TODO make immutable
|
|
620
624
|
|
|
@@ -640,18 +644,21 @@ export type AtlaspackTransformOptions = {
|
|
|
640
644
|
env?: EnvironmentOptions;
|
|
641
645
|
query?: string | null | undefined;
|
|
642
646
|
};
|
|
647
|
+
export type ParcelTransformOptions = AtlaspackTransformOptions;
|
|
643
648
|
export type AtlaspackResolveOptions = {
|
|
644
649
|
specifier: DependencySpecifier;
|
|
645
650
|
specifierType: SpecifierType;
|
|
646
651
|
env?: EnvironmentOptions;
|
|
647
652
|
resolveFrom?: FilePath;
|
|
648
653
|
};
|
|
654
|
+
export type ParcelResolveOptions = AtlaspackResolveOptions;
|
|
649
655
|
export type AtlaspackResolveResult = {
|
|
650
656
|
filePath: FilePath;
|
|
651
657
|
code?: string;
|
|
652
658
|
query?: string | null | undefined;
|
|
653
659
|
sideEffects?: boolean;
|
|
654
660
|
};
|
|
661
|
+
export type ParcelResolveResult = AtlaspackResolveResult;
|
|
655
662
|
|
|
656
663
|
/**
|
|
657
664
|
* An asset represents a file or part of a file. It may represent any data type, including source code,
|
|
@@ -721,7 +728,7 @@ export interface BaseAsset {
|
|
|
721
728
|
/** The type of the AST. */
|
|
722
729
|
readonly astGenerator: ASTGenerator | null | undefined;
|
|
723
730
|
|
|
724
|
-
/** The pipeline defined in .
|
|
731
|
+
/** The pipeline defined in .parcelrc that the asset should be processed with. */
|
|
725
732
|
readonly pipeline: string | null | undefined;
|
|
726
733
|
|
|
727
734
|
/** The symbols that the asset exports. */
|
|
@@ -851,7 +858,7 @@ export type DevDepOptions = {
|
|
|
851
858
|
|
|
852
859
|
/**
|
|
853
860
|
* When this dev dependency is invalidated, also invalidate these dependencies.
|
|
854
|
-
* This is useful if the
|
|
861
|
+
* This is useful if the parcel plugin or another parent dependency
|
|
855
862
|
* has its own cache for this dev dependency other than Node's require cache.
|
|
856
863
|
*/
|
|
857
864
|
additionalInvalidations?: Array<{
|
|
@@ -989,7 +996,7 @@ export type TransformerResult = {
|
|
|
989
996
|
/** Plugin-specific metadata for the asset. */
|
|
990
997
|
readonly meta?: Meta;
|
|
991
998
|
|
|
992
|
-
/** The pipeline defined in .
|
|
999
|
+
/** The pipeline defined in .parcelrc that the asset should be processed with. */
|
|
993
1000
|
readonly pipeline?: string | null | undefined;
|
|
994
1001
|
|
|
995
1002
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaspack/types-internal",
|
|
3
|
-
"version": "2.12.1-dev.
|
|
3
|
+
"version": "2.12.1-dev.3398+81c73b3cd",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -16,10 +16,10 @@
|
|
|
16
16
|
"check-ts": "tsc --noEmit lib/index.d.ts"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@atlaspack/diagnostic": "2.12.1-dev.
|
|
20
|
-
"@atlaspack/feature-flags": "2.12.1-dev.
|
|
19
|
+
"@atlaspack/diagnostic": "2.12.1-dev.3398+81c73b3cd",
|
|
20
|
+
"@atlaspack/feature-flags": "2.12.1-dev.3398+81c73b3cd",
|
|
21
21
|
"@parcel/source-map": "^2.1.1",
|
|
22
22
|
"utility-types": "^3.10.0"
|
|
23
23
|
},
|
|
24
|
-
"gitHead": "
|
|
24
|
+
"gitHead": "81c73b3cdf93adf8b0013be9fed5422579bd5910"
|
|
25
25
|
}
|
package/src/index.js
CHANGED
|
@@ -99,6 +99,7 @@ export type Semver = string;
|
|
|
99
99
|
export type GlobMap<T> = {[Glob]: T, ...};
|
|
100
100
|
|
|
101
101
|
export type RawAtlaspackConfigPipeline = Array<PackageName>;
|
|
102
|
+
export type RawParcelConfigPipeline = RawAtlaspackConfigPipeline;
|
|
102
103
|
|
|
103
104
|
export type HMROptions = {
|
|
104
105
|
port?: number,
|
|
@@ -106,7 +107,7 @@ export type HMROptions = {
|
|
|
106
107
|
...
|
|
107
108
|
};
|
|
108
109
|
|
|
109
|
-
/** The format of .
|
|
110
|
+
/** The format of .parcelrc */
|
|
110
111
|
export type RawAtlaspackConfig = {|
|
|
111
112
|
extends?: PackageName | FilePath | Array<PackageName | FilePath>,
|
|
112
113
|
resolvers?: RawAtlaspackConfigPipeline,
|
|
@@ -120,20 +121,22 @@ export type RawAtlaspackConfig = {|
|
|
|
120
121
|
reporters?: RawAtlaspackConfigPipeline,
|
|
121
122
|
validators?: {[Glob]: RawAtlaspackConfigPipeline, ...},
|
|
122
123
|
|};
|
|
124
|
+
export type RawParcelConfig = RawAtlaspackConfig;
|
|
123
125
|
|
|
124
|
-
/** A .
|
|
126
|
+
/** A .parcelrc where all package names are resolved */
|
|
125
127
|
export type ResolvedAtlaspackConfigFile = {|
|
|
126
128
|
...RawAtlaspackConfig,
|
|
127
129
|
+filePath: FilePath,
|
|
128
130
|
+resolveFrom?: FilePath,
|
|
129
131
|
|};
|
|
132
|
+
export type ResolvedParcelConfigFile = ResolvedAtlaspackConfigFile;
|
|
130
133
|
|
|
131
134
|
/** Corresponds to <code>pkg#engines</code> */
|
|
132
135
|
export type Engines = {
|
|
133
136
|
+browsers?: string | Array<string>,
|
|
134
137
|
+electron?: SemverRange,
|
|
135
138
|
+node?: SemverRange,
|
|
136
|
-
+
|
|
139
|
+
+parcel?: SemverRange,
|
|
137
140
|
...
|
|
138
141
|
};
|
|
139
142
|
|
|
@@ -394,6 +397,8 @@ export type InitialAtlaspackOptionsInternal<WorkerFarm> = {|
|
|
|
394
397
|
// throwErrors
|
|
395
398
|
// global?
|
|
396
399
|
|};
|
|
400
|
+
export type InitialParcelOptionsInternal<WorkerFarm> =
|
|
401
|
+
InitialAtlaspackOptionsInternal<WorkerFarm>;
|
|
397
402
|
|
|
398
403
|
export type InitialServerOptions = {|
|
|
399
404
|
+publicUrl?: string,
|
|
@@ -404,7 +409,7 @@ export type InitialServerOptions = {|
|
|
|
404
409
|
|
|
405
410
|
export interface PluginOptions {
|
|
406
411
|
+mode: BuildMode;
|
|
407
|
-
+
|
|
412
|
+
+parcelVersion: string;
|
|
408
413
|
+env: EnvMap;
|
|
409
414
|
+hmrOptions: ?HMROptions;
|
|
410
415
|
+serveOptions: ServerOptions | false;
|
|
@@ -594,7 +599,7 @@ export type DependencyOptions = {|
|
|
|
594
599
|
+packageConditions?: Array<string>,
|
|
595
600
|
/** Plugin-specific metadata for the dependency. */
|
|
596
601
|
+meta?: Meta,
|
|
597
|
-
/** The pipeline defined in .
|
|
602
|
+
/** The pipeline defined in .parcelrc that the dependency should be processed with. */
|
|
598
603
|
+pipeline?: string,
|
|
599
604
|
/**
|
|
600
605
|
* The file path where the dependency should be resolved from.
|
|
@@ -688,7 +693,7 @@ export interface Dependency {
|
|
|
688
693
|
+resolveFrom: ?FilePath;
|
|
689
694
|
/** The semver version range expected for the dependency. */
|
|
690
695
|
+range: ?SemverRange;
|
|
691
|
-
/** The pipeline defined in .
|
|
696
|
+
/** The pipeline defined in .parcelrc that the dependency should be processed with. */
|
|
692
697
|
+pipeline: ?string;
|
|
693
698
|
|
|
694
699
|
// TODO make immutable
|
|
@@ -717,6 +722,7 @@ export type AtlaspackTransformOptions = {|
|
|
|
717
722
|
env?: EnvironmentOptions,
|
|
718
723
|
query?: ?string,
|
|
719
724
|
|};
|
|
725
|
+
export type ParcelTransformOptions = AtlaspackTransformOptions;
|
|
720
726
|
|
|
721
727
|
export type AtlaspackResolveOptions = {|
|
|
722
728
|
specifier: DependencySpecifier,
|
|
@@ -724,6 +730,7 @@ export type AtlaspackResolveOptions = {|
|
|
|
724
730
|
env?: EnvironmentOptions,
|
|
725
731
|
resolveFrom?: FilePath,
|
|
726
732
|
|};
|
|
733
|
+
export type ParcelResolveOptions = AtlaspackResolveOptions;
|
|
727
734
|
|
|
728
735
|
export type AtlaspackResolveResult = {|
|
|
729
736
|
filePath: FilePath,
|
|
@@ -731,6 +738,7 @@ export type AtlaspackResolveResult = {|
|
|
|
731
738
|
query?: ?string,
|
|
732
739
|
sideEffects?: boolean,
|
|
733
740
|
|};
|
|
741
|
+
export type ParcelResolveResult = AtlaspackResolveResult;
|
|
734
742
|
|
|
735
743
|
/**
|
|
736
744
|
* An asset represents a file or part of a file. It may represent any data type, including source code,
|
|
@@ -787,7 +795,7 @@ export interface BaseAsset {
|
|
|
787
795
|
+uniqueKey: ?string;
|
|
788
796
|
/** The type of the AST. */
|
|
789
797
|
+astGenerator: ?ASTGenerator;
|
|
790
|
-
/** The pipeline defined in .
|
|
798
|
+
/** The pipeline defined in .parcelrc that the asset should be processed with. */
|
|
791
799
|
+pipeline: ?string;
|
|
792
800
|
/** The symbols that the asset exports. */
|
|
793
801
|
+symbols: AssetSymbols;
|
|
@@ -892,7 +900,7 @@ export type DevDepOptions = {|
|
|
|
892
900
|
range?: ?SemverRange,
|
|
893
901
|
/**
|
|
894
902
|
* When this dev dependency is invalidated, also invalidate these dependencies.
|
|
895
|
-
* This is useful if the
|
|
903
|
+
* This is useful if the parcel plugin or another parent dependency
|
|
896
904
|
* has its own cache for this dev dependency other than Node's require cache.
|
|
897
905
|
*/
|
|
898
906
|
additionalInvalidations?: Array<{|
|
|
@@ -1020,7 +1028,7 @@ export type TransformerResult = {|
|
|
|
1020
1028
|
+isBundleSplittable?: boolean,
|
|
1021
1029
|
/** Plugin-specific metadata for the asset. */
|
|
1022
1030
|
+meta?: Meta,
|
|
1023
|
-
/** The pipeline defined in .
|
|
1031
|
+
/** The pipeline defined in .parcelrc that the asset should be processed with. */
|
|
1024
1032
|
+pipeline?: ?string,
|
|
1025
1033
|
/**
|
|
1026
1034
|
* Whether this asset can be omitted if none of its exports are being used.
|