Skip to content

Commit f745e01

Browse files
committed
move _createBundledTree to private method
1 parent 982701f commit f745e01

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

workspaces/arborist/lib/arborist/index.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,8 @@ class Arborist extends Base {
100100
workspaces: options.workspaces || [],
101101
workspacesEnabled: options.workspacesEnabled !== false,
102102
}
103-
// TODO we only ever look at this.options.replaceRegistryHost, not
104-
// this.replaceRegistryHost. Defaulting needs to be written back to
105-
// this.options to work properly
103+
// TODO we only ever look at this.options.replaceRegistryHost, not this.replaceRegistryHost.
104+
// Defaulting needs to be written back to this.options to work properly
106105
this.replaceRegistryHost = this.options.replaceRegistryHost =
107106
(!this.options.replaceRegistryHost || this.options.replaceRegistryHost === 'npmjs') ?
108107
'registry.npmjs.org' : this.options.replaceRegistryHost

workspaces/arborist/lib/arborist/isolated-reifier.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
const _makeIdealGraph = Symbol('makeIdealGraph')
22
const _createIsolatedTree = Symbol.for('createIsolatedTree')
3-
const _createBundledTree = Symbol('createBundledTree')
43
const { mkdirSync } = require('node:fs')
54
const pacote = require('pacote')
65
const { join } = require('node:path')
@@ -162,7 +161,7 @@ module.exports = cls => class IsolatedReifier extends cls {
162161
result.hasInstallScript = node.hasInstallScript
163162
}
164163

165-
async [_createBundledTree] () {
164+
async #createBundledTree () {
166165
// TODO: make sure that idealTree object exists
167166
const idealTree = this.idealTree
168167
// TODO: test workspaces having bundled deps
@@ -217,7 +216,7 @@ module.exports = cls => class IsolatedReifier extends cls {
217216

218217
const proxiedIdealTree = this.idealGraph
219218

220-
const bundledTree = await this[_createBundledTree]()
219+
const bundledTree = await this.#createBundledTree()
221220

222221
const treeHash = (startNode) => {
223222
// generate short hash based on the dependency tree

0 commit comments

Comments
 (0)