Skip to content

Commit 9bc455b

Browse files
authored
docs: fixing typos (#6188)
1 parent 6ed3535 commit 9bc455b

File tree

11 files changed

+21
-21
lines changed

11 files changed

+21
-21
lines changed

DEPENDENCIES.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -777,7 +777,7 @@ graph LR;
777777
write-file-atomic-->signal-exit;
778778
```
779779

780-
## npm dependency heirarchy
780+
## npm dependency hierarchy
781781

782782
These are the groups of dependencies in npm that depend on each other.
783783
Each group depends on packages lower down the chain, nothing depends on

lib/commands/help.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const BaseCommand = require('../base-command.js')
1010

1111
// Strips out the number from foo.7 or foo.7. or foo.7.tgz
1212
// We don't currently compress our man pages but if we ever did this would
13-
// seemlessly continue supporting it
13+
// seamlessly continue supporting it
1414
const manNumberRegex = /\.(\d+)(\.[^/\\]*)?$/
1515
// Searches for the "npm-" prefix in page names, to prefer those.
1616
const manNpmPrefixRegex = /\/npm-/

lib/commands/link.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class Link extends ArboristWorkspaceCmd {
5252
{ code: 'ELINKGLOBAL' }
5353
)
5454
}
55-
// install-links is implicitely false when running `npm link`
55+
// install-links is implicitly false when running `npm link`
5656
this.npm.config.set('install-links', false)
5757

5858
// link with no args: symlink the folder to the global location

lib/utils/queryable.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const _append = Symbol('append')
44

55
const sqBracketsMatcher = str => str.match(/(.+)\[([^\]]+)\]\.?(.*)$/)
66

7-
// replaces any occurence of an empty-brackets (e.g: []) with a special
7+
// replaces any occurrence of an empty-brackets (e.g: []) with a special
88
// Symbol(append) to represent it, this is going to be useful for the setter
99
// method that will push values to the end of the array when finding these
1010
const replaceAppendSymbols = str => {
@@ -29,7 +29,7 @@ const parseKeys = key => {
2929
const preSqBracketPortion = index[1]
3030

3131
// we want to have a `new String` wrapper here in order to differentiate
32-
// between multiple occurences of the same string, e.g:
32+
// between multiple occurrences of the same string, e.g:
3333
// foo.bar[foo.bar] should split into { foo: { bar: { 'foo.bar': {} } }
3434
/* eslint-disable-next-line no-new-wrappers */
3535
const foundKey = new String(index[2])
@@ -41,7 +41,7 @@ const parseKeys = key => {
4141
sqBracketItems.add(foundKey)
4242

4343
// returns an array that contains either dot-separate items (that will
44-
// be splitted appart during the next step OR the fully parsed keys
44+
// be split apart during the next step OR the fully parsed keys
4545
// read from square brackets, e.g:
4646
// foo.bar[1.0.0].a.b -> ['foo.bar', '1.0.0', 'a.b']
4747
return [
@@ -142,7 +142,7 @@ const setter = ({ data, key, value, force }) => {
142142
const keys = parseKeys(key)
143143
const setKeys = (_data, _key) => {
144144
// handles array indexes, converting valid integers to numbers,
145-
// note that occurences of Symbol(append) will throw,
145+
// note that occurrences of Symbol(append) will throw,
146146
// so we just ignore these for now
147147
let maybeIndex = Number.NaN
148148
try {

lib/workspaces/update-workspaces.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ async function updateWorkspaces ({
2222
? false
2323
: config.get('save')
2424

25-
// runs a minimalistic reify update, targetting only the workspaces
25+
// runs a minimalistic reify update, targeting only the workspaces
2626
// that had version updates and skipping fund/audit/save
2727
const opts = {
2828
...flatOptions,

scripts/bundle-and-gitignore-deps.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ const getAllowedPaths = (files) => {
109109
if (use) {
110110
this.use()
111111
}
112-
// Allow a previously ignored directy
112+
// Allow a previously ignored directory
113113
// Important: this should NOT have a trailing
114114
// slash if we are not sure it is a directory.
115115
// Since a dep can be a directory or a symlink and

scripts/create-node-pr.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ const main = async (spec, branch = 'main', opts) => withTempDir(CWD, async (tmpD
247247
}
248248
}
249249

250-
log.info('Found exisiting PR', existingPr)
250+
log.info('Found existing PR', existingPr)
251251
log.info('Found PRs to close', closePrs)
252252

253253
const prBody = await getPrBody({ releases: npmReleases, closePrs })

scripts/dependency-graph.js

+7-7
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ const main = async function () {
8686
const tree = await arborist.loadVirtual({ path: CWD, name: 'npm' })
8787
tree.name = 'npm'
8888

89-
const [annotationsOurs, heirarchyOurs] = walk(tree, true)
89+
const [annotationsOurs, hierarchyOurs] = walk(tree, true)
9090
const [annotationsAll] = walk(tree, false)
9191

9292
const out = [
@@ -104,13 +104,13 @@ const main = async function () {
104104
...annotationsAll.sort(),
105105
'```',
106106
'',
107-
'## npm dependency heirarchy',
107+
'## npm dependency hierarchy',
108108
'',
109109
'These are the groups of dependencies in npm that depend on each other.',
110110
'Each group depends on packages lower down the chain, nothing depends on',
111111
'packages higher up the chain.',
112112
'',
113-
` - ${heirarchyOurs.reverse().join('\n - ')}`,
113+
` - ${hierarchyOurs.reverse().join('\n - ')}`,
114114
]
115115

