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

Infrastructure maintenance #2313

Merged
merged 77 commits into from
Apr 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
48aa3b4
fix(boxplot): fix stale dependencies
plouc Apr 28, 2023
1a267c9
feat(infrastructure): migrate to pnpm
plouc Apr 28, 2023
9b086e0
feat(infrastructure): replace yarn calls with pnpm
plouc Apr 28, 2023
66e6ed7
feat(infrastructure): upgrade rollup
plouc Apr 28, 2023
21c9074
feat(ci): update github worflow to use pnpm
plouc Apr 28, 2023
ce7fe85
feat(core): directly export types
plouc Apr 28, 2023
963524e
fix(deps): add missing dependencies in nivo packages
plouc Apr 28, 2023
3e84110
fix(radar): add missing dependencies
plouc Apr 28, 2023
2f4e40d
fix(radial-bar): add missing dependencies
plouc Apr 28, 2023
2a06b47
fix(recompose): add missing dependencies
plouc Apr 28, 2023
38ba307
fix(sankey): add missing dependencies
plouc Apr 28, 2023
e158165
fix(scatterplot): fix dependencies
plouc Apr 28, 2023
1c66b3c
fix(stream): fix dependencies
plouc Apr 28, 2023
07edbc8
fix(sunburst): fix dependencies
plouc Apr 28, 2023
16442d8
fix(swarmplot): fix dependencies
plouc Apr 28, 2023
24c0e2a
fix(treemap): fix dependencies
plouc Apr 28, 2023
d271b38
fix(voronoi): fix dependencies
plouc Apr 28, 2023
e7db272
fix(waffle): fix dependencies
plouc Apr 28, 2023
01994de
feat(infrastructure): rename package targets to pkg
plouc Apr 28, 2023
44e4b9a
feat(stories): isolate storybook
plouc Apr 29, 2023
6ea24b4
doc(infrastructure): update the contributing guide
plouc Apr 29, 2023
df8d2ba
feat(react): force usage of react 18
plouc Apr 29, 2023
bd4d516
feat(calendar): move stories to the dedicated storybook workspace
plouc Apr 29, 2023
040325c
feat(chord): move stories to the dedicated storybook workspace
plouc Apr 29, 2023
40b66a5
feat(circle-packing): move stories to the dedicated storybook workspace
plouc Apr 29, 2023
69f3ff7
feat(funnel): move stories to the dedicated storybook workspace
plouc Apr 29, 2023
3e77a09
feat(heatmap): move stories to the dedicated storybook workspace
plouc Apr 29, 2023
5ee7b97
feat(line): move stories to the dedicated storybook workspace
plouc Apr 29, 2023
db30790
feat(marimekko): move stories to the dedicated storybook workspace
plouc Apr 29, 2023
a9a3a5f
feat(network): move stories to the dedicated storybook workspace
plouc Apr 29, 2023
13fc395
feat(pie): move stories to the dedicated storybook workspace
plouc Apr 29, 2023
f6fed5d
feat(radar): move stories to the dedicated storybook workspace
plouc Apr 29, 2023
bbb8e97
feat(radial-bar): move stories to the dedicated storybook workspace
plouc Apr 29, 2023
90ba33a
feat(sankey): move stories to the dedicated storybook workspace
plouc Apr 29, 2023
1b9e72d
feat(scatterplot): move stories to the dedicated storybook workspace
plouc Apr 29, 2023
186a04b
feat(stream): move stories to the dedicated storybook workspace
plouc Apr 29, 2023
dcc6fb7
feat(sunburst): move stories to the dedicated storybook workspace
plouc Apr 29, 2023
a9a1af6
feat(swarmplot): move stories to the dedicated storybook workspace
plouc Apr 29, 2023
8be3c80
feat(treemap): move stories to the dedicated storybook workspace
plouc Apr 29, 2023
f4030a8
feat(voronoi): move stories to the dedicated storybook workspace
plouc Apr 29, 2023
247205d
feat(waffle): move stories to the dedicated storybook workspace
plouc Apr 29, 2023
4e39511
fix(ci): rename make targets in the github workflow
plouc Apr 29, 2023
9c222d1
fix(ts): add missing types for mouse events in various packages
plouc Apr 29, 2023
27a9215
feat(types): uprgade typescript to 4.9.5
plouc Apr 29, 2023
467c1ec
fix(bump): add missing types for event handlers
plouc Apr 29, 2023
0477454
fix(stream): add missing types for event handlers
plouc Apr 29, 2023
0e1a042
fix(scatterplot): add missing types for event handlers
plouc Apr 29, 2023
bc94a0a
fix(sankey): add missing types for event handlers
plouc Apr 29, 2023
da5f0cc
fix(radar): add missing types for event handlers
plouc Apr 29, 2023
7d510ed
fix(voronoi): add missing types for event handlers
plouc Apr 29, 2023
42dbe4a
fix(pie): fix types
plouc Apr 29, 2023
6849066
fix(static): add missing @nivo/colors dependency
plouc Apr 29, 2023
5ed5c5b
fix(scales): fix types
plouc Apr 29, 2023
9da9e63
fix(marimekko): add missing types for event handlers
plouc Apr 29, 2023
788e0c4
fix(axes): fix typings
plouc Apr 30, 2023
1d80a1f
fix(scales): improve constraints for scales
plouc Apr 30, 2023
545104e
feat(typings): specify TypeScript baseUrl for all nivo packages
plouc Apr 30, 2023
c9d88b7
fix(types): ignore nivo packages due to the migration to pnpm
plouc Apr 30, 2023
2946e4c
fix(tests): adjust transformIgnorePatterns for pnpm
plouc Apr 30, 2023
a09b8d9
fix(storybook): add missing @nivo/axes dependency
plouc Apr 30, 2023
d63d378
fix(network): fix typings errors
plouc Apr 30, 2023
8f333c1
chore(linting): upgrade eslint
plouc Apr 30, 2023
a406aff
fix(react): adjust react deps
plouc Apr 30, 2023
1a9d9c4
feat(infrastructure): pkgs-build target now fails as soon as it encou…
plouc Apr 30, 2023
563441f
fix(website): get the website to work with pnpm and react 18 (behavin…
plouc Apr 30, 2023
caf9e18
chore(deps): remove stale dependencies
plouc Apr 30, 2023
ac86835
feat(fmt): reformat the code after the prettier upgrade
plouc Apr 30, 2023
92f311e
feat(captures): adjust the capture scripts due to the pupeeter update
plouc Apr 30, 2023
3c1dc1c
fix(website): fix website build
plouc Apr 30, 2023
587da25
fix(pkgs): restore types for @nivo/static and @nivo/express
plouc Apr 30, 2023
4655b49
fix(pkgs): all packages should now build without errors
plouc Apr 30, 2023
e5e632f
feat(infrastructure): make sure that we can build both the website an…
plouc Apr 30, 2023
cfed8c4
feat(axes): update tests for @nivo/axes
plouc Apr 30, 2023
74d3a8f
feat(capture): update the capture script
plouc Apr 30, 2023
e037911
feat(test): update tests for bar
plouc Apr 30, 2023
40180f0
feat(ci): use node 18 on CI
plouc Apr 30, 2023
332908f
fix(website): attempt to fix gatsby build on CI
plouc Apr 30, 2023
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
42 changes: 16 additions & 26 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,38 +11,28 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ['16']
node-version: ['18']
steps:
- name: Check out code
uses: actions/checkout@v2
uses: actions/checkout@v3

- uses: pnpm/action-setup@v2
with:
version: 8

- name: Setup Node ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- run: pnpm install
- run: make pkgs-build
- run: make pkgs-lint
- run: make pkgs-test

- name: Restore Yarn cache
uses: actions/cache@v2
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-

- name: Restore Lerna cache
uses: actions/cache@v2
with:
path: |
node_modules
*/*/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
# Make sure that we can build the website
- run: make website-build

- run: yarn install --frozen-lockfile
- run: make bootstrap
- run: make packages-build
- run: make packages-lint
- run: make packages-test
# Make sure that we can build storybook
- run: make storybook-build
11 changes: 10 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*.log*
node_modules
coverage
/storybook-static
storybook/storybook-static

package-lock.json

Expand All @@ -18,3 +18,12 @@ build
/api/app.js
# Local Netlify folder
.netlify

# yarn 2 - not using zero-installs
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
3 changes: 3 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
auto-install-peers=true
strict-peer-dependencies=false
dedupe-peer-dependents=true
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v16
v18
7 changes: 0 additions & 7 deletions .storybook/babel.config.js

This file was deleted.

11 changes: 0 additions & 11 deletions .storybook/main.js

This file was deleted.

8 changes: 0 additions & 8 deletions .storybook/manager.js

This file was deleted.

26 changes: 0 additions & 26 deletions .storybook/preview-head.html

This file was deleted.

42 changes: 0 additions & 42 deletions .storybook/preview.js

This file was deleted.

32 changes: 19 additions & 13 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@

## Requirements

- **Node.js**
- **yarn**
- **Node.js >= 16**
- **pnpm**
- **Make** (you also have the option to run the commands manually though)

## Setup

Nivo is structured into multiple packages handled by [lerna](https://lerna.js.org/).
Nivo is structured into multiple packages thanks to workspaces.
In order to install all the required dependencies and to establish links between
the various packages, please execute the following:

Expand All @@ -41,8 +41,14 @@ The storybook development mode can be started via:
make storybook
```

The storybook uses the src code of each package, thus you don't have to build
to see your changes.
Stories are located in a different folder: `storybook/stories/` so you should also
run the package in dev mode:

```
make pkg-dev-bar
```

Where `bar` is the name of the package.

### Demo/Doc website

Expand All @@ -56,28 +62,28 @@ of a package, you'll have to rebuild it to see the changes.

To automate this process, you can start a watcher on the package you're working
on, for example if you want to make some change on the `@nivo/bar` package,
you should run `make package-dev-bar` and then start the website `make website`,
you should run `make pkg-dev-bar` and then start the website `make website`,
this way each change you make will trigger a build and will be (almost :))
immediately visible on the website.

You can also build the packages without running a watcher, you have two options:

1. Rebuild all the packages via `make packages-build` or…
2. Rebuild only a specific package, for example `make package-build-bar` for `@nivo/bar` package
1. Rebuild all the packages via `make pkgs-build` or…
2. Rebuild only a specific package, for example `make pkg-build-bar` for `@nivo/bar` package

### Testing

To run unit tests on all packages, run the following command:

```
make packages-test
make pkgs-test
```

If you only made modifications on a specific package,
you can use the scoped form to speed up the process:

```
make package-test-bar
make pkg-test-bar
```

where `bar` is the name of the targeted nivo package.
Expand All @@ -99,14 +105,14 @@ eslint is only enabled on packages for now, if you want to run eslint
against all packages, please run:

```
make packages-lint
make pkgs-lint
```

If you only made modifications on a specific package,
you can use the scoped form to speed up the process:

```
make package-lint-bar
make pkg-lint-bar
```

where `bar` is the name of the targeted nivo package.
Expand All @@ -129,7 +135,7 @@ make website
Then run the corresponding script:

```
make packages-screenshots
make pkgs-screenshots
```

## Website
Expand Down
Loading