jsii 6.0.8-dev.0 → 6.0.9
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/assembler.d.ts +1 -0
- package/lib/assembler.js +10 -5
- package/lib/assembler.js.map +1 -1
- package/lib/common/symbol-id.js +1 -1
- package/lib/common/symbol-id.js.map +1 -1
- package/lib/version.d.ts +2 -2
- package/lib/version.js +2 -2
- package/lib/version.js.map +1 -1
- package/package.json +3 -4
package/lib/assembler.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ export declare class Assembler implements Emitter {
|
|
|
14
14
|
private readonly warningsInjector?;
|
|
15
15
|
private readonly mainFile;
|
|
16
16
|
private readonly tscRootDir?;
|
|
17
|
+
private readonly tscOutDir?;
|
|
17
18
|
private readonly compressAssembly?;
|
|
18
19
|
private readonly usedFeatures;
|
|
19
20
|
private readonly _typeChecker;
|
package/lib/assembler.js
CHANGED
|
@@ -83,6 +83,7 @@ class Assembler {
|
|
|
83
83
|
warningsInjector;
|
|
84
84
|
mainFile;
|
|
85
85
|
tscRootDir;
|
|
86
|
+
tscOutDir;
|
|
86
87
|
compressAssembly;
|
|
87
88
|
usedFeatures = new Set();
|
|
88
89
|
_typeChecker;
|
|
@@ -132,9 +133,9 @@ class Assembler {
|
|
|
132
133
|
// If out-of-source build was configured (tsc's outDir and rootDir), the
|
|
133
134
|
// main file's path needs to be re-rooted from the outDir into the rootDir.
|
|
134
135
|
// outDir might be also be absolute, so we need to normalize it.
|
|
135
|
-
|
|
136
|
-
if (tscOutDir != null) {
|
|
137
|
-
mainFile = path.relative(tscOutDir, mainFile);
|
|
136
|
+
this.tscOutDir = (0, helpers_1.normalizeConfigPath)(projectInfo.projectRoot, program.getCompilerOptions().outDir);
|
|
137
|
+
if (this.tscOutDir != null) {
|
|
138
|
+
mainFile = path.relative(this.tscOutDir, mainFile);
|
|
138
139
|
// rootDir may be set explicitly or not. If not, inferRootDir replicates
|
|
139
140
|
// tsc's behavior of using the longest prefix of all built source files.
|
|
140
141
|
// rootDir might also be absolute (just like outDir), so we normalize it
|
|
@@ -229,9 +230,13 @@ class Assembler {
|
|
|
229
230
|
targets: this.projectInfo.targets,
|
|
230
231
|
metadata: {
|
|
231
232
|
...this.projectInfo.metadata,
|
|
232
|
-
// Downstream consumers need
|
|
233
|
-
// symbolId in the rootDir.
|
|
233
|
+
// Downstream consumers need these to map a symbolId in the outDir to a
|
|
234
|
+
// symbolId in the rootDir. They cannot always be recovered from the
|
|
235
|
+
// consumed package's `package.json` (e.g. when the package was built
|
|
236
|
+
// with a user-provided `tsconfig.json` via `jsii.tsconfig`), so they
|
|
237
|
+
// must be recorded in the assembly itself.
|
|
234
238
|
tscRootDir: this.tscRootDir,
|
|
239
|
+
tscOutDir: this.tscOutDir,
|
|
235
240
|
},
|
|
236
241
|
docs,
|
|
237
242
|
readme,
|