Skip to content
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

Next gatsby v5 #1289

Merged
merged 108 commits into from
May 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
108 commits
Select commit Hold shift + click to select a range
8faa49f
feat(deps): update node to 18 (#1278)
eng618 Dec 1, 2022
dae0a5f
chore: release 4.0.0-next.0
eng618 Dec 1, 2022
75c6bcd
chore: release 4.0.0-next.1
eng618 Dec 1, 2022
a08bdf6
build: bump deps
eng618 Feb 5, 2023
228abba
chore: release 4.0.0-next.2
eng618 Feb 5, 2023
e92990f
build: update node version
eng618 Feb 20, 2023
a6a337b
Merge remote-tracking branch 'origin/main' into next
eng618 Mar 27, 2023
974eef9
build: update deps
eng618 Mar 27, 2023
22792b5
build: gatsby v5
eng618 Mar 27, 2023
44cdc5e
fix: run gatsby codemods
eng618 Mar 27, 2023
82416ea
build: define trailingSlash
eng618 Mar 27, 2023
10d5fae
build: bump dependencies
eng618 Mar 27, 2023
580cbe7
refactor: apply formatting
eng618 Mar 27, 2023
e686591
refactor(eslint): comment out unused imorts
eng618 Mar 27, 2023
72a17c5
refactor: apply formatting
eng618 Mar 27, 2023
a241e89
start update mdx
eng618 Mar 27, 2023
38bb067
Merge remote-tracking branch 'origin/main' into next
eng618 May 10, 2023
f5b66ae
build(deps): bump minor and below versions
eng618 May 10, 2023
1754639
build: update lerna
eng618 May 10, 2023
252eb7a
formatting...
eng618 May 10, 2023
c86d58e
feat: update release-it
eng618 May 10, 2023
a12ea4c
feat: update @commitlint
eng618 May 10, 2023
89cb3eb
ci: add github actions updater
eng618 May 10, 2023
ca7158e
build: move some deps down to devDependencies
eng618 May 10, 2023
430700c
build: update all things
eng618 May 10, 2023
ba9f49a
formatting...
eng618 May 10, 2023
6b31908
build: dep updates
eng618 May 11, 2023
6c4c0dd
fix: remove extraLayouts
eng618 May 11, 2023
24fd566
build: bump dependencies
eng618 Jun 15, 2023
280d4ae
chore: update sass resources loader to compatible version
eng618 Jun 16, 2023
7be486e
build: bump deps
eng618 Jun 16, 2023
dba3830
docs: start migration doc
eng618 Jul 6, 2023
7545fba
Merge remote-tracking branch 'origin/main' into next
eng618 Aug 4, 2023
f14479d
chore: rebuild yarn lock
eng618 Aug 4, 2023
fdf6ccd
build(deps): update minor and below
eng618 Aug 19, 2023
2558f7e
build(deps): update minor and below
eng618 Aug 19, 2023
5dbfef3
feat(layouts): start converting to use layouts
eng618 Aug 19, 2023
01f8cd7
Merge remote-tracking branch 'origin/main' into next
eng618 Aug 19, 2023
e1390e4
build: rebuild lock file
eng618 Aug 19, 2023
213f05c
build: cleanup unknown property
eng618 Aug 19, 2023
da0aa94
Merge remote-tracking branch 'origin/main' into next
eng618 Aug 31, 2023
e4c2658
Merge remote-tracking branch 'origin/main' into next
eng618 Aug 31, 2023
d31bea7
build(deps): update minor and below
eng618 Aug 31, 2023
f77cfa0
Merge remote-tracking branch 'origin/main' into next
eng618 Nov 1, 2023
3a75fc3
Merge remote-tracking branch 'origin/main' into next
eng618 Jan 31, 2024
596ffda
Merge remote-tracking branch 'origin/main' into next
eng618 Feb 1, 2024
35c4f81
build(deps): bump minor and below
eng618 Feb 1, 2024
18344af
fix(path): update layout path
eng618 Feb 1, 2024
f365a74
linter fixes
eng618 Feb 1, 2024
ec22fbb
Merge remote-tracking branch 'origin/main' into next
eng618 Feb 3, 2024
ec9fe46
chore: update changelog settings
eng618 Feb 3, 2024
8089bc6
build(deps): bump minor and below
eng618 Feb 5, 2024
e1c6245
chore: add recommended plugins
eng618 Feb 5, 2024
ffa7fbc
fix(scss): import + other minor fixes (#1410)
muditjuneja Feb 6, 2024
38f9c8c
Merge remote-tracking branch 'origin/main' into next
eng618 Feb 6, 2024
cd07308
chore(deps): bump minor and below
eng618 Feb 6, 2024
1e80c1a
fix(format): run prettier
eng618 Feb 6, 2024
380f8bd
Merge remote-tracking branch 'origin/main' into next
eng618 Feb 6, 2024
c5359c6
fix(lint): update wesbos
eng618 Feb 6, 2024
43d67cb
fix: linting,imports in code (#1414)
muditjuneja Feb 7, 2024
b845dd6
Merge remote-tracking branch 'origin/main' into next
eng618 Feb 7, 2024
137e948
build(deps): update release-it workspaces
eng618 Feb 7, 2024
cc21316
docs: update code block
eng618 Feb 7, 2024
b43d983
chore: release 4.0.0-next.4 [skip ci],
eng618 Feb 7, 2024
86da1b9
chore: update lock file
eng618 Feb 9, 2024
1e69b64
Fix : mdx tables + port to esm v2 (#1418)
muditjuneja Feb 12, 2024
26ba70a
Merge remote-tracking branch 'origin/main' into next
eng618 Feb 13, 2024
d45b3e0
fix(yarn): revert lock file changes
eng618 Feb 13, 2024
c6f49be
fix: v5 issues (#1431)
alisonjoseph Feb 29, 2024
fdf19b3
docs: update migration guide
eng618 Mar 1, 2024
69d7c92
Merge remote-tracking branch 'origin/main' into next
eng618 Mar 1, 2024
ae09b93
build: maintian dependencies
eng618 Mar 1, 2024
46a0af4
build: rebuild lock file
eng618 Mar 1, 2024
7aa23ec
Fix: code blocks in mdx + issues/868 (#1422)
muditjuneja Mar 3, 2024
21d02d1
fix: heading spacing
alisonjoseph Mar 8, 2024
b8d4961
build: bump yarn
eng618 Mar 8, 2024
37fb939
fix: nested list styling for v5 (#1438)
alisonjoseph Mar 9, 2024
9845d71
style: apply formatting
eng618 Mar 9, 2024
d992d59
chore: release 4.0.0-next.5.0 [skip ci],
eng618 Mar 9, 2024
700011b
build(deps): bump minor
eng618 Mar 10, 2024
69eb948
fix: copy button color token (#1441)
alisonjoseph Mar 12, 2024
09f2ee0
fix: regression in code blocks - default prop (#1442)
muditjuneja Mar 13, 2024
7729542
docs: code blocks docs page (#1443)
alisonjoseph Mar 15, 2024
19173d3
fix formatting
eng618 Mar 15, 2024
9ce7b5b
fix: release
eng618 Mar 15, 2024
a34757f
chore: release 4.0.0-next.7 [skip ci],
eng618 Mar 15, 2024
d8a73da
refactor: change hideCode prop to showAll prop (#1445)
muditjuneja Mar 17, 2024
dc1bbb1
fix: feedback form button style
alisonjoseph Mar 20, 2024
ba2e9af
fix: warnings (#1450)
alisonjoseph Mar 20, 2024
3511ce6
fix: caption styles (#1451)
alisonjoseph Mar 20, 2024
d559f5b
fix formatting
eng618 Mar 20, 2024
ed9d65f
chore: release 4.0.0-next.8 [skip ci],
eng618 Mar 20, 2024
cdee553
feat(next): add gatsby-plugin-local-search (#1464)
alisonjoseph Apr 16, 2024
95a7a99
chore: release 4.0.0-next.9 [skip ci],
eng618 Apr 17, 2024
6b36135
feat: add max results to search (#1466)
alisonjoseph Apr 17, 2024
d2f3e55
chore: release 4.0.0-next.10 [skip ci],
eng618 Apr 17, 2024
2dee2dd
Merge remote-tracking branch 'origin/main' into next
eng618 May 22, 2024
07f4093
build(deps): bump minor and below
eng618 May 22, 2024
2f475fd
chore: release 4.0.0-next.11 [skip ci],
eng618 May 22, 2024
6c99eaf
build(yarn): update lock file
eng618 May 22, 2024
95b33d1
docs: update migration guide
eng618 May 22, 2024
07c97f3
fix(deps): add missing preset
eng618 May 22, 2024
7f61897
docs: update migration guide
alisonjoseph May 23, 2024
aab1ef6
chore: cleanup
alisonjoseph May 23, 2024
ff49192
fix: update homepage link to v4 migration
alisonjoseph May 23, 2024
a0f0d14
Merge remote-tracking branch 'origin/main' into next
eng618 May 23, 2024
d71f73e
Merge remote-tracking branch 'origin/main' into next
eng618 May 23, 2024
36d34b1
Merge remote-tracking branch 'origin/main' into next
eng618 May 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions .stylelintrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,13 @@
"selector-pseudo-class-no-unknown": [
true,
{
"ignorePseudoClasses": [
"global",
"local"
]
"ignorePseudoClasses": ["global", "local"]
}
],
"property-no-unknown": [
true,
{
"ignoreProperties": [
"composes"
]
"ignoreProperties": ["composes"]
}
],
"no-descending-specificity": null
Expand Down
7 changes: 7 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"recommendations": [
"xyc.vscode-mdx-preview",
"unifiedjs.vscode-mdx",
"editorconfig.editorconfig"
]
}
324 changes: 162 additions & 162 deletions .yarn/releases/yarn-4.1.0.cjs → .yarn/releases/yarn-4.1.1.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ enableGlobalCache: false

nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-4.1.0.cjs
yarnPath: .yarn/releases/yarn-4.1.1.cjs
551 changes: 151 additions & 400 deletions CHANGELOG.md

Large diffs are not rendered by default.

4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@
> :exclamation: This project is maintained by community contributions. The original
> contributor, Carbon Design System, is no longer involved in maintaining this project.

The Gatsby Carbon theme includes all the configuration you need to build a beautiful
site inspired by the [Carbon Design System](https://www.carbondesignsystem.com).

[![Validate](https://github.com/carbon-design-system/gatsby-theme-carbon/actions/workflows/validate-and-build.yaml/badge.svg)](https://github.com/carbon-design-system/gatsby-theme-carbon/actions/workflows/validate-and-build.yaml)
[![release-it](https://github.com/carbon-design-system/gatsby-theme-carbon/actions/workflows/release.yml/badge.svg)](https://github.com/carbon-design-system/gatsby-theme-carbon/actions/workflows/release.yml)

<!-- NPM info -->
Expand Down
6 changes: 4 additions & 2 deletions cp-example.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# This script is used to update the a repository containing the starter kit
#!/bin/bash

# This script is used to update the a repository containing the starter kit
# https://github.com/carbon-design-system/gatsby-starter-carbon-theme
# This project should be located in the same directory as the starter project

Expand All @@ -8,4 +10,4 @@ find ./packages/example -type f -maxdepth 1 ! -iname '.DS_Store' -exec cp {} ../
# delete and copy over directories
rm -rf ../gatsby-starter-carbon-theme/{src,static}
cp -r ./packages/example/src ../gatsby-starter-carbon-theme/src
cp -r ./packages/example/static ../gatsby-starter-carbon-theme/static
cp -r ./packages/example/static ../gatsby-starter-carbon-theme/static
32 changes: 18 additions & 14 deletions docs/commitlint.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# commitlint

## My pull request is failing! What Gives?

We use a tool called
Expand All @@ -8,33 +10,35 @@ packages based on the type of commit.
If you're here, odds are your pull request or a subsequent commit didn't adhere
to our guidelines.

## So what do I do about it?!
### So what do I do about it?

We need a commit message that describes what's happening in your commit, let's
build one.

### Type
#### Type

Commit messages need a type, pick the one below that best matches your commit:

**Release:** commits in this category will trigger a release of the package

- fix: a bug fix (triggers a `patch` release)
- feat: a new feature (triggers a `minor` release)
- **fix**: a bug fix (triggers a `patch` release)
- **feat**: a new feature (triggers a `minor` release)

**No release:** commits in this category won't trigger a release

- build: changes that affect the build system
- ci: changes to our CI configuration
- chore: dependency updates
- docs: documentation changes
- perf: performance improvements
- refactor: code change that neither fixes a bug, nore adds a feature
- test: adding or changing test files
- **build**: changes that affect the build system
- **ci**: changes to our CI configuration
- **chore**: dependency updates
- **docs**: documentation changes
- **perf**: performance improvements
- **refactor**: code change that neither fixes a bug, nor adds a feature
- **test**: adding or changing test files
- **revert**: undoes another commit
- **style**: changes that do not affect the meaning of the code

Commit messages should look like this:

### Structure
#### Structure

Your commit should look like this (keep everything lowercase, even React
components):
Expand All @@ -45,7 +49,7 @@ type(scope): subject # scope is optional, it refers to a particular component/fe

The `subject` is just a short summary of the code changes

### Examples
#### Examples

```bash
feat: add RTL support
Expand All @@ -55,7 +59,7 @@ feat: add RTL support
fix(aside): remove aside margin
```

### Fixing the PR
#### Fixing the PR

1. On the command line, navigate to the repository that contains the commit you
want to amend
Expand Down
6 changes: 4 additions & 2 deletions docs/development-principles.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# What should be a feature?
# Development principles

## What should be a feature?

When determining whether a not a new feature should be added to the theme, we
should run the feature through the following heuristic. The term `siteland`
Expand All @@ -13,7 +15,7 @@ If any of the above are false, we recommend building a solution in `siteland`
for the project that needs it most. This ensures we bring in mature, solutions
that have the largest likelihood of solving more problems than it causes.

# What constitutes a breaking change?
## What constitutes a breaking change?

A breaking change for the theme is one in which, after upgrading, a site is
unable to build.
Expand Down
8 changes: 5 additions & 3 deletions docs/releases.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# When does the theme publish releases?
# Releases

## When does the theme publish releases?

At the moment, we intentionally publish releases manually. We want each release
to have meaning and reduce constant release churn. For that reason we release
Expand All @@ -12,7 +14,7 @@ when any of the following conditions are true:
If a patch is narrow in scope(impacting a small subset of sites) we'll hold off
on releasing the patch for the reasons mentioned above.

# How to publish a new theme version
## How to publish a new theme version

We publish to npm, create a GitHub release, and generate changelogs by using
[release-it](https://www.npmjs.com/package/release-it). To practice, use
Expand All @@ -27,7 +29,7 @@ not actually do anything.
4. Complete the prompts
5. 🚀 You did it! 🥳

# Updating the starter
## Updating the starter

If there's been a feature release/substantial change to the example project, you
should update the gatsby starter kit
Expand Down
58 changes: 30 additions & 28 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"name": "gatsby-theme-carbon-workspace",
"private": true,
"version": "4.0.0-next.11",
"packageManager": "[email protected]",
"repository": {
"url": "[email protected]:carbon-design-system/gatsby-theme-carbon.git",
"type": "git"
Expand Down Expand Up @@ -38,12 +40,11 @@
},
"release-it": {
"plugins": {
"release-it-yarn-workspaces": {
"skipChecks": true
},
"@release-it-plugins/workspaces": true,
"@release-it/conventional-changelog": {
"preset": "conventionalcommits",
"infile": "CHANGELOG.md"
"infile": "CHANGELOG.md",
"header": "# Changelog",
"preset": "conventionalcommits"
}
},
"github": {
Expand Down Expand Up @@ -79,31 +80,32 @@
]
},
"dependencies": {
"@commitlint/cli": "^11.0.0",
"@commitlint/config-conventional": "^11.0.0",
"@release-it/conventional-changelog": "^2.0.1",
"@babel/core": "^7.24.5",
"@babel/eslint-parser": "^7.24.5",
"@babel/preset-react": "^7.24.1",
"@commitlint/cli": "^18.6.1",
"@commitlint/config-conventional": "^18.6.3",
"@release-it-plugins/workspaces": "^4.2.0",
"@release-it/conventional-changelog": "^8.0.1",
"babel-eslint": "^10.1.0",
"eslint": "^6.8.0",
"eslint-config-airbnb": "^18.2.1",
"eslint-config-prettier": "^6.15.0",
"eslint-config-wesbos": "0.0.19",
"eslint-plugin-html": "^6.2.0",
"eslint": "^8.57.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-prettier": "^9.1.0",
"eslint-config-wesbos": "4.0.1",
"eslint-plugin-html": "^7.1.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jsx-a11y": "^6.8.0",
"eslint-plugin-prettier": "^3.4.1",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^4.6.0",
"husky": "^4.3.8",
"lerna": "^8.1.2",
"lint-staged": "^10.5.4",
"prettier": "^2.8.8",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-react": "^7.34.1",
"eslint-plugin-react-hooks": "^4.6.2",
"husky": "^9.0.11",
"lerna": "^8.1.3",
"lint-staged": "^15.2.4",
"prettier": "^3.2.5",
"prettier-config-carbon": "^0.11.0",
"release-it": "^14.14.3",
"release-it-yarn-workspaces": "^2.0.1",
"stylelint": "^15.11.0",
"stylelint-config-recommended-scss": "^12.0.0",
"stylelint-scss": "^5.3.2"
},
"version": "3.4.22",
"packageManager": "[email protected]"
"release-it": "^17.3.0",
"stylelint": "^16.5.0",
"stylelint-config-recommended-scss": "^14.0.0",
"stylelint-scss": "^6.3.0"
}
}
2 changes: 1 addition & 1 deletion packages/example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

> Gatsby [themes](https://www.gatsbyjs.org/docs/themes/) encapsulate all of the
> configuration and implementation details of Gatsby websites. This is a
> starter-kit (boilerplate) with a dependancy on the `gatsby-theme-carbon`
> starter-kit (boilerplate) with a dependency on the `gatsby-theme-carbon`
> package. The primary goal of `gatsby-theme-carbon` is to get content authors
> speaking the IBM Design Language with Carbon as soon as possible. It includes
> some sample components/content demos in the `src/pages` directory.
Expand Down
1 change: 1 addition & 0 deletions packages/example/gatsby-config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
module.exports = {
trailingSlash: `always`,
siteMetadata: {
title: 'Gatsby Theme Carbon',
description: 'A Gatsby theme for the carbon design system',
Expand Down
11 changes: 6 additions & 5 deletions packages/example/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "example",
"private": true,
"version": "3.4.22",
"version": "4.0.0-next.11",
"license": "Apache 2.0",
"scripts": {
"dev": "gatsby develop -H 0.0.0.0",
Expand All @@ -12,9 +12,10 @@
"clean": "gatsby clean"
},
"dependencies": {
"gatsby": "^4.25.8",
"gatsby-theme-carbon": "^3.4.22",
"react": "^17.0.2",
"react-dom": "^17.0.2"
"@carbon/icons-react": "^11.42.0",
"gatsby": "^5.13.5",
"gatsby-theme-carbon": "^4.0.0-next.11",
"react": "^18.3.1",
"react-dom": "^18.3.1"
}
}
2 changes: 1 addition & 1 deletion packages/example/src/components/Homepage.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { HomepageBanner, HomepageCallout } from 'gatsby-theme-carbon';
import HomepageTemplate from 'gatsby-theme-carbon/src/templates/Homepage';
import HomepageTemplate from 'gatsby-theme-carbon/src/components/Layouts/Homepage';
import { calloutLink } from './Homepage.module.scss';

import Carbon from './carbon.jpg';
Expand Down
2 changes: 2 additions & 0 deletions packages/example/src/data/nav-items.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
path: /guides/v2-migration
- title: v3.0 Migration
path: /guides/v3-migration
- title: v4.0 Migration
path: /guides/v4-migration
- title: Components
pages:
- title: Accordion
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Information } from '@carbon/icons-react';
import Meta from 'gatsby-theme-carbon/src/components/Meta';
import LeftNav from 'gatsby-theme-carbon/src/components/LeftNav';
import Header from 'gatsby-theme-carbon/src/components/Header';
import Switcher from 'gatsby-theme-carbon/src/components/Switcher';
import { Switcher } from 'gatsby-theme-carbon/src/components/Switcher';
import Container from 'gatsby-theme-carbon/src/components/Container';
import useMetadata from 'gatsby-theme-carbon/src/util/hooks/useMetadata';
import Footer from './Footer';
Expand Down
20 changes: 10 additions & 10 deletions packages/example/src/pages/components/Accordion.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,13 @@ ligula tempor.

<Title>AccordionItem</Title>

| property | propType | required | default | description |
| --------------- | -------- | -------- | ------------------------------ | ----------------------------------------------------------------------------------- |
| title | node | | 'title' | The accordion title |
| renderExpando | func | | props => <button {...props} /> | The callback function to render the expando button. Can be a React component class. |
| iconDescription | string | | 'Expand/Collapse' | The description of the expando icon |
| open | bool | | false | `true` to open the expando |
| onClick | func | | () => {} | The handler of the massaged `click` event. |
| onHeadingClick | func | | () => {} | The handler of the massaged `click` event on the heading. |
| children | node | | | Provide the contents of your AccordionItem |
| className | string | | | Specify an optional className to be applied to the container node |
| property | propType | required | default | description |
| --------------- | -------- | -------- | -------------------------------- | ----------------------------------------------------------------------------------- |
| title | node | | 'title' | The accordion title |
| renderExpando | func | | `props => <button {...props} />` | The callback function to render the expando button. Can be a React component class. |
| iconDescription | string | | 'Expand/Collapse' | The description of the expando icon |
| open | bool | | false | `true` to open the expando |
| onClick | func | | () => {} | The handler of the massaged `click` event. |
| onHeadingClick | func | | () => {} | The handler of the massaged `click` event on the heading. |
| children | node | | | Provide the contents of your AccordionItem |
| className | string | | | Specify an optional className to be applied to the container node |
Loading
Loading