From 8ab56807784dd40aca46341e299aabc4882a13d5 Mon Sep 17 00:00:00 2001 From: Axel Bocciarelli Date: Wed, 16 Aug 2023 14:39:59 +0200 Subject: [PATCH] Revert workaround of bundling in `react-keyed-flatten-children` --- CONTRIBUTING.md | 2 +- packages/lib/package.json | 2 +- packages/lib/vite.config.js | 4 +- pnpm-lock.yaml | 84 +++++++++++++++++++++++-------------- 4 files changed, 56 insertions(+), 36 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d119189a7..ae3248e89 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -156,7 +156,7 @@ import. The build process of`@h5web/h5wasm` is also the same as the lib's, but since the package does not include any styles, `vite build` does not generate a -`style.css` file and there's not `build:css` script. +`style.css` file and there's no `build:css` script. Finally, since `@h5web/shared` is not a published package, it does not need to be built with Vite. However, its types do need to be built with `tsc` so that diff --git a/packages/lib/package.json b/packages/lib/package.json index 4fdbef5f2..9ac45206e 100644 --- a/packages/lib/package.json +++ b/packages/lib/package.json @@ -62,7 +62,7 @@ "ndarray-ops": "1.2.2", "react-aria-menubutton": "7.0.3", "react-icons": "4.8.0", - "react-keyed-flatten-children": "1.3.0", + "react-keyed-flatten-children": "2.2.1", "react-measure": "2.5.2", "react-slider": "2.0.4", "react-window": "1.8.8", diff --git a/packages/lib/vite.config.js b/packages/lib/vite.config.js index f228bbab3..82ac23fc5 100644 --- a/packages/lib/vite.config.js +++ b/packages/lib/vite.config.js @@ -12,9 +12,7 @@ const [pkg, sharedPkg] = ['.', '../shared'].map((prefix) => export const externals = new Set([ ...Object.keys(sharedPkg.peerDependencies), - ...Object.keys(pkg.dependencies).filter( - (dep) => dep !== 'react-keyed-flatten-children', // Fix https://github.com/silx-kit/h5web/issues/914 - ), + ...Object.keys(pkg.dependencies), ...Object.keys(pkg.peerDependencies), ]); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 338eb70f8..5cc53100d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -463,8 +463,8 @@ importers: specifier: 4.8.0 version: 4.8.0(react@17.0.2) react-keyed-flatten-children: - specifier: 1.3.0 - version: 1.3.0(react@17.0.2) + specifier: 2.2.1 + version: 2.2.1(react@17.0.2) react-measure: specifier: 2.5.2 version: 2.5.2(react-dom@17.0.2)(react@17.0.2) @@ -657,11 +657,19 @@ packages: default-browser-id: 3.0.0 dev: true + /@babel/code-frame@7.22.10: + resolution: {integrity: sha512-/KKIMG4UEL35WmI9OlvMhurwtytjvXoFcGNrOvyG9zIzA8YmPjVtIZUf7b05+TPO7G7/GEmLHDaoCgACHl9hhA==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/highlight': 7.22.10 + chalk: 2.4.2 + dev: true + /@babel/code-frame@7.22.5: resolution: {integrity: sha512-Xmwn266vad+6DAqEB2A6V/CcZVp62BbwVmcOJc2RPuwih1kw02TjQvWVWlcKGbBPd+8/0V5DEkOcizRGYsspYQ==} engines: {node: '>=6.9.0'} dependencies: - '@babel/highlight': 7.22.5 + '@babel/highlight': 7.22.10 dev: true /@babel/compat-data@7.22.9: @@ -998,8 +1006,8 @@ packages: - supports-color dev: true - /@babel/highlight@7.22.5: - resolution: {integrity: sha512-BSKlD1hgnedS5XRnGOljZawtag7H1yPfQp0tdNJCHoH6AZ+Pcm9VvkrK59/Yy593Ypg0zMxH2BxD1VPYUQ7UIw==} + /@babel/highlight@7.22.10: + resolution: {integrity: sha512-78aUtVcT7MUscr0K5mIEnkwxPE0MaxkR5RxRwuHaQ+JuU5AmTPhY+do2mdzVTnIJJpyBglql2pehuBIWHug+WQ==} engines: {node: '>=6.9.0'} dependencies: '@babel/helper-validator-identifier': 7.22.5 @@ -4316,7 +4324,7 @@ packages: resolution: {integrity: sha512-/DiOQ5xBxgdYRC8LNk7U+RWat0S3qRLeIw3ZIkMQ9kkVlRmwD/Eg8k8CqIpD6GW7u20JIUOfMKbxtiLutpjQ4g==} engines: {node: '>=12'} dependencies: - '@babel/code-frame': 7.22.5 + '@babel/code-frame': 7.22.10 '@babel/runtime': 7.22.6 '@types/aria-query': 5.0.1 aria-query: 5.1.3 @@ -8758,6 +8766,12 @@ packages: has: 1.0.3 dev: true + /is-core-module@2.13.0: + resolution: {integrity: sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ==} + dependencies: + has: 1.0.3 + dev: true + /is-date-object@1.0.5: resolution: {integrity: sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==} engines: {node: '>= 0.4'} @@ -9030,7 +9044,7 @@ packages: resolution: {integrity: sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==} engines: {node: '>=10'} dependencies: - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.4 istanbul-lib-coverage: 3.2.0 source-map: 0.6.1 transitivePeerDependencies: @@ -9295,7 +9309,7 @@ packages: resolution: {integrity: sha512-KoAW2zAmNSd3Gk88uJ56qXUWbFk787QKmjjJVOjtGFmmGSZgDBrlIL4AfQw1xyMYPNVD7dNInfIbur9B2rd/wQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@babel/code-frame': 7.22.5 + '@babel/code-frame': 7.22.10 '@jest/types': 29.6.1 '@types/stack-utils': 2.0.1 chalk: 4.1.2 @@ -10879,7 +10893,7 @@ packages: resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} engines: {node: '>=8'} dependencies: - '@babel/code-frame': 7.22.5 + '@babel/code-frame': 7.22.10 error-ex: 1.3.2 json-parse-even-better-errors: 2.3.1 lines-and-columns: 1.2.4 @@ -11059,29 +11073,29 @@ packages: '@babel/runtime': 7.22.6 dev: true - /postcss-import@15.1.0(postcss@8.4.27): + /postcss-import@15.1.0(postcss@8.4.28): resolution: {integrity: sha512-hpr+J05B2FVYUAXHeK1YyI267J/dDDhMU6B6civm8hSY1jYJnBXxzKDKDswzJmtLHryrjhnDjqqp/49t8FALew==} engines: {node: '>=14.0.0'} peerDependencies: postcss: ^8.0.0 dependencies: - postcss: 8.4.27 + postcss: 8.4.28 postcss-value-parser: 4.2.0 read-cache: 1.0.0 - resolve: 1.22.2 + resolve: 1.22.4 dev: true - /postcss-js@4.0.1(postcss@8.4.27): + /postcss-js@4.0.1(postcss@8.4.28): resolution: {integrity: sha512-dDLF8pEO191hJMtlHFPRa8xsizHaM82MLfNkUHdUtVEV3tgTp5oj+8qbEqYM57SLfc74KSbw//4SeJma2LRVIw==} engines: {node: ^12 || ^14 || >= 16} peerDependencies: postcss: ^8.4.21 dependencies: camelcase-css: 2.0.1 - postcss: 8.4.27 + postcss: 8.4.28 dev: true - /postcss-load-config@4.0.1(postcss@8.4.27): + /postcss-load-config@4.0.1(postcss@8.4.28): resolution: {integrity: sha512-vEJIc8RdiBRu3oRAI0ymerOn+7rPuMvRXslTvZUKZonDHFIczxztIyJ1urxM1x9JXEikvpWWTUUqal5j/8QgvA==} engines: {node: '>= 14'} peerDependencies: @@ -11094,17 +11108,17 @@ packages: optional: true dependencies: lilconfig: 2.1.0 - postcss: 8.4.27 + postcss: 8.4.28 yaml: 2.3.1 dev: true - /postcss-nested@6.0.1(postcss@8.4.27): + /postcss-nested@6.0.1(postcss@8.4.28): resolution: {integrity: sha512-mEp4xPMi5bSWiMbsgoPfcP74lsWLHkQbZc3sY+jWYd65CUwXrUaTp0fmNpa01ZcETKlIgUdFN/MpS2xZtqL9dQ==} engines: {node: '>=12.0'} peerDependencies: postcss: ^8.2.14 dependencies: - postcss: 8.4.27 + postcss: 8.4.28 postcss-selector-parser: 6.0.13 dev: true @@ -11129,8 +11143,8 @@ packages: source-map-js: 1.0.2 dev: true - /postcss@8.4.27: - resolution: {integrity: sha512-gY/ACJtJPSmUFPDCHtX78+01fHa64FaU4zaaWfuh1MhGJISufJAH4cun6k/8fwsHYeK4UQmENQK+tRLCFJE8JQ==} + /postcss@8.4.28: + resolution: {integrity: sha512-Z7V5j0cq8oEKyejIKfpD8b4eBy9cwW2JWPk0+fB1HOAMsfHbnAXLLS+PfVWlzMSLQaWttKDt607I0XHmpE67Vw==} engines: {node: ^10 || ^12 || >=14} dependencies: nanoid: 3.3.6 @@ -11464,15 +11478,14 @@ packages: /react-is@18.2.0: resolution: {integrity: sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==} - dev: true - /react-keyed-flatten-children@1.3.0(react@17.0.2): - resolution: {integrity: sha512-qB7A6n+NHU0x88qTZGAJw6dsqwI941jcRPBB640c/CyWqjPQQ+YUmXOuzPziuHb7iqplM3xksWAbGYwkQT0tXA==} + /react-keyed-flatten-children@2.2.1(react@17.0.2): + resolution: {integrity: sha512-6yBLVO6suN8c/OcJk1mzIrUHdeEzf5rtRVBhxEXAHO49D7SlJ70cG4xrSJrBIAG7MMeQ+H/T151mM2dRDNnFaA==} peerDependencies: react: '>=15.0.0' dependencies: react: 17.0.2 - react-is: 16.13.1 + react-is: 18.2.0 dev: false /react-measure@2.5.2(react-dom@17.0.2)(react@17.0.2): @@ -11848,6 +11861,15 @@ packages: supports-preserve-symlinks-flag: 1.0.0 dev: true + /resolve@1.22.4: + resolution: {integrity: sha512-PXNdCiPqDqeUou+w1C2eTQbNfxKSuMxqTCuvlmmMsk1NWHL5fRrhY6Pl0qEYYc6+QqGClco1Qj8XnjPego4wfg==} + hasBin: true + dependencies: + is-core-module: 2.13.0 + path-parse: 1.0.7 + supports-preserve-symlinks-flag: 1.0.0 + dev: true + /resolve@2.0.0-next.4: resolution: {integrity: sha512-iMDbmAWtfU+MHpxt/I5iWI7cY6YVEZUQ3MBgPQ++XD1PELuJHIl82xBmObyP2KyQmkNB2dsqF7seoQQiAn5yDQ==} hasBin: true @@ -11914,7 +11936,7 @@ packages: rollup: 3.20.2 typescript: 5.0.4 optionalDependencies: - '@babel/code-frame': 7.22.5 + '@babel/code-frame': 7.22.10 dev: true /rollup@2.79.1: @@ -12517,13 +12539,13 @@ packages: normalize-path: 3.0.0 object-hash: 3.0.0 picocolors: 1.0.0 - postcss: 8.4.27 - postcss-import: 15.1.0(postcss@8.4.27) - postcss-js: 4.0.1(postcss@8.4.27) - postcss-load-config: 4.0.1(postcss@8.4.27) - postcss-nested: 6.0.1(postcss@8.4.27) + postcss: 8.4.28 + postcss-import: 15.1.0(postcss@8.4.28) + postcss-js: 4.0.1(postcss@8.4.28) + postcss-load-config: 4.0.1(postcss@8.4.28) + postcss-nested: 6.0.1(postcss@8.4.28) postcss-selector-parser: 6.0.13 - resolve: 1.22.2 + resolve: 1.22.4 sucrase: 3.34.0 transitivePeerDependencies: - ts-node