Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade repo to lerna v8 and Node 18 #2209

Merged
merged 31 commits into from
Oct 2, 2024
Merged
Show file tree
Hide file tree
Changes from 30 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
11e4ab7
build: upgrade lerna to v8
yousif-bugsnag Sep 26, 2024
b68fa47
build: add workspace config to package.json
yousif-bugsnag Sep 26, 2024
045dae4
build: bump plugin-angular deps to v10
yousif-bugsnag Sep 26, 2024
3c5a579
build: fix react-native-cli build
yousif-bugsnag Sep 26, 2024
e8143a2
test(react-native): fix unit test import
yousif-bugsnag Sep 26, 2024
d530d07
chore: remove references to lerna bootstrap
yousif-bugsnag Sep 26, 2024
8818e68
ci: bump node versions to 18
yousif-bugsnag Sep 26, 2024
b5bb4ab
ci: use legacy peer deps when running npm install
yousif-bugsnag Sep 26, 2024
bd0fc04
ci: run npm install after copying files
yousif-bugsnag Sep 26, 2024
c34499f
install curl
yousif-bugsnag Sep 27, 2024
eca34b8
build: fix typescript build
yousif-bugsnag Sep 27, 2024
32beb41
test(interaction-breadcrumbs): loosen targetSelector test assertion
yousif-bugsnag Sep 27, 2024
d665db3
build: fix linting errors
yousif-bugsnag Sep 27, 2024
cc2461b
ci(browser): run npm install with legacy-peer-deps
yousif-bugsnag Sep 27, 2024
d5765d0
test(browser): set skipLibCheck:true for typescript builds
yousif-bugsnag Sep 27, 2024
e5ea0f3
test(angular): upgrade test fixture to angular 10
yousif-bugsnag Sep 27, 2024
e7e2536
test(angular): set --openssl-legacy-provider
yousif-bugsnag Sep 27, 2024
27c5ad8
ci(browser): fix package install command
yousif-bugsnag Sep 30, 2024
dc9b78f
test(angular): disable ivy in test fixture
yousif-bugsnag Sep 30, 2024
3a37f82
build: minimise lockfile changes
yousif-bugsnag Sep 30, 2024
5c68a29
test(aws-lambda): run npm ci when building packages
yousif-bugsnag Sep 27, 2024
e30d4fc
ci(aws-lambda): run on macos 14 node 18
yousif-bugsnag Sep 27, 2024
d93bb51
ci(aws-lambda): set playwright env var
yousif-bugsnag Oct 1, 2024
a532cfa
test(aws-lambda): bump serverless-express-app fixture to node 18
yousif-bugsnag Oct 1, 2024
16f7a81
test(aws-lambda): update simple-app fixture to node 18
yousif-bugsnag Oct 1, 2024
3340886
test(aws-lambda): update features for node 18
yousif-bugsnag Oct 1, 2024
0741c1b
test(aws-lambda): update promise stack trace assertion
yousif-bugsnag Oct 1, 2024
ace7783
ci(browser): drop IE 8 9 and 10 from CI pipeline
yousif-bugsnag Oct 1, 2024
f6c3d65
test(aws-lambda): update promise rejection session count assertion
yousif-bugsnag Oct 1, 2024
24a9725
test(angular): avoid multiple renders/events in angular fixture
yousif-bugsnag Oct 1, 2024
c0f3745
test(browser): skip angular tests on safari 10
yousif-bugsnag Oct 1, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .buildkite/basic/browser-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,6 @@ steps:
#
- label: ":browserstack: {{matrix}} tests"
matrix:
- ie_8
- ie_9
- ie_10
Comment on lines -128 to -130
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥

- edge_17
- safari_10
- safari_16
Expand Down
1 change: 0 additions & 1 deletion .buildkite/basic/electron-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ steps:
- echo "Running on Node `node -v`"
- npm install electron@${ELECTRON_VERSION} --no-audit --progress=false --no-save
- npm ci --no-audit --progress=false
- npx lerna bootstrap
- npm run build:electron
- defaults write com.apple.CrashReporter DialogType none
- npm run test:unit:electron-runner
Expand Down
5 changes: 4 additions & 1 deletion .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@ steps:
- label: ":aws-lambda: AWS Lambda tests"
timeout_in_minutes: 35
agents:
queue: "opensource-mac-cocoa-10.15"
queue: "macos-14"
env:
NODE_VERSION: "18"
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: "1"
commands:
# force the NPM registry as the default on CI is artifactory, which can't
# currently install from our lockfile
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/pr-diff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@v1
with:
node-version: 14.x
node-version: 18.x

- name: Checkout base branch
uses: actions/checkout@v1
Expand All @@ -22,7 +22,6 @@ jobs:
run: |
mkdir .diff
npm ci
npx lerna bootstrap
npm run build
cat packages/browser/dist/bugsnag.min.js | wc -c > .diff/size-before-minified
cat packages/browser/dist/bugsnag.min.js | gzip | wc -c > .diff/size-before-gzipped
Expand All @@ -37,7 +36,6 @@ jobs:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
run: |
npm ci
npx lerna bootstrap
npm run build
cat packages/browser/dist/bugsnag.min.js | wc -c > .diff/size-after-minified
cat packages/browser/dist/bugsnag.min.js | gzip | wc -c > .diff/size-after-gzipped
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/test-electron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ jobs:
- run: npm ci --no-audit --progress=false
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
- run: npx lerna bootstrap
- run: npm run build:electron
shell: bash
- run: sudo apt-get install cppcheck --assume-yes
Expand Down
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,6 @@ cd bugsnag-js
# Install top-level dependencies
npm i

