Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: plouc/nivo
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.74.1
Choose a base ref
...
head repository: plouc/nivo
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.75.0
Choose a head ref

Commits on Dec 17, 2021

  1. Copy the full SHA
    d53681b View commit details
  2. Copy the full SHA
    b15f63c View commit details
  3. Copy the full SHA
    eff43e2 View commit details
  4. feat(website): update gatsby

    plouc committed Dec 17, 2021
    Copy the full SHA
    5077890 View commit details
  5. chore(eslint): upgrade eslint

    plouc committed Dec 17, 2021
    Copy the full SHA
    8213867 View commit details
  6. chore(rollup): update rollup

    plouc committed Dec 17, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    c253548 View commit details
  7. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    35d4a4a View commit details
  8. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    1ec5fbd View commit details
  9. fix(build): fix error with duplicated typings for eslint by forcing t…

    …he resolution of the package
    plouc committed Dec 17, 2021
    Copy the full SHA
    384e424 View commit details
  10. Copy the full SHA
    60cdbbb View commit details
  11. Copy the full SHA
    6bfeaa8 View commit details
  12. Copy the full SHA
    7d03e9a View commit details
  13. Copy the full SHA
    64ac24e View commit details
  14. Copy the full SHA
    a4dbb44 View commit details
  15. Copy the full SHA
    fc0f27f View commit details
  16. Copy the full SHA
    20d5f05 View commit details
  17. Copy the full SHA
    643a1c9 View commit details
  18. Copy the full SHA
    ec6e7d9 View commit details
  19. Copy the full SHA
    7b1bbdb View commit details
  20. Copy the full SHA
    4d5ea5d View commit details
  21. Copy the full SHA
    06f1bc9 View commit details
  22. Copy the full SHA
    11c9e34 View commit details
  23. Copy the full SHA
    42eb2e4 View commit details
  24. Copy the full SHA
    99486f4 View commit details
  25. Copy the full SHA
    222de05 View commit details
  26. Copy the full SHA
    e36b06b View commit details
  27. Copy the full SHA
    0750223 View commit details
  28. bar docs: fix typo (legeds -> legends)

    davidcalhoun authored and plouc committed Dec 17, 2021
    Copy the full SHA
    7f68c58 View commit details
  29. Copy the full SHA
    7cfbfc9 View commit details
  30. Copy the full SHA
    edd3990 View commit details
  31. fix(bar): avoid to redefine react forwardRef type

    Adrien Gibrat authored and plouc committed Dec 17, 2021
    Copy the full SHA
    cd6e3ec View commit details
  32. Copy the full SHA
    feb6de6 View commit details
  33. v0.75.0

    plouc committed Dec 17, 2021
    Copy the full SHA
    bfe8126 View commit details
