@atlaspack/transformer-typescript-tsc 2.14.5-canary.17 → 2.14.5-canary.171

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,163 @@
1
1
  # @atlaspack/transformer-typescript-tsc
2
2
 
3
+ ## 2.14.27
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies []:
8
+ - @atlaspack/plugin@2.14.27
9
+ - @atlaspack/ts-utils@2.14.6
10
+
11
+ ## 2.14.26
12
+
13
+ ### Patch Changes
14
+
15
+ - [#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
16
+
17
+ - Updated dependencies [[`ee040bb`](https://github.com/atlassian-labs/atlaspack/commit/ee040bb6428f29b57d892ddd8107e29077d08ffd)]:
18
+ - @atlaspack/ts-utils@2.14.5
19
+ - @atlaspack/plugin@2.14.26
20
+
21
+ ## 2.14.25
22
+
23
+ ### Patch Changes
24
+
25
+ - Updated dependencies []:
26
+ - @atlaspack/plugin@2.14.25
27
+ - @atlaspack/ts-utils@2.14.4
28
+
29
+ ## 2.14.24
30
+
31
+ ### Patch Changes
32
+
33
+ - Updated dependencies []:
34
+ - @atlaspack/plugin@2.14.24
35
+ - @atlaspack/ts-utils@2.14.3
36
+
37
+ ## 2.14.23
38
+
39
+ ### Patch Changes
40
+
41
+ - Updated dependencies []:
42
+ - @atlaspack/plugin@2.14.23
43
+
44
+ ## 2.14.22
45
+
46
+ ### Patch Changes
47
+
48
+ - [#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
49
+
50
+ - Updated dependencies [[`d2fd849`](https://github.com/atlassian-labs/atlaspack/commit/d2fd849770fe6305e9c694bd97b1bd905abd9d94)]:
51
+ - @atlaspack/ts-utils@2.14.2
52
+ - @atlaspack/plugin@2.14.22
53
+
54
+ ## 2.14.21
55
+
56
+ ### Patch Changes
57
+
58
+ - Updated dependencies []:
59
+ - @atlaspack/plugin@2.14.21
60
+
61
+ ## 2.14.20
62
+
63
+ ### Patch Changes
64
+
65
+ - [#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
66
+
67
+ - Updated dependencies [[`daaa768`](https://github.com/atlassian-labs/atlaspack/commit/daaa7688786772d7e3713b71c5bba6b89ec704aa)]:
68
+ - @atlaspack/plugin@2.14.20
69
+
70
+ ## 2.14.19
71
+
72
+ ### Patch Changes
73
+
74
+ - Updated dependencies []:
75
+ - @atlaspack/plugin@2.14.19
76
+
77
+ ## 2.14.18
78
+
79
+ ### Patch Changes
80
+
81
+ - Updated dependencies []:
82
+ - @atlaspack/plugin@2.14.18
83
+
84
+ ## 2.14.17
85
+
86
+ ### Patch Changes
87
+
88
+ - Updated dependencies []:
89
+ - @atlaspack/plugin@2.14.17
90
+
91
+ ## 2.14.16
92
+
93
+ ### Patch Changes
94
+
95
+ - Updated dependencies []:
96
+ - @atlaspack/plugin@2.14.16
97
+
98
+ ## 2.14.15
99
+
100
+ ### Patch Changes
101
+
102
+ - Updated dependencies []:
103
+ - @atlaspack/plugin@2.14.15
104
+
105
+ ## 2.14.14
106
+
107
+ ### Patch Changes
108
+
109
+ - Updated dependencies []:
110
+ - @atlaspack/plugin@2.14.14
111
+
112
+ ## 2.14.13
113
+
114
+ ### Patch Changes
115
+
116
+ - Updated dependencies []:
117
+ - @atlaspack/plugin@2.14.13
118
+
119
+ ## 2.14.12
120
+
121
+ ### Patch Changes
122
+
123
+ - Updated dependencies []:
124
+ - @atlaspack/plugin@2.14.12
125
+
126
+ ## 2.14.11
127
+
128
+ ### Patch Changes
129
+
130
+ - Updated dependencies []:
131
+ - @atlaspack/plugin@2.14.11
132
+
133
+ ## 2.14.10
134
+
135
+ ### Patch Changes
136
+
137
+ - Updated dependencies []:
138
+ - @atlaspack/plugin@2.14.10
139
+
140
+ ## 2.14.9
141
+
142
+ ### Patch Changes
143
+
144
+ - Updated dependencies []:
145
+ - @atlaspack/plugin@2.14.9
146
+
147
+ ## 2.14.8
148
+
149
+ ### Patch Changes
150
+
151
+ - Updated dependencies []:
152
+ - @atlaspack/plugin@2.14.8
153
+
154
+ ## 2.14.7
155
+
156
+ ### Patch Changes
157
+
158
+ - Updated dependencies []:
159
+ - @atlaspack/plugin@2.14.7
160
+
3
161
  ## 2.14.6
4
162
 
5
163
  ### 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.17+a1773d2a6",
3
+ "version": "2.14.5-canary.171+f0349a6b9",
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.17+a1773d2a6",
19
- "@atlaspack/ts-utils": "2.14.1-canary.85+a1773d2a6",
19
+ "@atlaspack/plugin": "2.14.5-canary.171+f0349a6b9",
20
+ "@atlaspack/ts-utils": "2.14.1-canary.239+f0349a6b9",
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": "a1773d2a62d0ef7805ac7524621dcabcc1afe929"
30
+ "scripts": {
31
+ "check-ts": "tsc --emitDeclarationOnly --rootDir src",
32
+ "build:lib": "gulp build --gulpfile ../../../gulpfile.js --cwd ."
33
+ },
34
+ "gitHead": "f0349a6b9b04755088f121095ca6301a2ada3767"
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
+ }