@jcoreio/toolchain-flow 4.8.0 → 4.9.1
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/build.cjs +8 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jcoreio/toolchain-flow",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.9.1",
|
|
4
4
|
"description": "Flow JS build toolchain",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
"dedent-js": "^1.0.1",
|
|
22
22
|
"eslint": "^8.56.0",
|
|
23
23
|
"eslint-plugin-flowtype": "^8.0.3",
|
|
24
|
-
"@jcoreio/toolchain": "4.
|
|
25
|
-
"@jcoreio/toolchain-esnext": "4.
|
|
24
|
+
"@jcoreio/toolchain": "4.9.1",
|
|
25
|
+
"@jcoreio/toolchain-esnext": "4.9.1"
|
|
26
26
|
},
|
|
27
27
|
"toolchainManaged": {
|
|
28
28
|
"devDependencies": {
|
package/plugins/build.cjs
CHANGED
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
const Path = require('path')
|
|
2
|
-
const glob = require('@jcoreio/toolchain/util/glob.cjs')
|
|
2
|
+
const { glob } = require('@jcoreio/toolchain/util/glob.cjs')
|
|
3
3
|
const fs = require('@jcoreio/toolchain/util/projectFs.cjs')
|
|
4
|
-
const
|
|
4
|
+
const hasTSSources = require('@jcoreio/toolchain/util/hasTSSources.cjs')
|
|
5
5
|
const resolveImportsCodemod = require('@jcoreio/toolchain-esnext/util/resolveImportsCodemod.cjs')
|
|
6
6
|
const { toolchainConfig } = require('@jcoreio/toolchain/util/findUps.cjs')
|
|
7
|
+
const buildGlobOpts = require('@jcoreio/toolchain/util/buildGlobOpts.cjs')
|
|
7
8
|
|
|
8
9
|
module.exports = [
|
|
9
10
|
[
|
|
10
11
|
async function build(args = []) {
|
|
11
|
-
if (!
|
|
12
|
-
const jsFiles = await glob(
|
|
12
|
+
if (!(await hasTSSources())) {
|
|
13
|
+
const jsFiles = await glob(
|
|
14
|
+
Path.join('src', '**', '*.{js,cjs,mjs}'),
|
|
15
|
+
buildGlobOpts
|
|
16
|
+
)
|
|
13
17
|
for (const ext of [
|
|
14
18
|
'.js.flow',
|
|
15
19
|
...(toolchainConfig.outputEsm !== false ? ['.mjs.flow'] : []),
|