# Bootstrap all of the packages
npm run bootstrap

# Build the standalone notifiers and plugins
npm run build

Expand Down
6 changes: 0 additions & 6 deletions TESTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,6 @@ Install top level dependencies:
npm i
```

Bootstrap all of the individual packages:

```sh
npm run bootstrap
```

Build each of the standalone packages:

```sh
Expand Down
6 changes: 0 additions & 6 deletions bin/local-test-util
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ async function init () {

async function update () {
try {
await bootstrap()
await updateNotifiers()
await installFixtureDeps()
await buildFixtures()
Expand Down Expand Up @@ -109,11 +108,6 @@ function trace (stepname) {
console.log(`\n• ${stepname} •\n ${Array(stepname.length).fill('-').join('')}`)
}

async function bootstrap () {
trace('bootstrap')
return ex(`npm`, [ `run`, `bootstrap` ])
}

async function buildNotifiers (notifier) {
trace('build notifiers')
if (notifier) {
Expand Down
1 change: 0 additions & 1 deletion bin/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ cd /app/bugsnag-js

# "ci" rather than "install" ensures the process doesn't make the work tree dirty by modifying lockfiles
npm ci
npm run bootstrap -- --ci

# check if CDN packages changed – if they didn't we don't need to upload to the CDN
BROWSER_PACKAGE_CHANGED=$(npx lerna changed --parseable | grep -c packages/js$ || test $? = 1;)
Expand Down
22 changes: 11 additions & 11 deletions dockerfiles/Dockerfile.browser
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
# CI test image for unit/lint/type tests
FROM node:14-alpine as browser-feature-builder
FROM node:18-alpine as browser-feature-builder

RUN apk add --update bash python3 make gcc g++ musl-dev xvfb-run
RUN apk add --update bash python3 make gcc g++ musl-dev xvfb-run curl

WORKDIR /app

COPY package*.json ./
RUN npm install

COPY babel.config.js lerna.json .eslintignore .eslintrc.js jest.config.js tsconfig.json ./
ADD min_packages.tar .
COPY bin ./bin
COPY packages ./packages
RUN npx lerna bootstrap

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

RUN npm pack --verbose packages/js/
Expand All @@ -24,12 +23,13 @@ RUN npm pack --verbose packages/plugin-vue/
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 ../../../../bugsnag-browser-*.tgz
RUN npm install --no-package-lock --no-save --legacy-peer-deps ../../../../bugsnag-plugin-react-*.tgz
RUN npm install --no-package-lock --no-save --legacy-peer-deps ../../../../bugsnag-plugin-vue-*.tgz
RUN npm install --no-package-lock --no-save --legacy-peer-deps ../../../../bugsnag-web-worker-*.tgz
RUN npm install --no-package-lock --no-save --legacy-peer-deps \
../../../../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 \
../../../../../../bugsnag-plugin-angular-*.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 && npm run build'
xargs -I % bash -c 'cd `dirname %` && npm install --no-package-lock --legacy-peer-deps && 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
9 changes: 4 additions & 5 deletions dockerfiles/Dockerfile.ci
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
# CI test image for unit/lint/type tests
FROM node:14-alpine
FROM node:18-alpine

RUN apk add --update bash python3 make gcc g++ musl-dev xvfb-run
RUN apk add --update bash python3 make gcc g++ musl-dev xvfb-run curl

WORKDIR /app

COPY package*.json ./
RUN npm install --unsafe-perm

COPY babel.config.js lerna.json .eslintignore .eslintrc.js jest.config.js tsconfig.json ./
ADD min_packages.tar .
COPY bin ./bin
COPY scripts ./scripts
COPY test ./test
COPY packages ./packages
RUN npx lerna bootstrap

RUN npm install --unsafe-perm --legacy-peer-deps
RUN npm run build
9 changes: 4 additions & 5 deletions dockerfiles/Dockerfile.node
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
# CI test image for unit/lint/type tests
FROM node:14-alpine as node-feature-builder
FROM node:18-alpine as node-feature-builder

RUN apk add --update bash python3 make gcc g++ musl-dev xvfb-run
RUN apk add --update bash python3 make gcc g++ musl-dev xvfb-run curl

WORKDIR /app

COPY package*.json ./
RUN npm install

COPY babel.config.js lerna.json .eslintignore .eslintrc.js jest.config.js tsconfig.json ./
ADD min_packages.tar .
COPY bin ./bin
COPY packages ./packages
RUN npx lerna bootstrap

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

RUN npm pack --verbose packages/node/
Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/Dockerfile.release
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:14-alpine
FROM node:18-alpine
RUN apk add --update git bash python3 make gcc g++ openssh-client curl

RUN addgroup -S admins
Expand Down
8 changes: 3 additions & 5 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
{
"lerna": "2.11.0",
"packages": [
"packages/*"
],
"version": "8.0.0"
"packages": ["packages/*"],
"version": "8.0.0",
"$schema": "node_modules/lerna/schemas/lerna-schema.json"
}
Loading
Loading