-
Notifications
You must be signed in to change notification settings - Fork 187
switch node package manager yarn -> pnpm #18571
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
base: edge
Are you sure you want to change the base?
Conversation
|
run test
build
tsc
lint
test
others
|
SyntaxColoring
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Heroic! Thank you!
I have only minor questions and comments. Otherwise, this LGTM once we figure out those last few things that are failing in CI.
| // const successToast = screen.getByTestId('Toast_success') | ||
| // expect(successToast).toHaveStyle(`color: #04aa65 | ||
| // background-color: ##baffcd`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these still meant to be commented out?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why?
| // ToDo temporary disable style checks due to styled-components issues | ||
| // const successToast = screen.getByTestId('Toast_success') | ||
| // expect(successToast).toHaveStyle(`color: #04aa65 | ||
| // background-color: #f3fffa`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes
| $(MAKE) -C .. test-js-components tests=$(tests) test_opts="$(test_opts)" cov_opts="$(cov_opts)" | ||
| make -C .. test-js-components tests=$(tests) test_opts="$(test_opts)" cov_opts="$(cov_opts)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like an accidentally duplicated line?
| $(MAKE) -C .. test-js-components tests=$(tests) test_opts="$(test_opts)" cov_opts="$(cov_opts)" | |
| make -C .. test-js-components tests=$(tests) test_opts="$(test_opts)" cov_opts="$(cov_opts)" | |
| $(MAKE) -C .. test-js-components tests=$(tests) test_opts="$(test_opts)" cov_opts="$(cov_opts)" |
| // Note temporarily skip | ||
| it.skip('renders an empty slot with all the labware options', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these skips still meant to be in here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes
| // For unknown reasons, PD whitescreens on launch unless we have this. | ||
| dedupe: ['tslib'], | ||
| alias: { | ||
| tslib: path.resolve('node_modules/tslib'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ouch.
This shouldn't block this PR, but this is more reason for us to figure out what's wrong that's requiring us to do all this weird tslib stuff.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think we would need to review all vite.configs.mts to optimize the build.
the thing is that the current vite config files are just converted from webpack config for vite.
| run: | | ||
| npm config set cache ${{ github.workspace }}/.npm-cache | ||
| yarn config set cache-folder ${{ github.workspace }}/.yarn-cache | ||
| make setup-js | ||
| uses: ./.github/actions/js/setup | ||
| # run: | | ||
| # npm config set cache ${{ github.workspace }}/.npm-cache | ||
| # pnpm config set cache ${{ github.workspace }}/.pnpm-cache | ||
| # make setup-js | ||
| # Use the if to run all the lint checks even of some fail | ||
| shell: bash | ||
| # shell: bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these meant to be commented out, still?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i will remove them
| return readdir( | ||
| path.join(directory, 'somerandomname', contents[0].name) | ||
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's going on with these test changes?
components/package.json
Outdated
| "styled-components": "5.3.6" | ||
| }, | ||
| "devDependencies": { | ||
| "@storybook/blocks": "7.6.17", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does @storybook/blocks belong in the top-level package.json, instead? That's where the other Storybook addons are installed. And even though we run it with make -C components dev, Storybook generally operates as a monorepo-wide thing, not a components/-specific thing.
| rollupOptions: { | ||
| external: [ | ||
| 'electron', | ||
| /^node:/, | ||
| // Externalize problematic CommonJS modules | ||
| 'mdns-js', | ||
| 'is-ip', | ||
| 'redux', | ||
| 'reselect', | ||
| 'lodash', | ||
| 'lodash/unionBy', | ||
| 'escape-string-regexp', | ||
| 'stable', | ||
| 'to-regex', | ||
| ], | ||
| output: { | ||
| format: 'cjs', | ||
| }, | ||
| }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you explain more about what's happening here? Why are these modules problematic and how does externalizing them help?
| vi.mock('electron') | ||
| vi.mock('../../config') | ||
| vi.mock('../../dialogs') | ||
| vi.mock('../definitions') | ||
| vi.mock('../../config', () => ({ | ||
| getFullConfig: vi.fn(), | ||
| handleConfigChange: vi.fn(), | ||
| })) | ||
|
|
||
| vi.mock('../../dialogs', () => ({ | ||
| showOpenDirectoryDialog: vi.fn(), | ||
| showOpenFileDialog: vi.fn(), | ||
| })) | ||
|
|
||
| vi.mock('../definitions', () => ({ | ||
| readLabwareDirectory: vi.fn(), | ||
| parseLabwareFiles: vi.fn(), | ||
| addLabwareFile: vi.fn(), | ||
| removeLabwareFile: vi.fn(), | ||
| })) | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's surprising to me that this PR needed so many changes in the tests. Why would changing the package manager affect the difference between vi.mock('../../config') and vi.mock('../../config', () => ({ ... })), for example?
I don't necessarily have any problem with this, but could you explain more about what happened here?
spoke with Alex about pd-e2e and at this moment I can modify the e2e test to pass the error. for ll-e2e, Josh will remove cypress from ll within 2 weeks so I'd like to wait to that. |
fix primarybutton and alt primarybutton styling issue close AUTH-2559
Overview
switching from yarn V1 to pnpm.
pnpm version
10.22.0 since components-test is using that version
package.json in each project
some package.jsons got update because pnpm is stricter than yarn v1 and no hoisting so need to align with the versions and add a few opentrons packages to avoid importing errors
tests
app-shell/app-shell-odd
a few test using import somehing from
electronwithout mocking so needed to add mock to pass testscomponents
needed to commnet out a few styling test due to path issues (this will be fixed after merge this pr)
for e2e test errors
protocol-designer: this is happening on edge too
labware-library: Josh is preparing to switch from Cypress to Playwright.
dev server quick start
can update Storybook to introduce visual testing
close AUTH-2557
Test Plan and Hands on Testing
install pnpm v10 via npm/asdf/mise etc
v10.22.0
checkout this branch
run
make teardonw-js && make setup-jstest commands in the following comment
smoke test
Changelog
Review requests
Risk assessment
mid-high since switching the node package manager