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

Update packages #638

Closed
wants to merge 25 commits into from
Closed

Update packages #638

wants to merge 25 commits into from

Conversation

timlrx
Copy link

@timlrx timlrx commented Feb 2, 2024

Core dependency and peer dependency updates

Updated Unified, Next.js and Opentelemetry packages. Also list next 14 and esbuild 17-20 as peer dependencies.

This should solve the top 3/4 most commented issues on contentlayer and allow most folks to continue using it without manual patching:

The largest part of the core dependency that has yet to be updated are the effect packages, but given that the functions in the legacy package still work well I don't think there's a need to migrate it and that could be a subsequent update.

There's also the stackbit and contentful integration. Didn't bother upgrading those as I am neither a user nor a paid maintainer 😄. All the existing tests pass though so hopefully that should be sufficient.

Dev depedency updates

  • Fix changeset configuration (Fix Changesets configuration #622)
  • Updated dev dependencies vite to ^5.0.12 and vitest to 1.2.2
    • Added a vitest.config.ts file for each workspace with test as vitest now requires a moduleDirectories to resolve correctly
    • Snapshots are updated and double slash escape removed (see feat!(snapshot): make snapshots more visually pleasing vitest-dev/vitest#3961)
    • The readme in the integration tests workspace mentions a threading issue with the older version of Node 16 and Node 14 with windows. I didn't verify that the newest version of Vitest works with the latest node versions, but I think we can just update it and see if the test fails on any of the CI runs.

Misc

  • Use awk instead of sed for next-contentlayer prepack script. For some reason the sed script did not work on my Mac

Copy link

changeset-bot bot commented Feb 2, 2024

🦋 Changeset detected

Latest commit: 005c453

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

💥 An error occurred when fetching the changed packages and changesets in this PR
Some errors occurred when validating the changesets config:
The package or glob expression "@contentlayer/*" specified in the `fixed` option does not match any package in the project. You may have misspelled the package name or provided an invalid glob expression. Note that glob expressions must be defined according to https://www.npmjs.com/package/micromatch.
The package or glob expression "contentlayer" specified in the `fixed` option does not match any package in the project. You may have misspelled the package name or provided an invalid glob expression. Note that glob expressions must be defined according to https://www.npmjs.com/package/micromatch.
The package or glob expression "next-contentlayer" specified in the `fixed` option does not match any package in the project. You may have misspelled the package name or provided an invalid glob expression. Note that glob expressions must be defined according to https://www.npmjs.com/package/micromatch.

@timlrx
Copy link
Author

timlrx commented Feb 4, 2024

I published a test version of all the changes under @contentlayer-temp/*, contentlayer-temp and next-contentlayer-temp.

To try it out, you can swap out contentlayer and next-contentlayer with the temp packages v0.4.4, as well as update the relevant imports. The config file and generated content folder still remains the same.

From my testing on an updated version of next-contentlayer-example using [email protected], it appears that all the linked issues are fixed with the updates. The updated packages are compatible with the latest unified js packages e.g.

export default makeSource({
  contentDirPath: "posts",
  documentTypes: [Post],
  mdx: {
    remarkPlugins: [remarkGfm],
  },
});

Packaging related changes to get it published are over here: timlrx/contentlayer2#2

Hope to get it merged it so that all the updates will still be under contentlayer, but if there are no plans for further updates or if there are governance issues that make continuing under the contentlayer brand difficult, I will consider maintaining it separately with a reduce scope. Thank you for all the previous contributions ❤️ I really think it's the best ORM for markdown files and it would be a shame for it to just fade away!

@ahmed-adly-khalil
Copy link

it seems like this pr is ready? 🙏

Copy link

stale bot commented Mar 8, 2024

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the meta: stale label Mar 8, 2024
@timlrx
Copy link
Author

timlrx commented Mar 11, 2024

Yup, it's ready and it is not stale

@stale stale bot removed the meta: stale label Mar 11, 2024
@icco icco mentioned this pull request Mar 21, 2024
icco added a commit to icco/writing that referenced this pull request Mar 21, 2024
@necmettindev
Copy link

is there an update?

@DoyinDimeji
Copy link

@necmettindev, guess we're just waiting for it to be merged to base.

@kais-radwan
Copy link

This has been open for two months now, nobody is maintaining this project anymore right ?? time to just make a fork ???

@icco
Copy link

icco commented Mar 25, 2024

Probably time to just fork. I tested this in my project and it's working great.

@kais-radwan
Copy link

So what @timlrx ... can you take this on your shoulders and make a public fork with the changes you've made ?

@timlrx
Copy link
Author

timlrx commented Mar 31, 2024

Had a chat with Schickling and he is good with me maintaining a separate hard fork. Will post the new repository link soon.

@kais-radwan
Copy link

That's some great news. waiting for it

@timlrx
Copy link
Author

timlrx commented Mar 31, 2024

In the meantime, I have published @contentlayer2, contentlayer2 and next-contentlayer2.

Feel free to update the packages and bump the version to 0.4.4.

@timlrx
Copy link
Author

timlrx commented Apr 1, 2024

Here's the new repository: https://github.com/timlrx/contentlayer2

Copy link

stale bot commented Apr 21, 2024

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the meta: stale label Apr 21, 2024
@stale stale bot closed this Apr 28, 2024
@timlrx timlrx deleted the update branch July 13, 2024 07:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
8 participants