-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat!: v6 * docs: migrate docs from Prismic to GitHub (#536) * docs: migrate docs from Prismic to GitHub * docs: remove old list of docs * style: run Prettier * docs: update with latest docs * docs: add How To articles * docs: use GitHub-hosted image * refactor: reorganize Gatsby API files * docs: add v5 to v6 migration guide * docs: fix styling error * docs: fix syntax highlighting * docs: update docs README
- Loading branch information
1 parent
7124817
commit 36c1226
Showing
564 changed files
with
66,696 additions
and
223,508 deletions.
There are no files selected for viewing
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 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,35 +1,133 @@ | ||
name: ci | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
on: push | ||
|
||
jobs: | ||
ci: | ||
prepare: | ||
name: Prepare (${{ matrix.os}}, Node ${{ matrix.node }}) | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
node: [18] | ||
node: [18, 20] | ||
|
||
steps: | ||
- uses: actions/setup-node@v2 | ||
- name: Set up Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@master | ||
|
||
- name: Cache node_modules | ||
id: cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: node_modules | ||
key: ${{ matrix.os }}-node-v${{ matrix.node }}-deps-${{ hashFiles(format('{0}{1}', github.workspace, '/package-lock.json')) }} | ||
|
||
- name: Install dependencies | ||
uses: bahmutov/npm-install@v1 | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
run: npm ci | ||
|
||
suite: | ||
needs: prepare | ||
name: Suite (${{ matrix.os}}, Node ${{ matrix.node }}) | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest] | ||
node: [18, 20] | ||
|
||
steps: | ||
- name: Set up Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
|
||
- name: Checkout | ||
uses: actions/checkout@master | ||
|
||
- name: Retrieve node_modules | ||
uses: actions/cache@v3 | ||
with: | ||
path: node_modules | ||
key: ${{ matrix.os }}-node-v${{ matrix.node }}-deps-${{ hashFiles(format('{0}{1}', github.workspace, '/package-lock.json')) }} | ||
|
||
- name: Lint | ||
run: npm run lint | ||
|
||
- name: Unit | ||
run: npm run unit | ||
|
||
- name: Build | ||
run: yarn build | ||
run: npm run build | ||
|
||
- name: Coverage | ||
if: matrix.os == 'ubuntu-latest' && matrix.node == 18 | ||
uses: codecov/codecov-action@v3 | ||
|
||
types: | ||
needs: prepare | ||
name: Types (${{ matrix.os}}, Node ${{ matrix.node }}, TS ${{ matrix.typescript }}) | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest] | ||
node: [18] | ||
typescript: ["4.5", "4.6", "4.7", "4.8", "4.9"] | ||
|
||
- name: Test | ||
run: yarn test | ||
steps: | ||
- name: Set up Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
|
||
- name: Checkout | ||
uses: actions/checkout@master | ||
|
||
- name: Retrieve node_modules | ||
uses: actions/cache@v3 | ||
with: | ||
path: node_modules | ||
key: ${{ matrix.os }}-node-v${{ matrix.node }}-deps-${{ hashFiles(format('{0}{1}', github.workspace, '/package-lock.json')) }} | ||
|
||
- name: Overwrite TypeScript | ||
run: npm install --no-save typescript@${{ matrix.typescript }} && npx tsc --version | ||
|
||
- name: Types | ||
run: npm run types | ||
|
||
size: | ||
needs: prepare | ||
name: Size (${{ matrix.os}}, Node ${{ matrix.node }}) | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest] | ||
node: [18] | ||
|
||
steps: | ||
- name: Set up Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
|
||
- name: Checkout | ||
uses: actions/checkout@master | ||
|
||
- name: Retrieve node_modules | ||
uses: actions/cache@v3 | ||
with: | ||
path: node_modules | ||
key: ${{ matrix.os }}-node-v${{ matrix.node }}-deps-${{ hashFiles(format('{0}{1}', github.workspace, '/package-lock.json')) }} | ||
|
||
- name: Size | ||
if: github.event_name == 'pull_request' && matrix.os == 'ubuntu-latest' && matrix.node == 18 | ||
uses: andresz1/size-limit-action@v1 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} |
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,6 +1,7 @@ | ||
# custom | ||
dist | ||
examples/**/package-lock.json | ||
.turbo | ||
|
||
# os | ||
.DS_Store | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
{ | ||
"plugins": ["@trivago/prettier-plugin-sort-imports", "prettier-plugin-jsdoc"], | ||
"jsdocCapitalizeDescription": false, | ||
"jsdocSeparateReturnsFromParam": true, | ||
"jsdocSeparateTagGroups": true, | ||
"jsdocSingleLineComment": false, | ||
"tsdoc": true, | ||
"importOrder": [ | ||
"^vitest(/|$)", | ||
"^node:", | ||
"<THIRD_PARTY_MODULES>", | ||
"^(?!.*/src(/|$)).*/__testutils__(/|$)", | ||
"^(?!.*/src(/|$)).*/__fixtures__(/|$)", | ||
"^(?!.*/src(/|$)).*/lib(/|$)", | ||
"^(?!.*/src(/|$)).*/types(/|$)", | ||
"^(?!.*/src(/|$)).*/errors(/|$)", | ||
"^(?!.*/src(/|$))../../../../../", | ||
"^(?!.*/src(/|$))../../../../", | ||
"^(?!.*/src(/|$))../../../", | ||
"^(?!.*/src(/|$))../../", | ||
"^(?!.*/src(/|$))../", | ||
"^(?!.*/src(/|$))./(.*/)+", | ||
"^(?!.*/src(/|$))./", | ||
"/src(/|$)" | ||
], | ||
"importOrderSeparation": true, | ||
"importOrderSortSpecifiers": true, | ||
"importOrderGroupNamespaceSpecifiers": true, | ||
"printWidth": 80, | ||
"useTabs": true, | ||
"semi": true, | ||
"singleQuote": false, | ||
"quoteProps": "as-needed", | ||
"jsxSingleQuote": false, | ||
"trailingComma": "all", | ||
"bracketSpacing": true, | ||
"bracketSameLine": false, | ||
"arrowParens": "always", | ||
"requirePragma": false, | ||
"insertPragma": false, | ||
"htmlWhitespaceSensitivity": "css", | ||
"endOfLine": "lf" | ||
} |
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,27 @@ | ||
const pkg = require("./package.json"); | ||
|
||
module.exports = pkg.workspaces | ||
.map((workspace) => { | ||
const pkg = require(`./${workspace}/package.json`); | ||
|
||
return [pkg.module, pkg.main] | ||
.filter(Boolean) | ||
.map((file) => `./${workspace}/${file}`); | ||
}) | ||
.flat() | ||
.map((path) => ({ | ||
path, | ||
ignore: ["react", "gatsby", "gatsby-plugin-image"], | ||
modifyEsbuildConfig: (config) => { | ||
// Silence warnings when removing side-effect-free modules. | ||
config.logLevel = "error"; | ||
|
||
// Add JSX support. | ||
config.loader = { | ||
...config.loader, | ||
".js": "jsx", | ||
}; | ||
|
||
return config; | ||
}, | ||
})); |
Oops, something went wrong.