Skip to content

Commit

Permalink
chore: 👷 remove use of legacy peer dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
gingerbenw committed Oct 2, 2024
1 parent 81a2e90 commit 398e3e6
Show file tree
Hide file tree
Showing 26 changed files with 100 additions and 47 deletions.
1 change: 0 additions & 1 deletion .npmrc

This file was deleted.

2 changes: 0 additions & 2 deletions bin/local-test-util
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ async function installNotifiers (notifier) {
`install`,
`--no-package-lock`,
`--no-save`,
`--legacy-peer-deps`
].concat(notifier
? [
`../../../../bugsnag-${notifier}-${require(`../packages/${notifier}/package.json`).version}.tgz`
Expand All @@ -156,7 +155,6 @@ async function installNgNotifier (notifier) {
`install`,
`--no-package-lock`,
`--no-save`,
`--legacy-peer-deps`,
`../../../../../../bugsnag-browser-${require('../packages/browser/package.json').version}.tgz`,
`../../../../../../bugsnag-js-${require('../packages/js/package.json').version}.tgz`,
`../../../../../../bugsnag-node-${require('../packages/node/package.json').version}.tgz`,
Expand Down
8 changes: 4 additions & 4 deletions dockerfiles/Dockerfile.browser
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ ADD min_packages.tar .
COPY bin ./bin
COPY packages ./packages

RUN npm install --legacy-peer-deps
RUN npm install
RUN npm run build

RUN npm pack --verbose packages/js/
Expand All @@ -24,14 +24,14 @@ RUN npm pack --verbose packages/web-worker/

COPY test/browser/features test/browser/features
WORKDIR /app/test/browser/features/fixtures
RUN npm install --no-package-lock --no-save --legacy-peer-deps \
RUN npm install --no-package-lock --no-save \
../../../../bugsnag-browser-*.tgz \
../../../../bugsnag-plugin-react-*.tgz \
../../../../bugsnag-plugin-vue-*.tgz \
../../../../bugsnag-web-worker-*.tgz

WORKDIR plugin_angular/ng
RUN npm install --no-package-lock --no-save --legacy-peer-deps \
RUN npm install --no-package-lock --no-save \
../../../../../../bugsnag-plugin-angular-*.tgz \
../../../../../../bugsnag-node-*.tgz \
../../../../../../bugsnag-browser-*.tgz \
Expand All @@ -40,7 +40,7 @@ RUN npm install --no-package-lock --no-save --legacy-peer-deps \
# install the dependencies and build each fixture
WORKDIR /app/test/browser/features/fixtures
RUN find . -name package.json -type f -mindepth 2 -maxdepth 3 ! -path "./node_modules/*" | \
xargs -I % bash -c 'cd `dirname %` && npm install --no-package-lock --legacy-peer-deps && npm run build'
xargs -I % bash -c 'cd `dirname %` && npm install --no-package-lock && npm run build'

# once the fixtures are built we no longer need node_modules and
# it makes the COPY later on much faster if we don't have them
Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/Dockerfile.ci
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ COPY scripts ./scripts
COPY test ./test
COPY packages ./packages

RUN npm install --unsafe-perm --legacy-peer-deps
RUN npm install --unsafe-perm
RUN npm run build
2 changes: 1 addition & 1 deletion dockerfiles/Dockerfile.node
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ ADD min_packages.tar .
COPY bin ./bin
COPY packages ./packages

RUN npm install --legacy-peer-deps
RUN npm install
RUN npm run build

RUN npm pack --verbose packages/node/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ ARG REG_NPM_EMAIL
RUN echo "_auth=$REG_BASIC_CREDENTIAL" >> ~/.npmrc
RUN echo "email=$REG_NPM_EMAIL" >> ~/.npmrc
RUN echo "always-auth=true" >> ~/.npmrc
RUN echo "legacy-peer-deps=true" >> ~/.npmrc

# gradle / artifactory auth
ARG MAVEN_REPO_URL
Expand Down
1 change: 0 additions & 1 deletion dockerfiles/Dockerfile.react-native-cli-android-builder
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ RUN echo "registry=$REGISTRY_URL" >> ~/.npmrc
RUN echo "_auth=$REG_BASIC_CREDENTIAL" >> ~/.npmrc
RUN echo "email=$REG_NPM_EMAIL" >> ~/.npmrc
RUN echo "always-auth=true" >> ~/.npmrc
RUN echo "legacy-peer-deps=true" >> ~/.npmrc

# Now copy in all the files needed to build
COPY .git .git
Expand Down
90 changes: 74 additions & 16 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions scripts/react-native-cli-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ module.exports = {
common.run('npm install', true)

// Install and run the CLI
const installCommand = `npm install @bugsnag/react-native-cli@${version} --legacy-peer-deps`
const installCommand = `npm install @bugsnag/react-native-cli@${version}`
common.run(installCommand, true)

// Use Expect to run the init command interactively
Expand Down Expand Up @@ -79,7 +79,7 @@ module.exports = {
common.run('npm install', true)

// Install and run the CLI
const installCommand = `npm install @bugsnag/react-native-cli@${version} --legacy-peer-deps`
const installCommand = `npm install @bugsnag/react-native-cli@${version}`
common.run(installCommand, true)

// Use Expect to run the init command interactively
Expand Down
4 changes: 2 additions & 2 deletions scripts/react-native-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ module.exports = {
common.run(`npm install --registry ${registryUrl}`, true)

// Install notifier
const command = `npm install @bugsnag/react-native@${version} --registry ${registryUrl} --legacy-peer-deps`
const command = `npm install @bugsnag/react-native@${version} --registry ${registryUrl}`
common.run(command, true)

// Install react-native-file-access
Expand Down Expand Up @@ -98,7 +98,7 @@ module.exports = {

// Install notifier
console.log(`Installing notifier: ${version}`)
const command = `npm install @bugsnag/react-native@${version} --registry ${registryUrl} --legacy-peer-deps`
const command = `npm install @bugsnag/react-native@${version} --registry ${registryUrl}`
common.run(command, true)

// Install react-native-file-access
Expand Down
2 changes: 1 addition & 1 deletion test/electron/features/support/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const { spawn } = require('child_process')
const defaultFixturePath = join(__dirname, '../../fixtures/app')

const npmRunner = process.platform === 'win32' ? 'npm.cmd' : 'npm'
const installArgs = ['install', '--progress=false', '--no-audit', '--omit=optional', '--no-save', '--legacy-peer-deps']
const installArgs = ['install', '--progress=false', '--no-audit', '--omit=optional', '--no-save']
const log = (msg, ...args) => console.log(` [TestApp] ${msg}`, ...args)

class TestApp {
Expand Down
2 changes: 1 addition & 1 deletion test/node/features/fixtures/cause/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ RUN npm install

COPY . ./

RUN npm install --no-package-lock --no-save --legacy-peer-deps bugsnag-node*.tgz
RUN npm install --no-package-lock --no-save bugsnag-node*.tgz
2 changes: 1 addition & 1 deletion test/node/features/fixtures/connect/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ RUN npm install

COPY . ./

RUN npm install --no-package-lock --no-save --legacy-peer-deps bugsnag-node*.tgz bugsnag-plugin-express*.tgz
RUN npm install --no-package-lock --no-save bugsnag-node*.tgz bugsnag-plugin-express*.tgz

ENV NODE_ENV production
CMD node scenarios/app
2 changes: 1 addition & 1 deletion test/node/features/fixtures/contextualize/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ RUN npm install

COPY . ./

RUN npm install --no-package-lock --no-save --legacy-peer-deps bugsnag-node*.tgz
RUN npm install --no-package-lock --no-save bugsnag-node*.tgz
2 changes: 1 addition & 1 deletion test/node/features/fixtures/express/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ RUN npm install

COPY . ./

RUN npm install --no-package-lock --no-save --legacy-peer-deps bugsnag-node*.tgz bugsnag-plugin-express*.tgz
RUN npm install --no-package-lock --no-save bugsnag-node*.tgz bugsnag-plugin-express*.tgz

ENV NODE_ENV production
CMD node scenarios/app
2 changes: 1 addition & 1 deletion test/node/features/fixtures/handled/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ RUN npm install

COPY . ./

RUN npm install --no-package-lock --no-save --legacy-peer-deps bugsnag-node*.tgz
RUN npm install --no-package-lock --no-save bugsnag-node*.tgz
2 changes: 1 addition & 1 deletion test/node/features/fixtures/koa-1x/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ RUN npm install

COPY . ./

RUN npm install --no-package-lock --no-save --legacy-peer-deps bugsnag-node*.tgz bugsnag-plugin-koa*.tgz
RUN npm install --no-package-lock --no-save bugsnag-node*.tgz bugsnag-plugin-koa*.tgz

ENV NODE_ENV production
CMD node scenarios/app
Loading

0 comments on commit 398e3e6

Please sign in to comment.