jsii 5.9.50 → 5.9.52-dev.0
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 +9 -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 -2
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
|
@@ -85,9 +85,9 @@ class Assembler {
|
|
|
85
85
|
// If out-of-source build was configured (tsc's outDir and rootDir), the
|
|
86
86
|
// main file's path needs to be re-rooted from the outDir into the rootDir.
|
|
87
87
|
// outDir might be also be absolute, so we need to normalize it.
|
|
88
|
-
|
|
89
|
-
if (tscOutDir != null) {
|
|
90
|
-
mainFile = path.relative(tscOutDir, mainFile);
|
|
88
|
+
this.tscOutDir = (0, helpers_1.normalizeConfigPath)(projectInfo.projectRoot, program.getCompilerOptions().outDir);
|
|
89
|
+
if (this.tscOutDir != null) {
|
|
90
|
+
mainFile = path.relative(this.tscOutDir, mainFile);
|
|
91
91
|
// rootDir may be set explicitly or not. If not, inferRootDir replicates
|
|
92
92
|
// tsc's behavior of using the longest prefix of all built source files.
|
|
93
93
|
// rootDir might also be absolute (just like outDir), so we normalize it
|
|
@@ -182,9 +182,13 @@ class Assembler {
|
|
|
182
182
|
targets: this.projectInfo.targets,
|
|
183
183
|
metadata: {
|
|
184
184
|
...this.projectInfo.metadata,
|
|
185
|
-
// Downstream consumers need
|
|
186
|
-
// symbolId in the rootDir.
|
|
185
|
+
// Downstream consumers need these to map a symbolId in the outDir to a
|
|
186
|
+
// symbolId in the rootDir. They cannot always be recovered from the
|
|
187
|
+
// consumed package's `package.json` (e.g. when the package was built
|
|
188
|
+
// with a user-provided `tsconfig.json` via `jsii.tsconfig`), so they
|
|
189
|
+
// must be recorded in the assembly itself.
|
|
187
190
|
tscRootDir: this.tscRootDir,
|
|
191
|
+
tscOutDir: this.tscOutDir,
|
|
188
192
|
},
|
|
189
193
|
docs,
|
|
190
194
|
readme,
|