@jcoreio/toolchain 4.5.7 → 4.6.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/package.json
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
const once = require('../../util/once.cjs')
|
|
2
2
|
const confirm = require('../../util/confirm.cjs')
|
|
3
|
-
const {
|
|
3
|
+
const {
|
|
4
|
+
toolchainConfig,
|
|
5
|
+
toolchainConfigDeclared,
|
|
6
|
+
} = require('../../util/findUps.cjs')
|
|
4
7
|
|
|
5
8
|
module.exports = once(async () => {
|
|
6
|
-
if (toolchainConfig) {
|
|
9
|
+
if (toolchainConfig && toolchainConfigDeclared) {
|
|
7
10
|
if (typeof toolchainConfig.outputEsm === 'boolean') {
|
|
8
11
|
return toolchainConfig.outputEsm
|
|
9
12
|
}
|
|
10
|
-
|
|
11
|
-
return toolchainConfig.esmBabelEnv != null
|
|
12
|
-
}
|
|
13
|
+
return toolchainConfig.esmBabelEnv != null
|
|
13
14
|
}
|
|
14
15
|
return await confirm({
|
|
15
16
|
type: 'confirm',
|
package/util/configSchema.cjs
CHANGED
|
@@ -5,6 +5,25 @@ module.exports = z.object({
|
|
|
5
5
|
esmBabelEnv: z.record(z.unknown()).optional(),
|
|
6
6
|
esWrapper: z.boolean().optional(),
|
|
7
7
|
outputEsm: z.boolean().optional(),
|
|
8
|
+
sourceMaps: z
|
|
9
|
+
.union([
|
|
10
|
+
/**
|
|
11
|
+
* Will output source maps as separate .map files on disk
|
|
12
|
+
*/
|
|
13
|
+
z.boolean(),
|
|
14
|
+
z.enum([
|
|
15
|
+
/**
|
|
16
|
+
* Will output inline source maps in transpiled code
|
|
17
|
+
* (except for TypeScript declaration maps, which can only be separate files)
|
|
18
|
+
*/
|
|
19
|
+
'inline',
|
|
20
|
+
/**
|
|
21
|
+
* Will output both .map files and inline source maps
|
|
22
|
+
*/
|
|
23
|
+
'both',
|
|
24
|
+
]),
|
|
25
|
+
])
|
|
26
|
+
.default(true),
|
|
8
27
|
scripts: z
|
|
9
28
|
.record(
|
|
10
29
|
z.union([
|