@jcoreio/toolchain 5.10.0 → 5.10.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
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
const {
|
|
1
|
+
const { gt } = require('semver')
|
|
2
2
|
|
|
3
3
|
async function migrateEslintEnvComments({ fromVersion }) {
|
|
4
4
|
// istanbul ignore next
|
|
5
|
-
if (fromVersion &&
|
|
5
|
+
if (fromVersion && gt(fromVersion, '5.10.2')) {
|
|
6
6
|
return
|
|
7
7
|
}
|
|
8
8
|
|
|
@@ -18,7 +18,9 @@ async function migrateEslintEnvComments({ fromVersion }) {
|
|
|
18
18
|
/** env name -> array of paths from proj root to file */
|
|
19
19
|
const envFileMap = new Map()
|
|
20
20
|
const warnings = {}
|
|
21
|
-
for (const file of await glob('**/*.{js,jsx,cjs,mjs,ts,cts,mts,tsx}'
|
|
21
|
+
for (const file of await glob('**/*.{js,jsx,cjs,mjs,ts,cts,mts,tsx}', {
|
|
22
|
+
dot: true,
|
|
23
|
+
})) {
|
|
22
24
|
function warn(warning) {
|
|
23
25
|
;(warnings[file] || (warnings[file] = [])).push(warning)
|
|
24
26
|
}
|
|
@@ -75,7 +75,7 @@ const babelParseOpts = {
|
|
|
75
75
|
'decorators-legacy',
|
|
76
76
|
],
|
|
77
77
|
},
|
|
78
|
-
|
|
78
|
+
'd.ts': {
|
|
79
79
|
sourceType: 'unambiguous',
|
|
80
80
|
allowImportExportEverywhere: true,
|
|
81
81
|
allowReturnOutsideFunction: true,
|
|
@@ -106,7 +106,7 @@ const babelParseOpts = {
|
|
|
106
106
|
startLine: 1,
|
|
107
107
|
plugins: [...commonPlugins, 'typescript', 'decorators-legacy'],
|
|
108
108
|
},
|
|
109
|
-
|
|
109
|
+
'd.cts': {
|
|
110
110
|
sourceType: 'commonjs',
|
|
111
111
|
allowReturnOutsideFunction: true,
|
|
112
112
|
startLine: 1,
|
|
@@ -128,7 +128,7 @@ const babelParseOpts = {
|
|
|
128
128
|
'decorators-legacy',
|
|
129
129
|
],
|
|
130
130
|
},
|
|
131
|
-
|
|
131
|
+
'd.mts': {
|
|
132
132
|
sourceType: 'module',
|
|
133
133
|
allowImportExportEverywhere: true,
|
|
134
134
|
allowReturnOutsideFunction: true,
|
|
@@ -143,8 +143,8 @@ const babelParseOpts = {
|
|
|
143
143
|
}
|
|
144
144
|
|
|
145
145
|
function getBabelParseOpts(file) {
|
|
146
|
-
const match = /\.(js|cjs|mjs|jsx|(d\.)?(ts|cts|mts
|
|
147
|
-
const ext = (match ? match[
|
|
146
|
+
const match = /\.(js|cjs|mjs|jsx|tsx|(d\.)?(ts|cts|mts))$/i.exec(file)
|
|
147
|
+
const ext = (match ? match[1] : undefined) || 'js'
|
|
148
148
|
return babelParseOpts[ext]
|
|
149
149
|
}
|
|
150
150
|
|