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

refactor: switch to NPM workspaces #687

Merged
merged 11 commits into from
Sep 18, 2023

Conversation

not-my-profile
Copy link
Contributor

The lerna bootstrap command is deprecated1
and resulted in a very weird CI failure (#685).

This commit switches the repository to instead use
NPM workspaces.2

Fixes #685.

@not-my-profile not-my-profile requested a review from a team as a code owner March 16, 2023 12:05
@not-my-profile not-my-profile force-pushed the npm-workspaces branch 6 times, most recently from f27dc3d to 66ab973 Compare March 16, 2023 13:35
@not-my-profile not-my-profile force-pushed the npm-workspaces branch 18 times, most recently from 5f2dae5 to 565806f Compare March 17, 2023 11:32
@not-my-profile not-my-profile marked this pull request as draft March 17, 2023 11:34
@not-my-profile not-my-profile force-pushed the npm-workspaces branch 3 times, most recently from 08a7d0d to 752892b Compare March 17, 2023 15:40
@@ -45,7 +44,7 @@
],
"dependencies": {
"@axe-core/webdriverjs": "^4.7.3",
"axe-core": "^4.7.0",
"axe-core": "~4.7.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

Axe-core 4.8.1 was released and I don't want to take it with this conversion, so pinned all axe-core versions to 4.7

Copy link
Contributor

Choose a reason for hiding this comment

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

This is a breaking change for customers that are already using 4.8, which is allowed by the old version of this specifier and what a customer would have gotten already if they happen to have installed one of these packages since 4.8 was released.

I agree with not changing the requirement in this PR, and I'd also be fine with trying to avoid a lockfile update that moves our testing to 4.8, but I strongly disagree with converting ^ to ~ in all these packages

packages/cli/src/bin/cli.test.ts Show resolved Hide resolved
@@ -44,7 +44,7 @@
"express": "^4.18.2",
"mocha": "^10.0.0",
"nyc": "^15.1.0",
"puppeteer": "^19.7.3",
"puppeteer": "19.7.3",
Copy link
Contributor

Choose a reason for hiding this comment

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

Starting in Puppeteer 19.11 (ish?) they started adding a log that stated that headlness: new would be needed (which massively clogs up the test run as it logs a huge paragraph every test). However, if you add headless: new to the options it breaks the unloaded iframe test. It seems that whatever is in headless: new fixes the problem with unloaded iframes? Will open a tech debt ticket to investigate.

Copy link
Contributor

Choose a reason for hiding this comment

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

@@ -70,7 +70,7 @@
"ts-node": "^10.9.1",
"tsup": "^6.7.0",
"typescript": "^4.8.4",
"webdriverio": "^8.8.2"
"webdriverio": "8.8.2"
Copy link
Contributor

Choose a reason for hiding this comment

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

Latest webdriverio breaks our typescript build due to this bug with types webdriverio/webdriverio#11055. Will open a tech debt ticket to fix it.

Copy link
Contributor

Choose a reason for hiding this comment

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

@@ -32,8 +32,7 @@
"prebuild": "rimraf dist",
"build": "tsc",
"test": "mocha --timeout 60000 -r ts-node/register 'src/**/**.test.ts'",
"coverage": "nyc npm run test",
"prepare": "npm run build"
Copy link
Contributor

Choose a reason for hiding this comment

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

Talked with @michael-siek and this isn't needed. When left in it tries to build the cli before it links packages together, which would cause the build to fail as @axe-core/webdriverjs wasn't available yet.

@straker straker marked this pull request as ready for review September 11, 2023 21:30
@@ -45,7 +44,7 @@
],
"dependencies": {
"@axe-core/webdriverjs": "^4.7.3",
"axe-core": "^4.7.0",
"axe-core": "~4.7.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

This is a breaking change for customers that are already using 4.8, which is allowed by the old version of this specifier and what a customer would have gotten already if they happen to have installed one of these packages since 4.8 was released.

I agree with not changing the requirement in this PR, and I'd also be fine with trying to avoid a lockfile update that moves our testing to 4.8, but I strongly disagree with converting ^ to ~ in all these packages

packages/cli/src/bin/cli.test.ts Show resolved Hide resolved
packages/puppeteer/package.json Outdated Show resolved Hide resolved
packages/puppeteer/tsconfig.json Outdated Show resolved Hide resolved
packages/react/examples/next.js/package-lock.json Outdated Show resolved Hide resolved
@CLAassistant
Copy link

CLAassistant commented Sep 14, 2023

CLA assistant check
All committers have signed the CLA.

@dbjorge
Copy link
Contributor

dbjorge commented Sep 14, 2023

force-push was to correct author email address in merge from develop, to hopefully fix CLA bot

@dbjorge
Copy link
Contributor

dbjorge commented Sep 14, 2023

Reviewed for security

Copy link
Contributor

@dbjorge dbjorge left a comment

Choose a reason for hiding this comment

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

Ah, wait, approved too early - @straker , there's a missing lockfile update to pick up the changes from 2dedf1b

@dequejenn dequejenn mentioned this pull request Sep 15, 2023
21 tasks
@michael-siek
Copy link
Member

  • reviewed for security

@michael-siek michael-siek merged commit 4fa75a8 into dequelabs:develop Sep 18, 2023
25 of 26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ci: dependencies CI job is sometimes failing
7 participants