@atlaspack/transformer-typescript-types 2.12.1-dev.3443 → 2.12.1-dev.3478

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaspack/transformer-typescript-types",
3
- "version": "2.12.1-dev.3443+d1170cfc7",
3
+ "version": "2.12.1-dev.3478+5fd2da535",
4
4
  "license": "(MIT OR Apache-2.0)",
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
- "parcel": "^2.12.1-dev.3443+d1170cfc7"
16
+ "parcel": "^2.12.1-dev.3478+5fd2da535"
17
17
  },
18
18
  "dependencies": {
19
- "@atlaspack/diagnostic": "2.12.1-dev.3443+d1170cfc7",
20
- "@atlaspack/plugin": "2.12.1-dev.3443+d1170cfc7",
21
- "@atlaspack/ts-utils": "2.12.1-dev.3443+d1170cfc7",
22
- "@atlaspack/utils": "2.12.1-dev.3443+d1170cfc7",
19
+ "@atlaspack/diagnostic": "2.12.1-dev.3478+5fd2da535",
20
+ "@atlaspack/plugin": "2.12.1-dev.3478+5fd2da535",
21
+ "@atlaspack/ts-utils": "2.12.1-dev.3478+5fd2da535",
22
+ "@atlaspack/utils": "2.12.1-dev.3478+5fd2da535",
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": "d1170cfc79beb290b2a066f472f68f71f7d7cb23"
32
+ "gitHead": "5fd2da535ecbe096d57e03aec15e80bb1d7601f7"
33
33
  }
@@ -62,11 +62,11 @@ export default (new Transformer({
62
62
  let emitResult = program.emit(undefined, undefined, undefined, true, {
63
63
  afterDeclarations: [
64
64
  // 1. Build module graph
65
- context => sourceFile => {
65
+ (context) => (sourceFile) => {
66
66
  return collect(moduleGraph, context, sourceFile);
67
67
  },
68
68
  // 2. Tree shake and rename types
69
- context => sourceFile => {
69
+ (context) => (sourceFile) => {
70
70
  return shake(moduleGraph, context, sourceFile);
71
71
  },
72
72
  ],
@@ -93,7 +93,7 @@ export default (new Transformer({
93
93
  }
94
94
  }
95
95
 
96
- let parcelDiagnostics = deduplicatedDiagnostics.map(diagnostic => {
96
+ let parcelDiagnostics = deduplicatedDiagnostics.map((diagnostic) => {
97
97
  let filename = asset.filePath;
98
98
  let {file} = diagnostic;
99
99
 
@@ -167,7 +167,7 @@ export default (new Transformer({
167
167
  code = code.substring(0, code.lastIndexOf('//# sourceMappingURL'));
168
168
 
169
169
  let map = JSON.parse(nullthrows(host.outputMap));
170
- map.sources = map.sources.map(source =>
170
+ map.sources = map.sources.map((source) =>
171
171
  path.join(path.dirname(asset.filePath), source),
172
172
  );
173
173
 
package/src/collect.js CHANGED
@@ -115,7 +115,7 @@ export function collect(
115
115
 
116
116
  if (ts.isVariableStatement(node) && node.modifiers) {
117
117
  let isExported = node.modifiers.some(
118
- m => m.kind === ts.SyntaxKind.ExportKeyword,
118
+ (m) => m.kind === ts.SyntaxKind.ExportKeyword,
119
119
  );
120
120
  for (let v of node.declarationList.declarations) {
121
121
  currentModule.addLocal(v.name.text, v);
package/src/shake.js CHANGED
@@ -135,7 +135,7 @@ export function shake(
135
135
 
136
136
  // Remove original export modifiers
137
137
  node.modifiers = (node.modifiers || []).filter(
138
- m =>
138
+ (m) =>
139
139
  m.kind !== ts.SyntaxKind.ExportKeyword &&
140
140
  m.kind !== ts.SyntaxKind.DefaultKeyword,
141
141
  );
@@ -177,14 +177,14 @@ export function shake(
177
177
 
178
178
  // Remove original export modifiers
179
179
  node.modifiers = (node.modifiers || []).filter(
180
- m =>
180
+ (m) =>
181
181
  m.kind !== ts.SyntaxKind.ExportKeyword &&
182
182
  m.kind !== ts.SyntaxKind.DeclareKeyword,
183
183
  );
184
184
 
185
185
  // Add export modifier if all declarations are exported.
186
186
  let isExported = node.declarationList.declarations.every(
187
- d => exportedNames.get(d.name.text) === currentModule,
187
+ (d) => exportedNames.get(d.name.text) === currentModule,
188
188
  );
189
189
  if (isExported) {
190
190
  node.modifiers.unshift(
@@ -237,7 +237,7 @@ export function shake(
237
237
  if (ts.isPropertyDeclaration(node)) {
238
238
  let isPrivate =
239
239
  node.modifiers &&
240
- node.modifiers.some(m => m.kind === ts.SyntaxKind.PrivateKeyword);
240
+ node.modifiers.some((m) => m.kind === ts.SyntaxKind.PrivateKeyword);
241
241
  if (isPrivate) {
242
242
  return null;
243
243
  }
package/src/utils.js CHANGED
@@ -6,11 +6,11 @@ export function getExportedName(node: any): ?string {
6
6
  return null;
7
7
  }
8
8
 
9
- if (!node.modifiers.some(m => m.kind === ts.SyntaxKind.ExportKeyword)) {
9
+ if (!node.modifiers.some((m) => m.kind === ts.SyntaxKind.ExportKeyword)) {
10
10
  return null;
11
11
  }
12
12
 
13
- if (node.modifiers.some(m => m.kind === ts.SyntaxKind.DefaultKeyword)) {
13
+ if (node.modifiers.some((m) => m.kind === ts.SyntaxKind.DefaultKeyword)) {
14
14
  return 'default';
15
15
  }
16
16
 
package/src/wrappers.js CHANGED
@@ -19,7 +19,7 @@ type NamedExportBindings = any;
19
19
 
20
20
  const [majorVersion, minorVersion] = ts.versionMajorMinor
21
21
  .split('.')
22
- .map(num => parseInt(num, 10));
22
+ .map((num) => parseInt(num, 10));
23
23
 
24
24
  // Everything below was generated using https://github.com/mischnic/tsc-version-wrapper
25
25