@jcoreio/toolchain 5.0.1 → 5.0.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/util/findUps.cjs +17 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jcoreio/toolchain",
3
- "version": "5.0.1",
3
+ "version": "5.0.2",
4
4
  "description": "base JS build toolchain",
5
5
  "repository": {
6
6
  "type": "git",
package/util/findUps.cjs CHANGED
@@ -91,14 +91,28 @@ const toolchainPackages = (exports.toolchainPackages = [
91
91
  ...Object.keys(packageJson.devDependencies || {}),
92
92
  ].filter((dep) => dep.startsWith(name)))
93
93
 
94
+ const isToolchainDev = Path.normalize(__dirname)
95
+ .replace(/\\/, '/')
96
+ .endsWith('packages/base/util')
97
+
94
98
  const toolchainPackageJsons = (exports.toolchainPackageJsons = {})
95
99
  for (const pkg of toolchainPackages) {
96
100
  toolchainPackageJsons[pkg] =
97
101
  pkg === packageJson.name
98
102
  ? packageJson
99
- : require(require.resolve(`${pkg}/package.json`, {
100
- paths: [projectDir],
101
- }))
103
+ : require(isToolchainDev
104
+ ? Path.resolve(
105
+ __dirname,
106
+ '..',
107
+ '..',
108
+ pkg === '@jcoreio/toolchain'
109
+ ? 'base'
110
+ : pkg.replace('@jcoreio/toolchain-', ''),
111
+ 'package.json'
112
+ )
113
+ : require.resolve(`${pkg}/package.json`, {
114
+ paths: [projectDir],
115
+ }))
102
116
  }
103
117
 
104
118
  let toolchainConfigFile