Skip to content

Commit

Permalink
Remove npm depency
Browse files Browse the repository at this point in the history
Rely exclusively on `yarn`.
  • Loading branch information
esanzgar committed Nov 2, 2020
1 parent 0e74bb6 commit ef28894
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 7 deletions.
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ RUN apk update && apk add --no-cache \
git \
make \
nodejs \
npm \
yarn

# Do not download a Chrome build as part of installing the "puppeteer" package,
Expand Down
6 changes: 1 addition & 5 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -189,11 +189,7 @@ stage('Publish') {
"""
sh "scripts/create-github-release.js"

// Publish the updated package to the npm registry.
// Use `npm` rather than `yarn` for publishing.
// See https://github.com/yarnpkg/yarn/pull/3391.
sh "echo '//registry.npmjs.org/:_authToken=${env.NPM_TOKEN}' >> \$HOME/.npmrc"
sh "npm publish --tag ${npmTag}"
sh "NPM_TOKEN=${env.NPM_TOKEN} yarn publish --no-interactive --tag ${npmTag} --new-version=${newPkgVersion}"
sh "scripts/wait-for-npm-release.sh ${npmTag}"

// Deploy the client to cdn.hypothes.is, where the embedded
Expand Down
2 changes: 1 addition & 1 deletion scripts/wait-for-npm-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ fi
expected_version=$(node -p "require('./package.json').version")
while [ true ]
do
released_version=$(npm show hypothesis dist-tags.$dist_tag)
released_version=$(yarn info -s hypothesis dist-tags.$dist_tag)
if [ "$released_version" = "$expected_version" ]; then
break
fi
Expand Down

0 comments on commit ef28894

Please sign in to comment.