Skip to content

feat: update build and release process; update all major deps #617

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 1 commit into from
Mar 18, 2025

Conversation

transitive-bullshit
Copy link
Member

No description provided.

@charliechecks charliechecks bot requested a review from CharlieHelps March 18, 2025 15:40
Copy link

vercel bot commented Mar 18, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
react-notion-x ✅ Ready (Inspect) Visit Preview Mar 18, 2025 3:41pm
react-notion-x-minimal-demo ✅ Ready (Inspect) Visit Preview Mar 18, 2025 3:41pm

Copy link

charliechecks bot commented Mar 18, 2025

Sorry, I made a mistake and won't be able to finish the task. I'm happy to try again if you would like. Just @ mention me and I'll get back to work.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Hello @transitive-bullshit, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

Summary of Changes

This pull request focuses on updating the build and release process and updating major dependencies. It includes changes to GitHub workflows for release and testing, updates to package dependencies in several example projects and core packages, and modifications to the package manager version. The changes also involve removing the changesets configuration and updating the normalizeUrl utility function.

Highlights

  • Dependency Updates: Major dependencies across several packages and examples have been updated to their latest versions, including @notionhq/client, ky, next, react, react-dom, prismjs, and katex.
  • Build and Release Process: The build and release process has been updated, including the addition of a new GitHub workflow for releases triggered by tags and workflow dispatches, and the removal of the changesets configuration.
  • Testing Workflow: The CI testing workflow has been modified to run tests on Node.js versions 18, 22, and 23, and includes build and test steps.
  • Package Manager Update: The package manager has been updated from [email protected] to [email protected].
  • Git Hooks: The addition of simple-git-hooks and lint-staged for code formatting and linting before commits.

Changelog

Click here to see the changelog
  • .changeset/README.md
    • Removed the README file for changesets.
  • .changeset/config.json
    • Removed the changesets configuration file.
  • .github/workflows/release.yml
    • Added a new GitHub workflow for releases triggered by tags and workflow dispatches.
    • Configured the workflow to run on ubuntu-latest with write permissions for contents.
    • Included steps to checkout code, setup pnpm and Node.js, and run changelogithub.
  • .github/workflows/test.yml
    • Modified the CI testing workflow to run only on push events.
    • Updated Node.js versions to include 18, 22, and 23.
    • Simplified the steps to use actions/checkout@v4, pnpm/action-setup@v4, and actions/setup-node@v4.
    • Added build step before running tests.
  • examples/cra/CHANGELOG.md
    • Removed the CHANGELOG.md file.
  • examples/cra/package.json
    • Updated @types/node from ^22.8.4 to ^22.13.10.
    • Updated @types/react from ^18.3.12 to ^19.0.11.
    • Updated @types/react-dom from ^18.3.1 to ^19.0.4.
    • Updated react from ^18.3.1 to ^19.0.0.
    • Updated react-dom from ^18.3.1 to ^19.0.0.
  • examples/full/CHANGELOG.md
    • Removed the CHANGELOG.md file.
  • examples/full/package.json
    • Updated @notionhq/client from ^2.2.15 to ^2.3.0.
    • Updated ky from ^1.7.2 to ^1.7.5.
    • Updated next from ^15.0.2 to ^15.2.3.
    • Updated p-map from ^7.0.2 to ^7.0.3.
    • Updated prismjs from ^1.27.0 to ^1.30.0.
    • Updated react from ^18.3.1 to ^19.0.0.
    • Updated react-dom from ^18.3.1 to ^19.0.0.
  • examples/minimal/CHANGELOG.md
    • Removed the CHANGELOG.md file.
  • examples/minimal/package.json
    • Updated next from ^15.0.2 to ^15.2.3.
    • Updated react from ^18.3.1 to ^19.0.0.
    • Updated react-dom from ^18.3.1 to ^19.0.0.
  • package.json (root)
    • Updated packageManager from [email protected] to [email protected].
    • Added release script: bumpp -r && pnpm publish -r
    • Added prepare script: simple-git-hooks
    • Removed @changesets/cli.
    • Updated @types/node from ^22.9.0 to ^22.13.10.
    • Updated npm-run-all2 from ^7.0.1 to ^7.0.2.
    • Updated prettier from ^3.3.3 to ^3.5.3.
    • Updated react from ^18.3.1 to ^19.0.0.
    • Updated react-dom from ^18.3.1 to ^19.0.0.
    • Updated tsup from ^8.3.5 to ^8.4.0.
    • Updated tsx from ^4.19.2 to ^4.19.3.
    • Updated turbo from ^2.3.0 to ^2.4.4.
    • Updated typescript from ^5.6.3 to ^5.8.2.
    • Updated vitest from ^2.1.5 to ^3.0.9.
    • Added simple-git-hooks and lint-staged configuration.
  • packages/notion-client/CHANGELOG.md
    • Removed the CHANGELOG.md file.
  • packages/notion-client/package.json
    • Updated ky from ^1.7.2 to ^1.7.5.
    • Updated p-map from ^7.0.2 to ^7.0.3.
  • packages/notion-compat/CHANGELOG.md
    • Removed the CHANGELOG.md file.
  • packages/notion-compat/package.json
    • Updated @notionhq/client from ^2.2.15 to ^2.3.0.
    • Updated p-queue from ^8.0.1 to ^8.1.0.
  • packages/notion-types/CHANGELOG.md
    • Removed the CHANGELOG.md file.
  • packages/notion-utils/CHANGELOG.md
    • Removed the CHANGELOG.md file.
  • packages/notion-utils/package.json
    • Updated mem from ^10.0.0 to memoize ^10.1.0.
    • Updated p-queue from ^8.0.1 to ^8.1.0.
  • packages/notion-utils/src/normalize-url.ts
    • Replaced mem with memoize for URL normalization.
  • packages/react-notion-x/CHANGELOG.md
    • Removed the CHANGELOG.md file.
  • packages/react-notion-x/package.json
    • Updated katex from ^0.16.11 to ^0.16.21.
    • Updated prismjs from ^1.27.0 to ^1.30.0.
    • Updated react-modal from ^3.14.3 to ^3.16.3.
    • Updated @types/react from ^18.3.12 to ^19.0.11.
    • Updated react-pdf from ^9.1.1 to ^9.2.1.
  • packages/react-notion-x/src/block.tsx
    • Changed type of output variable from JSX.Element | null to React.ReactNode | null.
  • packages/react-notion-x/src/third-party/code.tsx
    • Updated the type of copyTimeout ref to number | undefined.
    • Updated the type of codeRef ref to HTMLElement | null.
  • pnpm-workspace.yaml
    • Added onlyBuiltDependencies to include simple-git-hooks.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.


