-
Notifications
You must be signed in to change notification settings - Fork 24
Release:1.5.0 (plugin 1.2.0) #918
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
Conversation
<!-- Filling out this template is required. Any PR that does not include enough information to be reviewed may be closed at a maintainers' discretion. All new code requires documentation and tests to ensure against regressions. --> ### Description of the Change <!-- We must be able to understand the design of your change from this description. The maintainer reviewing this PR may not have worked with this code recently, so please provide as much detail as possible. Where possible, please also include: - verification steps to ensure your change has the desired effects and has not introduced any regressions - any benefits that will be realized - any alternative implementations or possible drawbacks that you considered - screenshots or screencasts --> <!-- Enter any applicable Issue number(s) here that will be closed/resolved by this PR. --> Closes # ### How to test the Change <!-- Please provide steps on how to test or validate that the change in this PR works as described. --> ### Changelog Entry <!-- Please include a summary for this PR, noting whether this is something being Added / Changed / Deprecated / Removed / Fixed / or Security related. You can replace the sample entries after this comment block with the single changelog entry line for this PR. --> > Added - New feature > Changed - Existing functionality > Deprecated - Soon-to-be removed feature > Removed - Feature > Fixed - Bug fix > Security - Vulnerability ### Credits <!-- Please list any and all contributors on this PR so that they can be added to this projects CREDITS.md file. --> Props @username, @username2, ... ### Checklist: <!--- Go over all the following points, and put an `x` in all the boxes that apply. --> <!--- If you are unsure about any of these, please ask for clarification. We are here to help! --> - [ ] I agree to follow this project's [**Code of Conduct**](https://github.com/10up/.github/blob/trunk/CODE_OF_CONDUCT.md). - [ ] I have updated the documentation accordingly. - [ ] I have added tests to cover my change. - [ ] All new and existing tests pass.
The `revalidateRouteHandler` function uses the path pattern for the
pages router: `/_sites/${host}${path}`. When
`revalidatePath(pathToRevalidate)` is called, the `pathToRevalidate` is
incorrect, resulting in WordPress content updates not appearing on the
frontend without a manual cache purge.
### How to test the Change
On a site with caching enabled, update a WordPress page. The updated
content will not automatically appear on the frontend (when using App
Router). The `/api/revalidate` endpoint is called, but the computed path
to revalidate is incorrect.
### Changelog Entry
> Changed - With this change, the correct path is created, resulting in
a properly revalidated path.
> Added - A new optional callback parameter was added to
`revalidateRouteHandler`. This callback allows extra logic to be run
after the path is revalidated. For instance, revalidateTag may need to
be called for a specific query, or a `redis` tag may need to be deleted.
### Checklist:
<!--- Go over all the following points, and put an `x` in all the boxes
that apply. -->
<!--- If you are unsure about any of these, please ask for
clarification. We are here to help! -->
- [x] I agree to follow this project's [**Code of
Conduct**](https://github.com/10up/.github/blob/trunk/CODE_OF_CONDUCT.md).
- [ ] I have updated the documentation accordingly.
- [ ] I have added [Critical Flows, Test Cases, and/or End-to-End
Tests](https://10up.github.io/Open-Source-Best-Practices/testing/) to
cover my change.
- [x] All new and existing tests pass.
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
<!-- Filling out this template is required. Any PR that does not include enough information to be reviewed may be closed at a maintainers' discretion. All new code requires documentation and tests to ensure against regressions. --> ### Description of the Change <!-- We must be able to understand the design of your change from this description. The maintainer reviewing this PR may not have worked with this code recently, so please provide as much detail as possible. Where possible, please also include: - verification steps to ensure your change has the desired effects and has not introduced any regressions - any benefits that will be realized - any alternative implementations or possible drawbacks that you considered - screenshots or screencasts --> <!-- Enter any applicable Issue number(s) here that will be closed/resolved by this PR. --> Closes #882 ### How to test the Change <!-- Please provide steps on how to test or validate that the change in this PR works as described. --> ### Changelog Entry <!-- Please include a summary for this PR, noting whether this is something being Added / Changed / Deprecated / Removed / Fixed / or Security related. You can replace the sample entries after this comment block with the single changelog entry line for this PR. --> > Added - New feature > Changed - Existing functionality > Deprecated - Soon-to-be removed feature > Removed - Feature > Fixed - Bug fix > Security - Vulnerability > Developer - Non-functional update ### Credits <!-- Please list any and all contributors on this PR so that they can be added to this projects CREDITS.md file. --> Props @username, @username2, ... ### Checklist: <!--- Go over all the following points, and put an `x` in all the boxes that apply. --> <!--- If you are unsure about any of these, please ask for clarification. We are here to help! --> - [x] I agree to follow this project's [**Code of Conduct**](https://github.com/10up/.github/blob/trunk/CODE_OF_CONDUCT.md). - [x] I have updated the documentation accordingly. - [ ] I have added [Critical Flows, Test Cases, and/or End-to-End Tests](https://10up.github.io/Open-Source-Best-Practices/testing/) to cover my change. - [x] All new and existing tests pass.
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
<!-- Filling out this template is required. Any PR that does not include enough information to be reviewed may be closed at a maintainers' discretion. All new code requires documentation and tests to ensure against regressions. --> ### Description of the Change <!-- We must be able to understand the design of your change from this description. The maintainer reviewing this PR may not have worked with this code recently, so please provide as much detail as possible. Where possible, please also include: - verification steps to ensure your change has the desired effects and has not introduced any regressions - any benefits that will be realized - any alternative implementations or possible drawbacks that you considered - screenshots or screencasts --> <!-- Enter any applicable Issue number(s) here that will be closed/resolved by this PR. --> Closes #866 ### How to test the Change <!-- Please provide steps on how to test or validate that the change in this PR works as described. --> ### Changelog Entry <!-- Please include a summary for this PR, noting whether this is something being Added / Changed / Deprecated / Removed / Fixed / or Security related. You can replace the sample entries after this comment block with the single changelog entry line for this PR. --> > Added - New feature > Changed - Existing functionality > Deprecated - Soon-to-be removed feature > Removed - Feature > Fixed - Bug fix > Security - Vulnerability > Developer - Non-functional update ### Credits <!-- Please list any and all contributors on this PR so that they can be added to this projects CREDITS.md file. --> Props @username, @username2, ... ### Checklist: <!--- Go over all the following points, and put an `x` in all the boxes that apply. --> <!--- If you are unsure about any of these, please ask for clarification. We are here to help! --> - [ ] I agree to follow this project's [**Code of Conduct**](https://github.com/10up/.github/blob/trunk/CODE_OF_CONDUCT.md). - [ ] I have updated the documentation accordingly. - [ ] I have added [Critical Flows, Test Cases, and/or End-to-End Tests](https://10up.github.io/Open-Source-Best-Practices/testing/) to cover my change. - [ ] All new and existing tests pass.
… for post path matching (#905)
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to develop, this PR will be updated.⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ `develop` is currently in **pre mode** so this branch has prereleases rather than normal releases. If you want to exit prereleases, run `changeset pre exit` on `develop`.⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ # Releases ## @headstartwp/core@1.5.0-next.11 ### Patch Changes - 318c9fa: Fix: account for possible `single` property in the default post types when executing the default post path matching. - ee5be48: Fix: blockGap in useBlockSetting ## @headstartwp/next@1.5.0-next.13 ### Patch Changes - fbcad53: Fix: windows support - Updated dependencies [318c9fa] - Updated dependencies [ee5be48] - @headstartwp/core@1.5.0-next.11
<!-- Filling out this template is required. Any PR that does not include enough information to be reviewed may be closed at a maintainers' discretion. All new code requires documentation and tests to ensure against regressions. --> ### Description of the Change <!-- We must be able to understand the design of your change from this description. The maintainer reviewing this PR may not have worked with this code recently, so please provide as much detail as possible. Where possible, please also include: - verification steps to ensure your change has the desired effects and has not introduced any regressions - any benefits that will be realized - any alternative implementations or possible drawbacks that you considered - screenshots or screencasts --> <!-- Enter any applicable Issue number(s) here that will be closed/resolved by this PR. --> Fix typo ### How to test the Change <!-- Please provide steps on how to test or validate that the change in this PR works as described. --> ### Changelog Entry <!-- Please include a summary for this PR, noting whether this is something being Added / Changed / Deprecated / Removed / Fixed / or Security related. You can replace the sample entries after this comment block with the single changelog entry line for this PR. --> > Added - New feature > Changed - Existing functionality > Deprecated - Soon-to-be removed feature > Removed - Feature > Fixed - Bug fix > Security - Vulnerability > Developer - Non-functional update ### Credits <!-- Please list any and all contributors on this PR so that they can be added to this projects CREDITS.md file. --> Props @jacobdubail ### Checklist: <!--- Go over all the following points, and put an `x` in all the boxes that apply. --> <!--- If you are unsure about any of these, please ask for clarification. We are here to help! --> - [ ] I agree to follow this project's [**Code of Conduct**](https://github.com/10up/.github/blob/trunk/CODE_OF_CONDUCT.md). - [ ] I have updated the documentation accordingly. - [ ] I have added [Critical Flows, Test Cases, and/or End-to-End Tests](https://10up.github.io/Open-Source-Best-Practices/testing/) to cover my change. - [ ] All new and existing tests pass.
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to develop, this PR will be updated.⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ `develop` is currently in **pre mode** so this branch has prereleases rather than normal releases. If you want to exit prereleases, run `changeset pre exit` on `develop`.⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ # Releases ## @headstartwp/next@1.5.0-next.14 ### Patch Changes - c8baaa2: Fix type on prepareSeoMetadata
<!-- Filling out this template is required. Any PR that does not include enough information to be reviewed may be closed at a maintainers' discretion. All new code requires documentation and tests to ensure against regressions. --> ### Description of the Change <!-- We must be able to understand the design of your change from this description. The maintainer reviewing this PR may not have worked with this code recently, so please provide as much detail as possible. Where possible, please also include: - verification steps to ensure your change has the desired effects and has not introduced any regressions - any benefits that will be realized - any alternative implementations or possible drawbacks that you considered - screenshots or screencasts --> <!-- Enter any applicable Issue number(s) here that will be closed/resolved by this PR. --> This PR adds logic to ensure that internal images always have width/height when added to the block editor. This is useful because Next.js requires width/height in order to optimize images ### Checklist: <!--- Go over all the following points, and put an `x` in all the boxes that apply. --> <!--- If you are unsure about any of these, please ask for clarification. We are here to help! --> - [x] I agree to follow this project's [**Code of Conduct**](https://github.com/10up/.github/blob/trunk/CODE_OF_CONDUCT.md). - [x] I have updated the documentation accordingly. - [x] I have added [Critical Flows, Test Cases, and/or End-to-End Tests](https://10up.github.io/Open-Source-Best-Practices/testing/) to cover my change. - [x] All new and existing tests pass.
Co-authored-by: Jacob Dubail <jacob.dubail@10up.com>
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to develop, this PR will be updated.⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ `develop` is currently in **pre mode** so this branch has prereleases rather than normal releases. If you want to exit prereleases, run `changeset pre exit` on `develop`.⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ # Releases ## @headstartwp/next@1.5.0-next.15 ### Patch Changes - feff893: Fix how enable() from draftMode is called ## @headstartwp/headstartwp@1.2.0-next.1 ### Minor Changes - a858208: feat: ensure all internal images added to the block editor contains width and height.
<!-- Filling out this template is required. Any PR that does not include enough information to be reviewed may be closed at a maintainers' discretion. All new code requires documentation and tests to ensure against regressions. --> ### Description of the Change <!-- We must be able to understand the design of your change from this description. The maintainer reviewing this PR may not have worked with this code recently, so please provide as much detail as possible. Where possible, please also include: - verification steps to ensure your change has the desired effects and has not introduced any regressions - any benefits that will be realized - any alternative implementations or possible drawbacks that you considered - screenshots or screencasts --> <!-- Enter any applicable Issue number(s) here that will be closed/resolved by this PR. --> Closes #916 This implements the approach described in #916. ### Credits props to @tobeycodes for the WP code that loads the dynamic css. ### How to test the Change Add any core block that requires WordPress Core CSS such as group block with grid layout. ### Checklist: <!--- Go over all the following points, and put an `x` in all the boxes that apply. --> <!--- If you are unsure about any of these, please ask for clarification. We are here to help! --> - [x] I agree to follow this project's [**Code of Conduct**](https://github.com/10up/.github/blob/trunk/CODE_OF_CONDUCT.md). - [ ] I have updated the documentation accordingly. - [x] I have added [Critical Flows, Test Cases, and/or End-to-End Tests](https://10up.github.io/Open-Source-Best-Practices/testing/) to cover my change. - [x] All new and existing tests pass.
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
🦋 Changeset detectedLatest commit: 822a2d5 The changes in this PR will be included in the next version bump. This PR includes no changesetsWhen changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types 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 |
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
| runs-on: ${{ matrix.os }} | ||
| strategy: | ||
| # This ensures only one combination runs at a time to avoid rate limiting | ||
| max-parallel: 1 | ||
| matrix: | ||
| os: [ubuntu-latest, windows-latest] | ||
| node-version: [18, 20, 22] | ||
| exclude: | ||
| - os: windows-latest | ||
| node-version: 18 | ||
| - os: windows-latest | ||
| node-version: 20 | ||
|
|
||
| steps: | ||
| - name: Configure Git line endings | ||
| if: matrix.os == 'windows-latest' | ||
| run: | | ||
| git config --global core.autocrlf false | ||
| git config --global core.eol lf | ||
|
|
||
| - name: Checkout | ||
| uses: actions/checkout@v2 | ||
|
|
||
| - name: Setup Node ${{ matrix.node-version }} | ||
| uses: actions/setup-node@v3 | ||
| with: | ||
| node-version: ${{ matrix.node-version }} | ||
|
|
||
| - name: Setup npm cache | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: ~/.npm | ||
| key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-node- | ||
| - name: Install dependencies | ||
| run: npm install | ||
| - name: Build Projects (Windows) | ||
| if: matrix.os == 'windows-latest' | ||
| run: npm run build:wpnextjs:app && npm run build:wpnextjs | ||
| - name: Build Projects | ||
| if: matrix.os != 'windows-latest' | ||
| run: npm run build No newline at end of file |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 6 months ago
To fix the issue, we will add a permissions block at the root of the workflow file. This block will specify the least privileges required for the workflow to function correctly. Based on the actions used in the workflow (actions/checkout, actions/cache, etc.), the workflow only needs contents: read permission to read the repository's contents. No write permissions are required.
The permissions block will be added directly under the name field to apply to all jobs in the workflow.
-
Copy modified lines R2-R3
| @@ -1,2 +1,4 @@ | ||
| name: Build Test | ||
| permissions: | ||
| contents: read | ||
|
|
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v2 | ||
|
|
||
| - name: Set up node | ||
| uses: actions/setup-node@v3 | ||
| with: | ||
| node-version: '20.x' | ||
|
|
||
| - name: Install dependencies | ||
| run: (cd ../../ && npm ci) | ||
|
|
||
| - name: Restore next build | ||
| uses: actions/cache@v4 | ||
| id: restore-build-cache | ||
| env: | ||
| cache-name: cache-next-build | ||
| with: | ||
| # if you use a custom build directory, replace all instances of `.next` in this file with your build directory | ||
| # ex: if your app builds to `dist`, replace `.next` with `dist` | ||
| path: .next/cache | ||
| # change this if you prefer a more strict cache | ||
| key: ${{ runner.os }}-build-${{ env.cache-name }} | ||
|
|
||
| - name: Build next.js app | ||
| # change this if your site requires a custom build command | ||
| run: (cd ../../ && npm run build -- --filter=@10up/wp-nextjs-app) | ||
|
|
||
| # Here's the first place where next-bundle-analysis' own script is used | ||
| # This step pulls the raw bundle stats for the current bundle | ||
| - name: Analyze bundle | ||
| run: npx -p nextjs-bundle-analysis report | ||
|
|
||
| - name: Upload bundle | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: bundle | ||
| path: ./projects/wp-nextjs-app/.next/analyze/__bundle_analysis.json | ||
|
|
||
| - name: Download base branch bundle stats | ||
| uses: dawidd6/action-download-artifact@v2 | ||
| if: success() && github.event.number | ||
| with: | ||
| workflow: nextjs_bundle_analysis.yml | ||
| branch: ${{ github.event.pull_request.base.ref }} | ||
| path: ./projects/wp-nextjs-app/.next/analyze/base | ||
|
|
||
| # And here's the second place - this runs after we have both the current and | ||
| # base branch bundle stats, and will compare them to determine what changed. | ||
| # There are two configurable arguments that come from package.json: | ||
| # | ||
| # - budget: optional, set a budget (bytes) against which size changes are measured | ||
| # it's set to 350kb here by default, as informed by the following piece: | ||
| # https://infrequently.org/2021/03/the-performance-inequality-gap/ | ||
| # | ||
| # - red-status-percentage: sets the percent size increase where you get a red | ||
| # status indicator, defaults to 20% | ||
| # | ||
| # Either of these arguments can be changed or removed by editing the `nextBundleAnalysis` | ||
| # entry in your package.json file. | ||
| - name: Compare with base branch bundle | ||
| if: success() && github.event.number | ||
| run: ls -laR .next/analyze/base && npx -p nextjs-bundle-analysis compare | ||
|
|
||
| - name: Get comment body | ||
| id: get-comment-body | ||
| if: success() && github.event.number | ||
| run: | | ||
| body=$(cat .next/analyze/__bundle_analysis_comment.txt) | ||
| body="${body//'%'/'%25'}" | ||
| body="${body//$'\n'/'%0A'}" | ||
| body="${body//$'\r'/'%0D'}" | ||
| echo ::set-output name=body::$body | ||
|
|
||
| - name: Find Comment | ||
| uses: peter-evans/find-comment@v1 | ||
| if: success() && github.event.number | ||
| id: fc | ||
| with: | ||
| issue-number: ${{ github.event.number }} | ||
| body-includes: '<!-- __NEXTJS_BUNDLE -->' | ||
|
|
||
| - name: Create Comment | ||
| uses: peter-evans/create-or-update-comment@v1.4.4 | ||
| if: success() && github.event.number && steps.fc.outputs.comment-id == 0 | ||
| with: | ||
| issue-number: ${{ github.event.number }} | ||
| body: ${{ steps.get-comment-body.outputs.body }} | ||
|
|
||
| - name: Update Comment | ||
| uses: peter-evans/create-or-update-comment@v1.4.4 | ||
| if: success() && github.event.number && steps.fc.outputs.comment-id != 0 | ||
| with: | ||
| issue-number: ${{ github.event.number }} | ||
| body: ${{ steps.get-comment-body.outputs.body }} | ||
| comment-id: ${{ steps.fc.outputs.comment-id }} | ||
| edit-mode: replace |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 6 months ago
To fix the issue, we will add a permissions block at the root of the workflow file. This block will explicitly define the minimal permissions required for the workflow to function. Based on the workflow's steps, it primarily reads repository contents and interacts with pull requests. Therefore, we will set contents: read and pull-requests: write as the permissions. This ensures that the workflow has only the access it needs and no more.
-
Copy modified lines R10-R13
| @@ -9,2 +9,6 @@ | ||
|
|
||
| permissions: | ||
| contents: read | ||
| pull-requests: write | ||
|
|
||
| defaults: |
Description of the Change
Closes #
How to test the Change
Changelog Entry
Credits
Props @username, @username2, ...
Checklist: