@jcoreio/toolchain-flow 4.7.0 → 4.9.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,6 +1,6 @@
1
1
  {
2
2
  "name": "@jcoreio/toolchain-flow",
3
- "version": "4.7.0",
3
+ "version": "4.9.0",
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.7.0",
25
- "@jcoreio/toolchain-esnext": "4.7.0"
24
+ "@jcoreio/toolchain": "4.9.0",
25
+ "@jcoreio/toolchain-esnext": "4.9.0"
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 hasTSSourcesSync = require('@jcoreio/toolchain/util/hasTSSourcesSync.cjs')
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 (!hasTSSourcesSync()) {
12
- const jsFiles = await glob(Path.join('src', '**', '*.{js,cjs,mjs}'))
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'] : []),