-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TurboRepo 2.0 (and a new test case for blocksrenderer) (#785)
<!-- 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.
- Loading branch information
Showing
11 changed files
with
139 additions
and
93 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"name": "@10up/headless_framework", | ||
"name": "@10up/headstartwp", | ||
"version": "1.0.0", | ||
"description": "Monorepo for headless framework", | ||
"homepage": "https://github.com/10up/headstartwp#readme", | ||
|
@@ -14,14 +14,13 @@ | |
"scripts": { | ||
"build": "turbo run build", | ||
"build:packages": "turbo run build --filter=./packages/*", | ||
"build:wpnextjs": "npm run build:packages && turbo run build --filter=./projects/wp-nextjs", | ||
"test": "npm run build:packages && turbo run test", | ||
"build:wpnextjs": "turbo run build --filter=./projects/wp-nextjs", | ||
"test": "turbo run test", | ||
"test:watch": "turbo run test:watch", | ||
"lint": "turbo run lint", | ||
"wp-env": "npm run wp-env:start -w=wp/headless-wp", | ||
"nextjs:dev": "turbo run dev --parallel --filter=!./projects/wp-multisite-nextjs --filter=!./projects/wp-multisite-i18n-nextjs --filter=!./projects/wp-nextjs-ts", | ||
"nextjs:dev-multisite": "turbo run dev --parallel --filter=!./projects/wp-nextjs", | ||
"dev": "npm run build:packages && npm run wp-env && npm run nextjs:dev", | ||
"dev:multisite": "npm run build:packages && npm run wp-env && npm run nextjs:dev-multisite", | ||
"dev": "turbo run dev --parallel --filter=!./projects/wp-multisite-nextjs --filter=!./projects/wp-multisite-i18n-nextjs", | ||
"dev:multisite": "turbo run dev --parallel --filter=!./projects/wp-nextjs", | ||
"prepare": "husky install", | ||
"typedoc": "typedoc", | ||
"typedoc:watch": "typedoc --watch", | ||
|
@@ -48,8 +47,8 @@ | |
"jest": "^29.0.3", | ||
"jest-environment-jsdom": "^29.0.3", | ||
"lint-staged": "^11.1.2", | ||
"turbo": "^1.9.3", | ||
"prettier": "3.2.5" | ||
"prettier": "3.2.5", | ||
"turbo": "^2.0.3" | ||
}, | ||
"nextBundleAnalysis": { | ||
"buildOutputDirectory": "./projects/wp-nextjs/.next", | ||
|
@@ -63,11 +62,12 @@ | |
"npm": ">=9.0.0" | ||
}, | ||
"optionalDependencies": { | ||
"turbo-darwin-64": "^1.9.3", | ||
"turbo-darwin-arm64": "^1.9.3", | ||
"turbo-linux-64": "^1.9.3", | ||
"turbo-linux-arm64": "^1.9.3", | ||
"turbo-windows-64": "^1.9.3", | ||
"turbo-windows-arm64": "^1.9.3" | ||
} | ||
"turbo-darwin-64": "^2.0.3", | ||
"turbo-darwin-arm64": "^2.0.3", | ||
"turbo-linux-64": "^2.0.3", | ||
"turbo-linux-arm64": "^2.0.3", | ||
"turbo-windows-64": "^2.0.3", | ||
"turbo-windows-arm64": "^2.0.3" | ||
}, | ||
"packageManager": "[email protected]" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
packages/core/src/react/components/__tests__/__snapshots__/BlocksRenderer.tsx.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`BlocksRenderer works correctly with chinese content 1`] = ` | ||
<div> | ||
<h3 | ||
class="wp-block-heading" | ||
data-wp-block="{"level":3,"hash":"9fb25fc5-7456-4704-bffe-aa438487253b"}" | ||
data-wp-block-name="core/heading" | ||
> | ||
<strong> | ||
活動期間 | ||
</strong> | ||
</h3> | ||
</div> | ||
`; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,51 @@ | ||
{ | ||
"$schema": "https://turborepo.org/schema.json", | ||
"pipeline": { | ||
"build": { | ||
"dependsOn": ["^build"], | ||
"outputs": ["dist/**", ".next/**", "!.next/cache/**"] | ||
}, | ||
"test": { | ||
"outputs": [""], | ||
"inputs": ["src/**/*.tsx", "src/**/*.ts", "test/**/*.ts"] | ||
}, | ||
"lint": { | ||
"outputs": [""] | ||
}, | ||
"dev": { | ||
"cache": false | ||
} | ||
"$schema": "https://turborepo.org/schema.json", | ||
"tasks": { | ||
"build": { | ||
"dependsOn": [ | ||
"^build" | ||
], | ||
"outputs": [ | ||
"dist/**", | ||
".next/**", | ||
"!.next/cache/**" | ||
] | ||
}, | ||
"test": { | ||
"dependsOn": ["@headstartwp/core#build", "@headstartwp/next#build"], | ||
"outputs": [ | ||
"" | ||
], | ||
"inputs": [ | ||
"src/**/*.tsx", | ||
"src/**/*.ts", | ||
"test/**/*.ts" | ||
] | ||
}, | ||
"test:watch": { | ||
"persistent": true, | ||
"dependsOn": ["@headstartwp/core#build", "@headstartwp/next#build"], | ||
"outputs": [ | ||
"" | ||
], | ||
"inputs": [ | ||
"src/**/*.tsx", | ||
"src/**/*.ts", | ||
"test/**/*.ts" | ||
] | ||
}, | ||
"lint": { | ||
"outputs": [ | ||
"" | ||
] | ||
}, | ||
"dev": { | ||
"cache": false, | ||
"persistent": true, | ||
"dependsOn": ["@headstartwp/core#build", "@headstartwp/next#build", "//#wp-env", "@10up/next-redis-cache-provider#build"] | ||
}, | ||
"//#wp-env": { | ||
"cache": false | ||
} | ||
} | ||
} | ||
} |