@atlaspack/transformer-typescript-tsc 2.14.5-canary.18 → 2.14.5-canary.180

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 CHANGED
@@ -1,5 +1,181 @@
1
1
  # @atlaspack/transformer-typescript-tsc
2
2
 
3
+ ## 2.14.29
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies []:
8
+ - @atlaspack/plugin@2.14.29
9
+ - @atlaspack/ts-utils@2.14.8
10
+
11
+ ## 2.14.28
12
+
13
+ ### Patch Changes
14
+
15
+ - [#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
16
+
17
+ - Updated dependencies []:
18
+ - @atlaspack/plugin@2.14.28
19
+ - @atlaspack/ts-utils@2.14.7
20
+
21
+ ## 2.14.27
22
+
23
+ ### Patch Changes
24
+
25
+ - Updated dependencies []:
26
+ - @atlaspack/plugin@2.14.27
27
+ - @atlaspack/ts-utils@2.14.6
28
+
29
+ ## 2.14.26
30
+
31
+ ### Patch Changes
32
+
33
+ - [#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
34
+
35
+ - Updated dependencies [[`ee040bb`](https://github.com/atlassian-labs/atlaspack/commit/ee040bb6428f29b57d892ddd8107e29077d08ffd)]:
36
+ - @atlaspack/ts-utils@2.14.5
37
+ - @atlaspack/plugin@2.14.26
38
+
39
+ ## 2.14.25
40
+
41
+ ### Patch Changes
42
+
43
+ - Updated dependencies []:
44
+ - @atlaspack/plugin@2.14.25
45
+ - @atlaspack/ts-utils@2.14.4
46
+
47
+ ## 2.14.24
48
+
49
+ ### Patch Changes
50
+
51
+ - Updated dependencies []:
52
+ - @atlaspack/plugin@2.14.24
53
+ - @atlaspack/ts-utils@2.14.3
54
+
55
+ ## 2.14.23
56
+
57
+ ### Patch Changes
58
+
59
+ - Updated dependencies []:
60
+ - @atlaspack/plugin@2.14.23
61
+
62
+ ## 2.14.22
63
+
64
+ ### Patch Changes
65
+
66
+ - [#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
67
+
68
+ - Updated dependencies [[`d2fd849`](https://github.com/atlassian-labs/atlaspack/commit/d2fd849770fe6305e9c694bd97b1bd905abd9d94)]:
69
+ - @atlaspack/ts-utils@2.14.2
70
+ - @atlaspack/plugin@2.14.22
71
+
72
+ ## 2.14.21
73
+
74
+ ### Patch Changes
75
+
76
+ - Updated dependencies []:
77
+ - @atlaspack/plugin@2.14.21
78
+
79
+ ## 2.14.20
80
+
81
+ ### Patch Changes
82
+
83
+ - [#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
84
+
85
+ - Updated dependencies [[`daaa768`](https://github.com/atlassian-labs/atlaspack/commit/daaa7688786772d7e3713b71c5bba6b89ec704aa)]:
86
+ - @atlaspack/plugin@2.14.20
87
+
88
+ ## 2.14.19
89
+
90
+ ### Patch Changes
91
+
92
+ - Updated dependencies []:
93
+ - @atlaspack/plugin@2.14.19
94
+
95
+ ## 2.14.18
96
+
97
+ ### Patch Changes
98
+
99
+ - Updated dependencies []:
100
+ - @atlaspack/plugin@2.14.18
101
+
102
+ ## 2.14.17
103
+
104
+ ### Patch Changes
105
+
106
+ - Updated dependencies []:
107
+ - @atlaspack/plugin@2.14.17
108
+
109
+ ## 2.14.16
110
+
111
+ ### Patch Changes
112
+
113
+ - Updated dependencies []:
114
+ - @atlaspack/plugin@2.14.16
115
+
116
+ ## 2.14.15
117
+
118
+ ### Patch Changes
119
+
120
+ - Updated dependencies []:
121
+ - @atlaspack/plugin@2.14.15
122
+
123
+ ## 2.14.14
124
+
125
+ ### Patch Changes
126
+
127
+ - Updated dependencies []:
128
+ - @atlaspack/plugin@2.14.14
129
+
130
+ ## 2.14.13
131
+
132
+ ### Patch Changes
133
+
134
+ - Updated dependencies []:
135
+ - @atlaspack/plugin@2.14.13
136
+
137
+ ## 2.14.12
138
+
139
+ ### Patch Changes
140
+
141
+ - Updated dependencies []:
142
+ - @atlaspack/plugin@2.14.12
143
+
144
+ ## 2.14.11
145
+
146
+ ### Patch Changes
147
+
148
+ - Updated dependencies []:
149
+ - @atlaspack/plugin@2.14.11
150
+
151
+ ## 2.14.10
152
+
153
+ ### Patch Changes
154
+
155
+ - Updated dependencies []:
156
+ - @atlaspack/plugin@2.14.10
157
+
158
+ ## 2.14.9
159
+
160
+ ### Patch Changes
161
+
162
+ - Updated dependencies []:
163
+ - @atlaspack/plugin@2.14.9
164
+
165
+ ## 2.14.8
166
+
167
+ ### Patch Changes
168
+
169
+ - Updated dependencies []:
170
+ - @atlaspack/plugin@2.14.8
171
+
172
+ ## 2.14.7
173
+
174
+ ### Patch Changes
175
+
176
+ - Updated dependencies []:
177
+ - @atlaspack/plugin@2.14.7
178
+
3
179
  ## 2.14.6
4
180
 
5
181
  ### Patch Changes
@@ -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);
@@ -0,0 +1,3 @@
1
+ import { Transformer } from '@atlaspack/plugin';
2
+ declare const _default: Transformer<unknown>;
3
+ export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaspack/transformer-typescript-tsc",
3
- "version": "2.14.5-canary.18+556d6ab8e",
3
+ "version": "2.14.5-canary.180+58b9fb037",
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.js",
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.18+556d6ab8e",
19
- "@atlaspack/ts-utils": "2.14.1-canary.86+556d6ab8e",
19
+ "@atlaspack/plugin": "2.14.5-canary.180+58b9fb037",
20
+ "@atlaspack/ts-utils": "2.14.1-canary.248+58b9fb037",
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
- "gitHead": "556d6ab8ede759fa7f37fcd3f4da336ef1c55e8f"
30
+ "scripts": {
31
+ "check-ts": "tsc --emitDeclarationOnly --rootDir src",
32
+ "build:lib": "gulp build --gulpfile ../../../gulpfile.js --cwd ."
33
+ },
34
+ "gitHead": "58b9fb037680a36a0b4af7890f2a03532095b88f"
30
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 (new Transformer({
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
- code,
23
- ({
24
- compilerOptions: {
25
- // React is the default. Users can override this by supplying their own tsconfig,
26
- // which many TypeScript users will already have for typechecking, etc.
27
- jsx: typescript.JsxEmit.React,
28
- ...config,
29
- // Always emit output
30
- noEmit: false,
31
- // Don't compile ES `import`s -- scope hoisting prefers them and they will
32
- // otherwise compiled to CJS via babel in the js transformer
33
- module: typescript.ModuleKind.ESNext,
34
- sourceMap: Boolean(asset.env.sourceMap),
35
- mapRoot: options.projectRoot,
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
- }): Transformer);
58
+ }) as Transformer<unknown>;
package/tsconfig.json ADDED
@@ -0,0 +1,4 @@
1
+ {
2
+ "extends": "../../../tsconfig.json",
3
+ "include": ["src"]
4
+ }