@jcoreio/toolchain 5.3.2 → 5.3.3

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",
3
- "version": "5.3.2",
3
+ "version": "5.3.3",
4
4
  "description": "base JS build toolchain",
5
5
  "repository": {
6
6
  "type": "git",
@@ -5,9 +5,12 @@ const chalk = require('chalk')
5
5
  const getPluginsObjectSync = require('../util/getPluginsObjectSync.cjs')
6
6
  const execa = require('../util/execa.cjs')
7
7
 
8
- let toolchainConfig, isMonorepoRoot
8
+ let toolchainConfig,
9
+ isMonorepoRoot,
10
+ foundProject = false
9
11
  try {
10
12
  ;({ toolchainConfig, isMonorepoRoot } = require('../util/findUps.cjs'))
13
+ foundProject = true
11
14
  } catch (error) {
12
15
  if (!error.message.startsWith('failed to find project package.json')) {
13
16
  throw error
@@ -39,7 +42,9 @@ const scripts =
39
42
  },
40
43
  'install-git-hooks': require('./install-git-hooks.cjs'),
41
44
  'install-optional-deps': require('./install-optional-deps.cjs'),
42
- ...(isMonorepoRoot ? { create: require('./create.cjs') } : {}),
45
+ ...(isMonorepoRoot || !foundProject ?
46
+ { create: require('./create.cjs') }
47
+ : {}),
43
48
  ...getPluginsObjectSync('scripts'),
44
49
  ...Object.fromEntries(
45
50
  Object.entries(toolchainConfig.scripts || {}).map(([name, script]) => [