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 to use @citation-js/core #864

Merged
merged 6 commits into from
Jan 30, 2024

Conversation

agoose77
Copy link
Contributor

This PR replaces the use of citation-js with @citation-js/core. With the CSL and bibtex plugins, the installed size is <1 MB.

@agoose77 agoose77 requested a review from rowanc1 January 22, 2024 16:51
Copy link
Collaborator

@rowanc1 rowanc1 left a comment

Choose a reason for hiding this comment

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

Nice, this looks good - I will do a quick test later today and then I think we can bring it in.

  • fix up package.json in root
  • add changeset for citation-js-utils

package.json Outdated Show resolved Hide resolved
@agoose77
Copy link
Contributor Author

@rowanc1 I've run prettier in each package, and its changed some packages that I've not touched in this PR. Is there some kind of version dependency in prettier that's not captured by our development dependencies? It's interesting that the CI seems happy (i.e. my linting is not contra whatever version of prettier other people are running).

@rowanc1
Copy link
Collaborator

rowanc1 commented Jan 23, 2024

Looks like the package-lock change is quite extensive, and changed prettier from v3.0.0 --> v3.2.4, which is the root of these differences.

@agoose77
Copy link
Contributor Author

Ah, I was thinking about this the wrong way then. Fab, fixed.

@agoose77 agoose77 force-pushed the agoose77/feat-use-citation-js-core branch from d09f720 to 06b673c Compare January 23, 2024 10:16
@agoose77 agoose77 changed the title feat: use '@citation-js/core' feat: use @citation-js/core Jan 23, 2024
@rowanc1
Copy link
Collaborator

rowanc1 commented Jan 23, 2024

That is awesome, thanks for making the lock-diff much smaller!

Could you add a changeset for each package changed:

npm run changeset

and follow the instructions. This allows us to keep track of which packages need to be bumped and released next time we version.

@agoose77
Copy link
Contributor Author

That is awesome, thanks for making the lock-diff much smaller!

Could you add a changeset for each package changed:

npm run changeset

and follow the instructions. This allows us to keep track of which packages need to be bumped and released next time we version.

Yes, sorry — been meaning to do that. Not sure why it slipped my mind to begin with 🙃

@agoose77 agoose77 force-pushed the agoose77/feat-use-citation-js-core branch from 2d1d02f to e466cd1 Compare January 23, 2024 17:27
@agoose77 agoose77 requested a review from rowanc1 January 24, 2024 14:54
@rowanc1 rowanc1 force-pushed the agoose77/feat-use-citation-js-core branch from e466cd1 to c11343d Compare January 30, 2024 02:19
@rowanc1 rowanc1 changed the title feat: use @citation-js/core 📦 Refactor to use @citation-js/core Jan 30, 2024
Copy link
Collaborator

@rowanc1 rowanc1 left a comment

Choose a reason for hiding this comment

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

Fell into the same problems, I put back in those changes and we can update the linting and merge it in!

"version": "3.0.0",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.0.tgz",
"integrity": "sha512-zBf5eHpwHOGPC47h0zrPyNn+eAEIdEzfywMoYn2XPi0P44Zp0tSq64rq0xAREh4auw2cJZHo9QUob+NqCQky4g==",
"version": "3.2.4",
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is the root of the format changes.

Comment on lines +13191 to +13193
"@citation-js/core": "^0.7.6",
"@citation-js/plugin-bibtex": "^0.7.8",
"@citation-js/plugin-csl": "^0.7.6",
Copy link
Collaborator

Choose a reason for hiding this comment

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

@agoose77 I went to the next version, seems fine in testing!

@rowanc1 rowanc1 merged commit d4013a6 into main Jan 30, 2024
4 checks passed
@rowanc1 rowanc1 deleted the agoose77/feat-use-citation-js-core branch January 30, 2024 02:29
@stevejpurves stevejpurves mentioned this pull request Feb 2, 2024
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.

2 participants