Did you know?

The first version of pnpm was released in January 2017.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates the build and release process and updates major dependencies. The changes look good overall, but there are a few areas that could be improved.

Summary of Findings

  • Redundant dependency declarations: The notion-utils dependency is declared in both dependencies and devDependencies in packages/notion-compat/package.json. It should only be declared in one place.
  • Inconsistent dependency updates: Some dependencies are updated across multiple package.json files (e.g., react, react-dom), while others are only updated in some files. Ensure consistency in dependency updates across the project.
  • Unnecessary file deletion: The .changeset/README.md and .changeset/config.json files are deleted. Verify that this is intentional and that the changesets functionality is no longer needed or has been migrated elsewhere.

Merge Readiness

The pull request is almost ready for merging. However, the redundant dependency declarations and inconsistent dependency updates should be addressed before merging. The deletion of the .changeset files should also be verified. I am unable to approve this pull request, and recommend that others review and approve this code before merging.

@transitive-bullshit
Copy link
Member Author

@CharlieHelps please review this PR again

Copy link

charliechecks bot commented Mar 18, 2025

Now I have a good understanding of the changes. Let me provide a comprehensive re-review.

Re-Review of Pull Request #617

Overview of Changes

This PR makes significant updates to the build and release process as well as major dependency updates across all packages. The key changes include:

  1. Build and Release Process Update:

    • Removed the changesets configuration (.changeset directory)
    • Added a new GitHub workflow for releases (release.yml)
    • Updated the test workflow (test.yml) with newer Node.js versions and simplified steps
    • Added a new release script and prepare script in root package.json
  2. Dependency Updates:

    • Updated package manager from [email protected] to [email protected]
    • Updated React from v18 to v19 across all packages
    • Updated various dependencies like Next.js, prismjs, katex, etc.
    • Replaced 'mem' with 'memoize' in the normalizeUrl utility function
  3. Code Quality Improvements:

    • Added simple-git-hooks and lint-staged for pre-commit code formatting and linting
    • Simplified the build and test scripts in GitHub workflows

Analysis of Previous Concerns

1. Redundant dependency declarations in packages/notion-compat/package.json

I examined the packages/notion-compat/package.json file and found that notion-utils is declared in the dependencies section but not in the devDependencies section. So this issue seems to have been resolved or was misidentified in the previous review.

"dependencies": {
  "notion-types": "workspace:*",
  "notion-utils": "workspace:*",
  "p-queue": "^8.1.0"
},
"devDependencies": {
  "@notionhq/client": "^2.3.0",
  "notion-client": "workspace:*"
}

2. Inconsistent dependency updates

I checked the dependency versions across multiple package.json files and found that the dependency updates are now consistent:

  • React and React DOM are updated to v19.0.0 in all packages
  • Next.js is updated to ^15.2.3 in all relevant packages
  • prismjs is updated to ^1.30.0 in all relevant packages
  • Other dependencies like ky, katex, etc. are also consistently updated

3. Removal of .changeset files

The PR removes the .changeset directory and its configuration files, but introduces a new release process. This appears to be an intentional change rather than an oversight:

  1. Removed .changeset/README.md and .changeset/config.json
  2. Added a new release workflow in .github/workflows/release.yml which uses changelogithub instead
  3. Added a new release script in the root package.json: "release": "bumpp -r && pnpm publish -r"

This indicates a shift from using changesets to using a simpler release process with bumpp and changelogithub, which is a valid alternative approach for managing versioning and changelogs.

Additional Observations

  1. Type Improvements: The PR makes type improvements in React components, such as updating JSX.Element | null to React.ReactNode | null in block.tsx.

  2. Workflow Improvements: The updated GitHub workflows are more streamlined and use newer versions of actions.

  3. Git Hooks: Added pre-commit hooks with simple-git-hooks and lint-staged to ensure code quality.

Recommendations

The PR looks good and addresses all the previously identified concerns. However, I would recommend:

  1. Documentation Update: Consider adding documentation for the new release process so that contributors understand how to use it.

  2. Peer Dependencies Check: The peerDependencies in react-notion-x package.json still specify ">=18" for React and React DOM, but the minimum version should be updated to ">=19" since the PR updates to React 19.

  3. Testing on All Node Versions: The test.yml workflow now runs on Node.js 18, 22, and 23. Consider how this might affect users on other Node.js versions (e.g., 20).

Final Verdict

This PR is a significant improvement to the build system and dependency management of the project. All the concerns raised in the previous review have been addressed, and the changes are well-structured and consistent. I recommend merging this PR after addressing the minor recommendations above.

@transitive-bullshit transitive-bullshit merged commit 89c89df into master Mar 18, 2025
5 checks passed
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.

1 participant