Showing with 11,430 additions and 15,935 deletions.
  1. +1 −1 .codesandbox/ci.json
  2. +5 −0 .eslintignore
  3. +0 −2 .eslintrc.yml
  4. +13 −3 .github/workflows/ci.yml
  5. +2 −1 .gitignore
  6. +1 −1 .nvmrc
  7. +0 −4 .storybook/.babelrc
  8. +7 −0 .storybook/babel.config.js
  9. +10 −11 .storybook/main.js
  10. +44 −1 CHANGELOG.md
  11. +26 −18 Makefile
  12. +1 −0 Procfile
  13. +0 −1 api/Procfile
  14. +44 −0 api/app.ts
  15. +0 −53 api/misc/README.mustache
  16. +0 −28 api/misc/readmeData.js
  17. +12 −0 api/nodemon.json
  18. +17 −33 api/package.json
  19. +0 −128 api/src/api.yml
  20. +0 −107 api/src/app.js
  21. +0 −36 api/src/lib/middlewares/validationMiddleware.js
  22. +0 −34 api/src/lib/render/index.js
  23. +0 −21 api/src/lib/storage/index.js
  24. +0 −56 api/src/mapping/bar.js
  25. +0 −41 api/src/mapping/bubble.js
  26. +0 −39 api/src/mapping/calendar.js
  27. +0 −58 api/src/mapping/chord.js
  28. +0 −51 api/src/mapping/common.js
  29. +0 −30 api/src/mapping/commons/scales.js
  30. +0 −50 api/src/mapping/heatmap.js
  31. +0 −23 api/src/mapping/index.js
  32. +0 −89 api/src/mapping/line.js
  33. +0 −53 api/src/mapping/pie.js
  34. +0 −56 api/src/mapping/radar.js
  35. +0 −77 api/src/mapping/sankey.js
  36. +0 −37 api/src/mapping/sunburst.js
  37. +0 −64 api/src/mapping/treemap.js
  38. +0 −45 api/src/samples/heatmap.js
  39. +12 −0 api/tsconfig.json
  40. +8 −1 babel.config.js
  41. +5 −2 conf/rollup.config.js
  42. +1 −1 lerna.json
  43. +47 −40 package.json
  44. +4 −4 packages/annotations/package.json
  45. +2 −6 packages/annotations/src/types.ts
  46. +4 −4 packages/arcs/package.json
  47. +8 −8 packages/arcs/src/ArcShape.tsx
  48. +3 −0 packages/arcs/src/arc_labels/index.ts
  49. +11 −15 packages/arcs/src/arc_link_labels/ArcLinkLabelsLayer.tsx
  50. +3 −0 packages/arcs/src/arc_link_labels/index.ts
  51. +18 −16 packages/arcs/src/centers.ts
  52. +4 −4 packages/axes/package.json
  53. +1 −1 packages/axes/src/compute.ts
  54. +9 −9 packages/bar/package.json
  55. +0 −7 packages/bar/src/BarCanvas.tsx
  56. +4 −5 packages/bar/src/BarItem.tsx
  57. +6 −1 packages/bar/src/ResponsiveBarCanvas.tsx
  58. +8 −6 packages/bar/src/compute/common.ts
  59. +2 −2 packages/bar/src/compute/stacked.ts
  60. +1 −2 packages/bar/stories/bar.stories.tsx
  61. +12 −11 packages/bar/tests/Bar.test.tsx
  62. +7 −7 packages/bullet/package.json
  63. +11 −11 packages/bullet/tests/Bullet.test.tsx
  64. +1 −1 packages/bump/index.d.ts
  65. +7 −7 packages/bump/package.json
  66. +4 −5 packages/bump/src/area-bump/AreaBump.js
  67. +9 −9 packages/bump/src/area-bump/hooks.js
  68. +5 −1 packages/bump/src/bump/hooks.js
  69. +5 −5 packages/calendar/package.json
  70. +7 −7 packages/chord/package.json
  71. +13 −20 packages/chord/src/ChordCanvas.js
  72. +7 −5 packages/chord/src/ChordRibbons.js
  73. +5 −5 packages/circle-packing/package.json
  74. +6 −5 packages/circle-packing/src/CirclePacking.tsx
  75. +4 −3 packages/circle-packing/src/Circles.tsx
  76. +1 −0 packages/circle-packing/src/types.ts
  77. +3 −3 packages/colors/package.json
  78. +16 −0 packages/core/index.d.ts
  79. +4 −4 packages/core/package.json
  80. +19 −0 packages/express/LICENSE.md
  81. +3 −0 packages/express/README.md
  82. +39 −0 packages/express/package.json
  83. +57 −0 packages/express/src/index.ts
  84. +19 −0 packages/express/src/memory-storage.ts
  85. +36 −0 packages/express/src/validation.ts
  86. +8 −0 packages/express/tsconfig.json
  87. +6 −6 packages/funnel/package.json
  88. +1 −1 packages/generators/package.json
  89. +6 −6 packages/geo/package.json
  90. +4 −4 packages/geo/src/Choropleth.js
  91. +4 −4 packages/geo/src/ChoroplethCanvas.js
  92. +4 −4 packages/geo/src/GeoMap.js
  93. +4 −4 packages/geo/src/GeoMapCanvas.js
  94. +12 −10 packages/geo/src/hooks.js
  95. +6 −6 packages/heatmap/package.json
  96. +3 −3 packages/legends/package.json
  97. +1 −0 packages/legends/src/svg/index.ts
  98. +10 −10 packages/line/package.json
  99. +5 −1 packages/line/src/hooks.js
  100. +4 −50 packages/line/stories/line.stories.js
  101. +2 −1 packages/line/tests/Line.test.js
  102. +6 −6 packages/marimekko/package.json
  103. +17 −18 packages/marimekko/src/Marimekko.tsx
  104. +5 −5 packages/network/package.json
  105. +8 −6 packages/network/src/AnimatedNodes.js
  106. +3 −3 packages/network/src/NetworkCanvas.js
  107. +6 −6 packages/parallel-coordinates/package.json
  108. +10 −15 packages/parallel-coordinates/src/ParallelCoordinates.js
  109. +10 −15 packages/parallel-coordinates/src/ParallelCoordinatesCanvas.js
  110. +7 −7 packages/pie/package.json
  111. +15 −22 packages/pie/src/PieCanvas.tsx
  112. +1 −1 packages/pie/src/props.ts
  113. +48 −43 packages/pie/tests/Pie.test.tsx
  114. +5 −5 packages/polar-axes/package.json
  115. +6 −6 packages/radar/package.json
  116. +10 −11 packages/radar/tests/Radar.test.tsx
  117. +9 −9 packages/radial-bar/package.json
  118. +11 −11 packages/radial-bar/tests/RadialBar.test.tsx
  119. +1 −1 packages/recompose/package.json
  120. +3 −1 packages/recompose/src/compose.ts
  121. +10 −10 packages/recompose/src/defaultProps.ts
  122. +11 −9 packages/recompose/src/mapProps.ts
  123. +9 −10 packages/recompose/src/setStatic.ts
  124. +20 −18 packages/recompose/src/shouldUpdate.ts
  125. +2 −3 packages/recompose/src/types.ts
  126. +42 −37 packages/recompose/src/withPropsOnChange.ts
  127. +40 −43 packages/recompose/src/withState.ts
  128. +6 −6 packages/sankey/package.json
  129. +1 −1 packages/sankey/src/hooks.ts
  130. +1 −1 packages/scales/package.json
  131. +2 −2 packages/scales/src/compute.ts
  132. +1 −1 packages/scales/src/linearScale.ts
  133. +1 −1 packages/scales/src/timeScale.ts
  134. +1 −11 packages/scales/tests/ticks.test.ts
  135. +10 −10 packages/scatterplot/package.json
  136. +2 −3 packages/scatterplot/src/props.tsx
  137. +15 −10 packages/scatterplot/tests/ScatterPlot.test.tsx
  138. +19 −0 packages/static/LICENSE.md
  139. +3 −0 packages/static/README.md
  140. +48 −0 packages/static/package.json
  141. +3 −0 packages/static/src/index.ts
  142. +87 −0 packages/static/src/mappings/bar.ts
  143. +59 −0 packages/static/src/mappings/calendar.ts
  144. +77 −0 packages/static/src/mappings/chord.ts
  145. +50 −0 packages/static/src/mappings/circle_packing.ts
  146. +76 −0 packages/static/src/mappings/common.ts
  147. +4 −14 api/src/mapping/commons/colors.js → packages/static/src/mappings/commons/colors.ts
  148. +8 −0 packages/static/src/mappings/commons/curves.ts
  149. +2 −12 api/src/mapping/commons/dimensions.js → packages/static/src/mappings/commons/dimensions.ts
  150. +20 −0 packages/static/src/mappings/commons/scales.ts
  151. +56 −0 packages/static/src/mappings/heatmap.ts
  152. +43 −0 packages/static/src/mappings/index.ts
  153. +111 −0 packages/static/src/mappings/line.ts
  154. +70 −0 packages/static/src/mappings/pie.ts
  155. +52 −0 packages/static/src/mappings/radar.ts
  156. +91 −0 packages/static/src/mappings/sankey.ts
  157. +49 −0 packages/static/src/mappings/sunburst.ts
  158. +69 −0 packages/static/src/mappings/treemap.ts
  159. +37 −0 packages/static/src/renderer.ts
  160. +47 −33 api/src/samples/index.js → packages/static/src/samples/index.ts
  161. +1 −0 packages/static/src/types.ts
  162. +8 −0 packages/static/tsconfig.json
  163. +8 −8 packages/stream/package.json
  164. +4 −3 packages/stream/src/hooks.ts
  165. +4 −3 packages/stream/src/props.ts
  166. +1 −3 packages/stream/src/types.ts
  167. +6 −6 packages/sunburst/package.json
  168. +2 −1 packages/sunburst/src/Sunburst.tsx
  169. +1 −1 packages/sunburst/src/props.ts
  170. +1 −0 packages/sunburst/src/types.ts
  171. +28 −27 packages/sunburst/tests/Sunburst.test.tsx
  172. +10 −10 packages/swarmplot/package.json
  173. +4 −3 packages/swarmplot/src/Circles.tsx
  174. +2 −1 packages/swarmplot/src/SwarmPlot.tsx
  175. +4 −7 packages/swarmplot/src/hooks.ts
  176. +17 −0 packages/swarmplot/tests/Swarmplot.test.tsx
  177. +3 −3 packages/tooltip/package.json
  178. +1 −1 packages/tooltip/src/BasicTooltip.tsx
  179. +5 −5 packages/treemap/package.json
  180. +3 −3 packages/voronoi/package.json
  181. +9 −14 packages/voronoi/src/hooks.ts
  182. +7 −7 packages/waffle/package.json
  183. +2 −10 packages/waffle/src/WaffleCanvas.js
  184. +5 −4 tsconfig.json
  185. +5 −1 tsconfig.monorepo.json
  186. +0 −23 tslint.json
  187. +10 −0 website/babel.config.js
  188. +46 −44 website/package.json
  189. +6 −5 website/src/components/Layout.js
  190. +12 −11 website/src/components/components/ComponentFlavorSelector.js
  191. +11 −10 website/src/components/components/ComponentSettings.js
  192. +19 −19 website/src/components/controls/{ArrayControl.js → ArrayControl.tsx}
  193. +19 −23 website/src/components/controls/{InheritedColorControl.js → InheritedColorControl.tsx}
  194. +7 −6 ...te/src/components/controls/{InheritedColorModifierControl.js → InheritedColorModifierControl.tsx}
  195. +0 −141 website/src/components/controls/MarginControl.js
  196. +136 −0 website/src/components/controls/MarginControl.tsx
  197. +12 −12 website/src/components/controls/{ObjectControl.js → ObjectControl.tsx}
  198. +15 −18 website/src/components/controls/{OrdinalColorsControl.js → OrdinalColorsControl.tsx}
  199. +5 −6 website/src/components/controls/{PropertyDescription.js → PropertyDescription.tsx}
  200. +14 −9 website/src/components/controls/{PropertyDocumentation.js → PropertyDocumentation.tsx}
  201. +0 −80 website/src/components/controls/QuantizeColorsControl.js
  202. +82 −0 website/src/components/controls/QuantizeColorsControl.tsx
  203. +19 −19 website/src/components/controls/{RadioControl.js → RadioControl.tsx}
  204. +19 −18 website/src/components/controls/{SwitchableRangeControl.js → SwitchableRangeControl.tsx}
  205. +0 −48 website/src/components/controls/TextControl.js
  206. +47 −0 website/src/components/controls/TextControl.tsx
  207. +2 −4 website/src/components/icons/BulletIcon.js
  208. +2 −2 website/src/components/icons/RadialBarIcon.tsx
  209. +1 −29 website/src/components/icons/SwarmPlotIcon.js
  210. +1 −1 website/src/data/components/bar/meta.yml
  211. +1 −2 website/src/data/components/bar/props.ts
  212. +1 −2 website/src/data/components/chord/props.ts
  213. +2 −3 website/src/data/components/circle-packing/meta.yml
  214. +1 −2 website/src/data/components/circle-packing/props.ts
  215. +2 −4 website/src/data/components/line/props.ts
  216. +1 −2 website/src/data/components/pie/props.ts
  217. +1 −2 website/src/data/components/radar/props.ts
  218. +1 −2 website/src/data/components/radial-bar/props.ts
  219. +1 −2 website/src/data/components/sankey/props.ts
  220. +1 −2 website/src/data/components/sunburst/props.ts
  221. +2 −4 website/src/data/components/swarmplot/props.ts
  222. +3 −2 website/src/data/components/treemap/props.ts
  223. +2 −2 website/src/data/config.js
  224. +6 −7 website/src/data/nav.js
  225. +13 −14 website/src/lib/settings.ts
  226. +3 −4 website/src/pages/circle-packing/api.js
  227. +0 −4 website/src/pages/sankey/api.js
  228. +1 −1 website/src/pages/sunburst/api.js
  229. +10 −7 website/src/pages/treemap/api.js
  230. +780 −773 website/src/styles/icons.css
  231. +7,812 −12,414 yarn.lock
