@jcoreio/toolchain-esnext 3.2.1 → 3.2.2
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 +3 -3
- package/plugins/getConfigFiles.cjs +16 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jcoreio/toolchain-esnext",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.2",
|
|
4
4
|
"description": "ESNext JS build toolchain",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -32,10 +32,10 @@
|
|
|
32
32
|
"glob": "^7.2.0",
|
|
33
33
|
"resolve": "^1.22.2",
|
|
34
34
|
"resolve-bin": "^1.0.0",
|
|
35
|
-
"@jcoreio/toolchain": "3.2.
|
|
35
|
+
"@jcoreio/toolchain": "3.2.2"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
|
-
"@jcoreio/toolchain": "3.2.
|
|
38
|
+
"@jcoreio/toolchain": "3.2.2"
|
|
39
39
|
},
|
|
40
40
|
"toolchainManaged": {
|
|
41
41
|
"dependencies": {
|
|
@@ -1,16 +1,25 @@
|
|
|
1
1
|
const { name } = require('../package.json')
|
|
2
|
+
const confirmOutputEsm = require('@jcoreio/toolchain/scripts/migrate/confirmOutputEsm.cjs')
|
|
2
3
|
const dedent = require('dedent-js')
|
|
3
4
|
|
|
4
5
|
module.exports = [
|
|
5
6
|
async function getConfigFiles() {
|
|
6
7
|
return {
|
|
7
|
-
'toolchain.config.cjs':
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
'toolchain.config.cjs': async (existing) => {
|
|
9
|
+
if (existing) return existing
|
|
10
|
+
const outputEsm = await confirmOutputEsm()
|
|
11
|
+
return dedent`
|
|
12
|
+
/* eslint-env node, es2018 */
|
|
13
|
+
module.exports = {
|
|
14
|
+
cjsBabelEnv: { forceAllTransforms: true },
|
|
15
|
+
${
|
|
16
|
+
outputEsm
|
|
17
|
+
? `esmBabelEnv: { targets: { node: 16 } }`
|
|
18
|
+
: `outputEsm: false`
|
|
19
|
+
},
|
|
20
|
+
}
|
|
21
|
+
`
|
|
22
|
+
},
|
|
14
23
|
'.babelrc.cjs': dedent`
|
|
15
24
|
/* eslint-env node, es2018 */
|
|
16
25
|
module.exports = function (api) {
|