116116
return fs.writeFile(join(CWD, 'DEPENDENCIES.md'), out.join('\n'))
@@ -124,7 +124,7 @@ const walk = function (tree, onlyOurs) {
124124

125125
const allDeps = new Set(Object.keys(dependedBy))
126126
const foundDeps = new Set()
127-
const heirarchy = []
127+
const hierarchy = []
128128

129129
if (onlyOurs) {
130130
while (allDeps.size) {
@@ -158,13 +158,13 @@ const walk = function (tree, onlyOurs) {
158158
throw new Error(`Would do an infinite loop here, need to debug. ${remaining}`)
159159
}
160160

161-
heirarchy.push(level.join(', '))
162-
log.silly('HIEARARCHY', heirarchy.length)
161+
hierarchy.push(level.join(', '))
162+
log.silly('HIERARCHY', hierarchy.length)
163163
log.silly('='.repeat(80))
164164
}
165165
}
166166

167-
return [annotations, heirarchy]
167+
return [annotations, hierarchy]
168168
}
169169

170170
const iterate = function (node, dependedBy, annotations, onlyOurs) {

scripts/util.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const fs = {
3030
}
3131

3232
// for spawn, allow a flat array of arguments where the
33-
// the last arg can optionall be an options object
33+
// the last arg can optionally be an options object
3434
const getArgs = (allArgs) => {
3535
let args = allArgs.flat().filter(Boolean)
3636
let opts = {}

workspaces/arborist/docs/workspace.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,13 @@ root `Node`
5252
- be aware it's a **Top-level workspace**
5353
- 4 Edges in edgesOut with type=workspace, referencing workspace children
5454
- that means we create a link node in root.children.get('app')
55-
targetting `./app` Node, etc.
55+
targeting `./app` Node, etc.
5656
- during buildIdeal:
5757
- need to know that app is in root's workspace
5858
- app.wsParent = root
5959
- root.wsChildren.add(app)
6060
- if any dep CAN be satisfied by a named dep in the workspace, then
61-
create a Link targetting that workspace child node
61+
create a Link targeting that workspace child node
6262
- resolving: _first_ check this.wsParent.get('dep-name'), and if
6363
that's ok, then resolve with a link to that target.
6464
- no hoisting by default: when doing `_canPlaceDep`, if target is

workspaces/arborist/test/node.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@ t.test('load with a virtual filesystem parent', t => {
533533

534534
t.equal(normalizePath(packages.path), normalizePath(root.realpath + '/link-target/packages'))
535535
t.equal(normalizePath(target3.path), normalizePath(root.realpath + '/link-target/packages/link3'))
536-
t.equal(link3.target, target3, 'still targetting the right node 4')
536+
t.equal(link3.target, target3, 'still targeting the right node 4')
537537
t.equal(target3.fsParent, packages, 'link3 target under packages')
538538
t.equal(normalizePath(link3.realpath), normalizePath(target3.path), 'link realpath updated')
539539

0 commit comments

Comments
 (0)