@atlaspack/transformer-typescript-tsc 2.14.5-canary.2 → 2.14.5-canary.200
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/CHANGELOG.md +208 -0
- package/lib/TSCTransformer.js +1 -0
- package/lib/types/TSCTransformer.d.ts +3 -0
- package/package.json +12 -7
- package/src/{TSCTransformer.js → TSCTransformer.ts} +19 -23
- package/tsconfig.json +4 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,213 @@
|
|
|
1
1
|
# @atlaspack/transformer-typescript-tsc
|
|
2
2
|
|
|
3
|
+
## 2.14.31
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#785](https://github.com/atlassian-labs/atlaspack/pull/785) [`0e7dd5e`](https://github.com/atlassian-labs/atlaspack/commit/0e7dd5ec6fbe05aa9e0bb5775a9d0975f206a922) Thanks [@matt-koko](https://github.com/matt-koko)! - We need to re-publish every package in Atlaspack with the corrected types field.
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`0e7dd5e`](https://github.com/atlassian-labs/atlaspack/commit/0e7dd5ec6fbe05aa9e0bb5775a9d0975f206a922)]:
|
|
10
|
+
- @atlaspack/plugin@2.14.31
|
|
11
|
+
- @atlaspack/ts-utils@2.14.10
|
|
12
|
+
|
|
13
|
+
## 2.14.30
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- Updated dependencies []:
|
|
18
|
+
- @atlaspack/plugin@2.14.30
|
|
19
|
+
- @atlaspack/ts-utils@2.14.9
|
|
20
|
+
|
|
21
|
+
## 2.14.29
|
|
22
|
+
|
|
23
|
+
### Patch Changes
|
|
24
|
+
|
|
25
|
+
- Updated dependencies []:
|
|
26
|
+
- @atlaspack/plugin@2.14.29
|
|
27
|
+
- @atlaspack/ts-utils@2.14.8
|
|
28
|
+
|
|
29
|
+
## 2.14.28
|
|
30
|
+
|
|
31
|
+
### Patch Changes
|
|
32
|
+
|
|
33
|
+
- [#758](https://github.com/atlassian-labs/atlaspack/pull/758) [`c940954`](https://github.com/atlassian-labs/atlaspack/commit/c940954d27d657c3c93cd328dfb394778da46eab) Thanks [@marcins](https://github.com/marcins)! - Type fixes
|
|
34
|
+
|
|
35
|
+
- Updated dependencies []:
|
|
36
|
+
- @atlaspack/plugin@2.14.28
|
|
37
|
+
- @atlaspack/ts-utils@2.14.7
|
|
38
|
+
|
|
39
|
+
## 2.14.27
|
|
40
|
+
|
|
41
|
+
### Patch Changes
|
|
42
|
+
|
|
43
|
+
- Updated dependencies []:
|
|
44
|
+
- @atlaspack/plugin@2.14.27
|
|
45
|
+
- @atlaspack/ts-utils@2.14.6
|
|
46
|
+
|
|
47
|
+
## 2.14.26
|
|
48
|
+
|
|
49
|
+
### Patch Changes
|
|
50
|
+
|
|
51
|
+
- [#742](https://github.com/atlassian-labs/atlaspack/pull/742) [`ee040bb`](https://github.com/atlassian-labs/atlaspack/commit/ee040bb6428f29b57d892ddd8107e29077d08ffd) Thanks [@yamadapc](https://github.com/yamadapc)! - Internal changes and bug fixes to environmentDeduplication flag
|
|
52
|
+
|
|
53
|
+
- Updated dependencies [[`ee040bb`](https://github.com/atlassian-labs/atlaspack/commit/ee040bb6428f29b57d892ddd8107e29077d08ffd)]:
|
|
54
|
+
- @atlaspack/ts-utils@2.14.5
|
|
55
|
+
- @atlaspack/plugin@2.14.26
|
|
56
|
+
|
|
57
|
+
## 2.14.25
|
|
58
|
+
|
|
59
|
+
### Patch Changes
|
|
60
|
+
|
|
61
|
+
- Updated dependencies []:
|
|
62
|
+
- @atlaspack/plugin@2.14.25
|
|
63
|
+
- @atlaspack/ts-utils@2.14.4
|
|
64
|
+
|
|
65
|
+
## 2.14.24
|
|
66
|
+
|
|
67
|
+
### Patch Changes
|
|
68
|
+
|
|
69
|
+
- Updated dependencies []:
|
|
70
|
+
- @atlaspack/plugin@2.14.24
|
|
71
|
+
- @atlaspack/ts-utils@2.14.3
|
|
72
|
+
|
|
73
|
+
## 2.14.23
|
|
74
|
+
|
|
75
|
+
### Patch Changes
|
|
76
|
+
|
|
77
|
+
- Updated dependencies []:
|
|
78
|
+
- @atlaspack/plugin@2.14.23
|
|
79
|
+
|
|
80
|
+
## 2.14.22
|
|
81
|
+
|
|
82
|
+
### Patch Changes
|
|
83
|
+
|
|
84
|
+
- [#720](https://github.com/atlassian-labs/atlaspack/pull/720) [`d2fd849`](https://github.com/atlassian-labs/atlaspack/commit/d2fd849770fe6305e9c694bd97b1bd905abd9d94) Thanks [@alshdavid](https://github.com/alshdavid)! - Migrate to TypeScript
|
|
85
|
+
|
|
86
|
+
- Updated dependencies [[`d2fd849`](https://github.com/atlassian-labs/atlaspack/commit/d2fd849770fe6305e9c694bd97b1bd905abd9d94)]:
|
|
87
|
+
- @atlaspack/ts-utils@2.14.2
|
|
88
|
+
- @atlaspack/plugin@2.14.22
|
|
89
|
+
|
|
90
|
+
## 2.14.21
|
|
91
|
+
|
|
92
|
+
### Patch Changes
|
|
93
|
+
|
|
94
|
+
- Updated dependencies []:
|
|
95
|
+
- @atlaspack/plugin@2.14.21
|
|
96
|
+
|
|
97
|
+
## 2.14.20
|
|
98
|
+
|
|
99
|
+
### Patch Changes
|
|
100
|
+
|
|
101
|
+
- [#702](https://github.com/atlassian-labs/atlaspack/pull/702) [`daaa768`](https://github.com/atlassian-labs/atlaspack/commit/daaa7688786772d7e3713b71c5bba6b89ec704aa) Thanks [@alshdavid](https://github.com/alshdavid)! - Fixes to Flow types
|
|
102
|
+
|
|
103
|
+
- Updated dependencies [[`daaa768`](https://github.com/atlassian-labs/atlaspack/commit/daaa7688786772d7e3713b71c5bba6b89ec704aa)]:
|
|
104
|
+
- @atlaspack/plugin@2.14.20
|
|
105
|
+
|
|
106
|
+
## 2.14.19
|
|
107
|
+
|
|
108
|
+
### Patch Changes
|
|
109
|
+
|
|
110
|
+
- Updated dependencies []:
|
|
111
|
+
- @atlaspack/plugin@2.14.19
|
|
112
|
+
|
|
113
|
+
## 2.14.18
|
|
114
|
+
|
|
115
|
+
### Patch Changes
|
|
116
|
+
|
|
117
|
+
- Updated dependencies []:
|
|
118
|
+
- @atlaspack/plugin@2.14.18
|
|
119
|
+
|
|
120
|
+
## 2.14.17
|
|
121
|
+
|
|
122
|
+
### Patch Changes
|
|
123
|
+
|
|
124
|
+
- Updated dependencies []:
|
|
125
|
+
- @atlaspack/plugin@2.14.17
|
|
126
|
+
|
|
127
|
+
## 2.14.16
|
|
128
|
+
|
|
129
|
+
### Patch Changes
|
|
130
|
+
|
|
131
|
+
- Updated dependencies []:
|
|
132
|
+
- @atlaspack/plugin@2.14.16
|
|
133
|
+
|
|
134
|
+
## 2.14.15
|
|
135
|
+
|
|
136
|
+
### Patch Changes
|
|
137
|
+
|
|
138
|
+
- Updated dependencies []:
|
|
139
|
+
- @atlaspack/plugin@2.14.15
|
|
140
|
+
|
|
141
|
+
## 2.14.14
|
|
142
|
+
|
|
143
|
+
### Patch Changes
|
|
144
|
+
|
|
145
|
+
- Updated dependencies []:
|
|
146
|
+
- @atlaspack/plugin@2.14.14
|
|
147
|
+
|
|
148
|
+
## 2.14.13
|
|
149
|
+
|
|
150
|
+
### Patch Changes
|
|
151
|
+
|
|
152
|
+
- Updated dependencies []:
|
|
153
|
+
- @atlaspack/plugin@2.14.13
|
|
154
|
+
|
|
155
|
+
## 2.14.12
|
|
156
|
+
|
|
157
|
+
### Patch Changes
|
|
158
|
+
|
|
159
|
+
- Updated dependencies []:
|
|
160
|
+
- @atlaspack/plugin@2.14.12
|
|
161
|
+
|
|
162
|
+
## 2.14.11
|
|
163
|
+
|
|
164
|
+
### Patch Changes
|
|
165
|
+
|
|
166
|
+
- Updated dependencies []:
|
|
167
|
+
- @atlaspack/plugin@2.14.11
|
|
168
|
+
|
|
169
|
+
## 2.14.10
|
|
170
|
+
|
|
171
|
+
### Patch Changes
|
|
172
|
+
|
|
173
|
+
- Updated dependencies []:
|
|
174
|
+
- @atlaspack/plugin@2.14.10
|
|
175
|
+
|
|
176
|
+
## 2.14.9
|
|
177
|
+
|
|
178
|
+
### Patch Changes
|
|
179
|
+
|
|
180
|
+
- Updated dependencies []:
|
|
181
|
+
- @atlaspack/plugin@2.14.9
|
|
182
|
+
|
|
183
|
+
## 2.14.8
|
|
184
|
+
|
|
185
|
+
### Patch Changes
|
|
186
|
+
|
|
187
|
+
- Updated dependencies []:
|
|
188
|
+
- @atlaspack/plugin@2.14.8
|
|
189
|
+
|
|
190
|
+
## 2.14.7
|
|
191
|
+
|
|
192
|
+
### Patch Changes
|
|
193
|
+
|
|
194
|
+
- Updated dependencies []:
|
|
195
|
+
- @atlaspack/plugin@2.14.7
|
|
196
|
+
|
|
197
|
+
## 2.14.6
|
|
198
|
+
|
|
199
|
+
### Patch Changes
|
|
200
|
+
|
|
201
|
+
- Updated dependencies []:
|
|
202
|
+
- @atlaspack/plugin@2.14.6
|
|
203
|
+
|
|
204
|
+
## 2.14.5
|
|
205
|
+
|
|
206
|
+
### Patch Changes
|
|
207
|
+
|
|
208
|
+
- Updated dependencies []:
|
|
209
|
+
- @atlaspack/plugin@2.14.5
|
|
210
|
+
|
|
3
211
|
## 2.14.4
|
|
4
212
|
|
|
5
213
|
### Patch Changes
|
package/lib/TSCTransformer.js
CHANGED
|
@@ -72,6 +72,7 @@ var _default = exports.default = new (_plugin().Transformer)({
|
|
|
72
72
|
let map = new (_sourceMap().default)(options.projectRoot);
|
|
73
73
|
map.addVLQMap(JSON.parse(sourceMapText));
|
|
74
74
|
if (originalMap) {
|
|
75
|
+
// @ts-expect-error TS2345 - the types are wrong, `extends` accepts a `SourceMap` or a `Buffer`
|
|
75
76
|
map.extends(originalMap);
|
|
76
77
|
}
|
|
77
78
|
asset.setMap(map);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaspack/transformer-typescript-tsc",
|
|
3
|
-
"version": "2.14.5-canary.
|
|
3
|
+
"version": "2.14.5-canary.200+10ee3fa5b",
|
|
4
4
|
"license": "(MIT OR Apache-2.0)",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -9,14 +9,15 @@
|
|
|
9
9
|
"type": "git",
|
|
10
10
|
"url": "https://github.com/atlassian-labs/atlaspack.git"
|
|
11
11
|
},
|
|
12
|
-
"main": "lib/TSCTransformer.js",
|
|
13
|
-
"source": "src/TSCTransformer.
|
|
12
|
+
"main": "./lib/TSCTransformer.js",
|
|
13
|
+
"source": "./src/TSCTransformer.ts",
|
|
14
|
+
"types": "./lib/types/TSCTransformer.d.ts",
|
|
14
15
|
"engines": {
|
|
15
16
|
"node": ">= 16.0.0"
|
|
16
17
|
},
|
|
17
18
|
"dependencies": {
|
|
18
|
-
"@atlaspack/plugin": "2.14.5-canary.
|
|
19
|
-
"@atlaspack/ts-utils": "2.14.1-canary.
|
|
19
|
+
"@atlaspack/plugin": "2.14.5-canary.200+10ee3fa5b",
|
|
20
|
+
"@atlaspack/ts-utils": "2.14.1-canary.268+10ee3fa5b",
|
|
20
21
|
"@parcel/source-map": "^2.1.1"
|
|
21
22
|
},
|
|
22
23
|
"devDependencies": {
|
|
@@ -26,5 +27,9 @@
|
|
|
26
27
|
"typescript": ">=3.0.0"
|
|
27
28
|
},
|
|
28
29
|
"type": "commonjs",
|
|
29
|
-
"
|
|
30
|
-
|
|
30
|
+
"scripts": {
|
|
31
|
+
"check-ts": "tsc --emitDeclarationOnly --rootDir src",
|
|
32
|
+
"build:lib": "gulp build --gulpfile ../../../gulpfile.js --cwd ."
|
|
33
|
+
},
|
|
34
|
+
"gitHead": "10ee3fa5b75a92acde8973673d9b3c5b6f3958e5"
|
|
35
|
+
}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
// @flow strict-local
|
|
2
|
-
|
|
3
1
|
import type {TranspileOptions} from 'typescript';
|
|
4
2
|
|
|
5
3
|
import {Transformer} from '@atlaspack/plugin';
|
|
@@ -7,7 +5,7 @@ import {loadTSConfig} from '@atlaspack/ts-utils';
|
|
|
7
5
|
import typescript from 'typescript';
|
|
8
6
|
import SourceMap from '@parcel/source-map';
|
|
9
7
|
|
|
10
|
-
export default
|
|
8
|
+
export default new Transformer({
|
|
11
9
|
loadConfig({config, options}) {
|
|
12
10
|
return loadTSConfig(config, options);
|
|
13
11
|
},
|
|
@@ -18,25 +16,22 @@ export default (new Transformer({
|
|
|
18
16
|
asset.getMap(),
|
|
19
17
|
]);
|
|
20
18
|
|
|
21
|
-
let transpiled = typescript.transpileModule(
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
fileName: asset.filePath, // Should be relativePath?
|
|
38
|
-
}: TranspileOptions),
|
|
39
|
-
);
|
|
19
|
+
let transpiled = typescript.transpileModule(code, {
|
|
20
|
+
compilerOptions: {
|
|
21
|
+
// React is the default. Users can override this by supplying their own tsconfig,
|
|
22
|
+
// which many TypeScript users will already have for typechecking, etc.
|
|
23
|
+
jsx: typescript.JsxEmit.React,
|
|
24
|
+
...config,
|
|
25
|
+
// Always emit output
|
|
26
|
+
noEmit: false,
|
|
27
|
+
// Don't compile ES `import`s -- scope hoisting prefers them and they will
|
|
28
|
+
// otherwise compiled to CJS via babel in the js transformer
|
|
29
|
+
module: typescript.ModuleKind.ESNext,
|
|
30
|
+
sourceMap: Boolean(asset.env.sourceMap),
|
|
31
|
+
mapRoot: options.projectRoot,
|
|
32
|
+
},
|
|
33
|
+
fileName: asset.filePath, // Should be relativePath?
|
|
34
|
+
} as TranspileOptions);
|
|
40
35
|
|
|
41
36
|
let {outputText, sourceMapText} = transpiled;
|
|
42
37
|
|
|
@@ -49,6 +44,7 @@ export default (new Transformer({
|
|
|
49
44
|
let map = new SourceMap(options.projectRoot);
|
|
50
45
|
map.addVLQMap(JSON.parse(sourceMapText));
|
|
51
46
|
if (originalMap) {
|
|
47
|
+
// @ts-expect-error TS2345 - the types are wrong, `extends` accepts a `SourceMap` or a `Buffer`
|
|
52
48
|
map.extends(originalMap);
|
|
53
49
|
}
|
|
54
50
|
asset.setMap(map);
|
|
@@ -59,4 +55,4 @@ export default (new Transformer({
|
|
|
59
55
|
|
|
60
56
|
return [asset];
|
|
61
57
|
},
|
|
62
|
-
})
|
|
58
|
+
}) as Transformer<unknown>;
|
package/tsconfig.json
ADDED