Skip to content

Commit

Permalink
chore: update lerna and storybook
Browse files Browse the repository at this point in the history
In order to work with node 20
  • Loading branch information
etienneburdet committed Mar 12, 2024
1 parent 2accd78 commit 4ac7031
Show file tree
Hide file tree
Showing 13 changed files with 56,431 additions and 10,258 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ A monorepo for the Opendatasoft's libraries:
- [`@opendatasoft/visualizations`](packages/visualizations/): Components to easily build dashboards and visualizations on top of an Opendatasoft platform.
- [`@opendatasoft/visualizations-react`](packages/visualizations-react/): A convenient React wrapper for the visualizations components.

## Running packages locally
Install the monorepo with: `npm install` (`lerna boostrap` is now deprecated).
Run the all the packages with: `npm run watch`. Changes will propagate from one repo to the other.

## Contributing

This project welcomes contributions and suggestions! To do so, take a look at our [Contributing Guide](CONTRIBUTING.md). It contains setup instructions, tools and scripts that can be useful if you need to work on all packages at the same time.
Expand Down
3 changes: 0 additions & 3 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
{
"packages": [
"packages/*"
],
"version": "independent",
"command": {
"version": {
Expand Down
66,153 changes: 56,366 additions & 9,787 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@
"bugs": {
"url": "https://github.com/opendatasoft/ods-dataviz-sdk/issues"
},
"workspaces": ["packages/*"],
"scripts": {
"test": "lerna run test --parallel --no-bail",
"bootstrap": "lerna bootstrap",
"watch": "lerna run watch --parallel --stream",
"lint": "lerna run lint --parallel --no-bail",
"build-package-lock": "lerna run build-package-lock",
"storybook": "lerna run --scope=@opendatasoft/visualizations-react storybook"
},
"devDependencies": {
"lerna": "^5.5.0",
"lerna": "^8.1.2",
"nx": "^14.7.11"
}
}
12 changes: 11 additions & 1 deletion packages/api-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,21 @@
"rollup-plugin-terser": "^7.0.2",
"size-limit": "^8.1.0",
"tslib": "^2.0.3",
"typedoc": "^0.22.10",
"typedoc": "^0.25.12",
"typedoc-plugin-markdown": "^3.11.9",
"typescript": "4.6"
},
"dependencies": {
"immutability-helper": "^3.1.1"
},
"directories": {
"test": "test"
},
"repository": {
"type": "git",
"url": "git+https://github.com/opendatasoft/ods-dataviz-sdk.git"
},
"bugs": {
"url": "https://github.com/opendatasoft/ods-dataviz-sdk/issues"
}
}
22 changes: 20 additions & 2 deletions packages/visualizations-react/.storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,26 @@
module.exports = {
import { dirname, join } from "path";

function getAbsolutePath(value) {
return dirname(require.resolve(join(value, "package.json")));
}

export default {
stories: ['../stories/**/*.stories.@(ts|tsx|js|jsx)'],
addons: ['@storybook/addon-links', '@storybook/addon-essentials'],
addons: [getAbsolutePath("@storybook/addon-links"), getAbsolutePath("@storybook/addon-essentials")],
// https://storybook.js.org/docs/react/configure/typescript#mainjs-configuration
typescript: {
check: true, // type-check stories during Storybook build
},
docs: {
autodocs: true
},

framework: {
name: getAbsolutePath("@storybook/react-vite"),
options: {
root: '../src',
}
}
};


2 changes: 1 addition & 1 deletion packages/visualizations-react/.storybook/manager.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { addons } from '@storybook/addons';
import { addons } from '@storybook/manager-api';

addons.setConfig({
panelPosition: 'right',
Expand Down
20 changes: 12 additions & 8 deletions packages/visualizations-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@
"lint:prettier:check": "prettier --check src test",
"lint:eslint:fix": "eslint src test --fix",
"lint:prettier:fix": "prettier src test --write",
"prepare": "rimraf dist && rollup --config",
"size": "size-limit",
"analyze": "size-limit --why",
"storybook": "start-storybook -p 6006",
"build-storybook": "build-storybook"
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build",
"prepare": "rimraf dist && rollup --config"
},
"peerDependencies": {
"react": ">=16"
Expand All @@ -53,7 +53,7 @@
"trailingComma": "es5"
},
"dependencies": {
"@opendatasoft/visualizations": "0.21.1-beta.0",
"@opendatasoft/visualizations": "file:../visualizations",
"use-callback-ref": "^1.2.4"
},
"devDependencies": {
Expand All @@ -68,10 +68,13 @@
"@rollup/plugin-replace": "^3.0.1",
"@rollup/plugin-typescript": "^6.1.0",
"@size-limit/preset-small-lib": "^8.1.0",
"@storybook/addon-essentials": "^6.5.16",
"@storybook/addon-links": "^6.5.16",
"@storybook/addons": "^6.5.16",
"@storybook/react": "^6.5.16",
"@storybook/addon-essentials": "^7.6.17",
"@storybook/addon-links": "^7.6.17",
"@storybook/cli": "^7.6.17",
"@storybook/manager-api": "^8.0.0",
"@storybook/preview-api": "^8.0.0",
"@storybook/react": "^7.6.17",
"@storybook/react-vite": "^7.6.17",
"@testing-library/jest-dom": "^5.11.9",
"@testing-library/react": "^12.1.5",
"@turf/turf": "^6.5.0",
Expand Down Expand Up @@ -107,6 +110,7 @@
"rollup-plugin-postcss": "^4.0.2",
"rollup-plugin-terser": "^7.0.2",
"size-limit": "^8.1.0",
"storybook": "^8.0.0",
"tslib": "^2.1.0",
"typescript": "4.6"
}
Expand Down
5 changes: 5 additions & 0 deletions packages/visualizations-react/vite.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { defineConfig } from 'vite';

export default defineConfig({
root: 'src'
})
Loading

0 comments on commit 4ac7031

Please sign in to comment.