Skip to content

chore: import from https://github.com/mongodb-js/devtools-connect COMPASS-7645 #239

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

Merged
merged 16 commits into from
Feb 21, 2024

Conversation

paula-stacho
Copy link
Collaborator

@paula-stacho paula-stacho commented Feb 16, 2024

Description

Not a straight-forward copy-paste. But still the diff is too big, so let me tell you what has been done.

oidc-http-server-pages

New package was created with npm run create-workspace.
The contents (src) were taken from https://github.com/mongodb-js/devtools-connect/tree/main/src/oidc/static.
New index.ts was added which exposes all the exports.
The rest of adjustions was to make sure the npm scripts are working. Files were reformatted to fit the new prettier and linting, and selected dependencies from devtools-connect were added. The compilation follows devtools-connect in that it includes static-pages.js and .esm-wrapper.mjs (this part I'm not sure if it's necessary).

devtools-connect

Again, new package was created with npm run create-workspace.
The contents (src, scripts & package.json) were taken from https://github.com/mongodb-js/devtools-connect. Usages of oidc-http-server-pages were replaced with the new separate package.
Again, I had to ensure the npm scripts are working. For this, I added the aliases used by lerna. Again, files were reformatted to fit new prettier. Linting was more difficult and I ended up just using the old config from devtools-connect + turning off a couple of extra rules that were in conflict with prettier.

Lastly, the packages were tested by linking the devtools-connect package to mongosh and running npm run test and npm run test-e2e.

@paula-stacho paula-stacho changed the title chore(devtools-connect,oidc-http-server-pages): import from https://github.com/mongodb-js/devtools-connect chore: import from https://github.com/mongodb-js/devtools-connect Feb 16, 2024
@paula-stacho paula-stacho marked this pull request as ready for review February 20, 2024 16:44
Copy link
Collaborator

@addaleax addaleax left a comment

Choose a reason for hiding this comment

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

I know this is still labeled Draft, but everything looks great! 🚀

'plugin:promise/recommended',
'plugin:@typescript-eslint/recommended',
],
rules: {
Copy link
Collaborator

@mcasimir mcasimir Feb 20, 2024

Choose a reason for hiding this comment

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

is fine for a follow up, but generally we try to avoid having special rules and plugins for packages in the monorepo, and instead we align on eslint / ts when we move things here, that way we can keep maintaining everything in the same way, especially for stuff that can be just addressed with eslint --fix

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yeah, this will have to be a follow up 🙈 . I mention this in the description - I have tried to make this work with the same rulesets as the other packages, but I kept seeing errors that I couldn't even figure out where they were coming from. so in the end I gave up and used the old eslint config + a couple of exceptions to support the new prettier config.

Copy link
Collaborator

@addaleax addaleax left a comment

Choose a reason for hiding this comment

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

Looks like this needs a prettier run but either way, LGTM!

@paula-stacho paula-stacho changed the title chore: import from https://github.com/mongodb-js/devtools-connect chore: import from https://github.com/mongodb-js/devtools-connect COMPASS-7645 Feb 21, 2024
@paula-stacho paula-stacho merged commit 7b30d2b into main Feb 21, 2024
@paula-stacho paula-stacho deleted the COMPASS-7645 branch February 21, 2024 12:29
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.

4 participants