Skip to content
This repository was archived by the owner on Jan 25, 2023. It is now read-only.

Commit 40f7d5c

Browse files
chore: fix capitalization and spelling of languages and package managers (#891)
yarn -> Yarn NPM -> npm PNPM -> pnpm modules -> packages ruby -> Ruby Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
1 parent 51d891f commit 40f7d5c

8 files changed

+65
-65
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ For further install instructions please visit the [official installation guide](
6868

6969
### Testing dynamic Versions
7070

71-
To test Golang or Node versions, which are dynamically downloaded via a script on startup we have a set of automated tests in [./tests](./tests). These are [bats](https://github.com/bats-core/bats-core) tests that we use to make assertions not only on the correct functioning of our bash/shell scripts, but also of the software provided by our Docker image. For an overview on how [bats works see here](https://bats-core.readthedocs.io/en/stable/).
71+
To test Golang or Node.js versions, which are dynamically downloaded via a script on startup we have a set of automated tests in [./tests](./tests). These are [bats](https://github.com/bats-core/bats-core) tests that we use to make assertions not only on the correct functioning of our bash/shell scripts, but also of the software provided by our Docker image. For an overview on how [bats works see here](https://bats-core.readthedocs.io/en/stable/).
7272

7373
To run those tests you can run the following command which will load the tests in the image and executes them.
7474

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -282,12 +282,12 @@ USER root
282282
#
283283
################################################################################
284284

285-
# this installer is needed for older node versions where no corepack is available
285+
# this installer is needed for older Node.js versions where Corepack isn't available
286286
RUN curl -o- -L https://yarnpkg.com/install.sh > /usr/local/bin/yarn-installer.sh
287287

288288
ENV NVM_VERSION=0.39.1
289289

290-
# Install node.js, yarn, grunt, bower
290+
# Install Node.js, Yarn, Grunt, Bower
291291
USER buildbot
292292
RUN git clone https://github.com/creationix/nvm.git ~/.nvm && \
293293
cd ~/.nvm && \
@@ -299,7 +299,7 @@ ENV PNPM_VERSION=7.13.4
299299

300300
ENV NETLIFY_NODE_VERSION="16"
301301

302-
# We install an "internal" yarn v1 executable to be used only for workspace detection. We can remove it once we have a better
302+
# We install an "internal" Yarn v1 executable to be used only for workspace detection. We can remove it once we have a better
303303
# strategy in place
304304
RUN /bin/bash -c ". ~/.nvm/nvm.sh && \
305305
nvm install --no-progress $NETLIFY_NODE_VERSION && \

focal.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -86,17 +86,17 @@ commandTests:
8686
- "-c"
8787
- |
8888
source /opt/buildhome/.nvm/nvm.sh
89-
echo "NVM: $(nvm --version)"
90-
echo "Node: $(node --version)"
89+
echo "nvm: $(nvm --version)"
90+
echo "Node.js: $(node --version)"
9191
echo "Yarn: $(yarn --version)"
92-
echo "NPM: $(npm --version)"
93-
echo "PNPM: $(pnpm --version)"
92+
echo "npm: $(npm --version)"
93+
echo "pnpm: $(pnpm --version)"
9494
expectedOutput:
95-
- "Node: v16.*.*"
96-
- "NVM: 0.39.1"
95+
- "Node.js: v16.*.*"
96+
- "nvm: 0.39.1"
9797
- "Yarn: 1.22.*"
98-
- "NPM: 8.*.*"
99-
- "PNPM: 7.*.*"
98+
- "npm: 8.*.*"
99+
- "pnpm: 7.*.*"
100100

101101
- name: hugo
102102
command: "hugo"

included_software.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ The specific patch versions included will depend on when the image was last buil
4747
* Yarn - `YARN_VERSION`
4848
* 1.22.19 (default)
4949
* Any version available via their installer.
50-
* NPM - `NPM_VERSION`
50+
* npm - `NPM_VERSION`
5151
* Version corresponding with Node.js version. (default)
52-
* Any version available via NPM.
53-
* bower
52+
* Any version available via npm.
53+
* Bower
5454
* Python
5555
* pip
5656
* Version corresponding with Python version. (default)

run-build-functions.sh

Lines changed: 46 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -163,13 +163,13 @@ run_yarn() {
163163
fi
164164

165165
if [ $(which yarn) ] && [ "$(yarn --version)" != "$yarn_version" ]; then
166-
echo "Found yarn version ($(yarn --version)) that doesn't match expected ($yarn_version)"
166+
echo "Found Yarn version ($(yarn --version)) that doesn't match expected ($yarn_version)"
167167
rm -rf $NETLIFY_CACHE_DIR/yarn $HOME/.yarn
168168
npm uninstall yarn -g
169169
fi
170170

171171
if ! [ $(which yarn) ]; then
172-
echo "Installing yarn at version $yarn_version"
172+
echo "Installing Yarn version $yarn_version"
173173
rm -rf $HOME/.yarn
174174
bash /usr/local/bin/yarn-installer.sh --version $yarn_version
175175
mv $HOME/.yarn $NETLIFY_CACHE_DIR/yarn
@@ -178,14 +178,14 @@ run_yarn() {
178178
else
179179
# if corepack is installed use it for changing the yarn version
180180
if [ "$(yarn --version)" != "$yarn_version" ]; then
181-
echo "Installing yarn at version $yarn_version"
181+
echo "Installing Yarn version $yarn_version"
182182
corepack prepare yarn@$yarn_version --activate
183183
fi
184184
fi
185185

186186
restore_node_modules "yarn"
187187

188-
echo "Installing NPM modules using Yarn version $(yarn --version)"
188+
echo "Installing npm packages using Yarn version $(yarn --version)"
189189

190190
# Remove the cache-folder flag if the user set any.
191191
# We want to control where to put the cache
@@ -197,7 +197,7 @@ run_yarn() {
197197

198198
if yarn install --cache-folder "$HOME/.yarn_cache" ${yarn_local:+$yarn_local}
199199
then
200-
echo "NPM modules installed using Yarn"
200+
echo "npm packages installed using Yarn"
201201
else
202202
echo "Error during Yarn install"
203203
exit 1
@@ -212,9 +212,9 @@ run_pnpm() {
212212
restore_home_cache ".pnpm-store" "pnpm cache"
213213

214214
if ! [ $(which corepack) ] || has_feature_flag "$featureFlags" "build-image-disable-node-corepack"; then
215-
echo "Error while installing PNPM $pnpm_version"
216-
echo "We cannot install the expected version of PNPM ($pnpm_version) as your required Node.js version $NODE_VERSION does not allow that"
217-
echo "Please ensure that you use at least Node Version 14.19.0 or greater than 16.9.0"
215+
echo "Error while installing pnpm $pnpm_version"
216+
echo "We cannot install the expected version of pnpm ($pnpm_version) as your required Node.js version $NODE_VERSION does not allow that"
217+
echo "Please ensure that you use at least Node.js version 14.19.0 or greater than 16.9.0"
218218

219219
exit 1
220220
fi
@@ -228,12 +228,12 @@ run_pnpm() {
228228

229229
restore_node_modules "pnpm"
230230

231-
echo "Installing NPM modules using PNPM version $(pnpm --version)"
231+
echo "Installing npm packages using pnpm version $(pnpm --version)"
232232
if pnpm install ${PNPM_FLAGS:+$PNPM_FLAGS}
233233
then
234-
echo "NPM modules installed using PNPM"
234+
echo "npm packages installed using pnpm"
235235
else
236-
echo "Error during PNPM install"
236+
echo "Error during pnpm install"
237237
exit 1
238238
fi
239239

@@ -249,12 +249,12 @@ run_npm() {
249249
if [ "$(npm --version)" != "$NPM_VERSION" ]
250250
then
251251
echo "Found npm version ($(npm --version)) that doesn't match expected ($NPM_VERSION)"
252-
echo "Installing npm at version $NPM_VERSION"
252+
echo "Installing npm version $NPM_VERSION"
253253
if npm install -g npm@$NPM_VERSION
254254
then
255-
echo "NPM installed successfully"
255+
echo "npm installed successfully"
256256
else
257-
echo "Error installing NPM"
257+
echo "Error installing npm"
258258
exit 1
259259
fi
260260
fi
@@ -263,24 +263,24 @@ run_npm() {
263263
if has_feature_flag "$featureFlags" "buildbot_bypass_module_cache"
264264
then
265265
echo "Bypassing sha validation. Running pre & post install scripts"
266-
echo "Installing NPM modules using NPM version $(npm --version)"
266+
echo "Installing npm packages using npm version $(npm --version)"
267267
if npm install ${NPM_FLAGS:+"$NPM_FLAGS"}
268268
then
269-
echo "NPM modules installed"
269+
echo "npm packages installed"
270270
else
271-
echo "Error during NPM install"
271+
echo "Error during npm install"
272272
exit 1
273273
fi
274274
else
275275
if install_deps package.json $NODE_VERSION $NETLIFY_CACHE_DIR/package-sha
276276
then
277-
echo "Installing NPM modules using NPM version $(npm --version)"
277+
echo "Installing npm packages using npm version $(npm --version)"
278278

279279
if npm install ${NPM_FLAGS:+$NPM_FLAGS}
280280
then
281-
echo "NPM modules installed"
281+
echo "npm packages installed"
282282
else
283-
echo "Error during NPM install"
283+
echo "Error during npm install"
284284
exit 1
285285
fi
286286

@@ -302,11 +302,11 @@ install_node() {
302302
# restore only non-existing cached versions
303303
if [[ $(ls $NETLIFY_CACHE_DIR/node_version/) ]]
304304
then
305-
echo "Started restoring cached node version"
305+
echo "Started restoring cached Node.js version"
306306
rm -rf "$NVM_DIR/versions/node"
307307
mkdir "$NVM_DIR/versions/node"
308308
cp -p -r $NETLIFY_CACHE_DIR/node_version/* $NVM_DIR/versions/node/
309-
echo "Finished restoring cached node version"
309+
echo "Finished restoring cached Node.js version"
310310
fi
311311

312312
if [ -f ".nvmrc" ]
@@ -329,13 +329,13 @@ install_node() {
329329
env
330330
fi
331331
else
332-
echo "Failed to install node version '$NODE_VERSION'"
332+
echo "Failed to install Node.js version '$NODE_VERSION'"
333333
exit 1
334334
fi
335335

336336
# if Node.js Corepack is available enable it
337337
if [ $(which corepack) ] && ! has_feature_flag "$featureFlags" "build-image-disable-node-corepack"; then
338-
echo "Enabling node corepack"
338+
echo "Enabling Node.js Corepack"
339339
corepack enable
340340
fi
341341

@@ -362,7 +362,7 @@ check_python_version() {
362362
read_node_version_file() {
363363
local nodeVersionFile="$1"
364364
NODE_VERSION="$(cat "$nodeVersionFile")"
365-
echo "Attempting node version '$NODE_VERSION' from $nodeVersionFile"
365+
echo "Attempting Node.js version '$NODE_VERSION' from $nodeVersionFile"
366366
}
367367

368368
install_dependencies() {
@@ -389,7 +389,7 @@ install_dependencies() {
389389
check_python_version "the PYTHON_VERSION environment variable"
390390
fi
391391

392-
# Node version
392+
# Node.js version
393393
install_node "$defaultNodeVersion" "$featureFlags"
394394

395395
# Automatically installed Build plugins
@@ -411,9 +411,9 @@ install_dependencies() {
411411
if [ -f .ruby-version ]
412412
then
413413
druby=$(cat .ruby-version)
414-
echo "Attempting ruby version ${druby}, read from .ruby-version file"
414+
echo "Attempting Ruby version ${druby}, read from .ruby-version file"
415415
else
416-
echo "Attempting ruby version ${druby}, read from environment"
416+
echo "Attempting Ruby version ${druby}, read from environment"
417417
fi
418418

419419
rvm use ${druby} > /dev/null 2>&1
@@ -423,29 +423,29 @@ install_dependencies() {
423423
local fulldruby="ruby-${druby}"
424424
if [ -d $NETLIFY_CACHE_DIR/ruby_version/${fulldruby} ] && [ -d $NETLIFY_CACHE_DIR/ruby_version_gems/${fulldruby} ]
425425
then
426-
echo "Started restoring cached ruby version"
426+
echo "Started restoring cached Ruby version"
427427
rm -rf $RVM_DIR/rubies/${fulldruby}
428428
cp -p -r $NETLIFY_CACHE_DIR/ruby_version/${fulldruby} $RVM_DIR/rubies/
429429

430430
rm -rf $RVM_DIR/gems/${fulldruby}
431431
cp -p -r $NETLIFY_CACHE_DIR/ruby_version_gems/${fulldruby} $RVM_DIR/gems/
432-
echo "Finished restoring cached ruby version"
432+
echo "Finished restoring cached Ruby version"
433433
fi
434434

435435
rvm --create use ${druby} > /dev/null 2>&1
436436
if [ $? -eq 0 ]
437437
then
438438
local crv=$(rvm current)
439439
export RUBY_VERSION=${crv#ruby-}
440-
echo "Using ruby version ${RUBY_VERSION}"
440+
echo "Using Ruby version ${RUBY_VERSION}"
441441
else
442442
if rvm_install_on_use_flag=1 rvm --quiet-curl --create use ${druby}
443443
then
444444
local crv=$(rvm current)
445445
export RUBY_VERSION=${crv#ruby-}
446-
echo "Using ruby version ${RUBY_VERSION}"
446+
echo "Using Ruby version ${RUBY_VERSION}"
447447
else
448-
echo "Failed to install ruby version '${druby}'"
448+
echo "Failed to install Ruby version '${druby}'"
449449
exit 1
450450
fi
451451
fi
@@ -459,7 +459,7 @@ install_dependencies() {
459459

460460
if ! [ -z "$bundler_version" ]
461461
then
462-
echo "Using bundler version $bundler_version from Gemfile.lock"
462+
echo "Using Bundler version $bundler_version from Gemfile.lock"
463463
fi
464464

465465
if ! gem list -i "^bundler$" -v "$bundler_version" > /dev/null 2>&1
@@ -473,7 +473,7 @@ install_dependencies() {
473473
fi
474474
if ! gem install "$bundler_gem_name" --no-document
475475
then
476-
echo "Error installing bundler"
476+
echo "Error installing Bundler"
477477
exit 1
478478
fi
479479
fi
@@ -595,11 +595,11 @@ install_dependencies() {
595595
# SPM dependencies
596596
if [ -f Package.swift ]
597597
then
598-
echo "Building Swift Package"
598+
echo "Building Swift package"
599599
restore_cwd_cache ".build" "swift build"
600600
if swift build
601601
then
602-
echo "Swift package Built"
602+
echo "Swift package built"
603603
else
604604
echo "Error building Swift package"
605605
exit 1
@@ -615,7 +615,7 @@ install_dependencies() {
615615
brew bundle
616616
fi
617617

618-
# NPM Dependencies
618+
# npm Dependencies
619619
: ${YARN_VERSION="$defaultYarnVersion"}
620620
: ${PNPM_VERSION="$defaultPnpmVersion"}
621621
: ${CYPRESS_CACHE_FOLDER="./node_modules/.cache/CypressBinary"}
@@ -659,21 +659,21 @@ install_dependencies() {
659659
then
660660
if [ "$NETLIFY_USE_YARN" = "true" ] || ([ "$NETLIFY_USE_YARN" != "false" ] && [ -f yarn.lock ])
661661
then
662-
echo "Installing bower with Yarn"
662+
echo "Installing Bower with Yarn"
663663
yarn add bower
664664
else
665-
echo "Installing bower with NPM"
665+
echo "Installing Bower with npm"
666666
npm install bower
667667
fi
668668
export PATH=$(npm bin):$PATH
669669
fi
670670
restore_cwd_cache bower_components "bower components"
671-
echo "Installing bower components"
671+
echo "Installing Bower packages"
672672
if bower install --config.interactive=false
673673
then
674-
echo "Bower components installed"
674+
echo "Bower packages installed"
675675
else
676-
echo "Error installing bower components"
676+
echo "Error installing Bower packages"
677677
exit 1
678678
fi
679679
fi
@@ -834,23 +834,23 @@ cache_artifacts() {
834834
chmod -R +rw $HOME/.gimme_cache
835835
cache_home_directory ".gimme_cache" "go dependencies"
836836

837-
# cache the version of node installed
837+
# cache the version of Node.js installed
838838
if ! [ -d $NETLIFY_CACHE_DIR/node_version/$NODE_VERSION ]
839839
then
840840
rm -rf $NETLIFY_CACHE_DIR/node_version
841841
mkdir $NETLIFY_CACHE_DIR/node_version
842842
mv $NVM_DIR/versions/node/* $NETLIFY_CACHE_DIR/node_version/
843843
fi
844844

845-
# cache the version of ruby installed
845+
# cache the version of Ruby installed
846846
if [[ "$CUSTOM_RUBY" -ne "0" ]]
847847
then
848848
if ! [ -d $NETLIFY_CACHE_DIR/ruby_version/ruby-$RUBY_VERSION ] || ! [ -d $NETLIFY_CACHE_DIR/ruby_version_gems/ruby-$RUBY_VERSION ]
849849
then
850850
rm -rf $NETLIFY_CACHE_DIR/ruby_version
851851
mkdir $NETLIFY_CACHE_DIR/ruby_version
852852
mv $RVM_DIR/rubies/ruby-$RUBY_VERSION $NETLIFY_CACHE_DIR/ruby_version/
853-
echo "Cached ruby version $RUBY_VERSION"
853+
echo "Cached Ruby version $RUBY_VERSION"
854854

855855
rm -rf $NETLIFY_CACHE_DIR/ruby_version_gems
856856
mkdir $NETLIFY_CACHE_DIR/ruby_version_gems

tests/node/bypass_cache.bats

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ teardown() {
2323

2424
@test 'bypass_cache run pre and post install scripts' {
2525
run run_npm "buildbot_bypass_module_cache"
26-
assert_output --partial "NPM modules installed"
26+
assert_output --partial "npm packages installed"
2727
refute_output --partial "Creating package sha"
2828
}
2929

0 commit comments

Comments
 (0)