2 changes: 1 addition & 1 deletion .codesandbox/ci.json
Original file line number Diff line number Diff line change
@@ -3,5 +3,5 @@
"buildCommand": false,
"packages": ["packages/*"],
"sandboxes": ["/examples/codesandbox", "/website"],
"node": "14"
"node": "16"
}
5 changes: 5 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/branding/
/stats/
/storybook-static/
node_modules/
/packages/recompose/
2 changes: 0 additions & 2 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
@@ -4,8 +4,6 @@ extends:
- plugin:@typescript-eslint/recommended
- plugin:prettier/recommended
- prettier
- prettier/@typescript-eslint
- prettier/react

rules:
# Leave this as a warning while we convert the codebase, then remove it
16 changes: 13 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,46 @@
name: CI

on: [push, pull_request]
on:
push:
branches: ['master']
pull_request:
types: [opened, synchronize]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ['14', '16']
node-version: ['16']
steps:
- uses: actions/checkout@v2
- name: Check out code
uses: actions/checkout@v2

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

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- 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') }}

- run: yarn install --frozen-lockfile
- run: make bootstrap
- run: make packages-build
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -14,4 +14,5 @@ build

*.lerna_backup

/stats
/stats
/api/app.js
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v14
v16
4 changes: 0 additions & 4 deletions .storybook/.babelrc

