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

Updating generated docs and README instructions for running doc server #501

Merged
merged 1 commit into from
Apr 8, 2022

Conversation

ElonVolo
Copy link
Collaborator

@ElonVolo ElonVolo commented Apr 8, 2022

Updating the generated jsdocs that had been sitting around unupdated for years. Also updated jsdoc dependency to 3.7; 3.4 had been causing crashes when npm run docs was run. Also added to README casey's instructions about how to run the doc server.

Shout out to @caseywatts for the PR #272. Better late than never.

@trivikr @Daniel15

@@ -51,7 +51,7 @@
"babel-eslint": "^10.0.1",
"eslint": "^5.9.0",
"jest": "^26",
"jsdoc": "^3.4.0",
"jsdoc": "3.6.7",

Choose a reason for hiding this comment

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

Is there a reason to not keep the caret here? 🤔

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

jsdoc 3.6.8 was updated to use a version of the klaw library that's incompatible with node versions < 14.4.0, and this caused the jscodeshift CI builds to break when being run for node version 12. This is why the exact version of 3.6.7 is being used.

Choose a reason for hiding this comment

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

Probably good to create an issue in the jsdoc repo and keep track of it in this repo too. 🤔

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's a known issue.

jsdoc/jsdoc#1972

JSDoc makes use of klaw, which decided to having breaking changes with 4.1

https://github.com/jprichardson/node-klaw/blob/master/CHANGELOG.md

I can put in an issue for it. Mainly just a reminder to bump up the version of JSDoc whenever node < v13 is deprecated from jscodeshift.

Copy link
Member

@Daniel15 Daniel15 Apr 8, 2022

Choose a reason for hiding this comment

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

@MichaelDeBoey I personally don't like the caret as people are bad at determining if a change is breaking or not. Since you can directly import any file from an npm module, there's a lot of stuff that can be a breaking change.

The tilde (allow patch updates only) is a bit better, but in this case it'd break things.

Copy link
Collaborator Author

@ElonVolo ElonVolo Apr 8, 2022

Choose a reason for hiding this comment

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

Filed issue #502 to remind us to bump up whenever node < 14 is deprecated (which will probably be a while)

Choose a reason for hiding this comment

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

@Daniel15 I agree not everybody adheres semver very good, but that shouldn't let us discard carets imo.
If a package has a lot of breaking non-major changes, we should either use strict version for that package or use another package that doesn't have these problems imo.

Using strict versions of dependencies can lead to multiple versions of the same package, while npm/Yarn could probably dedupe them and give you a much smaller node_modules.

You can indeed import any file from the package, but if you're using non-public API and it breaks, that's on you imo as the package was never intended to be used like that.

@ElonVolo ElonVolo mentioned this pull request Apr 8, 2022
Copy link
Contributor

@trivikr trivikr left a comment

Choose a reason for hiding this comment

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

LGTM! The PR approval is limited to users with explicit access to the repository

@Daniel15
Copy link
Member

Daniel15 commented Apr 8, 2022

Looks good. Thanks :)

@Daniel15 Daniel15 merged commit 9bc2dcd into main Apr 8, 2022
@ElonVolo ElonVolo deleted the JSDocsUpdate branch April 9, 2022 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants