Skip to content

Commit

Permalink
feat!: v6 (#535)
Browse files Browse the repository at this point in the history
* 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
angeloashmore authored Jun 29, 2023
1 parent 7124817 commit 36c1226
Show file tree
Hide file tree
Showing 564 changed files with 66,696 additions and 223,508 deletions.
13 changes: 0 additions & 13 deletions .gitattributes

This file was deleted.

19 changes: 10 additions & 9 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,29 @@
---
name: 🚨 Bug report
about: Report a bug report to help us improve the package.
title: ''
labels: 'bug'
assignees: ''
about: Report a bug report to help improve the package.
title: ""
labels: "bug"
assignees: ""
---

<!-- 💙 Thanks for your time to make this package better with your feedback 💙
**IMPORTANT** Before reporting a bug please make sure that you have read through the documentation:
- https://prismic.io/docs/technologies/gatsby
- https://prismic.io/docs
👍 A properly detailed bug report can save a LOT of time and help fixing issues as soon as possible.
-->

### Versions

- gatsby-source-prismic: <!-- ex: v0.1.0 -->
- gatsby-plugin-prismic-previews: <!-- (if used) ex: v0.1.0 -->
- node: <!-- ex: v12.14.0 -->
- `gatsby-source-prismic`: <!-- ex: v5.2.9 -->
- `gatsby-plugin-prismic-previews`: <!-- (if used) ex: v5.2.9 -->
- `gatsby`: <!-- ex: v4.20.0 -->
- Node.js: <!-- ex: v14.15.0 -->

### Reproduction

<!-- Please link to a minimal test case. Without a reproduction, it is so hard to address problems :( -->
<!-- If possible link to a minimal test case. Without a reproduction, it is difficult to address problems. :( -->

<details open>
<summary>Additional Details</summary>
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ blank_issues_enabled: false
contact_links:
- name: 👪 Prismic Community Forum
url: https://community.prismic.io
about: Ask questions about this package or raise issues directly related to Prismic. You will usually get support much quicker there!
about: Ask a question about the package or raise an issue directly related to Prismic. You will usually get support there more quickly!
8 changes: 4 additions & 4 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
---
name: 🙋‍♀️ Feature request
about: Suggest an idea or enhancement for the package.
title: ''
labels: 'enhancement'
assignees: ''
title: ""
labels: "enhancement"
assignees: ""
---

<!-- 💙 Thanks for your time to make this package better with your feedback 💙 -->

### Is your feature request related to a problem? Please describe.

<!-- A clear and concise description of what the problem is. E.g. I'm always frustrated when [...] -->
<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->

### Describe the solution you'd like

Expand Down
7 changes: 0 additions & 7 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
<!--- Provide a general summary of your changes in the title above -->

## Package

<!--- Which packages are affected? Put an `x` in all the boxes that apply: -->

- [ ] gatsby-source-prismic
- [ ] gatsby-plugin-prismic-previews

## Types of changes

<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
Expand Down
60 changes: 60 additions & 0 deletions .github/prismic-oss-ecosystem.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
130 changes: 114 additions & 16 deletions .github/workflows/ci.yml
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 }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# custom
dist
examples/**/package-lock.json
.turbo

# os
.DS_Store
Expand Down
1 change: 0 additions & 1 deletion .node-version

This file was deleted.

43 changes: 43 additions & 0 deletions .prettierrc
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"
}
27 changes: 27 additions & 0 deletions .size-limit.cjs
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;
},
}));
Loading

0 comments on commit 36c1226

Please sign in to comment.