@atlaspack/transformer-typescript-types 2.12.1-dev.3365 → 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/TSTypesTransformer.js +3 -3
- package/lib/collect.js +1 -1
- package/package.json +7 -7
- package/src/TSTypesTransformer.js +3 -3
- package/src/collect.js +1 -1
|
@@ -132,7 +132,7 @@ var _default = exports.default = new (_plugin().Transformer)({
|
|
|
132
132
|
deduplicatedDiagnostics.push(d);
|
|
133
133
|
}
|
|
134
134
|
}
|
|
135
|
-
let
|
|
135
|
+
let parcelDiagnostics = deduplicatedDiagnostics.map(diagnostic => {
|
|
136
136
|
let filename = asset.filePath;
|
|
137
137
|
let {
|
|
138
138
|
file
|
|
@@ -181,10 +181,10 @@ var _default = exports.default = new (_plugin().Transformer)({
|
|
|
181
181
|
});
|
|
182
182
|
if (host.outputCode == null) {
|
|
183
183
|
throw new (_diagnostic().default)({
|
|
184
|
-
diagnostic:
|
|
184
|
+
diagnostic: parcelDiagnostics
|
|
185
185
|
});
|
|
186
186
|
} else {
|
|
187
|
-
for (let d of
|
|
187
|
+
for (let d of parcelDiagnostics) {
|
|
188
188
|
logger.warn(d);
|
|
189
189
|
}
|
|
190
190
|
}
|
package/lib/collect.js
CHANGED
|
@@ -73,7 +73,7 @@ function collect(moduleGraph, context, sourceFile) {
|
|
|
73
73
|
}
|
|
74
74
|
node = _typescript().default.visitEachChild(node, visit, context);
|
|
75
75
|
if (_typescript().default.isImportTypeNode(node) && _typescript().default.isLiteralTypeNode(node.argument) && _typescript().default.isStringLiteral(node.argument.literal)) {
|
|
76
|
-
let local = `$$
|
|
76
|
+
let local = `$$parcel$import$${moduleGraph.syntheticImportCount++}`;
|
|
77
77
|
let [specifier, entity] = getImportName(node.qualifier, local, factory);
|
|
78
78
|
currentModule.addImport(local, node.argument.literal.text, specifier);
|
|
79
79
|
return factory.createTypeReferenceNode(entity, node.typeArguments);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaspack/transformer-typescript-types",
|
|
3
|
-
"version": "2.12.1-dev.
|
|
3
|
+
"version": "2.12.1-dev.3398+81c73b3cd",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -13,13 +13,13 @@
|
|
|
13
13
|
"source": "src/TSTypesTransformer.js",
|
|
14
14
|
"engines": {
|
|
15
15
|
"node": ">= 16.0.0",
|
|
16
|
-
"
|
|
16
|
+
"parcel": "^2.12.1-dev.3398+81c73b3cd"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@atlaspack/diagnostic": "2.12.1-dev.
|
|
20
|
-
"@atlaspack/plugin": "2.12.1-dev.
|
|
21
|
-
"@atlaspack/ts-utils": "2.12.1-dev.
|
|
22
|
-
"@atlaspack/utils": "2.12.1-dev.
|
|
19
|
+
"@atlaspack/diagnostic": "2.12.1-dev.3398+81c73b3cd",
|
|
20
|
+
"@atlaspack/plugin": "2.12.1-dev.3398+81c73b3cd",
|
|
21
|
+
"@atlaspack/ts-utils": "2.12.1-dev.3398+81c73b3cd",
|
|
22
|
+
"@atlaspack/utils": "2.12.1-dev.3398+81c73b3cd",
|
|
23
23
|
"@parcel/source-map": "^2.1.1",
|
|
24
24
|
"nullthrows": "^1.1.1"
|
|
25
25
|
},
|
|
@@ -29,5 +29,5 @@
|
|
|
29
29
|
"peerDependencies": {
|
|
30
30
|
"typescript": ">=3.0.0"
|
|
31
31
|
},
|
|
32
|
-
"gitHead": "
|
|
32
|
+
"gitHead": "81c73b3cdf93adf8b0013be9fed5422579bd5910"
|
|
33
33
|
}
|
|
@@ -93,7 +93,7 @@ export default (new Transformer({
|
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
-
let
|
|
96
|
+
let parcelDiagnostics = deduplicatedDiagnostics.map(diagnostic => {
|
|
97
97
|
let filename = asset.filePath;
|
|
98
98
|
let {file} = diagnostic;
|
|
99
99
|
|
|
@@ -156,9 +156,9 @@ export default (new Transformer({
|
|
|
156
156
|
});
|
|
157
157
|
|
|
158
158
|
if (host.outputCode == null) {
|
|
159
|
-
throw new ThrowableDiagnostic({diagnostic:
|
|
159
|
+
throw new ThrowableDiagnostic({diagnostic: parcelDiagnostics});
|
|
160
160
|
} else {
|
|
161
|
-
for (let d of
|
|
161
|
+
for (let d of parcelDiagnostics) {
|
|
162
162
|
logger.warn(d);
|
|
163
163
|
}
|
|
164
164
|
}
|
package/src/collect.js
CHANGED
|
@@ -90,7 +90,7 @@ export function collect(
|
|
|
90
90
|
ts.isLiteralTypeNode(node.argument) &&
|
|
91
91
|
ts.isStringLiteral(node.argument.literal)
|
|
92
92
|
) {
|
|
93
|
-
let local = `$$
|
|
93
|
+
let local = `$$parcel$import$${moduleGraph.syntheticImportCount++}`;
|
|
94
94
|
let [specifier, entity] = getImportName(node.qualifier, local, factory);
|
|
95
95
|
currentModule.addImport(local, node.argument.literal.text, specifier);
|
|
96
96
|
return factory.createTypeReferenceNode(entity, node.typeArguments);
|