This file was deleted.

7 changes: 7 additions & 0 deletions .storybook/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
presets: [
['@babel/preset-env', { loose: true }],
['@babel/preset-react', { runtime: 'automatic' }],
'@babel/preset-typescript',
],
}
21 changes: 10 additions & 11 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
module.exports = {
stories: ['../**/*.stories.@(js|tsx)'],
addons: [
'@storybook/addon-knobs',
'@storybook/addon-actions',
'@storybook/addon-links',
'@storybook/addon-storysource',
],
typescript: {
reactDocgen: 'none',
},
};
stories: ['../packages/*/stories/*.stories.@(js|tsx)'],
addons: [
'@storybook/addon-knobs',
'@storybook/addon-actions',
'@storybook/addon-links',
'@storybook/addon-essentials',
'@storybook/addon-storysource',
],
framework: '@storybook/react'
}
45 changes: 44 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,48 @@
<a name="v0.75.0"></a>
## v0.75.0 (2021-12-17)


#### Features

* **api:**
* create new @nivo/static & @nivo/express packages ([fc0f27ff](https://github.com/plouc/nivo/commit/fc0f27ff314f783713c3497d625a3f8992038512))
* fix heroku deployment ([a4dbb440](https://github.com/plouc/nivo/commit/a4dbb440c12fc8cd42153a039ed74ecfe87a5adc))
* migrate API to TypeScript and fix stale mappings and examples ([d53681b4](https://github.com/plouc/nivo/commit/d53681b439d3bac08e978491a56518b3fe9c98b5))
* **build:**
* init support for development builds ([643a1c95](https://github.com/plouc/nivo/commit/643a1c95a117d62d0e2c3a1ea7f6d60bfaae1994))
* fix build after upgrading a bunch of dependencies ([60cdbbbf](https://github.com/plouc/nivo/commit/60cdbbbf1a9f2631f0703f7c69f8d0cbbb9b6522))
* **eslint:**
* enable eslint for the website ([1ec5fbd0](https://github.com/plouc/nivo/commit/1ec5fbd0a8ff392aa185589c980f2f80fc6b48f9))
* enable eslint for the api ([35d4a4a7](https://github.com/plouc/nivo/commit/35d4a4a702251b8b098fb235b8d79b5d521f77fc))
* **storybook:** upgrade storybook and addons ([64ac24e0](https://github.com/plouc/nivo/commit/64ac24e048a333155887c0a94f3accebd2362014))
* **ts:** upgrade TypeScript version ([eff43e28](https://github.com/plouc/nivo/commit/eff43e2865c337e2c1aae263f92e548a51756c33))
* **website:**
* update the API url to match the new path ([ec6e7d96](https://github.com/plouc/nivo/commit/ec6e7d963baa72aec959cc4c62e74ee6a6204662))
* fix gatsby build due to dependencies updates ([6bfeaa86](https://github.com/plouc/nivo/commit/6bfeaa86e443359dfcd77fe7f26ea48a49a2388f))
* update gatsby ([50778907](https://github.com/plouc/nivo/commit/50778907b4c76f0a32b617117f640ff5e465b13d))

#### Bug Fixes

* **bar:** avoid to redefine react forwardRef type ([cd6e3ec3](https://github.com/plouc/nivo/commit/cd6e3ec37791393f88519924778602ba9da06065))
* **build:** fix error with duplicated typings for eslint by forcing the resolution of the package ([384e4240](https://github.com/plouc/nivo/commit/384e424070e313158dda140f4c12f8a76cffe9ee))
* **ci:** fix triggers for the CI workflow ([0750223f](https://github.com/plouc/nivo/commit/0750223fc78721ed5e744b152b0f2d52c31efa2e))
* **core:**
* import missing SVGProps type ([feb6de60](https://github.com/plouc/nivo/commit/feb6de60ec34ce289792e72db3eaacd3dcf6814a))
* export linearGradientDef in typings ([7cfbfc96](https://github.com/plouc/nivo/commit/7cfbfc9623631cd94e165f25a1919cf9019dbdb3))
* **format:** fix formatting issues ([7d03e9a3](https://github.com/plouc/nivo/commit/7d03e9a39b5439007740a1eabdf6b4eebcc4c4e4))
* **swarmplot:** use the borderWidth property - fixes #1813 ([edd3990c](https://github.com/plouc/nivo/commit/edd3990c0846353c001853531948477ea7837500))
* **website:** fix React runtime issue with Gatsby ([e36b06b3](https://github.com/plouc/nivo/commit/e36b06b30120db374d9163cbefe3eaa44ed8a9be))

#### Chore

* **eslint:** upgrade eslint ([82138679](https://github.com/plouc/nivo/commit/821386794a03273103f2c759faa4942d698ec74a))
* **node:** update Node.js to v16 ([b15f63cb](https://github.com/plouc/nivo/commit/b15f63cb94bb2f431c95f2145434a0b5dd267021))
* **rollup:** update rollup ([c253548f](https://github.com/plouc/nivo/commit/c253548fb18c6c6745d9a8abb0b6d6fedde74b99))



<a name="v0.74.1"></a>
## v0.74.1 (2021-12-13)
## v0.74.1 (%cs)


#### Features
44 changes: 26 additions & 18 deletions Makefile
Original file line number Diff line number Diff line change
@@ -44,7 +44,7 @@ help: ##prints help
########################################################################################################################

bootstrap: ##@0 global lerna bootstrap
@./node_modules/.bin/lerna bootstrap
@yarn lerna bootstrap

init: ##@0 global cleanup/install/bootstrap
@$(MAKE) clean-all
@@ -53,7 +53,7 @@ init: ##@0 global cleanup/install/bootstrap
@$(MAKE) packages-build

fmt: ##@0 global format code using prettier (js, css, md)
@./node_modules/.bin/prettier --color --write \
@yarn prettier --color --write \
"packages/*/{src,stories,tests}/**/*.{js,ts,tsx}" \
"packages/*/index.d.ts" \
"packages/*/README.md" \
@@ -63,7 +63,7 @@ fmt: ##@0 global format code using prettier (js, css, md)

fmt-check: ##@0 global check if files were all formatted using prettier
@echo "${YELLOW}Checking formatting${RESET}"
@./node_modules/.bin/prettier --color --list-different \
@yarn prettier --color --list-different \
"packages/*/{src,stories,tests}/**/*.{js,ts,tsx}" \
"packages/*/index.d.ts" \
"packages/*/README.md" \
@@ -86,6 +86,8 @@ clean-all: ##@0 global uninstall node modules, remove transpiled code & lock fil
@$(foreach source, $(SOURCES), $(call clean-source-all, $(source)))
@rm -rf website/node_modules
@rm -rf website/package-lock.json
@rm -rf api/node_modules
@rm -rf api/package-lock.json

define clean-source-lib
rm -rf $(1)/*/cjs
@@ -111,42 +113,42 @@ lint: ##@0 run eslint & tslint

package-lint-%: ##@1 packages run eslint on package
@echo "${YELLOW}Running eslint on package ${WHITE}@nivo/${*}${RESET}"
@./node_modules/.bin/eslint ./packages/${*}/{src,tests}
@yarn eslint ./packages/${*}/{src,tests}

packages-lint: ##@1 packages run eslint on all packages
@echo "${YELLOW}Running eslint on all packages${RESET}"
@./node_modules/.bin/eslint "./packages/*/{src,tests}/**/*.{js,ts,tsx}"
@yarn eslint "./packages/*/{src,tests}/**/*.{js,ts,tsx}"

packages-lint-fix: ##@1 packages run eslint on all packages with a fix option
@echo "${YELLOW}Running eslint on all packages${RESET}"
@./node_modules/.bin/eslint "./packages/*/{src,tests}/**/*.{js,ts,tsx}" --fix
@yarn eslint "./packages/*/{src,tests}/**/*.{js,ts,tsx}" --fix

package-test-cover-%: ##@1 packages run tests for a package with code coverage
@yarn jest -c ./packages/jest.config.js --rootDir . --coverage ./packages/${*}/tests
@export BABEL_ENV=development; yarn jest -c ./packages/jest.config.js --rootDir . --coverage ./packages/${*}/tests

package-test-%: ##@1 packages run tests for a package
@yarn jest -c ./packages/jest.config.js --rootDir . ./packages/${*}/tests
@export BABEL_ENV=development; yarn jest -c ./packages/jest.config.js --rootDir . ./packages/${*}/tests

package-watch-test-%: ##@1 packages run tests for a package and watch for changes
@yarn jest -c ./packages/jest.config.js --rootDir . ./packages/${*}/tests --watch
@export BABEL_ENV=development; yarn jest -c ./packages/jest.config.js --rootDir . ./packages/${*}/tests --watch

package-update-test-%: ##@1 packages run tests for a package and update its snapshots
@yarn jest -c ./packages/jest.config.js --rootDir . ./packages/${*}/tests -u
@export BABEL_ENV=development; yarn jest -c ./packages/jest.config.js --rootDir . ./packages/${*}/tests -u

package-watch-test-%: ##@1 packages run tests for a package and watch for changes
@yarn jest -c ./packages/jest.config.js --rootDir . ./packages/${*}/tests --watch
@export BABEL_ENV=development; yarn jest -c ./packages/jest.config.js --rootDir . ./packages/${*}/tests --watch

packages-test: ##@1 packages run tests for all packages
@echo "${YELLOW}Running test suites for all packages${RESET}"
@yarn jest -c ./packages/jest.config.js --rootDir . ./packages/*/tests
@export BABEL_ENV=development; yarn jest -c ./packages/jest.config.js --rootDir . ./packages/*/tests

packages-watch-test: ##@1 packages run tests for all packages and watch for changes
@echo "${YELLOW}Running test suites watcher for all packages${RESET}"
@yarn jest -c ./packages/jest.config.js --rootDir . ./packages/*/tests --watch
@export BABEL_ENV=development; yarn jest -c ./packages/jest.config.js --rootDir . ./packages/*/tests --watch

packages-test-cover: ##@1 packages run tests for all packages with code coverage
@echo "${YELLOW}Running test suites coverage for all packages${RESET}"
@yarn jest -c ./packages/jest.config.js --rootDir . --coverage ./packages/*/tests
@export BABEL_ENV=development; yarn jest -c ./packages/jest.config.js --rootDir . --coverage ./packages/*/tests

packages-types: ##@1 packages build all package types
@echo "${YELLOW}Building TypeScript types for all packages${RESET}"
@@ -181,13 +183,13 @@ packages-publish: ##@1 packages publish all packages
@$(MAKE) packages-build

@echo "${YELLOW}Publishing packages${RESET}"
@./node_modules/.bin/lerna publish --exact
@yarn lerna publish --exact

packages-publish-next: ##@1 packages publish all packages for @next npm tag
@$(MAKE) packages-build

@echo "${YELLOW}Publishing packages${RESET}"
@./node_modules/.bin/lerna publish --exact --npm-tag=next
@yarn lerna publish --exact --npm-tag=next

package-watch-%: ##@1 packages build package (es flavor) on change, eg. `package-watch-bar`
@echo "${YELLOW}Running build watcher for package ${WHITE}@nivo/${*}${RESET}"
@@ -225,11 +227,14 @@ website-deploy: ##@2 website build & deploy website
@$(MAKE) website-build

@echo "${YELLOW}Deploying website${RESET}"
@./node_modules/.bin/gh-pages -d website/public -r git@github.com:plouc/nivo.git -b gh-pages
@yarn gh-pages -d website/public -r git@github.com:plouc/nivo.git -b gh-pages

website-audit: ##@2 website audit website build
@cd website && yarn analyze

website-lint: ##@2 website run eslint on the website code
@yarn eslint ./website/src

website-sprites: ##@2 website build sprite sheet
@glue --img website/src/assets --css website/src/styles website/src/assets/icons

@@ -250,7 +255,7 @@ storybook-deploy: ##@3 storybook build and deploy storybook
@$(MAKE) storybook-build

@echo "${YELLOW}Deploying storybook${RESET}"
@./node_modules/.bin/gh-pages -d storybook-static -r git@github.com:plouc/nivo.git -b gh-pages -e storybook
@yarn gh-pages -d storybook-static -r git@github.com:plouc/nivo.git -b gh-pages -e storybook

########################################################################################################################
#
@@ -266,5 +271,8 @@ api: ##@5 API run API in regular mode (no watcher)
@echo "${YELLOW}Starting API${RESET}"
@cd api && yarn start

api-lint: ##@5 API run eslint on the API code
@yarn eslint ./api/src

api-deploy: ##@5 Deploy API on heroku
git subtree push --prefix api heroku master
1 change: 1 addition & 0 deletions Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
web: node api/app.js
1 change: 0 additions & 1 deletion api/Procfile

This file was deleted.

44 changes: 44 additions & 0 deletions api/app.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import express from 'express'
import cors from 'cors'
import bodyParser from 'body-parser'
import compression from 'compression'
import winston from 'winston'
import expressWinston from 'express-winston'
import { nivo } from '@nivo/express'

const app = express()

app.enable('trust proxy')
app.set('json spaces', 4)
app.use(cors())
app.use(bodyParser.json())
app.use(
expressWinston.logger({
transports: [new winston.transports.Console()],
format: winston.format.combine(winston.format.colorize(), winston.format.simple()),
meta: false,
expressFormat: true,
colorize: true,
})
)
app.use(compression())

app.get('/status', (req, res) => {
res.status(200).json({
status: 'ok',
uptime: `${process.uptime()} second(s)`,
protocol: req.protocol,
host: req.get('host'),
env: {
// @ts-ignore
NODE_ENV: process.NODE_ENV,
},
})
})

app.use('/nivo', nivo)

const port = process.env.PORT || 3030
app.listen(port, () => {
console.log(`nivo api listening on ${port}`)
})
Loading