From 17293c10162e9c62e3df0a4a1f04031e5fcbe8df Mon Sep 17 00:00:00 2001 From: Adam Michael Thompson Date: Thu, 3 Apr 2025 16:49:51 -0400 Subject: [PATCH 01/48] Bump to TS5.0 --- package.json | 4 +- pnpm-lock.yaml | 312 +++++++++++++++++++-------------------- tools/build/package.json | 2 +- tools/lint/package.json | 2 +- 4 files changed, 160 insertions(+), 160 deletions(-) diff --git a/package.json b/package.json index 17ce3537d3..c42e838d22 100644 --- a/package.json +++ b/package.json @@ -64,11 +64,11 @@ "prettier": "2.8.8", "react": "^18.2.0", "react-dom": "^18.2.0", - "stream": "^0.0.3", "storybook": "^8.5.3", + "stream": "^0.0.3", "ts-node": "10.9.2", "turbo": "^2.0.6", - "typescript": "~4.9.0" + "typescript": "~5.0.4" }, "pnpm": { "overrides": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 94ac2ce3f3..3716d8004b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -49,7 +49,7 @@ importers: version: link:tools/test '@storybook/react': specifier: ^8.5.3 - version: 8.5.3(@storybook/test@8.5.3(storybook@8.5.3(prettier@2.8.8)))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.5.3(prettier@2.8.8))(typescript@4.9.5) + version: 8.5.3(@storybook/test@8.5.3(storybook@8.5.3(prettier@2.8.8)))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.5.3(prettier@2.8.8))(typescript@5.0.4) '@testing-library/react': specifier: ^14.0.0 version: 14.0.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0) @@ -82,7 +82,7 @@ importers: version: 3.2.3 npm-package-json-lint: specifier: 8.0.0 - version: 8.0.0(typescript@4.9.5) + version: 8.0.0(typescript@5.0.4) npm-run-all: specifier: ^4.1.5 version: 4.1.5 @@ -103,13 +103,13 @@ importers: version: 0.0.3 ts-node: specifier: 10.9.2 - version: 10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.17.12)(typescript@4.9.5) + version: 10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.17.12)(typescript@5.0.4) turbo: specifier: ^2.0.6 version: 2.0.6 typescript: - specifier: ~4.9.0 - version: 4.9.5 + specifier: ~5.0.4 + version: 5.0.4 charts/chart-card: dependencies: @@ -1626,7 +1626,7 @@ importers: version: 6.1.1 ts-node: specifier: ^10.9.2 - version: 10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.17.12)(typescript@4.9.5) + version: 10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.17.12)(typescript@5.0.4) xml2json: specifier: ^0.12.0 version: 0.12.0 @@ -2947,10 +2947,10 @@ importers: version: 8.0.0(@babel/core@7.24.3) '@svgr/cli': specifier: 8.0.1 - version: 8.0.1(typescript@4.9.5) + version: 8.0.1(typescript@5.0.4) '@svgr/rollup': specifier: ^8.1.0 - version: 8.1.0(rollup@4.16.1)(typescript@4.9.5) + version: 8.1.0(rollup@4.16.1)(typescript@5.0.4) '@types/cross-spawn': specifier: 6.0.2 version: 6.0.2 @@ -2974,7 +2974,7 @@ importers: version: 4.17.21 react-docgen-typescript: specifier: 2.2.2 - version: 2.2.2(typescript@4.9.5) + version: 2.2.2(typescript@5.0.4) rollup: specifier: 4.16.1 version: 4.16.1 @@ -2991,8 +2991,8 @@ importers: specifier: ^2.0.6 version: 2.0.6 typescript: - specifier: ~4.9.0 - version: 4.9.5 + specifier: ~5.0.0 + version: 5.0.4 tools/cli: dependencies: @@ -3148,7 +3148,7 @@ importers: version: 7.25.9(@babel/core@7.23.2)(eslint@9.16.0) '@emotion/eslint-plugin': specifier: 11.12.0 - version: 11.12.0(eslint@9.16.0)(typescript@4.9.5) + version: 11.12.0(eslint@9.16.0)(typescript@5.0.4) '@eslint/compat': specifier: ^1.2.3 version: 1.2.3(eslint@9.16.0) @@ -3166,10 +3166,10 @@ importers: version: 6.0.2 '@typescript-eslint/eslint-plugin': specifier: 8.17.0 - version: 8.17.0(@typescript-eslint/parser@8.17.0(eslint@9.16.0)(typescript@4.9.5))(eslint@9.16.0)(typescript@4.9.5) + version: 8.17.0(@typescript-eslint/parser@8.17.0(eslint@9.16.0)(typescript@5.0.4))(eslint@9.16.0)(typescript@5.0.4) '@typescript-eslint/parser': specifier: 8.17.0 - version: 8.17.0(eslint@9.16.0)(typescript@4.9.5) + version: 8.17.0(eslint@9.16.0)(typescript@5.0.4) chalk: specifier: 4.1.2 version: 4.1.2 @@ -3184,10 +3184,10 @@ importers: version: 9.1.0(eslint@9.16.0) eslint-plugin-import: specifier: 2.31.0 - version: 2.31.0(@typescript-eslint/parser@8.17.0(eslint@9.16.0)(typescript@4.9.5))(eslint@9.16.0) + version: 2.31.0(@typescript-eslint/parser@8.17.0(eslint@9.16.0)(typescript@5.0.4))(eslint@9.16.0) eslint-plugin-jest: specifier: 28.9.0 - version: 28.9.0(@typescript-eslint/eslint-plugin@8.17.0(@typescript-eslint/parser@8.17.0(eslint@9.16.0)(typescript@4.9.5))(eslint@9.16.0)(typescript@4.9.5))(eslint@9.16.0)(jest@29.6.2(@types/node@20.17.12)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.17.12)(typescript@4.9.5)))(typescript@4.9.5) + version: 28.9.0(@typescript-eslint/eslint-plugin@8.17.0(@typescript-eslint/parser@8.17.0(eslint@9.16.0)(typescript@5.0.4))(eslint@9.16.0)(typescript@5.0.4))(eslint@9.16.0)(jest@29.6.2(@types/node@20.17.12)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.17.12)(typescript@5.0.4)))(typescript@5.0.4) eslint-plugin-jsx-a11y: specifier: 6.10.2 version: 6.10.2(eslint@9.16.0) @@ -3202,22 +3202,22 @@ importers: version: 12.1.1(eslint@9.16.0) eslint-plugin-storybook: specifier: 0.11.1 - version: 0.11.1(eslint@9.16.0)(typescript@4.9.5) + version: 0.11.1(eslint@9.16.0)(typescript@5.0.4) globals: specifier: ^15.13.0 version: 15.13.0 npm-package-json-lint: specifier: 8.0.0 - version: 8.0.0(typescript@4.9.5) + version: 8.0.0(typescript@5.0.4) npm-package-json-lint-config-default: specifier: 7.0.1 - version: 7.0.1(npm-package-json-lint@8.0.0(typescript@4.9.5)) + version: 7.0.1(npm-package-json-lint@8.0.0(typescript@5.0.4)) prettier: specifier: 2.8.8 version: 2.8.8 typescript: - specifier: ~4.9.0 - version: 4.9.5 + specifier: ~5.0.0 + version: 5.0.4 tools/meta: dependencies: @@ -3320,10 +3320,10 @@ importers: version: 8.5.3(storybook@8.5.3(prettier@2.8.8)) '@storybook/react': specifier: 8.5.3 - version: 8.5.3(@storybook/test@8.5.3(storybook@8.5.3(prettier@2.8.8)))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.5.3(prettier@2.8.8))(typescript@4.9.5) + version: 8.5.3(@storybook/test@8.5.3(storybook@8.5.3(prettier@2.8.8)))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.5.3(prettier@2.8.8))(typescript@5.0.4) '@storybook/react-webpack5': specifier: 8.5.3 - version: 8.5.3(@storybook/test@8.5.3(storybook@8.5.3(prettier@2.8.8)))(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.18.19)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.5.3(prettier@2.8.8))(typescript@4.9.5) + version: 8.5.3(@storybook/test@8.5.3(storybook@8.5.3(prettier@2.8.8)))(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.18.19)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.5.3(prettier@2.8.8))(typescript@5.0.4) '@storybook/test': specifier: 8.5.3 version: 8.5.3(storybook@8.5.3(prettier@2.8.8)) @@ -3332,7 +3332,7 @@ importers: version: 8.5.3(storybook@8.5.3(prettier@2.8.8)) '@svgr/webpack': specifier: 8.0.1 - version: 8.0.1(typescript@4.9.5) + version: 8.0.1(typescript@5.0.4) babel-loader: specifier: 9.2.1 version: 9.2.1(@babel/core@7.24.3)(webpack@5.88.0(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.18.19)) @@ -3359,7 +3359,7 @@ importers: version: 18.2.0 react-docgen-typescript: specifier: 2.2.2 - version: 2.2.2(typescript@4.9.5) + version: 2.2.2(typescript@5.0.4) react-dom: specifier: ^17.0.0 || ^18.0.0 version: 18.2.0(react@18.2.0) @@ -3407,7 +3407,7 @@ importers: version: link:../storybook-utils '@storybook/react': specifier: ^8.5.3 - version: 8.5.3(@storybook/test@8.5.3(storybook@8.5.3(prettier@2.8.8)))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.5.3(prettier@2.8.8))(typescript@4.9.5) + version: 8.5.3(@storybook/test@8.5.3(storybook@8.5.3(prettier@2.8.8)))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.5.3(prettier@2.8.8))(typescript@5.0.4) lodash: specifier: 4.17.21 version: 4.17.21 @@ -3419,7 +3419,7 @@ importers: version: 0.1.13 '@storybook/react': specifier: 8.5.3 - version: 8.5.3(@storybook/test@8.5.3(storybook@8.5.3(prettier@2.8.8)))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.5.3(prettier@2.8.8))(typescript@4.9.5) + version: 8.5.3(@storybook/test@8.5.3(storybook@8.5.3(prettier@2.8.8)))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.5.3(prettier@2.8.8))(typescript@5.0.4) lodash: specifier: ^4.17.21 version: 4.17.21 @@ -3491,7 +3491,7 @@ importers: version: 11.1.1 jest: specifier: 29.6.2 - version: 29.6.2(@types/node@20.4.8)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@4.9.5)) + version: 29.6.2(@types/node@20.4.8)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@5.0.4)) jest-axe: specifier: 8.0.0 version: 8.0.0 @@ -10356,9 +10356,9 @@ packages: resolution: {integrity: sha512-3KS2b+kL7fsuk/eJZ7EQdnEmQoaho/r6KUef7hxvltNA5DR8NAUM+8wJMbJyZ4G9/7i3v5zPBIMN5aybAh2/Jg==} engines: {node: '>= 0.4'} - typescript@4.9.5: - resolution: {integrity: sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==} - engines: {node: '>=4.2.0'} + typescript@5.0.4: + resolution: {integrity: sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw==} + engines: {node: '>=12.20'} hasBin: true unbox-primitive@1.0.2: @@ -11979,9 +11979,9 @@ snapshots: optionalDependencies: '@babel/core': 7.24.3 - '@emotion/eslint-plugin@11.12.0(eslint@9.16.0)(typescript@4.9.5)': + '@emotion/eslint-plugin@11.12.0(eslint@9.16.0)(typescript@5.0.4)': dependencies: - '@typescript-eslint/utils': 5.62.0(eslint@9.16.0)(typescript@4.9.5) + '@typescript-eslint/utils': 5.62.0(eslint@9.16.0)(typescript@5.0.4) eslint: 9.16.0 transitivePeerDependencies: - supports-color @@ -12342,7 +12342,7 @@ snapshots: jest-util: 29.7.0 slash: 3.0.0 - '@jest/core@29.6.2(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.17.12)(typescript@4.9.5))': + '@jest/core@29.6.2(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.17.12)(typescript@5.0.4))': dependencies: '@jest/console': 29.6.2 '@jest/reporters': 29.6.2 @@ -12356,7 +12356,7 @@ snapshots: exit: 0.1.2 graceful-fs: 4.2.11 jest-changed-files: 29.5.0 - jest-config: 29.6.2(@types/node@20.4.8)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.17.12)(typescript@4.9.5)) + jest-config: 29.6.2(@types/node@20.4.8)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.17.12)(typescript@5.0.4)) jest-haste-map: 29.7.0 jest-message-util: 29.7.0 jest-regex-util: 29.6.3 @@ -12378,7 +12378,7 @@ snapshots: - ts-node optional: true - '@jest/core@29.6.2(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@4.9.5))': + '@jest/core@29.6.2(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@5.0.4))': dependencies: '@jest/console': 29.6.2 '@jest/reporters': 29.6.2 @@ -12392,7 +12392,7 @@ snapshots: exit: 0.1.2 graceful-fs: 4.2.11 jest-changed-files: 29.5.0 - jest-config: 29.6.2(@types/node@20.4.8)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@4.9.5)) + jest-config: 29.6.2(@types/node@20.4.8)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@5.0.4)) jest-haste-map: 29.7.0 jest-message-util: 29.7.0 jest-regex-util: 29.6.3 @@ -12953,7 +12953,7 @@ snapshots: react: 18.2.0 react-dom: 18.2.0(react@18.2.0) - '@storybook/builder-webpack5@8.5.3(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.18.19)(storybook@8.5.3(prettier@2.8.8))(typescript@4.9.5)': + '@storybook/builder-webpack5@8.5.3(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.18.19)(storybook@8.5.3(prettier@2.8.8))(typescript@5.0.4)': dependencies: '@storybook/core-webpack': 8.5.3(storybook@8.5.3(prettier@2.8.8)) '@types/semver': 7.5.0 @@ -12963,7 +12963,7 @@ snapshots: constants-browserify: 1.0.0 css-loader: 6.8.1(webpack@5.88.0(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.18.19)) es-module-lexer: 1.6.0 - fork-ts-checker-webpack-plugin: 8.0.0(typescript@4.9.5)(webpack@5.88.0(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.18.19)) + fork-ts-checker-webpack-plugin: 8.0.0(typescript@5.0.4)(webpack@5.88.0(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.18.19)) html-webpack-plugin: 5.5.3(webpack@5.88.0(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.18.19)) magic-string: 0.30.10 path-browserify: 1.0.1 @@ -12981,7 +12981,7 @@ snapshots: webpack-hot-middleware: 2.25.4 webpack-virtual-modules: 0.6.2 optionalDependencies: - typescript: 4.9.5 + typescript: 5.0.4 transitivePeerDependencies: - '@swc/core' - esbuild @@ -13056,11 +13056,11 @@ snapshots: dependencies: storybook: 8.5.3(prettier@2.8.8) - '@storybook/preset-react-webpack@8.5.3(@storybook/test@8.5.3(storybook@8.5.3(prettier@2.8.8)))(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.18.19)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.5.3(prettier@2.8.8))(typescript@4.9.5)': + '@storybook/preset-react-webpack@8.5.3(@storybook/test@8.5.3(storybook@8.5.3(prettier@2.8.8)))(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.18.19)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.5.3(prettier@2.8.8))(typescript@5.0.4)': dependencies: '@storybook/core-webpack': 8.5.3(storybook@8.5.3(prettier@2.8.8)) - '@storybook/react': 8.5.3(@storybook/test@8.5.3(storybook@8.5.3(prettier@2.8.8)))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.5.3(prettier@2.8.8))(typescript@4.9.5) - '@storybook/react-docgen-typescript-plugin': 1.0.6--canary.9.0c3f3b7.0(typescript@4.9.5)(webpack@5.88.0(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.18.19)) + '@storybook/react': 8.5.3(@storybook/test@8.5.3(storybook@8.5.3(prettier@2.8.8)))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.5.3(prettier@2.8.8))(typescript@5.0.4) + '@storybook/react-docgen-typescript-plugin': 1.0.6--canary.9.0c3f3b7.0(typescript@5.0.4)(webpack@5.88.0(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.18.19)) '@types/semver': 7.5.0 find-up: 5.0.0 magic-string: 0.30.10 @@ -13073,7 +13073,7 @@ snapshots: tsconfig-paths: 4.2.0 webpack: 5.88.0(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.18.19) optionalDependencies: - typescript: 4.9.5 + typescript: 5.0.4 transitivePeerDependencies: - '@storybook/test' - '@swc/core' @@ -13086,16 +13086,16 @@ snapshots: dependencies: storybook: 8.5.3(prettier@2.8.8) - '@storybook/react-docgen-typescript-plugin@1.0.6--canary.9.0c3f3b7.0(typescript@4.9.5)(webpack@5.88.0(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.18.19))': + '@storybook/react-docgen-typescript-plugin@1.0.6--canary.9.0c3f3b7.0(typescript@5.0.4)(webpack@5.88.0(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.18.19))': dependencies: debug: 4.3.4 endent: 2.1.0 find-cache-dir: 3.3.2 flat-cache: 3.0.4 micromatch: 4.0.5 - react-docgen-typescript: 2.2.2(typescript@4.9.5) + react-docgen-typescript: 2.2.2(typescript@5.0.4) tslib: 2.6.2 - typescript: 4.9.5 + typescript: 5.0.4 webpack: 5.88.0(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.18.19) transitivePeerDependencies: - supports-color @@ -13106,16 +13106,16 @@ snapshots: react-dom: 18.2.0(react@18.2.0) storybook: 8.5.3(prettier@2.8.8) - '@storybook/react-webpack5@8.5.3(@storybook/test@8.5.3(storybook@8.5.3(prettier@2.8.8)))(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.18.19)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.5.3(prettier@2.8.8))(typescript@4.9.5)': + '@storybook/react-webpack5@8.5.3(@storybook/test@8.5.3(storybook@8.5.3(prettier@2.8.8)))(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.18.19)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.5.3(prettier@2.8.8))(typescript@5.0.4)': dependencies: - '@storybook/builder-webpack5': 8.5.3(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.18.19)(storybook@8.5.3(prettier@2.8.8))(typescript@4.9.5) - '@storybook/preset-react-webpack': 8.5.3(@storybook/test@8.5.3(storybook@8.5.3(prettier@2.8.8)))(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.18.19)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.5.3(prettier@2.8.8))(typescript@4.9.5) - '@storybook/react': 8.5.3(@storybook/test@8.5.3(storybook@8.5.3(prettier@2.8.8)))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.5.3(prettier@2.8.8))(typescript@4.9.5) + '@storybook/builder-webpack5': 8.5.3(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.18.19)(storybook@8.5.3(prettier@2.8.8))(typescript@5.0.4) + '@storybook/preset-react-webpack': 8.5.3(@storybook/test@8.5.3(storybook@8.5.3(prettier@2.8.8)))(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.18.19)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.5.3(prettier@2.8.8))(typescript@5.0.4) + '@storybook/react': 8.5.3(@storybook/test@8.5.3(storybook@8.5.3(prettier@2.8.8)))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.5.3(prettier@2.8.8))(typescript@5.0.4) react: 18.2.0 react-dom: 18.2.0(react@18.2.0) storybook: 8.5.3(prettier@2.8.8) optionalDependencies: - typescript: 4.9.5 + typescript: 5.0.4 transitivePeerDependencies: - '@storybook/test' - '@swc/core' @@ -13124,7 +13124,7 @@ snapshots: - uglify-js - webpack-cli - '@storybook/react@8.5.3(@storybook/test@8.5.3(storybook@8.5.3(prettier@2.8.8)))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.5.3(prettier@2.8.8))(typescript@4.9.5)': + '@storybook/react@8.5.3(@storybook/test@8.5.3(storybook@8.5.3(prettier@2.8.8)))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.5.3(prettier@2.8.8))(typescript@5.0.4)': dependencies: '@storybook/components': 8.5.3(storybook@8.5.3(prettier@2.8.8)) '@storybook/global': 5.0.0 @@ -13137,7 +13137,7 @@ snapshots: storybook: 8.5.3(prettier@2.8.8) optionalDependencies: '@storybook/test': 8.5.3(storybook@8.5.3(prettier@2.8.8)) - typescript: 4.9.5 + typescript: 5.0.4 '@storybook/test@8.5.3(storybook@8.5.3(prettier@2.8.8))': dependencies: @@ -13242,12 +13242,12 @@ snapshots: '@svgr/babel-plugin-transform-react-native-svg': 8.1.0(@babel/core@7.24.3) '@svgr/babel-plugin-transform-svg-component': 8.0.0(@babel/core@7.24.3) - '@svgr/cli@8.0.1(typescript@4.9.5)': + '@svgr/cli@8.0.1(typescript@5.0.4)': dependencies: - '@svgr/core': 8.0.0(typescript@4.9.5) - '@svgr/plugin-jsx': 8.0.1(@svgr/core@8.0.0(typescript@4.9.5)) - '@svgr/plugin-prettier': 8.0.1(@svgr/core@8.0.0(typescript@4.9.5)) - '@svgr/plugin-svgo': 8.0.1(@svgr/core@8.0.0(typescript@4.9.5))(typescript@4.9.5) + '@svgr/core': 8.0.0(typescript@5.0.4) + '@svgr/plugin-jsx': 8.0.1(@svgr/core@8.0.0(typescript@5.0.4)) + '@svgr/plugin-prettier': 8.0.1(@svgr/core@8.0.0(typescript@5.0.4)) + '@svgr/plugin-svgo': 8.0.1(@svgr/core@8.0.0(typescript@5.0.4))(typescript@5.0.4) camelcase: 6.3.0 chalk: 4.1.2 commander: 9.5.0 @@ -13266,23 +13266,23 @@ snapshots: transitivePeerDependencies: - supports-color - '@svgr/core@8.0.0(typescript@4.9.5)': + '@svgr/core@8.0.0(typescript@5.0.4)': dependencies: '@babel/core': 7.24.3 '@svgr/babel-preset': 8.0.0(@babel/core@7.24.3) camelcase: 6.3.0 - cosmiconfig: 8.3.6(typescript@4.9.5) + cosmiconfig: 8.3.6(typescript@5.0.4) snake-case: 3.0.4 transitivePeerDependencies: - supports-color - typescript - '@svgr/core@8.1.0(typescript@4.9.5)': + '@svgr/core@8.1.0(typescript@5.0.4)': dependencies: '@babel/core': 7.24.3 '@svgr/babel-preset': 8.1.0(@babel/core@7.24.3) camelcase: 6.3.0 - cosmiconfig: 8.3.6(typescript@4.9.5) + cosmiconfig: 8.3.6(typescript@5.0.4) snake-case: 3.0.4 transitivePeerDependencies: - supports-color @@ -13306,51 +13306,51 @@ snapshots: transitivePeerDependencies: - supports-color - '@svgr/plugin-jsx@8.0.1(@svgr/core@8.0.0(typescript@4.9.5))': + '@svgr/plugin-jsx@8.0.1(@svgr/core@8.0.0(typescript@5.0.4))': dependencies: '@babel/core': 7.24.3 '@svgr/babel-preset': 8.0.0(@babel/core@7.24.3) - '@svgr/core': 8.0.0(typescript@4.9.5) + '@svgr/core': 8.0.0(typescript@5.0.4) '@svgr/hast-util-to-babel-ast': 8.0.0 svg-parser: 2.0.4 transitivePeerDependencies: - supports-color - '@svgr/plugin-jsx@8.1.0(@svgr/core@8.1.0(typescript@4.9.5))': + '@svgr/plugin-jsx@8.1.0(@svgr/core@8.1.0(typescript@5.0.4))': dependencies: '@babel/core': 7.24.3 '@svgr/babel-preset': 8.1.0(@babel/core@7.24.3) - '@svgr/core': 8.1.0(typescript@4.9.5) + '@svgr/core': 8.1.0(typescript@5.0.4) '@svgr/hast-util-to-babel-ast': 8.0.0 svg-parser: 2.0.4 transitivePeerDependencies: - supports-color - '@svgr/plugin-prettier@8.0.1(@svgr/core@8.0.0(typescript@4.9.5))': + '@svgr/plugin-prettier@8.0.1(@svgr/core@8.0.0(typescript@5.0.4))': dependencies: - '@svgr/core': 8.0.0(typescript@4.9.5) + '@svgr/core': 8.0.0(typescript@5.0.4) deepmerge: 4.3.1 prettier: 2.8.8 - '@svgr/plugin-svgo@8.0.1(@svgr/core@8.0.0(typescript@4.9.5))(typescript@4.9.5)': + '@svgr/plugin-svgo@8.0.1(@svgr/core@8.0.0(typescript@5.0.4))(typescript@5.0.4)': dependencies: - '@svgr/core': 8.0.0(typescript@4.9.5) - cosmiconfig: 8.3.6(typescript@4.9.5) + '@svgr/core': 8.0.0(typescript@5.0.4) + cosmiconfig: 8.3.6(typescript@5.0.4) deepmerge: 4.3.1 svgo: 3.0.2 transitivePeerDependencies: - typescript - '@svgr/plugin-svgo@8.1.0(@svgr/core@8.1.0(typescript@4.9.5))(typescript@4.9.5)': + '@svgr/plugin-svgo@8.1.0(@svgr/core@8.1.0(typescript@5.0.4))(typescript@5.0.4)': dependencies: - '@svgr/core': 8.1.0(typescript@4.9.5) - cosmiconfig: 8.3.6(typescript@4.9.5) + '@svgr/core': 8.1.0(typescript@5.0.4) + cosmiconfig: 8.3.6(typescript@5.0.4) deepmerge: 4.3.1 svgo: 3.0.2 transitivePeerDependencies: - typescript - '@svgr/rollup@8.1.0(rollup@4.16.1)(typescript@4.9.5)': + '@svgr/rollup@8.1.0(rollup@4.16.1)(typescript@5.0.4)': dependencies: '@babel/core': 7.24.3 '@babel/plugin-transform-react-constant-elements': 7.22.5(@babel/core@7.24.3) @@ -13358,24 +13358,24 @@ snapshots: '@babel/preset-react': 7.24.1(@babel/core@7.24.3) '@babel/preset-typescript': 7.24.1(@babel/core@7.24.3) '@rollup/pluginutils': 5.0.2(rollup@4.16.1) - '@svgr/core': 8.1.0(typescript@4.9.5) - '@svgr/plugin-jsx': 8.1.0(@svgr/core@8.1.0(typescript@4.9.5)) - '@svgr/plugin-svgo': 8.1.0(@svgr/core@8.1.0(typescript@4.9.5))(typescript@4.9.5) + '@svgr/core': 8.1.0(typescript@5.0.4) + '@svgr/plugin-jsx': 8.1.0(@svgr/core@8.1.0(typescript@5.0.4)) + '@svgr/plugin-svgo': 8.1.0(@svgr/core@8.1.0(typescript@5.0.4))(typescript@5.0.4) transitivePeerDependencies: - rollup - supports-color - typescript - '@svgr/webpack@8.0.1(typescript@4.9.5)': + '@svgr/webpack@8.0.1(typescript@5.0.4)': dependencies: '@babel/core': 7.24.3 '@babel/plugin-transform-react-constant-elements': 7.22.5(@babel/core@7.24.3) '@babel/preset-env': 7.24.3(@babel/core@7.24.3) '@babel/preset-react': 7.24.1(@babel/core@7.24.3) '@babel/preset-typescript': 7.24.1(@babel/core@7.24.3) - '@svgr/core': 8.0.0(typescript@4.9.5) - '@svgr/plugin-jsx': 8.0.1(@svgr/core@8.0.0(typescript@4.9.5)) - '@svgr/plugin-svgo': 8.0.1(@svgr/core@8.0.0(typescript@4.9.5))(typescript@4.9.5) + '@svgr/core': 8.0.0(typescript@5.0.4) + '@svgr/plugin-jsx': 8.0.1(@svgr/core@8.0.0(typescript@5.0.4)) + '@svgr/plugin-svgo': 8.0.1(@svgr/core@8.0.0(typescript@5.0.4))(typescript@5.0.4) transitivePeerDependencies: - supports-color - typescript @@ -13741,34 +13741,34 @@ snapshots: dependencies: '@types/yargs-parser': 21.0.0 - '@typescript-eslint/eslint-plugin@8.17.0(@typescript-eslint/parser@8.17.0(eslint@9.16.0)(typescript@4.9.5))(eslint@9.16.0)(typescript@4.9.5)': + '@typescript-eslint/eslint-plugin@8.17.0(@typescript-eslint/parser@8.17.0(eslint@9.16.0)(typescript@5.0.4))(eslint@9.16.0)(typescript@5.0.4)': dependencies: '@eslint-community/regexpp': 4.12.1 - '@typescript-eslint/parser': 8.17.0(eslint@9.16.0)(typescript@4.9.5) + '@typescript-eslint/parser': 8.17.0(eslint@9.16.0)(typescript@5.0.4) '@typescript-eslint/scope-manager': 8.17.0 - '@typescript-eslint/type-utils': 8.17.0(eslint@9.16.0)(typescript@4.9.5) - '@typescript-eslint/utils': 8.17.0(eslint@9.16.0)(typescript@4.9.5) + '@typescript-eslint/type-utils': 8.17.0(eslint@9.16.0)(typescript@5.0.4) + '@typescript-eslint/utils': 8.17.0(eslint@9.16.0)(typescript@5.0.4) '@typescript-eslint/visitor-keys': 8.17.0 eslint: 9.16.0 graphemer: 1.4.0 ignore: 5.3.2 natural-compare: 1.4.0 - ts-api-utils: 1.4.3(typescript@4.9.5) + ts-api-utils: 1.4.3(typescript@5.0.4) optionalDependencies: - typescript: 4.9.5 + typescript: 5.0.4 transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.17.0(eslint@9.16.0)(typescript@4.9.5)': + '@typescript-eslint/parser@8.17.0(eslint@9.16.0)(typescript@5.0.4)': dependencies: '@typescript-eslint/scope-manager': 8.17.0 '@typescript-eslint/types': 8.17.0 - '@typescript-eslint/typescript-estree': 8.17.0(typescript@4.9.5) + '@typescript-eslint/typescript-estree': 8.17.0(typescript@5.0.4) '@typescript-eslint/visitor-keys': 8.17.0 debug: 4.3.4 eslint: 9.16.0 optionalDependencies: - typescript: 4.9.5 + typescript: 5.0.4 transitivePeerDependencies: - supports-color @@ -13782,15 +13782,15 @@ snapshots: '@typescript-eslint/types': 8.17.0 '@typescript-eslint/visitor-keys': 8.17.0 - '@typescript-eslint/type-utils@8.17.0(eslint@9.16.0)(typescript@4.9.5)': + '@typescript-eslint/type-utils@8.17.0(eslint@9.16.0)(typescript@5.0.4)': dependencies: - '@typescript-eslint/typescript-estree': 8.17.0(typescript@4.9.5) - '@typescript-eslint/utils': 8.17.0(eslint@9.16.0)(typescript@4.9.5) + '@typescript-eslint/typescript-estree': 8.17.0(typescript@5.0.4) + '@typescript-eslint/utils': 8.17.0(eslint@9.16.0)(typescript@5.0.4) debug: 4.3.4 eslint: 9.16.0 - ts-api-utils: 1.4.3(typescript@4.9.5) + ts-api-utils: 1.4.3(typescript@5.0.4) optionalDependencies: - typescript: 4.9.5 + typescript: 5.0.4 transitivePeerDependencies: - supports-color @@ -13798,7 +13798,7 @@ snapshots: '@typescript-eslint/types@8.17.0': {} - '@typescript-eslint/typescript-estree@5.62.0(typescript@4.9.5)': + '@typescript-eslint/typescript-estree@5.62.0(typescript@5.0.4)': dependencies: '@typescript-eslint/types': 5.62.0 '@typescript-eslint/visitor-keys': 5.62.0 @@ -13806,13 +13806,13 @@ snapshots: globby: 11.1.0 is-glob: 4.0.3 semver: 7.6.3 - tsutils: 3.21.0(typescript@4.9.5) + tsutils: 3.21.0(typescript@5.0.4) optionalDependencies: - typescript: 4.9.5 + typescript: 5.0.4 transitivePeerDependencies: - supports-color - '@typescript-eslint/typescript-estree@8.17.0(typescript@4.9.5)': + '@typescript-eslint/typescript-estree@8.17.0(typescript@5.0.4)': dependencies: '@typescript-eslint/types': 8.17.0 '@typescript-eslint/visitor-keys': 8.17.0 @@ -13821,20 +13821,20 @@ snapshots: is-glob: 4.0.3 minimatch: 9.0.5 semver: 7.6.3 - ts-api-utils: 1.4.3(typescript@4.9.5) + ts-api-utils: 1.4.3(typescript@5.0.4) optionalDependencies: - typescript: 4.9.5 + typescript: 5.0.4 transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@5.62.0(eslint@9.16.0)(typescript@4.9.5)': + '@typescript-eslint/utils@5.62.0(eslint@9.16.0)(typescript@5.0.4)': dependencies: '@eslint-community/eslint-utils': 4.4.1(eslint@9.16.0) '@types/json-schema': 7.0.15 '@types/semver': 7.5.0 '@typescript-eslint/scope-manager': 5.62.0 '@typescript-eslint/types': 5.62.0 - '@typescript-eslint/typescript-estree': 5.62.0(typescript@4.9.5) + '@typescript-eslint/typescript-estree': 5.62.0(typescript@5.0.4) eslint: 9.16.0 eslint-scope: 5.1.1 semver: 7.6.3 @@ -13842,15 +13842,15 @@ snapshots: - supports-color - typescript - '@typescript-eslint/utils@8.17.0(eslint@9.16.0)(typescript@4.9.5)': + '@typescript-eslint/utils@8.17.0(eslint@9.16.0)(typescript@5.0.4)': dependencies: '@eslint-community/eslint-utils': 4.4.1(eslint@9.16.0) '@typescript-eslint/scope-manager': 8.17.0 '@typescript-eslint/types': 8.17.0 - '@typescript-eslint/typescript-estree': 8.17.0(typescript@4.9.5) + '@typescript-eslint/typescript-estree': 8.17.0(typescript@5.0.4) eslint: 9.16.0 optionalDependencies: - typescript: 4.9.5 + typescript: 5.0.4 transitivePeerDependencies: - supports-color @@ -14638,14 +14638,14 @@ snapshots: path-type: 4.0.0 yaml: 1.10.2 - cosmiconfig@8.3.6(typescript@4.9.5): + cosmiconfig@8.3.6(typescript@5.0.4): dependencies: import-fresh: 3.3.0 js-yaml: 4.1.0 parse-json: 5.2.0 path-type: 4.0.0 optionalDependencies: - typescript: 4.9.5 + typescript: 5.0.4 create-require@1.1.1: {} @@ -15240,17 +15240,17 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-module-utils@2.12.0(@typescript-eslint/parser@8.17.0(eslint@9.16.0)(typescript@4.9.5))(eslint-import-resolver-node@0.3.9)(eslint@9.16.0): + eslint-module-utils@2.12.0(@typescript-eslint/parser@8.17.0(eslint@9.16.0)(typescript@5.0.4))(eslint-import-resolver-node@0.3.9)(eslint@9.16.0): dependencies: debug: 3.2.7 optionalDependencies: - '@typescript-eslint/parser': 8.17.0(eslint@9.16.0)(typescript@4.9.5) + '@typescript-eslint/parser': 8.17.0(eslint@9.16.0)(typescript@5.0.4) eslint: 9.16.0 eslint-import-resolver-node: 0.3.9 transitivePeerDependencies: - supports-color - eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.17.0(eslint@9.16.0)(typescript@4.9.5))(eslint@9.16.0): + eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.17.0(eslint@9.16.0)(typescript@5.0.4))(eslint@9.16.0): dependencies: '@rtsao/scc': 1.1.0 array-includes: 3.1.8 @@ -15261,7 +15261,7 @@ snapshots: doctrine: 2.1.0 eslint: 9.16.0 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.12.0(@typescript-eslint/parser@8.17.0(eslint@9.16.0)(typescript@4.9.5))(eslint-import-resolver-node@0.3.9)(eslint@9.16.0) + eslint-module-utils: 2.12.0(@typescript-eslint/parser@8.17.0(eslint@9.16.0)(typescript@5.0.4))(eslint-import-resolver-node@0.3.9)(eslint@9.16.0) hasown: 2.0.2 is-core-module: 2.15.1 is-glob: 4.0.3 @@ -15273,19 +15273,19 @@ snapshots: string.prototype.trimend: 1.0.8 tsconfig-paths: 3.15.0 optionalDependencies: - '@typescript-eslint/parser': 8.17.0(eslint@9.16.0)(typescript@4.9.5) + '@typescript-eslint/parser': 8.17.0(eslint@9.16.0)(typescript@5.0.4) transitivePeerDependencies: - eslint-import-resolver-typescript - eslint-import-resolver-webpack - supports-color - eslint-plugin-jest@28.9.0(@typescript-eslint/eslint-plugin@8.17.0(@typescript-eslint/parser@8.17.0(eslint@9.16.0)(typescript@4.9.5))(eslint@9.16.0)(typescript@4.9.5))(eslint@9.16.0)(jest@29.6.2(@types/node@20.17.12)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.17.12)(typescript@4.9.5)))(typescript@4.9.5): + eslint-plugin-jest@28.9.0(@typescript-eslint/eslint-plugin@8.17.0(@typescript-eslint/parser@8.17.0(eslint@9.16.0)(typescript@5.0.4))(eslint@9.16.0)(typescript@5.0.4))(eslint@9.16.0)(jest@29.6.2(@types/node@20.17.12)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.17.12)(typescript@5.0.4)))(typescript@5.0.4): dependencies: - '@typescript-eslint/utils': 8.17.0(eslint@9.16.0)(typescript@4.9.5) + '@typescript-eslint/utils': 8.17.0(eslint@9.16.0)(typescript@5.0.4) eslint: 9.16.0 optionalDependencies: - '@typescript-eslint/eslint-plugin': 8.17.0(@typescript-eslint/parser@8.17.0(eslint@9.16.0)(typescript@4.9.5))(eslint@9.16.0)(typescript@4.9.5) - jest: 29.6.2(@types/node@20.17.12)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.17.12)(typescript@4.9.5)) + '@typescript-eslint/eslint-plugin': 8.17.0(@typescript-eslint/parser@8.17.0(eslint@9.16.0)(typescript@5.0.4))(eslint@9.16.0)(typescript@5.0.4) + jest: 29.6.2(@types/node@20.17.12)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.17.12)(typescript@5.0.4)) transitivePeerDependencies: - supports-color - typescript @@ -15339,10 +15339,10 @@ snapshots: dependencies: eslint: 9.16.0 - eslint-plugin-storybook@0.11.1(eslint@9.16.0)(typescript@4.9.5): + eslint-plugin-storybook@0.11.1(eslint@9.16.0)(typescript@5.0.4): dependencies: '@storybook/csf': 0.1.12 - '@typescript-eslint/utils': 8.17.0(eslint@9.16.0)(typescript@4.9.5) + '@typescript-eslint/utils': 8.17.0(eslint@9.16.0)(typescript@5.0.4) eslint: 9.16.0 ts-dedent: 2.2.0 transitivePeerDependencies: @@ -15611,7 +15611,7 @@ snapshots: cross-spawn: 7.0.6 signal-exit: 4.1.0 - fork-ts-checker-webpack-plugin@8.0.0(typescript@4.9.5)(webpack@5.88.0(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.18.19)): + fork-ts-checker-webpack-plugin@8.0.0(typescript@5.0.4)(webpack@5.88.0(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.18.19)): dependencies: '@babel/code-frame': 7.24.2 chalk: 4.1.2 @@ -15625,7 +15625,7 @@ snapshots: schema-utils: 3.3.0 semver: 7.6.3 tapable: 2.2.1 - typescript: 4.9.5 + typescript: 5.0.4 webpack: 5.88.0(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.18.19) form-data@2.5.1: @@ -16234,16 +16234,16 @@ snapshots: - babel-plugin-macros - supports-color - jest-cli@29.6.2(@types/node@20.17.12)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.17.12)(typescript@4.9.5)): + jest-cli@29.6.2(@types/node@20.17.12)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.17.12)(typescript@5.0.4)): dependencies: - '@jest/core': 29.6.2(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.17.12)(typescript@4.9.5)) + '@jest/core': 29.6.2(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.17.12)(typescript@5.0.4)) '@jest/test-result': 29.6.2 '@jest/types': 29.6.3 chalk: 4.1.2 exit: 0.1.2 graceful-fs: 4.2.11 import-local: 3.1.0 - jest-config: 29.6.2(@types/node@20.17.12)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.17.12)(typescript@4.9.5)) + jest-config: 29.6.2(@types/node@20.17.12)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.17.12)(typescript@5.0.4)) jest-util: 29.7.0 jest-validate: 29.6.2 prompts: 2.4.2 @@ -16255,16 +16255,16 @@ snapshots: - ts-node optional: true - jest-cli@29.6.2(@types/node@20.4.8)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@4.9.5)): + jest-cli@29.6.2(@types/node@20.4.8)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@5.0.4)): dependencies: - '@jest/core': 29.6.2(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@4.9.5)) + '@jest/core': 29.6.2(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@5.0.4)) '@jest/test-result': 29.6.2 '@jest/types': 29.6.3 chalk: 4.1.2 exit: 0.1.2 graceful-fs: 4.2.11 import-local: 3.1.0 - jest-config: 29.6.2(@types/node@20.4.8)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@4.9.5)) + jest-config: 29.6.2(@types/node@20.4.8)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@5.0.4)) jest-util: 29.7.0 jest-validate: 29.6.2 prompts: 2.4.2 @@ -16275,7 +16275,7 @@ snapshots: - supports-color - ts-node - jest-config@29.6.2(@types/node@20.17.12)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.17.12)(typescript@4.9.5)): + jest-config@29.6.2(@types/node@20.17.12)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.17.12)(typescript@5.0.4)): dependencies: '@babel/core': 7.24.3 '@jest/test-sequencer': 29.6.2 @@ -16301,13 +16301,13 @@ snapshots: strip-json-comments: 3.1.1 optionalDependencies: '@types/node': 20.17.12 - ts-node: 10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.17.12)(typescript@4.9.5) + ts-node: 10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.17.12)(typescript@5.0.4) transitivePeerDependencies: - babel-plugin-macros - supports-color optional: true - jest-config@29.6.2(@types/node@20.4.8)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.17.12)(typescript@4.9.5)): + jest-config@29.6.2(@types/node@20.4.8)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.17.12)(typescript@5.0.4)): dependencies: '@babel/core': 7.24.3 '@jest/test-sequencer': 29.6.2 @@ -16333,13 +16333,13 @@ snapshots: strip-json-comments: 3.1.1 optionalDependencies: '@types/node': 20.4.8 - ts-node: 10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.17.12)(typescript@4.9.5) + ts-node: 10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.17.12)(typescript@5.0.4) transitivePeerDependencies: - babel-plugin-macros - supports-color optional: true - jest-config@29.6.2(@types/node@20.4.8)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@4.9.5)): + jest-config@29.6.2(@types/node@20.4.8)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@5.0.4)): dependencies: '@babel/core': 7.24.3 '@jest/test-sequencer': 29.6.2 @@ -16365,7 +16365,7 @@ snapshots: strip-json-comments: 3.1.1 optionalDependencies: '@types/node': 20.4.8 - ts-node: 10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@4.9.5) + ts-node: 10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@5.0.4) transitivePeerDependencies: - babel-plugin-macros - supports-color @@ -16620,12 +16620,12 @@ snapshots: merge-stream: 2.0.0 supports-color: 8.1.1 - jest@29.6.2(@types/node@20.17.12)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.17.12)(typescript@4.9.5)): + jest@29.6.2(@types/node@20.17.12)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.17.12)(typescript@5.0.4)): dependencies: - '@jest/core': 29.6.2(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.17.12)(typescript@4.9.5)) + '@jest/core': 29.6.2(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.17.12)(typescript@5.0.4)) '@jest/types': 29.6.3 import-local: 3.1.0 - jest-cli: 29.6.2(@types/node@20.17.12)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.17.12)(typescript@4.9.5)) + jest-cli: 29.6.2(@types/node@20.17.12)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.17.12)(typescript@5.0.4)) transitivePeerDependencies: - '@types/node' - babel-plugin-macros @@ -16633,12 +16633,12 @@ snapshots: - ts-node optional: true - jest@29.6.2(@types/node@20.4.8)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@4.9.5)): + jest@29.6.2(@types/node@20.4.8)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@5.0.4)): dependencies: - '@jest/core': 29.6.2(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@4.9.5)) + '@jest/core': 29.6.2(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@5.0.4)) '@jest/types': 29.6.3 import-local: 3.1.0 - jest-cli: 29.6.2(@types/node@20.4.8)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@4.9.5)) + jest-cli: 29.6.2(@types/node@20.4.8)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@5.0.4)) transitivePeerDependencies: - '@types/node' - babel-plugin-macros @@ -17603,16 +17603,16 @@ snapshots: normalize-path@3.0.0: {} - npm-package-json-lint-config-default@7.0.1(npm-package-json-lint@8.0.0(typescript@4.9.5)): + npm-package-json-lint-config-default@7.0.1(npm-package-json-lint@8.0.0(typescript@5.0.4)): dependencies: - npm-package-json-lint: 8.0.0(typescript@4.9.5) + npm-package-json-lint: 8.0.0(typescript@5.0.4) - npm-package-json-lint@8.0.0(typescript@4.9.5): + npm-package-json-lint@8.0.0(typescript@5.0.4): dependencies: ajv: 6.12.6 ajv-errors: 1.0.1(ajv@6.12.6) chalk: 4.1.2 - cosmiconfig: 8.3.6(typescript@4.9.5) + cosmiconfig: 8.3.6(typescript@5.0.4) debug: 4.3.4 globby: 11.1.0 ignore: 5.3.2 @@ -18019,9 +18019,9 @@ snapshots: range-parser@1.2.1: {} - react-docgen-typescript@2.2.2(typescript@4.9.5): + react-docgen-typescript@2.2.2(typescript@5.0.4): dependencies: - typescript: 4.9.5 + typescript: 5.0.4 react-docgen@7.0.3: dependencies: @@ -18944,13 +18944,13 @@ snapshots: trough@2.1.0: {} - ts-api-utils@1.4.3(typescript@4.9.5): + ts-api-utils@1.4.3(typescript@5.0.4): dependencies: - typescript: 4.9.5 + typescript: 5.0.4 ts-dedent@2.2.0: {} - ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.17.12)(typescript@4.9.5): + ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.17.12)(typescript@5.0.4): dependencies: '@cspotcode/source-map-support': 0.8.1 '@tsconfig/node10': 1.0.11 @@ -18964,13 +18964,13 @@ snapshots: create-require: 1.1.1 diff: 4.0.2 make-error: 1.3.6 - typescript: 4.9.5 + typescript: 5.0.4 v8-compile-cache-lib: 3.0.1 yn: 3.1.1 optionalDependencies: '@swc/core': 1.4.2(@swc/helpers@0.5.1) - ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@4.9.5): + ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@5.0.4): dependencies: '@cspotcode/source-map-support': 0.8.1 '@tsconfig/node10': 1.0.11 @@ -18984,7 +18984,7 @@ snapshots: create-require: 1.1.1 diff: 4.0.2 make-error: 1.3.6 - typescript: 4.9.5 + typescript: 5.0.4 v8-compile-cache-lib: 3.0.1 yn: 3.1.1 optionalDependencies: @@ -19010,10 +19010,10 @@ snapshots: tslib@2.6.2: {} - tsutils@3.21.0(typescript@4.9.5): + tsutils@3.21.0(typescript@5.0.4): dependencies: tslib: 1.14.1 - typescript: 4.9.5 + typescript: 5.0.4 tty-browserify@0.0.1: {} @@ -19111,7 +19111,7 @@ snapshots: possible-typed-array-names: 1.0.0 reflect.getprototypeof: 1.0.7 - typescript@4.9.5: {} + typescript@5.0.4: {} unbox-primitive@1.0.2: dependencies: diff --git a/tools/build/package.json b/tools/build/package.json index 37720d2f99..ee7dd84203 100644 --- a/tools/build/package.json +++ b/tools/build/package.json @@ -47,6 +47,6 @@ "peerDependencies": { "@babel/core": "7.24.0", "turbo": "^2.0.6", - "typescript": "~4.9.0" + "typescript": "~5.0.0" } } diff --git a/tools/lint/package.json b/tools/lint/package.json index e4c0cfb994..e57e7ce389 100644 --- a/tools/lint/package.json +++ b/tools/lint/package.json @@ -40,6 +40,6 @@ "prettier": "2.8.8" }, "peerDependencies": { - "typescript": "~4.9.0" + "typescript": "~5.0.0" } } From d008dc17570b5672e5a06ebc8ba935c0252e992e Mon Sep 17 00:00:00 2001 From: Adam Michael Thompson Date: Fri, 4 Apr 2025 16:13:47 -0400 Subject: [PATCH 02/48] use typescript node API --- tools/build/src/typescript/build-ts.ts | 61 ++++++++++++++++--- .../src/typescript/report-ts-diagnostic.ts | 22 +++++++ 2 files changed, 76 insertions(+), 7 deletions(-) create mode 100644 tools/build/src/typescript/report-ts-diagnostic.ts diff --git a/tools/build/src/typescript/build-ts.ts b/tools/build/src/typescript/build-ts.ts index 8c1163cb20..6c727fb2a5 100644 --- a/tools/build/src/typescript/build-ts.ts +++ b/tools/build/src/typescript/build-ts.ts @@ -1,8 +1,9 @@ /* eslint-disable no-console */ import chalk from 'chalk'; -import { spawn } from 'cross-spawn'; import fse from 'fs-extra'; import path from 'path'; +import ts from 'typescript'; +import { reportTypescriptDiagnostic } from './report-ts-diagnostic'; /** * Builds Typescript definitions for the current directory @@ -20,12 +21,58 @@ export function buildTypescript( process.exit(1); } - verbose && console.log(chalk.gray('Building TypeScript')); + verbose && console.log(chalk.blue('Building TypeScript')); - spawn('tsc', ['--build', tsConfigPath, ...(passThru ?? [''])], { - cwd: packageDir, - stdio: 'inherit', - }).on('exit', code => { - process.exit(code ?? undefined); + // Read tsconfig.json + const configFile = ts.readConfigFile(tsConfigPath, ts.sys.readFile); + + if (configFile.error) { + reportTypescriptDiagnostic(configFile.error); + process.exit(1); + } + verbose && + console.log( + chalk.blue(' Loaded tsconfig.json: '), + chalk.white(tsConfigPath), + '\n', + chalk.gray(JSON.stringify(configFile, null, 2)), + ); + + // Parse the config + const parsedConfig = ts.parseJsonConfigFileContent( + configFile.config, + ts.sys, + path.dirname(tsConfigPath), + ); + + if (parsedConfig.errors.length > 0) { + parsedConfig.errors.forEach(reportTypescriptDiagnostic); + process.exit(1); + } + + // Create the program + const program = ts.createProgram({ + rootNames: parsedConfig.fileNames, + options: parsedConfig.options, + projectReferences: parsedConfig.projectReferences, }); + + // Emit output + const emitResult = program.emit(); + + // Report diagnostics + const allDiagnostics = ts + .getPreEmitDiagnostics(program) + .concat(emitResult.diagnostics); + + if (verbose && allDiagnostics.length > 0) { + allDiagnostics.forEach(reportTypescriptDiagnostic); + } + + // Exit with appropriate code + const hasErrors = allDiagnostics.some( + diagnostic => diagnostic.category === ts.DiagnosticCategory.Error, + ); + const exitCode = emitResult.emitSkipped || hasErrors ? 1 : 0; + process.exit(exitCode); } diff --git a/tools/build/src/typescript/report-ts-diagnostic.ts b/tools/build/src/typescript/report-ts-diagnostic.ts new file mode 100644 index 0000000000..994e6b20c3 --- /dev/null +++ b/tools/build/src/typescript/report-ts-diagnostic.ts @@ -0,0 +1,22 @@ +import chalk from 'chalk'; +import ts from 'typescript'; +/** + * Helper function to report diagnostic messages + */ +export function reportTypescriptDiagnostic(diagnostic: ts.Diagnostic): void { + const message = ts.flattenDiagnosticMessageText(diagnostic.messageText, '\n'); + if (diagnostic.file && diagnostic.start !== undefined) { + const { line, character } = diagnostic.file.getLineAndCharacterOfPosition( + diagnostic.start, + ); + console.error( + chalk.red( + `${diagnostic.file.fileName} (${line + 1},${ + character + 1 + }): ${message}`, + ), + ); + } else { + console.error(chalk.red(message)); + } +} From eee9c5cc1b39d6810cff64e58e014e379659f093 Mon Sep 17 00:00:00 2001 From: Adam Michael Thompson Date: Fri, 4 Apr 2025 16:25:46 -0400 Subject: [PATCH 03/48] handle cli options --- tools/build/src/typescript/build-ts.ts | 9 ++++++++- .../src/typescript/parsePassThruOptions.ts | 18 ++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 tools/build/src/typescript/parsePassThruOptions.ts diff --git a/tools/build/src/typescript/build-ts.ts b/tools/build/src/typescript/build-ts.ts index 6c727fb2a5..4f38ffc4af 100644 --- a/tools/build/src/typescript/build-ts.ts +++ b/tools/build/src/typescript/build-ts.ts @@ -3,6 +3,7 @@ import chalk from 'chalk'; import fse from 'fs-extra'; import path from 'path'; import ts from 'typescript'; +import { parsePassThruOptions } from './parsePAssThruOptions'; import { reportTypescriptDiagnostic } from './report-ts-diagnostic'; /** @@ -50,10 +51,16 @@ export function buildTypescript( process.exit(1); } + // Any additional options passed in via the CLI + const cliCompilerOptions = parsePassThruOptions(passThru); + // Create the program const program = ts.createProgram({ rootNames: parsedConfig.fileNames, - options: parsedConfig.options, + options: { + ...parsedConfig.options, + ...cliCompilerOptions, + }, projectReferences: parsedConfig.projectReferences, }); diff --git a/tools/build/src/typescript/parsePassThruOptions.ts b/tools/build/src/typescript/parsePassThruOptions.ts new file mode 100644 index 0000000000..7aec7c99fc --- /dev/null +++ b/tools/build/src/typescript/parsePassThruOptions.ts @@ -0,0 +1,18 @@ +/** + * Parses cli arguments passed to the build command + * into an object that can be used in the build process + */ +export function parsePassThruOptions( + passThru?: Array, +): Record | undefined { + return passThru?.reduce((acc, arg) => { + const [_key, value] = arg.split('='); + const key = _key.replace(/^-+/, ''); + if (value) { + acc[key] = value; + } else { + acc[key] = true; + } + return acc; + }, {} as Record); +} From 0b983617f1e34a8aa54b107eea1709229420efe6 Mon Sep 17 00:00:00 2001 From: Adam Michael Thompson Date: Fri, 4 Apr 2025 16:49:28 -0400 Subject: [PATCH 04/48] use createSolutionBuilderHost --- tools/build/src/typescript/build-ts.ts | 117 ++++++++++-------- .../src/typescript/report-ts-diagnostic.ts | 22 ---- 2 files changed, 64 insertions(+), 75 deletions(-) delete mode 100644 tools/build/src/typescript/report-ts-diagnostic.ts diff --git a/tools/build/src/typescript/build-ts.ts b/tools/build/src/typescript/build-ts.ts index 4f38ffc4af..078753ee78 100644 --- a/tools/build/src/typescript/build-ts.ts +++ b/tools/build/src/typescript/build-ts.ts @@ -3,15 +3,26 @@ import chalk from 'chalk'; import fse from 'fs-extra'; import path from 'path'; import ts from 'typescript'; -import { parsePassThruOptions } from './parsePAssThruOptions'; -import { reportTypescriptDiagnostic } from './report-ts-diagnostic'; +import { parsePassThruOptions } from './parsePassThruOptions'; + +interface BuildTypescriptOptions { + /** Whether to print verbose output*/ + verbose?: boolean; + + /** + * Whether to build for production + * + * This builds all TS downlevel targets + */ + production?: boolean; +} /** * Builds Typescript definitions for the current directory */ export function buildTypescript( passThru?: Array, - options?: Record, + options?: BuildTypescriptOptions, ) { const { verbose } = options ?? { verbose: false }; const packageDir = process.cwd(); @@ -22,64 +33,64 @@ export function buildTypescript( process.exit(1); } - verbose && console.log(chalk.blue('Building TypeScript')); + verbose && console.log(chalk.blue.bold('Building TypeScript')); + verbose && console.log(chalk.gray(JSON.stringify(options, null, 2))); - // Read tsconfig.json - const configFile = ts.readConfigFile(tsConfigPath, ts.sys.readFile); + // Any additional options passed in via the CLI + const cliCompilerOptions = parsePassThruOptions(passThru); - if (configFile.error) { - reportTypescriptDiagnostic(configFile.error); - process.exit(1); - } - verbose && - console.log( - chalk.blue(' Loaded tsconfig.json: '), - chalk.white(tsConfigPath), - '\n', - chalk.gray(JSON.stringify(configFile, null, 2)), - ); - - // Parse the config - const parsedConfig = ts.parseJsonConfigFileContent( - configFile.config, - ts.sys, - path.dirname(tsConfigPath), + // Create a Solution Builder Host to properly handle --build functionality + const buildHost = ts.createSolutionBuilderHost( + ts.sys, // system + ts.createEmitAndSemanticDiagnosticsBuilderProgram, // createProgram + reportTypescriptDiagnostic, // reportDiagnostic + reportTypescriptDiagnostic, // reportSolutionBuilderStatus + verbose ? message => console.log(chalk.gray(message)) : undefined, // reportErrorSummary ); - if (parsedConfig.errors.length > 0) { - parsedConfig.errors.forEach(reportTypescriptDiagnostic); - process.exit(1); - } + // Create a Solution Builder (equivalent to tsc --build) + const builder = ts.createSolutionBuilder(buildHost, [tsConfigPath], { + ...cliCompilerOptions, + verbose: verbose, + }); - // Any additional options passed in via the CLI - const cliCompilerOptions = parsePassThruOptions(passThru); + // Build the project + const exitStatus = builder.build(); - // Create the program - const program = ts.createProgram({ - rootNames: parsedConfig.fileNames, - options: { - ...parsedConfig.options, - ...cliCompilerOptions, - }, - projectReferences: parsedConfig.projectReferences, - }); + // Exit with appropriate code + process.exit(exitStatus); - // Emit output - const emitResult = program.emit(); + /** + * Helper function to report diagnostic messages + */ + function reportTypescriptDiagnostic(diagnostic: ts.Diagnostic): void { + const msg = ts.flattenDiagnosticMessageText(diagnostic.messageText, '\n'); - // Report diagnostics - const allDiagnostics = ts - .getPreEmitDiagnostics(program) - .concat(emitResult.diagnostics); + const isError = diagnostic.category === ts.DiagnosticCategory.Error; + const isWarning = diagnostic.category === ts.DiagnosticCategory.Warning; - if (verbose && allDiagnostics.length > 0) { - allDiagnostics.forEach(reportTypescriptDiagnostic); - } + // Only show non-errors in verbose + if (!verbose && !(isError || isWarning)) { + return; + } - // Exit with appropriate code - const hasErrors = allDiagnostics.some( - diagnostic => diagnostic.category === ts.DiagnosticCategory.Error, - ); - const exitCode = emitResult.emitSkipped || hasErrors ? 1 : 0; - process.exit(exitCode); + let message = msg; + + if (diagnostic.file && diagnostic.start !== undefined) { + const { line, character } = diagnostic.file.getLineAndCharacterOfPosition( + diagnostic.start, + ); + const l = line + 1; + const c = character + 1; + message = `${diagnostic.file.fileName} (${l},${c}): ${msg}`; + } + + const msgColor = isError + ? chalk.red + : isWarning + ? chalk.yellow + : chalk.gray; + + console.log(msgColor(message)); + } } diff --git a/tools/build/src/typescript/report-ts-diagnostic.ts b/tools/build/src/typescript/report-ts-diagnostic.ts deleted file mode 100644 index 994e6b20c3..0000000000 --- a/tools/build/src/typescript/report-ts-diagnostic.ts +++ /dev/null @@ -1,22 +0,0 @@ -import chalk from 'chalk'; -import ts from 'typescript'; -/** - * Helper function to report diagnostic messages - */ -export function reportTypescriptDiagnostic(diagnostic: ts.Diagnostic): void { - const message = ts.flattenDiagnosticMessageText(diagnostic.messageText, '\n'); - if (diagnostic.file && diagnostic.start !== undefined) { - const { line, character } = diagnostic.file.getLineAndCharacterOfPosition( - diagnostic.start, - ); - console.error( - chalk.red( - `${diagnostic.file.fileName} (${line + 1},${ - character + 1 - }): ${message}`, - ), - ); - } else { - console.error(chalk.red(message)); - } -} From b9dc06043f888428ce0eda8f556c024d815e2a12 Mon Sep 17 00:00:00 2001 From: Adam Michael Thompson Date: Fri, 4 Apr 2025 16:49:36 -0400 Subject: [PATCH 05/48] add production flag --- tools/cli/src/index.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/cli/src/index.ts b/tools/cli/src/index.ts index ba139d541e..8b1056b94d 100644 --- a/tools/cli/src/index.ts +++ b/tools/cli/src/index.ts @@ -222,8 +222,12 @@ cli .command('build-ts') .description("Builds a package's TypeScript definitions") .argument('[pass-through...]', 'Pass-through options for `tsc`') - .passThroughOptions(true) // allows passing flags to the `tsc` CLI .option('-v --verbose', 'Prints additional information to the console', false) + .option( + '-p --production', + 'Whether to build for production. This builds all TS downlevel targets', + false, + ) .allowUnknownOption(true) .action(buildTypescript); cli From 58ea13fddf8f9e6e3c4003381edd77d8ccfbcf3c Mon Sep 17 00:00:00 2001 From: Adam Michael Thompson Date: Fri, 4 Apr 2025 16:53:15 -0400 Subject: [PATCH 06/48] makeTypescriptDiagnosticReporter --- tools/build/src/typescript/build-ts.ts | 36 +----------------- .../makeTypescriptDiagnosticReporter.ts | 38 +++++++++++++++++++ 2 files changed, 40 insertions(+), 34 deletions(-) create mode 100644 tools/build/src/typescript/makeTypescriptDiagnosticReporter.ts diff --git a/tools/build/src/typescript/build-ts.ts b/tools/build/src/typescript/build-ts.ts index 078753ee78..43fae9438d 100644 --- a/tools/build/src/typescript/build-ts.ts +++ b/tools/build/src/typescript/build-ts.ts @@ -3,6 +3,7 @@ import chalk from 'chalk'; import fse from 'fs-extra'; import path from 'path'; import ts from 'typescript'; +import { makeTypescriptDiagnosticReporter } from './makeTypescriptDiagnosticReporter'; import { parsePassThruOptions } from './parsePassThruOptions'; interface BuildTypescriptOptions { @@ -38,6 +39,7 @@ export function buildTypescript( // Any additional options passed in via the CLI const cliCompilerOptions = parsePassThruOptions(passThru); + const reportTypescriptDiagnostic = makeTypescriptDiagnosticReporter(verbose); // Create a Solution Builder Host to properly handle --build functionality const buildHost = ts.createSolutionBuilderHost( @@ -59,38 +61,4 @@ export function buildTypescript( // Exit with appropriate code process.exit(exitStatus); - - /** - * Helper function to report diagnostic messages - */ - function reportTypescriptDiagnostic(diagnostic: ts.Diagnostic): void { - const msg = ts.flattenDiagnosticMessageText(diagnostic.messageText, '\n'); - - const isError = diagnostic.category === ts.DiagnosticCategory.Error; - const isWarning = diagnostic.category === ts.DiagnosticCategory.Warning; - - // Only show non-errors in verbose - if (!verbose && !(isError || isWarning)) { - return; - } - - let message = msg; - - if (diagnostic.file && diagnostic.start !== undefined) { - const { line, character } = diagnostic.file.getLineAndCharacterOfPosition( - diagnostic.start, - ); - const l = line + 1; - const c = character + 1; - message = `${diagnostic.file.fileName} (${l},${c}): ${msg}`; - } - - const msgColor = isError - ? chalk.red - : isWarning - ? chalk.yellow - : chalk.gray; - - console.log(msgColor(message)); - } } diff --git a/tools/build/src/typescript/makeTypescriptDiagnosticReporter.ts b/tools/build/src/typescript/makeTypescriptDiagnosticReporter.ts new file mode 100644 index 0000000000..3ef9fee903 --- /dev/null +++ b/tools/build/src/typescript/makeTypescriptDiagnosticReporter.ts @@ -0,0 +1,38 @@ +import chalk from 'chalk'; +import ts from 'typescript'; +/** + * Helper function to report diagnostic messages + */ + +export function makeTypescriptDiagnosticReporter(verbose?: boolean) { + return function reportTypescriptDiagnostic(diagnostic: ts.Diagnostic): void { + const msg = ts.flattenDiagnosticMessageText(diagnostic.messageText, '\n'); + + const isError = diagnostic.category === ts.DiagnosticCategory.Error; + const isWarning = diagnostic.category === ts.DiagnosticCategory.Warning; + + // Only show non-errors in verbose + if (!verbose && !(isError || isWarning)) { + return; + } + + let message = msg; + + if (diagnostic.file && diagnostic.start !== undefined) { + const { line, character } = diagnostic.file.getLineAndCharacterOfPosition( + diagnostic.start, + ); + const l = line + 1; + const c = character + 1; + message = `${diagnostic.file.fileName} (${l},${c}): ${msg}`; + } + + const msgColor = isError + ? chalk.red + : isWarning + ? chalk.yellow + : chalk.gray; + + console.log(msgColor(message)); + }; +} From ff8408286808553330a65a7a3c45f70c68326a9d Mon Sep 17 00:00:00 2001 From: Adam Michael Thompson Date: Fri, 4 Apr 2025 17:21:23 -0400 Subject: [PATCH 07/48] creates downlevelDts --- tools/build/src/typescript/build-ts.ts | 8 ++ tools/build/src/typescript/downlevel-dts.ts | 96 +++++++++++++++++++++ 2 files changed, 104 insertions(+) create mode 100644 tools/build/src/typescript/downlevel-dts.ts diff --git a/tools/build/src/typescript/build-ts.ts b/tools/build/src/typescript/build-ts.ts index 43fae9438d..01e10f5536 100644 --- a/tools/build/src/typescript/build-ts.ts +++ b/tools/build/src/typescript/build-ts.ts @@ -3,6 +3,7 @@ import chalk from 'chalk'; import fse from 'fs-extra'; import path from 'path'; import ts from 'typescript'; +import { downlevelDts } from './downlevel-dts'; import { makeTypescriptDiagnosticReporter } from './makeTypescriptDiagnosticReporter'; import { parsePassThruOptions } from './parsePassThruOptions'; @@ -59,6 +60,13 @@ export function buildTypescript( // Build the project const exitStatus = builder.build(); + if (options?.production) { + verbose && + console.log(chalk.blue.bold('Building TypeScript for production')); + downlevelDts({ verbose, target: '3.4' }); + downlevelDts({ verbose, target: '4.9' }); + } + // Exit with appropriate code process.exit(exitStatus); } diff --git a/tools/build/src/typescript/downlevel-dts.ts b/tools/build/src/typescript/downlevel-dts.ts new file mode 100644 index 0000000000..87f4f4a77d --- /dev/null +++ b/tools/build/src/typescript/downlevel-dts.ts @@ -0,0 +1,96 @@ +/* eslint-disable no-console */ +import chalk from 'chalk'; +import path from 'path'; +import fse from 'fs-extra'; +import { sync as spawnSync } from 'cross-spawn'; + +interface DownlevelDtsOptions { + /** Whether to print verbose output */ + verbose?: boolean; + + /** Target TypeScript version for output */ + target?: string; + + /** Directory to output downleveled declaration files */ + outDir?: string; +} + +/** + * Runs downlevel-dts to create backward compatible TypeScript declaration files + * + * @param options Configuration options + */ +export function downlevelDts(options?: DownlevelDtsOptions): void { + const { verbose, target = '3.4', outDir } = options ?? {}; + const packageDir = process.cwd(); + + // Default to types directory if not specified + const typesDirPath = path.resolve(packageDir, 'dist'); + + // Default output directory + const defaultOutDir = `dist/ts${target}`; + const outputDirPath = path.resolve(packageDir, outDir ?? defaultOutDir); + + // Ensure types directory exists + if (!fse.existsSync(typesDirPath)) { + console.error(chalk.red(`Types directory not found: ${typesDirPath}`)); + process.exit(1); + } + + verbose && + console.log( + chalk.blue(`Downleveling TypeScript declarations to TS ${target}`), + ); + verbose && console.log(chalk.gray(`Input: ${typesDirPath}`)); + verbose && console.log(chalk.gray(`Output: ${outputDirPath}`)); + + try { + // Ensure downlevel-dts is installed + verbose && console.log(chalk.blueBright('Checking for downlevel-dts...')); + + const checkResult = checkForDownlevelDts(); + + if (checkResult.status !== 0) { + verbose && + console.log(chalk.yellow('downlevel-dts not found, installing...')); + + const installResult = installDownlevelDts(); + + if (installResult.status !== 0) { + throw new Error( + `Failed to install downlevel-dts, exit code: ${installResult.status}`, + ); + } + } + + // Run downlevel-dts + const args = ['downlevel-dts', typesDirPath, outputDirPath, '--to', target]; + + verbose && console.log(chalk.gray(`Running: npx ${args.join(' ')}`)); + + const result = spawnSync('npx', args, { + stdio: verbose ? 'inherit' : 'pipe', + }); + + if (result.status !== 0) { + throw new Error(`downlevel-dts failed with exit code: ${result.status}`); + } + + console.log( + verbose && + chalk.green( + `Successfully created downleveled declarations in ${outputDirPath}`, + ), + ); + } catch (error: any) { + throw new Error(`Error downleveling declarations: ${error.message}`); + } + + function checkForDownlevelDts() { + return spawnSync('npx', ['--no-install', 'downlevel-dts', '--version']); + } + + function installDownlevelDts() { + return spawnSync('npm', ['install', '--no-save', 'downlevel-dts']); + } +} From f744abe1c1964b4f947f74834ee633beb82f3122 Mon Sep 17 00:00:00 2001 From: Adam Michael Thompson Date: Fri, 4 Apr 2025 18:01:57 -0400 Subject: [PATCH 08/48] downlevelDts parses package.json --- packages/lib/package.json | 5 + pnpm-lock.yaml | 229 ++++++++++++++------ tools/build/package.json | 1 + tools/build/src/typescript/build-ts.ts | 54 ++++- tools/build/src/typescript/downlevel-dts.ts | 54 ++--- tools/cli/src/index.ts | 5 + 6 files changed, 239 insertions(+), 109 deletions(-) diff --git a/packages/lib/package.json b/packages/lib/package.json index 3a920df9a5..8cf4ce4bad 100644 --- a/packages/lib/package.json +++ b/packages/lib/package.json @@ -10,6 +10,11 @@ "*": [ "ts3.4/*" ] + }, + "<=4.9": { + "*": [ + "ts4.9/*" + ] } }, "scripts": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3716d8004b..b54cd7c329 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1626,7 +1626,7 @@ importers: version: 6.1.1 ts-node: specifier: ^10.9.2 - version: 10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.17.12)(typescript@5.0.4) + version: 10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.17.12)(typescript@5.9.0-dev.20250404) xml2json: specifier: ^0.12.0 version: 0.12.0 @@ -2947,10 +2947,10 @@ importers: version: 8.0.0(@babel/core@7.24.3) '@svgr/cli': specifier: 8.0.1 - version: 8.0.1(typescript@5.0.4) + version: 8.0.1(typescript@5.9.0-dev.20250404) '@svgr/rollup': specifier: ^8.1.0 - version: 8.1.0(rollup@4.16.1)(typescript@5.0.4) + version: 8.1.0(rollup@4.16.1)(typescript@5.9.0-dev.20250404) '@types/cross-spawn': specifier: 6.0.2 version: 6.0.2 @@ -2963,6 +2963,9 @@ importers: cross-spawn: specifier: 7.0.3 version: 7.0.3 + downlevel-dts: + specifier: ^0.11.0 + version: 0.11.0 fs-extra: specifier: 11.1.1 version: 11.1.1 @@ -2974,7 +2977,7 @@ importers: version: 4.17.21 react-docgen-typescript: specifier: 2.2.2 - version: 2.2.2(typescript@5.0.4) + version: 2.2.2(typescript@5.9.0-dev.20250404) rollup: specifier: 4.16.1 version: 4.16.1 @@ -2992,7 +2995,7 @@ importers: version: 2.0.6 typescript: specifier: ~5.0.0 - version: 5.0.4 + version: 5.9.0-dev.20250404 tools/cli: dependencies: @@ -3320,10 +3323,10 @@ importers: version: 8.5.3(storybook@8.5.3(prettier@2.8.8)) '@storybook/react': specifier: 8.5.3 - version: 8.5.3(@storybook/test@8.5.3(storybook@8.5.3(prettier@2.8.8)))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.5.3(prettier@2.8.8))(typescript@5.0.4) + version: 8.5.3(@storybook/test@8.5.3(storybook@8.5.3(prettier@2.8.8)))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.5.3(prettier@2.8.8))(typescript@5.9.0-dev.20250404) '@storybook/react-webpack5': specifier: 8.5.3 - version: 8.5.3(@storybook/test@8.5.3(storybook@8.5.3(prettier@2.8.8)))(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.18.19)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.5.3(prettier@2.8.8))(typescript@5.0.4) + version: 8.5.3(@storybook/test@8.5.3(storybook@8.5.3(prettier@2.8.8)))(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.18.19)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.5.3(prettier@2.8.8))(typescript@5.9.0-dev.20250404) '@storybook/test': specifier: 8.5.3 version: 8.5.3(storybook@8.5.3(prettier@2.8.8)) @@ -3332,7 +3335,7 @@ importers: version: 8.5.3(storybook@8.5.3(prettier@2.8.8)) '@svgr/webpack': specifier: 8.0.1 - version: 8.0.1(typescript@5.0.4) + version: 8.0.1(typescript@5.9.0-dev.20250404) babel-loader: specifier: 9.2.1 version: 9.2.1(@babel/core@7.24.3)(webpack@5.88.0(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.18.19)) @@ -3359,7 +3362,7 @@ importers: version: 18.2.0 react-docgen-typescript: specifier: 2.2.2 - version: 2.2.2(typescript@5.0.4) + version: 2.2.2(typescript@5.9.0-dev.20250404) react-dom: specifier: ^17.0.0 || ^18.0.0 version: 18.2.0(react@18.2.0) @@ -3491,7 +3494,7 @@ importers: version: 11.1.1 jest: specifier: 29.6.2 - version: 29.6.2(@types/node@20.4.8)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@5.0.4)) + version: 29.6.2(@types/node@20.4.8)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@5.9.0-dev.20250404)) jest-axe: specifier: 8.0.0 version: 8.0.0 @@ -7164,6 +7167,10 @@ packages: resolution: {integrity: sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ==} engines: {node: '>=12'} + downlevel-dts@0.11.0: + resolution: {integrity: sha512-vo835pntK7kzYStk7xUHDifiYJvXxVhUapt85uk2AI94gUUAQX9HNRtrcMHNSc3YHJUEHGbYIGsM99uIbgAtxw==} + hasBin: true + duplexer2@0.1.4: resolution: {integrity: sha512-asLFVfWWtJ90ZyOUHMqk7/S2w2guQKxUI2itj3d92ADHhxUSbCMGi1f1cBcJ7xM1To+pE/Khbwo1yuNbMEPKeA==} @@ -7935,6 +7942,10 @@ packages: resolution: {integrity: sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==} engines: {node: '>= 0.4'} + interpret@1.4.0: + resolution: {integrity: sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==} + engines: {node: '>= 0.10'} + invariant@2.2.4: resolution: {integrity: sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==} @@ -9550,6 +9561,10 @@ packages: resolution: {integrity: sha512-Hx/BGIbwj+Des3+xy5uAtAbdCyqK9y9wbBcDFDYanLS9JnMqf7OeF87HQwUimE87OEc72mr6tkKUKMBBL+hF9Q==} engines: {node: '>= 4'} + rechoir@0.6.2: + resolution: {integrity: sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==} + engines: {node: '>= 0.10'} + redent@3.0.0: resolution: {integrity: sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==} engines: {node: '>=8'} @@ -9822,6 +9837,11 @@ packages: shell-quote@1.8.1: resolution: {integrity: sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==} + shelljs@0.8.5: + resolution: {integrity: sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==} + engines: {node: '>=4'} + hasBin: true + side-channel@1.0.6: resolution: {integrity: sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==} engines: {node: '>= 0.4'} @@ -10361,6 +10381,11 @@ packages: engines: {node: '>=12.20'} hasBin: true + typescript@5.9.0-dev.20250404: + resolution: {integrity: sha512-GL0YP8pAL3ug0rLp7Sii/ML+kYUkfCU2wxk4O+aV2H3rYfligNa+/SaXzpXfRMaa5wjDnbNUq9mAuhGpMvIUHQ==} + engines: {node: '>=14.17'} + hasBin: true + unbox-primitive@1.0.2: resolution: {integrity: sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==} @@ -12378,7 +12403,7 @@ snapshots: - ts-node optional: true - '@jest/core@29.6.2(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@5.0.4))': + '@jest/core@29.6.2(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@5.9.0-dev.20250404))': dependencies: '@jest/console': 29.6.2 '@jest/reporters': 29.6.2 @@ -12392,7 +12417,7 @@ snapshots: exit: 0.1.2 graceful-fs: 4.2.11 jest-changed-files: 29.5.0 - jest-config: 29.6.2(@types/node@20.4.8)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@5.0.4)) + jest-config: 29.6.2(@types/node@20.4.8)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@5.9.0-dev.20250404)) jest-haste-map: 29.7.0 jest-message-util: 29.7.0 jest-regex-util: 29.6.3 @@ -12953,7 +12978,7 @@ snapshots: react: 18.2.0 react-dom: 18.2.0(react@18.2.0) - '@storybook/builder-webpack5@8.5.3(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.18.19)(storybook@8.5.3(prettier@2.8.8))(typescript@5.0.4)': + '@storybook/builder-webpack5@8.5.3(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.18.19)(storybook@8.5.3(prettier@2.8.8))(typescript@5.9.0-dev.20250404)': dependencies: '@storybook/core-webpack': 8.5.3(storybook@8.5.3(prettier@2.8.8)) '@types/semver': 7.5.0 @@ -12963,7 +12988,7 @@ snapshots: constants-browserify: 1.0.0 css-loader: 6.8.1(webpack@5.88.0(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.18.19)) es-module-lexer: 1.6.0 - fork-ts-checker-webpack-plugin: 8.0.0(typescript@5.0.4)(webpack@5.88.0(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.18.19)) + fork-ts-checker-webpack-plugin: 8.0.0(typescript@5.9.0-dev.20250404)(webpack@5.88.0(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.18.19)) html-webpack-plugin: 5.5.3(webpack@5.88.0(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.18.19)) magic-string: 0.30.10 path-browserify: 1.0.1 @@ -12981,7 +13006,7 @@ snapshots: webpack-hot-middleware: 2.25.4 webpack-virtual-modules: 0.6.2 optionalDependencies: - typescript: 5.0.4 + typescript: 5.9.0-dev.20250404 transitivePeerDependencies: - '@swc/core' - esbuild @@ -13056,11 +13081,11 @@ snapshots: dependencies: storybook: 8.5.3(prettier@2.8.8) - '@storybook/preset-react-webpack@8.5.3(@storybook/test@8.5.3(storybook@8.5.3(prettier@2.8.8)))(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.18.19)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.5.3(prettier@2.8.8))(typescript@5.0.4)': + '@storybook/preset-react-webpack@8.5.3(@storybook/test@8.5.3(storybook@8.5.3(prettier@2.8.8)))(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.18.19)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.5.3(prettier@2.8.8))(typescript@5.9.0-dev.20250404)': dependencies: '@storybook/core-webpack': 8.5.3(storybook@8.5.3(prettier@2.8.8)) - '@storybook/react': 8.5.3(@storybook/test@8.5.3(storybook@8.5.3(prettier@2.8.8)))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.5.3(prettier@2.8.8))(typescript@5.0.4) - '@storybook/react-docgen-typescript-plugin': 1.0.6--canary.9.0c3f3b7.0(typescript@5.0.4)(webpack@5.88.0(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.18.19)) + '@storybook/react': 8.5.3(@storybook/test@8.5.3(storybook@8.5.3(prettier@2.8.8)))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.5.3(prettier@2.8.8))(typescript@5.9.0-dev.20250404) + '@storybook/react-docgen-typescript-plugin': 1.0.6--canary.9.0c3f3b7.0(typescript@5.9.0-dev.20250404)(webpack@5.88.0(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.18.19)) '@types/semver': 7.5.0 find-up: 5.0.0 magic-string: 0.30.10 @@ -13073,7 +13098,7 @@ snapshots: tsconfig-paths: 4.2.0 webpack: 5.88.0(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.18.19) optionalDependencies: - typescript: 5.0.4 + typescript: 5.9.0-dev.20250404 transitivePeerDependencies: - '@storybook/test' - '@swc/core' @@ -13086,16 +13111,16 @@ snapshots: dependencies: storybook: 8.5.3(prettier@2.8.8) - '@storybook/react-docgen-typescript-plugin@1.0.6--canary.9.0c3f3b7.0(typescript@5.0.4)(webpack@5.88.0(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.18.19))': + '@storybook/react-docgen-typescript-plugin@1.0.6--canary.9.0c3f3b7.0(typescript@5.9.0-dev.20250404)(webpack@5.88.0(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.18.19))': dependencies: debug: 4.3.4 endent: 2.1.0 find-cache-dir: 3.3.2 flat-cache: 3.0.4 micromatch: 4.0.5 - react-docgen-typescript: 2.2.2(typescript@5.0.4) + react-docgen-typescript: 2.2.2(typescript@5.9.0-dev.20250404) tslib: 2.6.2 - typescript: 5.0.4 + typescript: 5.9.0-dev.20250404 webpack: 5.88.0(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.18.19) transitivePeerDependencies: - supports-color @@ -13106,16 +13131,16 @@ snapshots: react-dom: 18.2.0(react@18.2.0) storybook: 8.5.3(prettier@2.8.8) - '@storybook/react-webpack5@8.5.3(@storybook/test@8.5.3(storybook@8.5.3(prettier@2.8.8)))(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.18.19)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.5.3(prettier@2.8.8))(typescript@5.0.4)': + '@storybook/react-webpack5@8.5.3(@storybook/test@8.5.3(storybook@8.5.3(prettier@2.8.8)))(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.18.19)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.5.3(prettier@2.8.8))(typescript@5.9.0-dev.20250404)': dependencies: - '@storybook/builder-webpack5': 8.5.3(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.18.19)(storybook@8.5.3(prettier@2.8.8))(typescript@5.0.4) - '@storybook/preset-react-webpack': 8.5.3(@storybook/test@8.5.3(storybook@8.5.3(prettier@2.8.8)))(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.18.19)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.5.3(prettier@2.8.8))(typescript@5.0.4) - '@storybook/react': 8.5.3(@storybook/test@8.5.3(storybook@8.5.3(prettier@2.8.8)))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.5.3(prettier@2.8.8))(typescript@5.0.4) + '@storybook/builder-webpack5': 8.5.3(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.18.19)(storybook@8.5.3(prettier@2.8.8))(typescript@5.9.0-dev.20250404) + '@storybook/preset-react-webpack': 8.5.3(@storybook/test@8.5.3(storybook@8.5.3(prettier@2.8.8)))(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.18.19)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.5.3(prettier@2.8.8))(typescript@5.9.0-dev.20250404) + '@storybook/react': 8.5.3(@storybook/test@8.5.3(storybook@8.5.3(prettier@2.8.8)))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.5.3(prettier@2.8.8))(typescript@5.9.0-dev.20250404) react: 18.2.0 react-dom: 18.2.0(react@18.2.0) storybook: 8.5.3(prettier@2.8.8) optionalDependencies: - typescript: 5.0.4 + typescript: 5.9.0-dev.20250404 transitivePeerDependencies: - '@storybook/test' - '@swc/core' @@ -13139,6 +13164,21 @@ snapshots: '@storybook/test': 8.5.3(storybook@8.5.3(prettier@2.8.8)) typescript: 5.0.4 + '@storybook/react@8.5.3(@storybook/test@8.5.3(storybook@8.5.3(prettier@2.8.8)))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.5.3(prettier@2.8.8))(typescript@5.9.0-dev.20250404)': + dependencies: + '@storybook/components': 8.5.3(storybook@8.5.3(prettier@2.8.8)) + '@storybook/global': 5.0.0 + '@storybook/manager-api': 8.5.3(storybook@8.5.3(prettier@2.8.8)) + '@storybook/preview-api': 8.5.3(storybook@8.5.3(prettier@2.8.8)) + '@storybook/react-dom-shim': 8.5.3(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.5.3(prettier@2.8.8)) + '@storybook/theming': 8.5.3(storybook@8.5.3(prettier@2.8.8)) + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + storybook: 8.5.3(prettier@2.8.8) + optionalDependencies: + '@storybook/test': 8.5.3(storybook@8.5.3(prettier@2.8.8)) + typescript: 5.9.0-dev.20250404 + '@storybook/test@8.5.3(storybook@8.5.3(prettier@2.8.8))': dependencies: '@storybook/csf': 0.1.12 @@ -13242,12 +13282,12 @@ snapshots: '@svgr/babel-plugin-transform-react-native-svg': 8.1.0(@babel/core@7.24.3) '@svgr/babel-plugin-transform-svg-component': 8.0.0(@babel/core@7.24.3) - '@svgr/cli@8.0.1(typescript@5.0.4)': + '@svgr/cli@8.0.1(typescript@5.9.0-dev.20250404)': dependencies: - '@svgr/core': 8.0.0(typescript@5.0.4) - '@svgr/plugin-jsx': 8.0.1(@svgr/core@8.0.0(typescript@5.0.4)) - '@svgr/plugin-prettier': 8.0.1(@svgr/core@8.0.0(typescript@5.0.4)) - '@svgr/plugin-svgo': 8.0.1(@svgr/core@8.0.0(typescript@5.0.4))(typescript@5.0.4) + '@svgr/core': 8.0.0(typescript@5.9.0-dev.20250404) + '@svgr/plugin-jsx': 8.0.1(@svgr/core@8.0.0(typescript@5.9.0-dev.20250404)) + '@svgr/plugin-prettier': 8.0.1(@svgr/core@8.0.0(typescript@5.9.0-dev.20250404)) + '@svgr/plugin-svgo': 8.0.1(@svgr/core@8.0.0(typescript@5.9.0-dev.20250404))(typescript@5.9.0-dev.20250404) camelcase: 6.3.0 chalk: 4.1.2 commander: 9.5.0 @@ -13266,23 +13306,23 @@ snapshots: transitivePeerDependencies: - supports-color - '@svgr/core@8.0.0(typescript@5.0.4)': + '@svgr/core@8.0.0(typescript@5.9.0-dev.20250404)': dependencies: '@babel/core': 7.24.3 '@svgr/babel-preset': 8.0.0(@babel/core@7.24.3) camelcase: 6.3.0 - cosmiconfig: 8.3.6(typescript@5.0.4) + cosmiconfig: 8.3.6(typescript@5.9.0-dev.20250404) snake-case: 3.0.4 transitivePeerDependencies: - supports-color - typescript - '@svgr/core@8.1.0(typescript@5.0.4)': + '@svgr/core@8.1.0(typescript@5.9.0-dev.20250404)': dependencies: '@babel/core': 7.24.3 '@svgr/babel-preset': 8.1.0(@babel/core@7.24.3) camelcase: 6.3.0 - cosmiconfig: 8.3.6(typescript@5.0.4) + cosmiconfig: 8.3.6(typescript@5.9.0-dev.20250404) snake-case: 3.0.4 transitivePeerDependencies: - supports-color @@ -13306,51 +13346,51 @@ snapshots: transitivePeerDependencies: - supports-color - '@svgr/plugin-jsx@8.0.1(@svgr/core@8.0.0(typescript@5.0.4))': + '@svgr/plugin-jsx@8.0.1(@svgr/core@8.0.0(typescript@5.9.0-dev.20250404))': dependencies: '@babel/core': 7.24.3 '@svgr/babel-preset': 8.0.0(@babel/core@7.24.3) - '@svgr/core': 8.0.0(typescript@5.0.4) + '@svgr/core': 8.0.0(typescript@5.9.0-dev.20250404) '@svgr/hast-util-to-babel-ast': 8.0.0 svg-parser: 2.0.4 transitivePeerDependencies: - supports-color - '@svgr/plugin-jsx@8.1.0(@svgr/core@8.1.0(typescript@5.0.4))': + '@svgr/plugin-jsx@8.1.0(@svgr/core@8.1.0(typescript@5.9.0-dev.20250404))': dependencies: '@babel/core': 7.24.3 '@svgr/babel-preset': 8.1.0(@babel/core@7.24.3) - '@svgr/core': 8.1.0(typescript@5.0.4) + '@svgr/core': 8.1.0(typescript@5.9.0-dev.20250404) '@svgr/hast-util-to-babel-ast': 8.0.0 svg-parser: 2.0.4 transitivePeerDependencies: - supports-color - '@svgr/plugin-prettier@8.0.1(@svgr/core@8.0.0(typescript@5.0.4))': + '@svgr/plugin-prettier@8.0.1(@svgr/core@8.0.0(typescript@5.9.0-dev.20250404))': dependencies: - '@svgr/core': 8.0.0(typescript@5.0.4) + '@svgr/core': 8.0.0(typescript@5.9.0-dev.20250404) deepmerge: 4.3.1 prettier: 2.8.8 - '@svgr/plugin-svgo@8.0.1(@svgr/core@8.0.0(typescript@5.0.4))(typescript@5.0.4)': + '@svgr/plugin-svgo@8.0.1(@svgr/core@8.0.0(typescript@5.9.0-dev.20250404))(typescript@5.9.0-dev.20250404)': dependencies: - '@svgr/core': 8.0.0(typescript@5.0.4) - cosmiconfig: 8.3.6(typescript@5.0.4) + '@svgr/core': 8.0.0(typescript@5.9.0-dev.20250404) + cosmiconfig: 8.3.6(typescript@5.9.0-dev.20250404) deepmerge: 4.3.1 svgo: 3.0.2 transitivePeerDependencies: - typescript - '@svgr/plugin-svgo@8.1.0(@svgr/core@8.1.0(typescript@5.0.4))(typescript@5.0.4)': + '@svgr/plugin-svgo@8.1.0(@svgr/core@8.1.0(typescript@5.9.0-dev.20250404))(typescript@5.9.0-dev.20250404)': dependencies: - '@svgr/core': 8.1.0(typescript@5.0.4) - cosmiconfig: 8.3.6(typescript@5.0.4) + '@svgr/core': 8.1.0(typescript@5.9.0-dev.20250404) + cosmiconfig: 8.3.6(typescript@5.9.0-dev.20250404) deepmerge: 4.3.1 svgo: 3.0.2 transitivePeerDependencies: - typescript - '@svgr/rollup@8.1.0(rollup@4.16.1)(typescript@5.0.4)': + '@svgr/rollup@8.1.0(rollup@4.16.1)(typescript@5.9.0-dev.20250404)': dependencies: '@babel/core': 7.24.3 '@babel/plugin-transform-react-constant-elements': 7.22.5(@babel/core@7.24.3) @@ -13358,24 +13398,24 @@ snapshots: '@babel/preset-react': 7.24.1(@babel/core@7.24.3) '@babel/preset-typescript': 7.24.1(@babel/core@7.24.3) '@rollup/pluginutils': 5.0.2(rollup@4.16.1) - '@svgr/core': 8.1.0(typescript@5.0.4) - '@svgr/plugin-jsx': 8.1.0(@svgr/core@8.1.0(typescript@5.0.4)) - '@svgr/plugin-svgo': 8.1.0(@svgr/core@8.1.0(typescript@5.0.4))(typescript@5.0.4) + '@svgr/core': 8.1.0(typescript@5.9.0-dev.20250404) + '@svgr/plugin-jsx': 8.1.0(@svgr/core@8.1.0(typescript@5.9.0-dev.20250404)) + '@svgr/plugin-svgo': 8.1.0(@svgr/core@8.1.0(typescript@5.9.0-dev.20250404))(typescript@5.9.0-dev.20250404) transitivePeerDependencies: - rollup - supports-color - typescript - '@svgr/webpack@8.0.1(typescript@5.0.4)': + '@svgr/webpack@8.0.1(typescript@5.9.0-dev.20250404)': dependencies: '@babel/core': 7.24.3 '@babel/plugin-transform-react-constant-elements': 7.22.5(@babel/core@7.24.3) '@babel/preset-env': 7.24.3(@babel/core@7.24.3) '@babel/preset-react': 7.24.1(@babel/core@7.24.3) '@babel/preset-typescript': 7.24.1(@babel/core@7.24.3) - '@svgr/core': 8.0.0(typescript@5.0.4) - '@svgr/plugin-jsx': 8.0.1(@svgr/core@8.0.0(typescript@5.0.4)) - '@svgr/plugin-svgo': 8.0.1(@svgr/core@8.0.0(typescript@5.0.4))(typescript@5.0.4) + '@svgr/core': 8.0.0(typescript@5.9.0-dev.20250404) + '@svgr/plugin-jsx': 8.0.1(@svgr/core@8.0.0(typescript@5.9.0-dev.20250404)) + '@svgr/plugin-svgo': 8.0.1(@svgr/core@8.0.0(typescript@5.9.0-dev.20250404))(typescript@5.9.0-dev.20250404) transitivePeerDependencies: - supports-color - typescript @@ -14647,6 +14687,15 @@ snapshots: optionalDependencies: typescript: 5.0.4 + cosmiconfig@8.3.6(typescript@5.9.0-dev.20250404): + dependencies: + import-fresh: 3.3.0 + js-yaml: 4.1.0 + parse-json: 5.2.0 + path-type: 4.0.0 + optionalDependencies: + typescript: 5.9.0-dev.20250404 + create-require@1.1.1: {} cross-spawn-async@2.2.5: @@ -14996,6 +15045,12 @@ snapshots: dotenv@16.4.7: {} + downlevel-dts@0.11.0: + dependencies: + semver: 7.6.3 + shelljs: 0.8.5 + typescript: 5.9.0-dev.20250404 + duplexer2@0.1.4: dependencies: readable-stream: 2.3.8 @@ -15611,7 +15666,7 @@ snapshots: cross-spawn: 7.0.6 signal-exit: 4.1.0 - fork-ts-checker-webpack-plugin@8.0.0(typescript@5.0.4)(webpack@5.88.0(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.18.19)): + fork-ts-checker-webpack-plugin@8.0.0(typescript@5.9.0-dev.20250404)(webpack@5.88.0(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.18.19)): dependencies: '@babel/code-frame': 7.24.2 chalk: 4.1.2 @@ -15625,7 +15680,7 @@ snapshots: schema-utils: 3.3.0 semver: 7.6.3 tapable: 2.2.1 - typescript: 5.0.4 + typescript: 5.9.0-dev.20250404 webpack: 5.88.0(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.18.19) form-data@2.5.1: @@ -15960,6 +16015,8 @@ snapshots: hasown: 2.0.2 side-channel: 1.0.6 + interpret@1.4.0: {} + invariant@2.2.4: dependencies: loose-envify: 1.4.0 @@ -16255,16 +16312,16 @@ snapshots: - ts-node optional: true - jest-cli@29.6.2(@types/node@20.4.8)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@5.0.4)): + jest-cli@29.6.2(@types/node@20.4.8)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@5.9.0-dev.20250404)): dependencies: - '@jest/core': 29.6.2(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@5.0.4)) + '@jest/core': 29.6.2(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@5.9.0-dev.20250404)) '@jest/test-result': 29.6.2 '@jest/types': 29.6.3 chalk: 4.1.2 exit: 0.1.2 graceful-fs: 4.2.11 import-local: 3.1.0 - jest-config: 29.6.2(@types/node@20.4.8)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@5.0.4)) + jest-config: 29.6.2(@types/node@20.4.8)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@5.9.0-dev.20250404)) jest-util: 29.7.0 jest-validate: 29.6.2 prompts: 2.4.2 @@ -16339,7 +16396,7 @@ snapshots: - supports-color optional: true - jest-config@29.6.2(@types/node@20.4.8)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@5.0.4)): + jest-config@29.6.2(@types/node@20.4.8)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@5.9.0-dev.20250404)): dependencies: '@babel/core': 7.24.3 '@jest/test-sequencer': 29.6.2 @@ -16365,7 +16422,7 @@ snapshots: strip-json-comments: 3.1.1 optionalDependencies: '@types/node': 20.4.8 - ts-node: 10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@5.0.4) + ts-node: 10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@5.9.0-dev.20250404) transitivePeerDependencies: - babel-plugin-macros - supports-color @@ -16633,12 +16690,12 @@ snapshots: - ts-node optional: true - jest@29.6.2(@types/node@20.4.8)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@5.0.4)): + jest@29.6.2(@types/node@20.4.8)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@5.9.0-dev.20250404)): dependencies: - '@jest/core': 29.6.2(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@5.0.4)) + '@jest/core': 29.6.2(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@5.9.0-dev.20250404)) '@jest/types': 29.6.3 import-local: 3.1.0 - jest-cli: 29.6.2(@types/node@20.4.8)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@5.0.4)) + jest-cli: 29.6.2(@types/node@20.4.8)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@5.9.0-dev.20250404)) transitivePeerDependencies: - '@types/node' - babel-plugin-macros @@ -18019,9 +18076,9 @@ snapshots: range-parser@1.2.1: {} - react-docgen-typescript@2.2.2(typescript@5.0.4): + react-docgen-typescript@2.2.2(typescript@5.9.0-dev.20250404): dependencies: - typescript: 5.0.4 + typescript: 5.9.0-dev.20250404 react-docgen@7.0.3: dependencies: @@ -18224,6 +18281,10 @@ snapshots: tiny-invariant: 1.3.3 tslib: 2.6.2 + rechoir@0.6.2: + dependencies: + resolve: 1.22.10 + redent@3.0.0: dependencies: indent-string: 4.0.0 @@ -18563,6 +18624,12 @@ snapshots: shell-quote@1.8.1: {} + shelljs@0.8.5: + dependencies: + glob: 7.2.3 + interpret: 1.4.0 + rechoir: 0.6.2 + side-channel@1.0.6: dependencies: call-bind: 1.0.7 @@ -18970,7 +19037,27 @@ snapshots: optionalDependencies: '@swc/core': 1.4.2(@swc/helpers@0.5.1) - ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@5.0.4): + ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.17.12)(typescript@5.9.0-dev.20250404): + dependencies: + '@cspotcode/source-map-support': 0.8.1 + '@tsconfig/node10': 1.0.11 + '@tsconfig/node12': 1.0.11 + '@tsconfig/node14': 1.0.3 + '@tsconfig/node16': 1.0.4 + '@types/node': 20.17.12 + acorn: 8.14.0 + acorn-walk: 8.3.3 + arg: 4.1.3 + create-require: 1.1.1 + diff: 4.0.2 + make-error: 1.3.6 + typescript: 5.9.0-dev.20250404 + v8-compile-cache-lib: 3.0.1 + yn: 3.1.1 + optionalDependencies: + '@swc/core': 1.4.2(@swc/helpers@0.5.1) + + ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@5.9.0-dev.20250404): dependencies: '@cspotcode/source-map-support': 0.8.1 '@tsconfig/node10': 1.0.11 @@ -18984,7 +19071,7 @@ snapshots: create-require: 1.1.1 diff: 4.0.2 make-error: 1.3.6 - typescript: 5.0.4 + typescript: 5.9.0-dev.20250404 v8-compile-cache-lib: 3.0.1 yn: 3.1.1 optionalDependencies: @@ -19113,6 +19200,8 @@ snapshots: typescript@5.0.4: {} + typescript@5.9.0-dev.20250404: {} + unbox-primitive@1.0.2: dependencies: call-bind: 1.0.7 diff --git a/tools/build/package.json b/tools/build/package.json index ee7dd84203..9c57988200 100644 --- a/tools/build/package.json +++ b/tools/build/package.json @@ -35,6 +35,7 @@ "@types/fs-extra": "11.0.1", "chalk": "4.1.2", "cross-spawn": "7.0.3", + "downlevel-dts": "^0.11.0", "fs-extra": "11.1.1", "glob": "10.3.12", "lodash": "4.17.21", diff --git a/tools/build/src/typescript/build-ts.ts b/tools/build/src/typescript/build-ts.ts index 01e10f5536..3f2e7890b6 100644 --- a/tools/build/src/typescript/build-ts.ts +++ b/tools/build/src/typescript/build-ts.ts @@ -13,7 +13,6 @@ interface BuildTypescriptOptions { /** * Whether to build for production - * * This builds all TS downlevel targets */ production?: boolean; @@ -36,7 +35,6 @@ export function buildTypescript( } verbose && console.log(chalk.blue.bold('Building TypeScript')); - verbose && console.log(chalk.gray(JSON.stringify(options, null, 2))); // Any additional options passed in via the CLI const cliCompilerOptions = parsePassThruOptions(passThru); @@ -63,10 +61,58 @@ export function buildTypescript( if (options?.production) { verbose && console.log(chalk.blue.bold('Building TypeScript for production')); - downlevelDts({ verbose, target: '3.4' }); - downlevelDts({ verbose, target: '4.9' }); + + const packageJson = fse.readJSONSync( + path.join(packageDir, 'package.json'), + 'utf-8', + ); + const typesVersions = packageJson?.typesVersions; + const downlevelVersions = getTypeVersions(typesVersions); + + if (downlevelVersions) { + downlevelVersions.forEach(target => { + downlevelDts({ verbose, target }); + }); + } else { + verbose && + console.log(chalk.yellow('No typesVersions found in package.json')); + } } // Exit with appropriate code process.exit(exitStatus); } + +/** + * Extracts TypeScript versions from the typesVersions field in package.json + * and returns an array of version numbers without the 'ts' prefix. + * @returns + */ +const getTypeVersions = (typesVersions?: { + [target: string]: { + [files: string]: string[]; + }; +}): Array | undefined => { + if (!typesVersions || typeof typesVersions !== 'object') return; + + const versions: Array = []; + + Object.entries(typesVersions).forEach(([_versionRange, pathMappings]) => { + // Get the output directory from the path mappings + // Typical format is { '*': ['ts3.4/*'] } + if (!pathMappings || typeof pathMappings !== 'object') return; + + const wildcardMapping = pathMappings['*']; + if (!Array.isArray(wildcardMapping) || wildcardMapping.length === 0) return; + + // Extract outputDir from format like 'ts3.4/*' + const outputDirMatch = wildcardMapping[0].match(/^ts([\d.]+)\/\*/); + if (!outputDirMatch || !outputDirMatch[1]) return; + + // Get just the version number without the 'ts' prefix + const versionNumber = outputDirMatch[1]; + versions.push(versionNumber); + }); + + return versions; +}; diff --git a/tools/build/src/typescript/downlevel-dts.ts b/tools/build/src/typescript/downlevel-dts.ts index 87f4f4a77d..d1d46a4f5f 100644 --- a/tools/build/src/typescript/downlevel-dts.ts +++ b/tools/build/src/typescript/downlevel-dts.ts @@ -28,8 +28,11 @@ export function downlevelDts(options?: DownlevelDtsOptions): void { const typesDirPath = path.resolve(packageDir, 'dist'); // Default output directory - const defaultOutDir = `dist/ts${target}`; - const outputDirPath = path.resolve(packageDir, outDir ?? defaultOutDir); + const defaultOutDir = `ts${target}`; + const outputDirPath = path.resolve( + packageDir, + `dist/${outDir ?? defaultOutDir}`, + ); // Ensure types directory exists if (!fse.existsSync(typesDirPath)) { @@ -39,37 +42,26 @@ export function downlevelDts(options?: DownlevelDtsOptions): void { verbose && console.log( - chalk.blue(`Downleveling TypeScript declarations to TS ${target}`), + chalk.blue.bold(`Downleveling TypeScript declarations to TS ${target}`), ); verbose && console.log(chalk.gray(`Input: ${typesDirPath}`)); verbose && console.log(chalk.gray(`Output: ${outputDirPath}`)); try { - // Ensure downlevel-dts is installed - verbose && console.log(chalk.blueBright('Checking for downlevel-dts...')); - - const checkResult = checkForDownlevelDts(); - - if (checkResult.status !== 0) { - verbose && - console.log(chalk.yellow('downlevel-dts not found, installing...')); - - const installResult = installDownlevelDts(); - - if (installResult.status !== 0) { - throw new Error( - `Failed to install downlevel-dts, exit code: ${installResult.status}`, - ); - } - } - // Run downlevel-dts - const args = ['downlevel-dts', typesDirPath, outputDirPath, '--to', target]; - - verbose && console.log(chalk.gray(`Running: npx ${args.join(' ')}`)); - - const result = spawnSync('npx', args, { - stdio: verbose ? 'inherit' : 'pipe', + const args = [ + 'exec', + 'downlevel-dts', + typesDirPath, + outputDirPath, + '--to', + target, + ]; + + verbose && console.log(chalk.gray(`Running: pnpm ${args.join(' ')}`)); + + const result = spawnSync('pnpm', args, { + stdio: verbose ? 'inherit' : 'ignore', }); if (result.status !== 0) { @@ -85,12 +77,4 @@ export function downlevelDts(options?: DownlevelDtsOptions): void { } catch (error: any) { throw new Error(`Error downleveling declarations: ${error.message}`); } - - function checkForDownlevelDts() { - return spawnSync('npx', ['--no-install', 'downlevel-dts', '--version']); - } - - function installDownlevelDts() { - return spawnSync('npm', ['install', '--no-save', 'downlevel-dts']); - } } diff --git a/tools/cli/src/index.ts b/tools/cli/src/index.ts index 8b1056b94d..ad10bcccde 100644 --- a/tools/cli/src/index.ts +++ b/tools/cli/src/index.ts @@ -217,6 +217,11 @@ cli .command('build-package') .description('Builds a package') .option('-v --verbose', 'Prints additional information to the console', false) + .option( + '-p --production', + 'Whether to build for production. This builds all TS downlevel targets', + false, + ) .action(buildPackage); cli .command('build-ts') From 8afa68790430d882c9c18390726db9ba1517f14e Mon Sep 17 00:00:00 2001 From: Adam Michael Thompson Date: Fri, 4 Apr 2025 18:29:43 -0400 Subject: [PATCH 09/48] use --downlevel flag --- tools/build/src/typescript/build-ts.ts | 64 ++----------------- .../{ => downlevel}/downlevel-dts.ts | 0 .../typescript/downlevel/getTypeVersions.ts | 33 ++++++++++ tools/build/src/typescript/downlevel/index.ts | 34 ++++++++++ tools/cli/src/index.ts | 9 +-- 5 files changed, 76 insertions(+), 64 deletions(-) rename tools/build/src/typescript/{ => downlevel}/downlevel-dts.ts (100%) create mode 100644 tools/build/src/typescript/downlevel/getTypeVersions.ts create mode 100644 tools/build/src/typescript/downlevel/index.ts diff --git a/tools/build/src/typescript/build-ts.ts b/tools/build/src/typescript/build-ts.ts index 3f2e7890b6..94b3e4e42d 100644 --- a/tools/build/src/typescript/build-ts.ts +++ b/tools/build/src/typescript/build-ts.ts @@ -3,19 +3,18 @@ import chalk from 'chalk'; import fse from 'fs-extra'; import path from 'path'; import ts from 'typescript'; -import { downlevelDts } from './downlevel-dts'; import { makeTypescriptDiagnosticReporter } from './makeTypescriptDiagnosticReporter'; import { parsePassThruOptions } from './parsePassThruOptions'; +import { runTypescriptDownlevel } from './downlevel'; interface BuildTypescriptOptions { /** Whether to print verbose output*/ verbose?: boolean; /** - * Whether to build for production - * This builds all TS downlevel targets + * Builds all TS downlevel targets based on the typesVersions field in package.json */ - production?: boolean; + downlevel?: boolean; } /** @@ -58,61 +57,12 @@ export function buildTypescript( // Build the project const exitStatus = builder.build(); - if (options?.production) { - verbose && - console.log(chalk.blue.bold('Building TypeScript for production')); - - const packageJson = fse.readJSONSync( - path.join(packageDir, 'package.json'), - 'utf-8', - ); - const typesVersions = packageJson?.typesVersions; - const downlevelVersions = getTypeVersions(typesVersions); - - if (downlevelVersions) { - downlevelVersions.forEach(target => { - downlevelDts({ verbose, target }); - }); - } else { - verbose && - console.log(chalk.yellow('No typesVersions found in package.json')); - } + if (options?.downlevel) { + runTypescriptDownlevel({ + verbose, + }); } // Exit with appropriate code process.exit(exitStatus); } - -/** - * Extracts TypeScript versions from the typesVersions field in package.json - * and returns an array of version numbers without the 'ts' prefix. - * @returns - */ -const getTypeVersions = (typesVersions?: { - [target: string]: { - [files: string]: string[]; - }; -}): Array | undefined => { - if (!typesVersions || typeof typesVersions !== 'object') return; - - const versions: Array = []; - - Object.entries(typesVersions).forEach(([_versionRange, pathMappings]) => { - // Get the output directory from the path mappings - // Typical format is { '*': ['ts3.4/*'] } - if (!pathMappings || typeof pathMappings !== 'object') return; - - const wildcardMapping = pathMappings['*']; - if (!Array.isArray(wildcardMapping) || wildcardMapping.length === 0) return; - - // Extract outputDir from format like 'ts3.4/*' - const outputDirMatch = wildcardMapping[0].match(/^ts([\d.]+)\/\*/); - if (!outputDirMatch || !outputDirMatch[1]) return; - - // Get just the version number without the 'ts' prefix - const versionNumber = outputDirMatch[1]; - versions.push(versionNumber); - }); - - return versions; -}; diff --git a/tools/build/src/typescript/downlevel-dts.ts b/tools/build/src/typescript/downlevel/downlevel-dts.ts similarity index 100% rename from tools/build/src/typescript/downlevel-dts.ts rename to tools/build/src/typescript/downlevel/downlevel-dts.ts diff --git a/tools/build/src/typescript/downlevel/getTypeVersions.ts b/tools/build/src/typescript/downlevel/getTypeVersions.ts new file mode 100644 index 0000000000..47e32d4fac --- /dev/null +++ b/tools/build/src/typescript/downlevel/getTypeVersions.ts @@ -0,0 +1,33 @@ +/** + * Extracts TypeScript versions from the typesVersions field in package.json + * and returns an array of version numbers without the 'ts' prefix. + * @returns + */ +const getTypeVersions = (typesVersions?: { + [target: string]: { + [files: string]: string[]; + }; +}): Array | undefined => { + if (!typesVersions || typeof typesVersions !== 'object') return; + + const versions: Array = []; + + Object.entries(typesVersions).forEach(([_versionRange, pathMappings]) => { + // Get the output directory from the path mappings + // Typical format is { '*': ['ts3.4/*'] } + if (!pathMappings || typeof pathMappings !== 'object') return; + + const wildcardMapping = pathMappings['*']; + if (!Array.isArray(wildcardMapping) || wildcardMapping.length === 0) return; + + // Extract outputDir from format like 'ts3.4/*' + const outputDirMatch = wildcardMapping[0].match(/^ts([\d.]+)\/\*/); + if (!outputDirMatch || !outputDirMatch[1]) return; + + // Get just the version number without the 'ts' prefix + const versionNumber = outputDirMatch[1]; + versions.push(versionNumber); + }); + + return versions; +}; diff --git a/tools/build/src/typescript/downlevel/index.ts b/tools/build/src/typescript/downlevel/index.ts new file mode 100644 index 0000000000..118c6aa168 --- /dev/null +++ b/tools/build/src/typescript/downlevel/index.ts @@ -0,0 +1,34 @@ +import chalk from 'chalk'; +import path from 'path'; +import fse from 'fs-extra'; + +import { downlevelDts } from './downlevel-dts'; + +interface DownlevelCommandOptions { + verbose?: boolean; +} + +/** + * Downlevel TypeScript definitions + * based on the typesVersions field in package.json. + */ +export function runTypescriptDownlevel({ verbose }: DownlevelCommandOptions) { + const packageDir = process.cwd(); + verbose && console.log(chalk.blue.bold('Building TypeScript for production')); + + const packageJson = fse.readJSONSync( + path.join(packageDir, 'package.json'), + 'utf-8', + ); + const typesVersions = packageJson?.typesVersions; + const downlevelVersions = getTypeVersions(typesVersions); + + if (downlevelVersions) { + downlevelVersions.forEach(target => { + downlevelDts({ verbose, target }); + }); + } else { + verbose && + console.log(chalk.yellow('No typesVersions found in package.json')); + } +} diff --git a/tools/cli/src/index.ts b/tools/cli/src/index.ts index ad10bcccde..72a89fb165 100644 --- a/tools/cli/src/index.ts +++ b/tools/cli/src/index.ts @@ -217,11 +217,6 @@ cli .command('build-package') .description('Builds a package') .option('-v --verbose', 'Prints additional information to the console', false) - .option( - '-p --production', - 'Whether to build for production. This builds all TS downlevel targets', - false, - ) .action(buildPackage); cli .command('build-ts') @@ -229,8 +224,8 @@ cli .argument('[pass-through...]', 'Pass-through options for `tsc`') .option('-v --verbose', 'Prints additional information to the console', false) .option( - '-p --production', - 'Whether to build for production. This builds all TS downlevel targets', + '--downlevel', + 'Builds all TS downlevel targets based on the typesVersions field in package.json', false, ) .allowUnknownOption(true) From 5f9000f372462b0015d3cada640fc38878e76b5d Mon Sep 17 00:00:00 2001 From: Adam Michael Thompson Date: Fri, 4 Apr 2025 18:42:03 -0400 Subject: [PATCH 10/48] add ts version override --- package.json | 5 +- pnpm-lock.yaml | 107 ++++++++++++++++--------- tools/build/package.json | 3 +- tools/build/src/typescript/build-ts.ts | 3 +- 4 files changed, 78 insertions(+), 40 deletions(-) diff --git a/package.json b/package.json index c42e838d22..43dd50be51 100644 --- a/package.json +++ b/package.json @@ -72,10 +72,11 @@ }, "pnpm": { "overrides": { + "@testing-library/dom": "9.3.4", + "@testing-library/user-event": "13.5.0", "caniuse-lite": "^1.0.30001585", "jackspeak": "2.1.1", - "@testing-library/dom": "9.3.4", - "@testing-library/user-event": "13.5.0" + "typescript": "~5.0.4" } }, "lg": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b54cd7c329..6d6e20c1bb 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -5,10 +5,11 @@ settings: excludeLinksFromLockfile: false overrides: - caniuse-lite: ^1.0.30001585 - jackspeak: 2.1.1 '@testing-library/dom': 9.3.4 '@testing-library/user-event': 13.5.0 + caniuse-lite: ^1.0.30001585 + jackspeak: 2.1.1 + typescript: ~5.0.4 importers: @@ -2947,10 +2948,10 @@ importers: version: 8.0.0(@babel/core@7.24.3) '@svgr/cli': specifier: 8.0.1 - version: 8.0.1(typescript@5.9.0-dev.20250404) + version: 8.0.1(typescript@5.0.4) '@svgr/rollup': specifier: ^8.1.0 - version: 8.1.0(rollup@4.16.1)(typescript@5.9.0-dev.20250404) + version: 8.1.0(rollup@4.16.1)(typescript@5.0.4) '@types/cross-spawn': specifier: 6.0.2 version: 6.0.2 @@ -2977,7 +2978,7 @@ importers: version: 4.17.21 react-docgen-typescript: specifier: 2.2.2 - version: 2.2.2(typescript@5.9.0-dev.20250404) + version: 2.2.2(typescript@5.0.4) rollup: specifier: 4.16.1 version: 4.16.1 @@ -2994,8 +2995,8 @@ importers: specifier: ^2.0.6 version: 2.0.6 typescript: - specifier: ~5.0.0 - version: 5.9.0-dev.20250404 + specifier: ~5.0.4 + version: 5.0.4 tools/cli: dependencies: @@ -3219,7 +3220,7 @@ importers: specifier: 2.8.8 version: 2.8.8 typescript: - specifier: ~5.0.0 + specifier: ~5.0.4 version: 5.0.4 tools/meta: @@ -5505,7 +5506,7 @@ packages: '@storybook/react-docgen-typescript-plugin@1.0.6--canary.9.0c3f3b7.0': resolution: {integrity: sha512-KUqXC3oa9JuQ0kZJLBhVdS4lOneKTOopnNBK4tUAgoxWQ3u/IjzdueZjFr7gyBrXMoU6duutk3RQR9u8ZpYJ4Q==} peerDependencies: - typescript: '>= 4.x' + typescript: ~5.0.4 webpack: '>= 4' '@storybook/react-dom-shim@8.5.3': @@ -5522,7 +5523,7 @@ packages: react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta storybook: ^8.5.3 - typescript: '>= 4.2.x' + typescript: ~5.0.4 peerDependenciesMeta: typescript: optional: true @@ -5535,7 +5536,7 @@ packages: react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta storybook: ^8.5.3 - typescript: '>= 4.2.x' + typescript: ~5.0.4 peerDependenciesMeta: '@storybook/test': optional: true @@ -6850,7 +6851,7 @@ packages: resolution: {integrity: sha512-kcZ6+W5QzcJ3P1Mt+83OUv/oHFqZHIx8DuxG6eZ5RGMERoLqp4BuGjhHLYGK+Kf5XVkQvqBSmAy/nGWN3qDgEA==} engines: {node: '>=14'} peerDependencies: - typescript: '>=4.9.5' + typescript: ~5.0.4 peerDependenciesMeta: typescript: optional: true @@ -7614,7 +7615,7 @@ packages: resolution: {integrity: sha512-mX3qW3idpueT2klaQXBzrIM/pHw+T0B/V9KHEvNrqijTq9NFnMZU6oreVxDYcf33P8a5cW+67PjodNHthGnNVg==} engines: {node: '>=12.13.0', yarn: '>=1.0.0'} peerDependencies: - typescript: '>3.6.0' + typescript: ~5.0.4 webpack: ^5.11.0 form-data@2.5.1: @@ -9429,7 +9430,7 @@ packages: react-docgen-typescript@2.2.2: resolution: {integrity: sha512-tvg2ZtOpOi6QDwsb3GZhOjDkkX0h8Z2gipvTg6OVMUyoYoURhEiRNePT8NZItTVCDh39JJHnLdfCOkzoLbFnTg==} peerDependencies: - typescript: '>= 4.3.x' + typescript: ~5.0.4 react-docgen@7.0.3: resolution: {integrity: sha512-i8aF1nyKInZnANZ4uZrH49qn1paRgBZ7wZiCNBMnenlPzEv0mRl+ShpTVEI6wZNl8sSc79xZkivtgLKQArcanQ==} @@ -10232,7 +10233,7 @@ packages: resolution: {integrity: sha512-i3eMG77UTMD0hZhgRS562pv83RC6ukSAC2GMNWc+9dieh/+jDM5u5YG+NHX6VNDRHQcHwmsTHctP9LhbC3WxVw==} engines: {node: '>=16'} peerDependencies: - typescript: '>=4.2.0' + typescript: ~5.0.4 ts-dedent@2.2.0: resolution: {integrity: sha512-q5W7tVM71e2xjHZTlgfTDoPF/SmqKG5hddq9SzR49CH2hayqRKJtQ4mtRlSxKaJlR/+9rEM+mnBHf7I2/BQcpQ==} @@ -10245,7 +10246,7 @@ packages: '@swc/core': '>=1.2.50' '@swc/wasm': '>=1.2.50' '@types/node': '*' - typescript: '>=2.7' + typescript: ~5.0.4 peerDependenciesMeta: '@swc/core': optional: true @@ -10272,7 +10273,7 @@ packages: resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} engines: {node: '>= 6'} peerDependencies: - typescript: '>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta' + typescript: ~5.0.4 tty-browserify@0.0.1: resolution: {integrity: sha512-C3TaO7K81YvjCgQH9Q1S3R3P3BtN3RIM8n+OvX4il1K1zgE8ZhI0op7kClgkxtutIE8hQrcrHBXvIheqKUUCxw==} @@ -13282,12 +13283,12 @@ snapshots: '@svgr/babel-plugin-transform-react-native-svg': 8.1.0(@babel/core@7.24.3) '@svgr/babel-plugin-transform-svg-component': 8.0.0(@babel/core@7.24.3) - '@svgr/cli@8.0.1(typescript@5.9.0-dev.20250404)': + '@svgr/cli@8.0.1(typescript@5.0.4)': dependencies: - '@svgr/core': 8.0.0(typescript@5.9.0-dev.20250404) - '@svgr/plugin-jsx': 8.0.1(@svgr/core@8.0.0(typescript@5.9.0-dev.20250404)) - '@svgr/plugin-prettier': 8.0.1(@svgr/core@8.0.0(typescript@5.9.0-dev.20250404)) - '@svgr/plugin-svgo': 8.0.1(@svgr/core@8.0.0(typescript@5.9.0-dev.20250404))(typescript@5.9.0-dev.20250404) + '@svgr/core': 8.0.0(typescript@5.0.4) + '@svgr/plugin-jsx': 8.0.1(@svgr/core@8.0.0(typescript@5.0.4)) + '@svgr/plugin-prettier': 8.0.1(@svgr/core@8.0.0(typescript@5.0.4)) + '@svgr/plugin-svgo': 8.0.1(@svgr/core@8.0.0(typescript@5.0.4))(typescript@5.0.4) camelcase: 6.3.0 chalk: 4.1.2 commander: 9.5.0 @@ -13306,6 +13307,17 @@ snapshots: transitivePeerDependencies: - supports-color + '@svgr/core@8.0.0(typescript@5.0.4)': + dependencies: + '@babel/core': 7.24.3 + '@svgr/babel-preset': 8.0.0(@babel/core@7.24.3) + camelcase: 6.3.0 + cosmiconfig: 8.3.6(typescript@5.0.4) + snake-case: 3.0.4 + transitivePeerDependencies: + - supports-color + - typescript + '@svgr/core@8.0.0(typescript@5.9.0-dev.20250404)': dependencies: '@babel/core': 7.24.3 @@ -13317,12 +13329,12 @@ snapshots: - supports-color - typescript - '@svgr/core@8.1.0(typescript@5.9.0-dev.20250404)': + '@svgr/core@8.1.0(typescript@5.0.4)': dependencies: '@babel/core': 7.24.3 '@svgr/babel-preset': 8.1.0(@babel/core@7.24.3) camelcase: 6.3.0 - cosmiconfig: 8.3.6(typescript@5.9.0-dev.20250404) + cosmiconfig: 8.3.6(typescript@5.0.4) snake-case: 3.0.4 transitivePeerDependencies: - supports-color @@ -13346,6 +13358,16 @@ snapshots: transitivePeerDependencies: - supports-color + '@svgr/plugin-jsx@8.0.1(@svgr/core@8.0.0(typescript@5.0.4))': + dependencies: + '@babel/core': 7.24.3 + '@svgr/babel-preset': 8.0.0(@babel/core@7.24.3) + '@svgr/core': 8.0.0(typescript@5.0.4) + '@svgr/hast-util-to-babel-ast': 8.0.0 + svg-parser: 2.0.4 + transitivePeerDependencies: + - supports-color + '@svgr/plugin-jsx@8.0.1(@svgr/core@8.0.0(typescript@5.9.0-dev.20250404))': dependencies: '@babel/core': 7.24.3 @@ -13356,22 +13378,31 @@ snapshots: transitivePeerDependencies: - supports-color - '@svgr/plugin-jsx@8.1.0(@svgr/core@8.1.0(typescript@5.9.0-dev.20250404))': + '@svgr/plugin-jsx@8.1.0(@svgr/core@8.1.0(typescript@5.0.4))': dependencies: '@babel/core': 7.24.3 '@svgr/babel-preset': 8.1.0(@babel/core@7.24.3) - '@svgr/core': 8.1.0(typescript@5.9.0-dev.20250404) + '@svgr/core': 8.1.0(typescript@5.0.4) '@svgr/hast-util-to-babel-ast': 8.0.0 svg-parser: 2.0.4 transitivePeerDependencies: - supports-color - '@svgr/plugin-prettier@8.0.1(@svgr/core@8.0.0(typescript@5.9.0-dev.20250404))': + '@svgr/plugin-prettier@8.0.1(@svgr/core@8.0.0(typescript@5.0.4))': dependencies: - '@svgr/core': 8.0.0(typescript@5.9.0-dev.20250404) + '@svgr/core': 8.0.0(typescript@5.0.4) deepmerge: 4.3.1 prettier: 2.8.8 + '@svgr/plugin-svgo@8.0.1(@svgr/core@8.0.0(typescript@5.0.4))(typescript@5.0.4)': + dependencies: + '@svgr/core': 8.0.0(typescript@5.0.4) + cosmiconfig: 8.3.6(typescript@5.0.4) + deepmerge: 4.3.1 + svgo: 3.0.2 + transitivePeerDependencies: + - typescript + '@svgr/plugin-svgo@8.0.1(@svgr/core@8.0.0(typescript@5.9.0-dev.20250404))(typescript@5.9.0-dev.20250404)': dependencies: '@svgr/core': 8.0.0(typescript@5.9.0-dev.20250404) @@ -13381,16 +13412,16 @@ snapshots: transitivePeerDependencies: - typescript - '@svgr/plugin-svgo@8.1.0(@svgr/core@8.1.0(typescript@5.9.0-dev.20250404))(typescript@5.9.0-dev.20250404)': + '@svgr/plugin-svgo@8.1.0(@svgr/core@8.1.0(typescript@5.0.4))(typescript@5.0.4)': dependencies: - '@svgr/core': 8.1.0(typescript@5.9.0-dev.20250404) - cosmiconfig: 8.3.6(typescript@5.9.0-dev.20250404) + '@svgr/core': 8.1.0(typescript@5.0.4) + cosmiconfig: 8.3.6(typescript@5.0.4) deepmerge: 4.3.1 svgo: 3.0.2 transitivePeerDependencies: - typescript - '@svgr/rollup@8.1.0(rollup@4.16.1)(typescript@5.9.0-dev.20250404)': + '@svgr/rollup@8.1.0(rollup@4.16.1)(typescript@5.0.4)': dependencies: '@babel/core': 7.24.3 '@babel/plugin-transform-react-constant-elements': 7.22.5(@babel/core@7.24.3) @@ -13398,9 +13429,9 @@ snapshots: '@babel/preset-react': 7.24.1(@babel/core@7.24.3) '@babel/preset-typescript': 7.24.1(@babel/core@7.24.3) '@rollup/pluginutils': 5.0.2(rollup@4.16.1) - '@svgr/core': 8.1.0(typescript@5.9.0-dev.20250404) - '@svgr/plugin-jsx': 8.1.0(@svgr/core@8.1.0(typescript@5.9.0-dev.20250404)) - '@svgr/plugin-svgo': 8.1.0(@svgr/core@8.1.0(typescript@5.9.0-dev.20250404))(typescript@5.9.0-dev.20250404) + '@svgr/core': 8.1.0(typescript@5.0.4) + '@svgr/plugin-jsx': 8.1.0(@svgr/core@8.1.0(typescript@5.0.4)) + '@svgr/plugin-svgo': 8.1.0(@svgr/core@8.1.0(typescript@5.0.4))(typescript@5.0.4) transitivePeerDependencies: - rollup - supports-color @@ -15049,7 +15080,7 @@ snapshots: dependencies: semver: 7.6.3 shelljs: 0.8.5 - typescript: 5.9.0-dev.20250404 + typescript: 5.0.4 duplexer2@0.1.4: dependencies: @@ -18076,6 +18107,10 @@ snapshots: range-parser@1.2.1: {} + react-docgen-typescript@2.2.2(typescript@5.0.4): + dependencies: + typescript: 5.0.4 + react-docgen-typescript@2.2.2(typescript@5.9.0-dev.20250404): dependencies: typescript: 5.9.0-dev.20250404 diff --git a/tools/build/package.json b/tools/build/package.json index 9c57988200..1d36e20980 100644 --- a/tools/build/package.json +++ b/tools/build/package.json @@ -43,7 +43,8 @@ "rollup": "4.16.1", "rollup-plugin-bundle-stats": "^4.18.2", "rollup-plugin-node-externals": "7.1.1", - "rollup-plugin-polyfill-node": "0.13.0" + "rollup-plugin-polyfill-node": "0.13.0", + "typescript": "~5.0.0" }, "peerDependencies": { "@babel/core": "7.24.0", diff --git a/tools/build/src/typescript/build-ts.ts b/tools/build/src/typescript/build-ts.ts index 94b3e4e42d..f6ea3a4120 100644 --- a/tools/build/src/typescript/build-ts.ts +++ b/tools/build/src/typescript/build-ts.ts @@ -33,7 +33,8 @@ export function buildTypescript( process.exit(1); } - verbose && console.log(chalk.blue.bold('Building TypeScript')); + verbose && + console.log(chalk.blue.bold(`Building TypeScript (v${ts.version})`)); // Any additional options passed in via the CLI const cliCompilerOptions = parsePassThruOptions(passThru); From 0d1c32043b73049f4f350468c8cb3a6ed65e9417 Mon Sep 17 00:00:00 2001 From: Adam Michael Thompson Date: Fri, 4 Apr 2025 18:45:02 -0400 Subject: [PATCH 11/48] add --downlevel on prepublish --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 43dd50be51..4e4b1d16b3 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "fix": "lg lint --fix", "link": "lg link", "lint": "lg lint", - "prepublishOnly": "pnpm run build && turbo run docs", + "prepublishOnly": "pnpm run build && pnpm run build:ts --downlevel && turbo run docs", "publish": "pnpm changeset publish --public", "slackbot": "lg slackbot release", "start": "npx storybook dev -p 9001 --no-version-updates --no-open", From af15a4a785f628d449adfecdec572b032a44d19a Mon Sep 17 00:00:00 2001 From: Adam Michael Thompson Date: Fri, 4 Apr 2025 18:48:06 -0400 Subject: [PATCH 12/48] adds changesets --- .changeset/build-typescript-5.md | 6 ++++++ .changeset/cli-ts-downlevel.md | 5 +++++ 2 files changed, 11 insertions(+) create mode 100644 .changeset/build-typescript-5.md create mode 100644 .changeset/cli-ts-downlevel.md diff --git a/.changeset/build-typescript-5.md b/.changeset/build-typescript-5.md new file mode 100644 index 0000000000..9bee1c1a4c --- /dev/null +++ b/.changeset/build-typescript-5.md @@ -0,0 +1,6 @@ +--- +'@lg-tools/build': minor +--- + +- Upgrades to TS 5.0. +- Adds `--downlevel` option for `build-ts`. This option reads a package's package.json and exports downleveled `*.d.ts` files for all targets listed in `"typeVersions"` diff --git a/.changeset/cli-ts-downlevel.md b/.changeset/cli-ts-downlevel.md new file mode 100644 index 0000000000..7e6ea17146 --- /dev/null +++ b/.changeset/cli-ts-downlevel.md @@ -0,0 +1,5 @@ +--- +'@lg-tools/cli': minor +--- + +Adds `--downlevel` option for `build-ts`. This option reads a package's package.json and exports downleveled `*.d.ts` files for all targets listed in `"typeVersions"` From 5858fc9f5d784eda35f37a9f4ebfc7a0afcf9399 Mon Sep 17 00:00:00 2001 From: Adam Michael Thompson Date: Thu, 3 Apr 2025 16:53:36 -0400 Subject: [PATCH 13/48] Update InlineCode.tsx --- packages/typography/src/InlineCode/InlineCode.tsx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/packages/typography/src/InlineCode/InlineCode.tsx b/packages/typography/src/InlineCode/InlineCode.tsx index df630d0617..c6a29b8d2a 100644 --- a/packages/typography/src/InlineCode/InlineCode.tsx +++ b/packages/typography/src/InlineCode/InlineCode.tsx @@ -38,11 +38,8 @@ const InlineCode = InferredPolymorphic( const baseFontSize = useUpdatedBaseFontSize(baseFontSizeOverride); const { Component } = useInferredPolymorphic(as, rest, 'code'); - const whiteSpace = - ((typeof children === 'string' && children.match(/./gu)?.length) ?? 0) <= - 30 - ? nowrap - : normal; + const charsCount = children.match(/./gu)?.length ?? 0; + const whiteSpace = charsCount <= 30 ? nowrap : normal; const needsWrapper = Component !== 'code'; const renderedInlineCode = ( From d1b06fc70b54a76d90f68d3edad65dd818d4ebb9 Mon Sep 17 00:00:00 2001 From: Adam Michael Thompson Date: Fri, 4 Apr 2025 18:54:13 -0400 Subject: [PATCH 14/48] update packagejsons --- charts/drag-provider/package.json | 2 +- charts/series-provider/package.json | 2 +- chat/avatar/package.json | 7 ++++++- chat/chat-window/package.json | 7 ++++++- chat/input-bar/package.json | 7 ++++++- chat/leafygreen-chat-provider/package.json | 7 ++++++- chat/lg-markdown/package.json | 7 ++++++- chat/message-feed/package.json | 7 ++++++- chat/message-feedback/package.json | 7 ++++++- chat/message-rating/package.json | 7 ++++++- chat/message/package.json | 7 ++++++- chat/title-bar/package.json | 7 ++++++- packages/a11y/package.json | 7 ++++++- packages/avatar/package.json | 7 ++++++- packages/badge/package.json | 7 ++++++- packages/banner/package.json | 7 ++++++- packages/box/package.json | 7 ++++++- packages/button/package.json | 7 ++++++- packages/callout/package.json | 7 ++++++- packages/card/package.json | 7 ++++++- packages/checkbox/package.json | 7 ++++++- packages/code/package.json | 7 ++++++- packages/combobox/package.json | 7 ++++++- packages/confirmation-modal/package.json | 7 ++++++- packages/copyable/package.json | 7 ++++++- packages/emotion/package.json | 7 ++++++- packages/empty-state/package.json | 7 ++++++- packages/expandable-card/package.json | 7 ++++++- packages/form-footer/package.json | 7 ++++++- packages/guide-cue/package.json | 7 ++++++- packages/hooks/package.json | 7 ++++++- packages/icon-button/package.json | 7 ++++++- packages/icon/package.json | 7 ++++++- packages/inline-definition/package.json | 7 ++++++- packages/input-option/package.json | 7 ++++++- packages/leafygreen-provider/package.json | 7 ++++++- packages/lib/package.json | 6 +++--- packages/loading-indicator/package.json | 7 ++++++- packages/logo/package.json | 7 ++++++- packages/marketing-modal/package.json | 7 ++++++- packages/menu/package.json | 7 ++++++- packages/modal/package.json | 7 ++++++- packages/number-input/package.json | 7 ++++++- packages/pagination/package.json | 7 ++++++- packages/palette/package.json | 7 ++++++- packages/password-input/package.json | 7 ++++++- packages/pipeline/package.json | 7 ++++++- packages/polymorphic/package.json | 7 ++++++- packages/popover/package.json | 7 ++++++- packages/portal/package.json | 7 ++++++- packages/radio-box-group/package.json | 7 ++++++- packages/radio-group/package.json | 7 ++++++- packages/ripple/package.json | 7 ++++++- packages/search-input/package.json | 7 ++++++- packages/segmented-control/package.json | 7 ++++++- packages/select/package.json | 7 ++++++- packages/side-nav/package.json | 7 ++++++- packages/skeleton-loader/package.json | 7 ++++++- packages/split-button/package.json | 7 ++++++- packages/stepper/package.json | 7 ++++++- packages/table/package.json | 7 ++++++- packages/tabs/package.json | 7 ++++++- packages/testing-lib/package.json | 7 ++++++- packages/text-area/package.json | 7 ++++++- packages/text-input/package.json | 7 ++++++- packages/toast/package.json | 7 ++++++- packages/toggle/package.json | 7 ++++++- packages/tokens/package.json | 7 ++++++- packages/tooltip/package.json | 7 ++++++- packages/typography/package.json | 7 ++++++- 70 files changed, 407 insertions(+), 72 deletions(-) diff --git a/charts/drag-provider/package.json b/charts/drag-provider/package.json index e2f94b1a09..658f8e2730 100644 --- a/charts/drag-provider/package.json +++ b/charts/drag-provider/package.json @@ -33,4 +33,4 @@ "devDependencies": { "@storybook/test": "8.5.3" } -} \ No newline at end of file +} diff --git a/charts/series-provider/package.json b/charts/series-provider/package.json index 17d15e450b..a6b555ee26 100644 --- a/charts/series-provider/package.json +++ b/charts/series-provider/package.json @@ -24,4 +24,4 @@ "peerDependencies": { "@leafygreen-ui/leafygreen-provider": "workspace:^" } -} \ No newline at end of file +} diff --git a/chat/avatar/package.json b/chat/avatar/package.json index 592d22dd9d..fe97546201 100644 --- a/chat/avatar/package.json +++ b/chat/avatar/package.json @@ -8,7 +8,12 @@ "typesVersions": { "<3.9": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/chat/chat-window/package.json b/chat/chat-window/package.json index 28c34d1bce..a6a798e3a9 100644 --- a/chat/chat-window/package.json +++ b/chat/chat-window/package.json @@ -8,7 +8,12 @@ "typesVersions": { "<3.9": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/chat/input-bar/package.json b/chat/input-bar/package.json index 641137548b..f0cac24cbd 100644 --- a/chat/input-bar/package.json +++ b/chat/input-bar/package.json @@ -8,7 +8,12 @@ "typesVersions": { "<3.9": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/chat/leafygreen-chat-provider/package.json b/chat/leafygreen-chat-provider/package.json index 31a3923019..7cb2e33ff2 100644 --- a/chat/leafygreen-chat-provider/package.json +++ b/chat/leafygreen-chat-provider/package.json @@ -8,7 +8,12 @@ "typesVersions": { "<3.9": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/chat/lg-markdown/package.json b/chat/lg-markdown/package.json index 3f09a6cced..4b789d6531 100644 --- a/chat/lg-markdown/package.json +++ b/chat/lg-markdown/package.json @@ -8,7 +8,12 @@ "typesVersions": { "<3.9": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/chat/message-feed/package.json b/chat/message-feed/package.json index cedd039782..c29fd842dd 100644 --- a/chat/message-feed/package.json +++ b/chat/message-feed/package.json @@ -8,7 +8,12 @@ "typesVersions": { "<3.9": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/chat/message-feedback/package.json b/chat/message-feedback/package.json index 7d80507727..98ccccd24e 100644 --- a/chat/message-feedback/package.json +++ b/chat/message-feedback/package.json @@ -8,7 +8,12 @@ "typesVersions": { "<3.9": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/chat/message-rating/package.json b/chat/message-rating/package.json index ef2886e9ac..cc7094a856 100644 --- a/chat/message-rating/package.json +++ b/chat/message-rating/package.json @@ -8,7 +8,12 @@ "typesVersions": { "<3.9": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/chat/message/package.json b/chat/message/package.json index 198e756ea3..f52253856b 100644 --- a/chat/message/package.json +++ b/chat/message/package.json @@ -8,7 +8,12 @@ "typesVersions": { "<3.9": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/chat/title-bar/package.json b/chat/title-bar/package.json index df5ee0e689..785447edf4 100644 --- a/chat/title-bar/package.json +++ b/chat/title-bar/package.json @@ -8,7 +8,12 @@ "typesVersions": { "<3.9": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/a11y/package.json b/packages/a11y/package.json index 7b690501ab..93ac204d57 100644 --- a/packages/a11y/package.json +++ b/packages/a11y/package.json @@ -8,7 +8,12 @@ "typesVersions": { "<3.9": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/avatar/package.json b/packages/avatar/package.json index f1c92e9617..e551ab81ee 100644 --- a/packages/avatar/package.json +++ b/packages/avatar/package.json @@ -8,7 +8,12 @@ "typesVersions": { "<3.9": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/badge/package.json b/packages/badge/package.json index fe2eba011d..75d90339ec 100644 --- a/packages/badge/package.json +++ b/packages/badge/package.json @@ -8,7 +8,12 @@ "typesVersions": { "<3.9": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/banner/package.json b/packages/banner/package.json index e52997bd12..7ac9771b66 100644 --- a/packages/banner/package.json +++ b/packages/banner/package.json @@ -8,7 +8,12 @@ "typesVersions": { "<3.9": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/box/package.json b/packages/box/package.json index cfd4328a7b..c6f8bc338b 100644 --- a/packages/box/package.json +++ b/packages/box/package.json @@ -8,7 +8,12 @@ "typesVersions": { "<3.9": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/button/package.json b/packages/button/package.json index 76f4bf2222..8fba3e8cdf 100644 --- a/packages/button/package.json +++ b/packages/button/package.json @@ -8,7 +8,12 @@ "typesVersions": { "<3.9": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/callout/package.json b/packages/callout/package.json index 4c877be2af..8ef7743809 100644 --- a/packages/callout/package.json +++ b/packages/callout/package.json @@ -8,7 +8,12 @@ "typesVersions": { "<3.9": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/card/package.json b/packages/card/package.json index e90f6cdb1b..6085304701 100644 --- a/packages/card/package.json +++ b/packages/card/package.json @@ -8,7 +8,12 @@ "typesVersions": { "<3.9": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/checkbox/package.json b/packages/checkbox/package.json index 4eb375ad9e..8a36f9996b 100644 --- a/packages/checkbox/package.json +++ b/packages/checkbox/package.json @@ -8,7 +8,12 @@ "typesVersions": { "<3.9": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/code/package.json b/packages/code/package.json index a896381343..48cdd8fa4f 100644 --- a/packages/code/package.json +++ b/packages/code/package.json @@ -8,7 +8,12 @@ "typesVersions": { "<3.9": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/combobox/package.json b/packages/combobox/package.json index e223a9ef79..fdedbf56d0 100644 --- a/packages/combobox/package.json +++ b/packages/combobox/package.json @@ -8,7 +8,12 @@ "typesVersions": { "<3.9": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/confirmation-modal/package.json b/packages/confirmation-modal/package.json index efd3632da8..d57ed5f41e 100644 --- a/packages/confirmation-modal/package.json +++ b/packages/confirmation-modal/package.json @@ -8,7 +8,12 @@ "typesVersions": { "<3.9": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/copyable/package.json b/packages/copyable/package.json index 6267a0d7ce..0b441b2adc 100644 --- a/packages/copyable/package.json +++ b/packages/copyable/package.json @@ -8,7 +8,12 @@ "typesVersions": { "<3.9": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/emotion/package.json b/packages/emotion/package.json index 133eaaf9e0..cb76457e53 100644 --- a/packages/emotion/package.json +++ b/packages/emotion/package.json @@ -8,7 +8,12 @@ "typesVersions": { "<3.9": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/empty-state/package.json b/packages/empty-state/package.json index 1fc5f89da2..684031867a 100644 --- a/packages/empty-state/package.json +++ b/packages/empty-state/package.json @@ -8,7 +8,12 @@ "typesVersions": { "<3.9": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/expandable-card/package.json b/packages/expandable-card/package.json index eccb7e7714..9444c110c6 100644 --- a/packages/expandable-card/package.json +++ b/packages/expandable-card/package.json @@ -8,7 +8,12 @@ "typesVersions": { "<3.9": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/form-footer/package.json b/packages/form-footer/package.json index 0cabe992bb..4d033624a1 100644 --- a/packages/form-footer/package.json +++ b/packages/form-footer/package.json @@ -8,7 +8,12 @@ "typesVersions": { "<3.9": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/guide-cue/package.json b/packages/guide-cue/package.json index 992aef4a04..9b4e0b61c9 100644 --- a/packages/guide-cue/package.json +++ b/packages/guide-cue/package.json @@ -8,7 +8,12 @@ "typesVersions": { "<3.9": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/hooks/package.json b/packages/hooks/package.json index e2dfbe2058..c307d59d00 100644 --- a/packages/hooks/package.json +++ b/packages/hooks/package.json @@ -8,7 +8,12 @@ "typesVersions": { "<3.9": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/icon-button/package.json b/packages/icon-button/package.json index bc3b99bd26..f7796d1c1f 100644 --- a/packages/icon-button/package.json +++ b/packages/icon-button/package.json @@ -8,7 +8,12 @@ "typesVersions": { "<3.9": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/icon/package.json b/packages/icon/package.json index 5b439718e7..2b5fe0b049 100644 --- a/packages/icon/package.json +++ b/packages/icon/package.json @@ -8,7 +8,12 @@ "typesVersions": { "<3.9": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/inline-definition/package.json b/packages/inline-definition/package.json index 3cc80898e3..c765f07830 100644 --- a/packages/inline-definition/package.json +++ b/packages/inline-definition/package.json @@ -8,7 +8,12 @@ "typesVersions": { "<3.9": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/input-option/package.json b/packages/input-option/package.json index 940cdd0d22..46ac7fe335 100644 --- a/packages/input-option/package.json +++ b/packages/input-option/package.json @@ -8,7 +8,12 @@ "typesVersions": { "<3.9": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/leafygreen-provider/package.json b/packages/leafygreen-provider/package.json index d443b5ac1d..b77750535e 100644 --- a/packages/leafygreen-provider/package.json +++ b/packages/leafygreen-provider/package.json @@ -8,7 +8,12 @@ "typesVersions": { "<3.9": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/lib/package.json b/packages/lib/package.json index 8cf4ce4bad..d2e543d86d 100644 --- a/packages/lib/package.json +++ b/packages/lib/package.json @@ -8,12 +8,12 @@ "typesVersions": { "<3.9": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" ] }, - "<=4.9": { + "<5.0": { "*": [ - "ts4.9/*" + "dist/ts4.9/*" ] } }, diff --git a/packages/loading-indicator/package.json b/packages/loading-indicator/package.json index e4a94565ff..8b35dfb171 100644 --- a/packages/loading-indicator/package.json +++ b/packages/loading-indicator/package.json @@ -8,7 +8,12 @@ "typesVersions": { "<3.9": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/logo/package.json b/packages/logo/package.json index 4b227545e2..242b17a90f 100644 --- a/packages/logo/package.json +++ b/packages/logo/package.json @@ -8,7 +8,12 @@ "typesVersions": { "<3.9": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/marketing-modal/package.json b/packages/marketing-modal/package.json index 988f153f45..6f928fa68a 100644 --- a/packages/marketing-modal/package.json +++ b/packages/marketing-modal/package.json @@ -8,7 +8,12 @@ "typesVersions": { "<3.9": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/menu/package.json b/packages/menu/package.json index 9ab50fb613..4654c29b40 100644 --- a/packages/menu/package.json +++ b/packages/menu/package.json @@ -8,7 +8,12 @@ "typesVersions": { "<3.9": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/modal/package.json b/packages/modal/package.json index 7d658c21fd..dd83618354 100644 --- a/packages/modal/package.json +++ b/packages/modal/package.json @@ -8,7 +8,12 @@ "typesVersions": { "<3.9": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/number-input/package.json b/packages/number-input/package.json index eef83572b4..627e703d51 100644 --- a/packages/number-input/package.json +++ b/packages/number-input/package.json @@ -8,7 +8,12 @@ "typesVersions": { "<3.9": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/pagination/package.json b/packages/pagination/package.json index 8edf823ce3..7a72b38ae8 100644 --- a/packages/pagination/package.json +++ b/packages/pagination/package.json @@ -8,7 +8,12 @@ "typesVersions": { "<3.9": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/palette/package.json b/packages/palette/package.json index a091ce3af7..ebcc1fdada 100644 --- a/packages/palette/package.json +++ b/packages/palette/package.json @@ -8,7 +8,12 @@ "typesVersions": { "<3.9": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/password-input/package.json b/packages/password-input/package.json index 1793ff72e2..959133ec09 100644 --- a/packages/password-input/package.json +++ b/packages/password-input/package.json @@ -8,7 +8,12 @@ "typesVersions": { "<3.9": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/pipeline/package.json b/packages/pipeline/package.json index 326e810bde..0f082cae8b 100644 --- a/packages/pipeline/package.json +++ b/packages/pipeline/package.json @@ -8,7 +8,12 @@ "typesVersions": { "<3.9": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/polymorphic/package.json b/packages/polymorphic/package.json index 7c0cbf94c7..9c3a57c77a 100644 --- a/packages/polymorphic/package.json +++ b/packages/polymorphic/package.json @@ -8,7 +8,12 @@ "typesVersions": { "<3.9": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/popover/package.json b/packages/popover/package.json index 941d1c73aa..6d0c55dc09 100644 --- a/packages/popover/package.json +++ b/packages/popover/package.json @@ -8,7 +8,12 @@ "typesVersions": { "<3.9": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/portal/package.json b/packages/portal/package.json index 3d8eda830e..4d5d06d1e7 100644 --- a/packages/portal/package.json +++ b/packages/portal/package.json @@ -8,7 +8,12 @@ "typesVersions": { "<3.9": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/radio-box-group/package.json b/packages/radio-box-group/package.json index c8a925192d..bc2c3a8011 100644 --- a/packages/radio-box-group/package.json +++ b/packages/radio-box-group/package.json @@ -8,7 +8,12 @@ "typesVersions": { "<3.9": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/radio-group/package.json b/packages/radio-group/package.json index b33c6b3fb5..24fcfec569 100644 --- a/packages/radio-group/package.json +++ b/packages/radio-group/package.json @@ -8,7 +8,12 @@ "typesVersions": { "<3.9": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/ripple/package.json b/packages/ripple/package.json index 9cff01ff3d..06e60b90e3 100644 --- a/packages/ripple/package.json +++ b/packages/ripple/package.json @@ -8,7 +8,12 @@ "typesVersions": { "<3.9": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/search-input/package.json b/packages/search-input/package.json index 7ac8259dca..3113e4c7aa 100644 --- a/packages/search-input/package.json +++ b/packages/search-input/package.json @@ -8,7 +8,12 @@ "typesVersions": { "<3.9": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/segmented-control/package.json b/packages/segmented-control/package.json index a7cef7a06d..b083706dae 100644 --- a/packages/segmented-control/package.json +++ b/packages/segmented-control/package.json @@ -8,7 +8,12 @@ "typesVersions": { "<3.9": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/select/package.json b/packages/select/package.json index 52d4c97ddc..40b7bae87a 100644 --- a/packages/select/package.json +++ b/packages/select/package.json @@ -8,7 +8,12 @@ "typesVersions": { "<3.9": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/side-nav/package.json b/packages/side-nav/package.json index 3ff73cd1f7..d4e96883a8 100644 --- a/packages/side-nav/package.json +++ b/packages/side-nav/package.json @@ -8,7 +8,12 @@ "typesVersions": { "<3.9": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/skeleton-loader/package.json b/packages/skeleton-loader/package.json index d63c30ff59..277a777ebd 100644 --- a/packages/skeleton-loader/package.json +++ b/packages/skeleton-loader/package.json @@ -8,7 +8,12 @@ "typesVersions": { "<3.9": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/split-button/package.json b/packages/split-button/package.json index 3fbd8183bb..4309f244f4 100644 --- a/packages/split-button/package.json +++ b/packages/split-button/package.json @@ -8,7 +8,12 @@ "typesVersions": { "<3.9": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/stepper/package.json b/packages/stepper/package.json index 50f4252f5f..f27cc6b5d7 100644 --- a/packages/stepper/package.json +++ b/packages/stepper/package.json @@ -8,7 +8,12 @@ "typesVersions": { "<3.9": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/table/package.json b/packages/table/package.json index 14fdfe5c69..c42d28f467 100644 --- a/packages/table/package.json +++ b/packages/table/package.json @@ -8,7 +8,12 @@ "typesVersions": { "<3.9": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/tabs/package.json b/packages/tabs/package.json index 5127a9af46..78964c1785 100644 --- a/packages/tabs/package.json +++ b/packages/tabs/package.json @@ -8,7 +8,12 @@ "typesVersions": { "<3.9": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/testing-lib/package.json b/packages/testing-lib/package.json index 496d03f335..fb39081bea 100644 --- a/packages/testing-lib/package.json +++ b/packages/testing-lib/package.json @@ -8,7 +8,12 @@ "typesVersions": { "<3.9": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/text-area/package.json b/packages/text-area/package.json index d0f4a5c2f7..93983c49b8 100644 --- a/packages/text-area/package.json +++ b/packages/text-area/package.json @@ -8,7 +8,12 @@ "typesVersions": { "<3.9": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/text-input/package.json b/packages/text-input/package.json index f240b4e99f..ffd7709fb3 100644 --- a/packages/text-input/package.json +++ b/packages/text-input/package.json @@ -8,7 +8,12 @@ "typesVersions": { "<3.9": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/toast/package.json b/packages/toast/package.json index 2f18dfa4eb..f5695257fa 100644 --- a/packages/toast/package.json +++ b/packages/toast/package.json @@ -8,7 +8,12 @@ "typesVersions": { "<3.9": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/toggle/package.json b/packages/toggle/package.json index 6129b78423..ebe90c19fb 100644 --- a/packages/toggle/package.json +++ b/packages/toggle/package.json @@ -8,7 +8,12 @@ "typesVersions": { "<3.9": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/tokens/package.json b/packages/tokens/package.json index adec06cb89..8b07696494 100644 --- a/packages/tokens/package.json +++ b/packages/tokens/package.json @@ -8,7 +8,12 @@ "typesVersions": { "<3.9": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/tooltip/package.json b/packages/tooltip/package.json index 5480d779c8..8c328b45cc 100644 --- a/packages/tooltip/package.json +++ b/packages/tooltip/package.json @@ -8,7 +8,12 @@ "typesVersions": { "<3.9": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/typography/package.json b/packages/typography/package.json index 10cc378d91..c2fdc5fd3a 100644 --- a/packages/typography/package.json +++ b/packages/typography/package.json @@ -8,7 +8,12 @@ "typesVersions": { "<3.9": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, From c1aaa0c370969b3d3b6a19e4292871449a6ac815 Mon Sep 17 00:00:00 2001 From: Adam Michael Thompson Date: Fri, 4 Apr 2025 18:59:21 -0400 Subject: [PATCH 15/48] fix prepublishOnly --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4e4b1d16b3..d246e1200c 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "fix": "lg lint --fix", "link": "lg link", "lint": "lg lint", - "prepublishOnly": "pnpm run build && pnpm run build:ts --downlevel && turbo run docs", + "prepublishOnly": "pnpm run build && pnpm run build:tsc --downlevel && turbo run docs", "publish": "pnpm changeset publish --public", "slackbot": "lg slackbot release", "start": "npx storybook dev -p 9001 --no-version-updates --no-open", From 153d7a369eaaf6ce8e15a8c23ce7178580b67d61 Mon Sep 17 00:00:00 2001 From: Adam Michael Thompson Date: Fri, 4 Apr 2025 18:59:28 -0400 Subject: [PATCH 16/48] update logging --- tools/build/src/typescript/downlevel/downlevel-dts.ts | 7 +++---- tools/build/src/typescript/downlevel/index.ts | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/tools/build/src/typescript/downlevel/downlevel-dts.ts b/tools/build/src/typescript/downlevel/downlevel-dts.ts index d1d46a4f5f..ee7a9cde40 100644 --- a/tools/build/src/typescript/downlevel/downlevel-dts.ts +++ b/tools/build/src/typescript/downlevel/downlevel-dts.ts @@ -40,10 +40,9 @@ export function downlevelDts(options?: DownlevelDtsOptions): void { process.exit(1); } - verbose && - console.log( - chalk.blue.bold(`Downleveling TypeScript declarations to TS ${target}`), - ); + console.log( + chalk.blue.bold(`Downleveling TypeScript declarations to TS ${target}`), + ); verbose && console.log(chalk.gray(`Input: ${typesDirPath}`)); verbose && console.log(chalk.gray(`Output: ${outputDirPath}`)); diff --git a/tools/build/src/typescript/downlevel/index.ts b/tools/build/src/typescript/downlevel/index.ts index 118c6aa168..8cd8e61636 100644 --- a/tools/build/src/typescript/downlevel/index.ts +++ b/tools/build/src/typescript/downlevel/index.ts @@ -14,7 +14,6 @@ interface DownlevelCommandOptions { */ export function runTypescriptDownlevel({ verbose }: DownlevelCommandOptions) { const packageDir = process.cwd(); - verbose && console.log(chalk.blue.bold('Building TypeScript for production')); const packageJson = fse.readJSONSync( path.join(packageDir, 'package.json'), @@ -24,6 +23,7 @@ export function runTypescriptDownlevel({ verbose }: DownlevelCommandOptions) { const downlevelVersions = getTypeVersions(typesVersions); if (downlevelVersions) { + verbose && console.log(chalk.blue.bold('Downleveling TypeScript')); downlevelVersions.forEach(target => { downlevelDts({ verbose, target }); }); From 90b690130a7f0762812ca746196d33919c87c640 Mon Sep 17 00:00:00 2001 From: Adam Michael Thompson Date: Fri, 4 Apr 2025 19:02:05 -0400 Subject: [PATCH 17/48] Update build-typescript-5.md --- .changeset/build-typescript-5.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/build-typescript-5.md b/.changeset/build-typescript-5.md index 9bee1c1a4c..921cedf7bd 100644 --- a/.changeset/build-typescript-5.md +++ b/.changeset/build-typescript-5.md @@ -3,4 +3,4 @@ --- - Upgrades to TS 5.0. -- Adds `--downlevel` option for `build-ts`. This option reads a package's package.json and exports downleveled `*.d.ts` files for all targets listed in `"typeVersions"` +- Adds `--downlevel` option for `build-ts`. This option reads a package's package.json and exports downleveled `*.d.ts` files for all targets listed in `"typesVersions"`. This uses [downlevel-dts](https://github.com/sandersn/downlevel-dts) under the hood. From 32ecdd90368097a20a3da955e218d43e6495c5ee Mon Sep 17 00:00:00 2001 From: Adam Michael Thompson Date: Fri, 4 Apr 2025 19:48:18 -0400 Subject: [PATCH 18/48] fix build build scripts --- tools/build/README.md | 2 +- tools/build/bin/build-ts.sh | 6 ++++++ tools/build/package.json | 7 ++++--- tools/build/scripts/build-ts.sh | 4 ++++ tools/build/scripts/build.sh | 4 ++++ tools/build/src/rollup/build-package.ts | 2 +- tools/build/src/typescript/downlevel/getTypeVersions.ts | 2 +- tools/build/src/typescript/downlevel/index.ts | 1 + 8 files changed, 22 insertions(+), 6 deletions(-) create mode 100755 tools/build/bin/build-ts.sh create mode 100755 tools/build/scripts/build-ts.sh create mode 100755 tools/build/scripts/build.sh diff --git a/tools/build/README.md b/tools/build/README.md index dff392023e..699b07fdc8 100644 --- a/tools/build/README.md +++ b/tools/build/README.md @@ -30,6 +30,6 @@ For a package that cli depends on, define the following scripts in its `package. ```json "scripts": { "build": "lg-internal-build-package", - "tsc": "tsc --build tsconfig.json" + "tsc": "lg-internal-build-ts" } ``` diff --git a/tools/build/bin/build-ts.sh b/tools/build/bin/build-ts.sh new file mode 100755 index 0000000000..0ec1d20a47 --- /dev/null +++ b/tools/build/bin/build-ts.sh @@ -0,0 +1,6 @@ +#!/bin/bash +# Build TypeScript files using the TypeScript CLI directly. +# We build this from a .sh script, since `tsc` doesn't take the same flags as our +# build-ts command. As a result, when trying to build with our custom flags, running this command directly will fail. +tsc --build tsconfig.json +exit 0 \ No newline at end of file diff --git a/tools/build/package.json b/tools/build/package.json index 1d36e20980..c0c12032ea 100644 --- a/tools/build/package.json +++ b/tools/build/package.json @@ -7,13 +7,14 @@ "access": "public" }, "bin": { - "lg-internal-build-package": "./bin/build-package.js" + "lg-internal-build-package": "./bin/build-package.js", + "lg-internal-build-ts": "./bin/build-ts.sh" }, "main": "dist/index.js", "module": "dist/esm/index.js", "scripts": { - "build": "rollup -c ./config/rollup.config.mjs", - "tsc": "tsc --build tsconfig.json" + "build": "scripts/build.sh", + "tsc": "scripts/build-ts.sh" }, "dependencies": { "@babel/core": "7.24.3", diff --git a/tools/build/scripts/build-ts.sh b/tools/build/scripts/build-ts.sh new file mode 100755 index 0000000000..f9fc590656 --- /dev/null +++ b/tools/build/scripts/build-ts.sh @@ -0,0 +1,4 @@ +#!/bin/bash +# lg-build can't use itself as a dependency in the build process +tsc --build tsconfig.json +exit 0 \ No newline at end of file diff --git a/tools/build/scripts/build.sh b/tools/build/scripts/build.sh new file mode 100755 index 0000000000..ef032b8f35 --- /dev/null +++ b/tools/build/scripts/build.sh @@ -0,0 +1,4 @@ +#!/bin/bash +# lg-build can't use itself as a dependency in the build process +rollup -c ./config/rollup.config.mjs +exit 0 diff --git a/tools/build/src/rollup/build-package.ts b/tools/build/src/rollup/build-package.ts index 448d647809..7cfb5f8e89 100644 --- a/tools/build/src/rollup/build-package.ts +++ b/tools/build/src/rollup/build-package.ts @@ -37,7 +37,7 @@ export function buildPackage({ direct, verbose }: BuildPackageOptions) { if (direct && scopeName !== 'tools') { console.warn( - 'Building package using the `lg-build-package` command directly from `@lg-tools/build`.', + `Building package @${scopeName}/${packageName} using the \`lg-internal-build-package\` command directly from \`@lg-tools/build\`.`, 'Consider using the global `lg build-package` command from `@lg-tools/cli` instead.', ); } diff --git a/tools/build/src/typescript/downlevel/getTypeVersions.ts b/tools/build/src/typescript/downlevel/getTypeVersions.ts index 47e32d4fac..1a420631e9 100644 --- a/tools/build/src/typescript/downlevel/getTypeVersions.ts +++ b/tools/build/src/typescript/downlevel/getTypeVersions.ts @@ -3,7 +3,7 @@ * and returns an array of version numbers without the 'ts' prefix. * @returns */ -const getTypeVersions = (typesVersions?: { +export const getTypeVersions = (typesVersions?: { [target: string]: { [files: string]: string[]; }; diff --git a/tools/build/src/typescript/downlevel/index.ts b/tools/build/src/typescript/downlevel/index.ts index 8cd8e61636..bb79b9b0b0 100644 --- a/tools/build/src/typescript/downlevel/index.ts +++ b/tools/build/src/typescript/downlevel/index.ts @@ -3,6 +3,7 @@ import path from 'path'; import fse from 'fs-extra'; import { downlevelDts } from './downlevel-dts'; +import { getTypeVersions } from './getTypeVersions'; interface DownlevelCommandOptions { verbose?: boolean; From c58669dd2f172655b759be963cade15a95340ff1 Mon Sep 17 00:00:00 2001 From: Adam Michael Thompson Date: Fri, 4 Apr 2025 19:48:31 -0400 Subject: [PATCH 19/48] "tsc": "lg-internal-build-ts" --- packages/testing-lib/package.json | 2 +- tools/cli/package.json | 2 +- tools/codemods/package.json | 2 +- tools/create/package.json | 2 +- tools/install/package.json | 2 +- tools/link/package.json | 2 +- tools/lint/package.json | 2 +- tools/meta/package.json | 2 +- tools/slackbot/package.json | 2 +- tools/storybook-addon/package.json | 2 +- tools/storybook-decorators/package.json | 2 +- tools/test-harnesses/package.json | 2 +- tools/test/package.json | 2 +- tools/update/package.json | 2 +- tools/validate/package.json | 2 +- 15 files changed, 15 insertions(+), 15 deletions(-) diff --git a/packages/testing-lib/package.json b/packages/testing-lib/package.json index fb39081bea..11a8affa97 100644 --- a/packages/testing-lib/package.json +++ b/packages/testing-lib/package.json @@ -30,7 +30,7 @@ }, "scripts": { "build": "lg-internal-build-package", - "tsc": "tsc --build tsconfig.json" + "tsc": "lg-internal-build-ts" }, "license": "Apache-2.0", "publishConfig": { diff --git a/tools/cli/package.json b/tools/cli/package.json index d6770b3d80..5846e18251 100644 --- a/tools/cli/package.json +++ b/tools/cli/package.json @@ -13,7 +13,7 @@ }, "scripts": { "build": "lg-internal-build-package", - "tsc": "tsc --build tsconfig.json" + "tsc": "lg-internal-build-ts" }, "dependencies": { "@lg-tools/build": "workspace:^", diff --git a/tools/codemods/package.json b/tools/codemods/package.json index 711b624c46..90277f31dd 100644 --- a/tools/codemods/package.json +++ b/tools/codemods/package.json @@ -8,7 +8,7 @@ "license": "Apache-2.0", "scripts": { "build": "lg-internal-build-package", - "tsc": "tsc --build tsconfig.json" + "tsc": "lg-internal-build-ts" }, "publishConfig": { "access": "public" diff --git a/tools/create/package.json b/tools/create/package.json index 32f258216b..9b50e303c1 100644 --- a/tools/create/package.json +++ b/tools/create/package.json @@ -10,7 +10,7 @@ }, "scripts": { "build": "lg-internal-build-package", - "tsc": "tsc --build tsconfig.json" + "tsc": "lg-internal-build-ts" }, "publishConfig": { "access": "public" diff --git a/tools/install/package.json b/tools/install/package.json index f65539ff84..f73349a46e 100644 --- a/tools/install/package.json +++ b/tools/install/package.json @@ -8,7 +8,7 @@ "license": "Apache-2.0", "scripts": { "build": "lg-internal-build-package", - "tsc": "tsc --build tsconfig.json" + "tsc": "lg-internal-build-ts" }, "publishConfig": { "access": "public" diff --git a/tools/link/package.json b/tools/link/package.json index f305d5364b..4c56d30bc8 100644 --- a/tools/link/package.json +++ b/tools/link/package.json @@ -7,7 +7,7 @@ "module": "dist/esm/index.js", "scripts": { "build": "lg-internal-build-package", - "tsc": "tsc --build tsconfig.json" + "tsc": "lg-internal-build-ts" }, "publishConfig": { "access": "public" diff --git a/tools/lint/package.json b/tools/lint/package.json index e57e7ce389..63828ef9c1 100644 --- a/tools/lint/package.json +++ b/tools/lint/package.json @@ -10,7 +10,7 @@ }, "scripts": { "build": "lg-internal-build-package", - "tsc": "tsc --build tsconfig.json" + "tsc": "lg-internal-build-ts" }, "dependencies": { "@babel/core": "7.23.2", diff --git a/tools/meta/package.json b/tools/meta/package.json index 2e963a8657..5be4d90729 100644 --- a/tools/meta/package.json +++ b/tools/meta/package.json @@ -10,7 +10,7 @@ }, "scripts": { "build": "lg-internal-build-package", - "tsc": "tsc --build tsconfig.json" + "tsc": "lg-internal-build-ts" }, "dependencies": { "@lg-tools/build": "workspace:^", diff --git a/tools/slackbot/package.json b/tools/slackbot/package.json index 16102f63e3..0f9eccd592 100644 --- a/tools/slackbot/package.json +++ b/tools/slackbot/package.json @@ -10,7 +10,7 @@ "module": "dist/esm/index.js", "scripts": { "build": "lg-internal-build-package", - "tsc": "tsc --build tsconfig.json" + "tsc": "lg-internal-build-ts" }, "publishConfig": { "access": "public" diff --git a/tools/storybook-addon/package.json b/tools/storybook-addon/package.json index 340b99ab9f..31edae9a92 100644 --- a/tools/storybook-addon/package.json +++ b/tools/storybook-addon/package.json @@ -8,7 +8,7 @@ "license": "Apache-2.0", "scripts": { "build": "lg-internal-build-package", - "tsc": "tsc --build tsconfig.json", + "tsc": "lg-internal-build-ts", "upgrade": "npx storybook@latest upgrade --config-dir ." }, "publishConfig": { diff --git a/tools/storybook-decorators/package.json b/tools/storybook-decorators/package.json index 13306dc2c6..5bd6a3b61c 100644 --- a/tools/storybook-decorators/package.json +++ b/tools/storybook-decorators/package.json @@ -8,7 +8,7 @@ "license": "Apache-2.0", "scripts": { "build": "lg-internal-build-package", - "tsc": "tsc --build tsconfig.json", + "tsc": "lg-internal-build-ts", "upgrade": "npx storybook@latest upgrade --config-dir ../storybook" }, "publishConfig": { diff --git a/tools/test-harnesses/package.json b/tools/test-harnesses/package.json index 3024b6722a..1619c5ca46 100644 --- a/tools/test-harnesses/package.json +++ b/tools/test-harnesses/package.json @@ -7,7 +7,7 @@ "module": "dist/esm/index.js", "scripts": { "build": "lg-internal-build-package", - "tsc": "tsc --build tsconfig.json" + "tsc": "lg-internal-build-ts" }, "publishConfig": { "access": "public" diff --git a/tools/test/package.json b/tools/test/package.json index 22d043dd96..b4c7177e08 100644 --- a/tools/test/package.json +++ b/tools/test/package.json @@ -7,7 +7,7 @@ "module": "dist/esm/index.js", "scripts": { "build": "lg-internal-build-package", - "tsc": "tsc --build tsconfig.json" + "tsc": "lg-internal-build-ts" }, "publishConfig": { "access": "public" diff --git a/tools/update/package.json b/tools/update/package.json index 5393059bfd..9bf4008577 100644 --- a/tools/update/package.json +++ b/tools/update/package.json @@ -12,7 +12,7 @@ }, "scripts": { "build": "lg-internal-build-package", - "tsc": "tsc --build tsconfig.json" + "tsc": "lg-internal-build-ts" }, "dependencies": { "@lg-tools/build": "workspace:^", diff --git a/tools/validate/package.json b/tools/validate/package.json index b6f042346a..8fccd65a27 100644 --- a/tools/validate/package.json +++ b/tools/validate/package.json @@ -10,7 +10,7 @@ }, "scripts": { "build": "lg-internal-build-package", - "tsc": "tsc --build tsconfig.json" + "tsc": "lg-internal-build-ts" }, "dependencies": { "@lg-tools/build": "workspace:^", From 2a0f25d16e1cf2de304c917bcabc48049e0d8cb7 Mon Sep 17 00:00:00 2001 From: Adam Michael Thompson Date: Fri, 4 Apr 2025 19:48:42 -0400 Subject: [PATCH 20/48] add downlevel to prepublish --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index d246e1200c..fbd9a853b9 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,7 @@ "build:cli": "turbo run build tsc --filter=@lg-tools/cli", "build:docs": "turbo run docs", "build:tsc": "turbo run tsc", + "build:tsc-downlevel": "turbo run tsc -- --downlevel", "build-storybook": "npx storybook build", "chromatic": "npx chromatic", "clean": "npm-run-all --parallel clean:*", @@ -26,7 +27,7 @@ "fix": "lg lint --fix", "link": "lg link", "lint": "lg lint", - "prepublishOnly": "pnpm run build && pnpm run build:tsc --downlevel && turbo run docs", + "prepublishOnly": "pnpm run build && pnpm run build:tsc-downlevel && turbo run docs", "publish": "pnpm changeset publish --public", "slackbot": "lg slackbot release", "start": "npx storybook dev -p 9001 --no-version-updates --no-open", From 5cde9cbd6f6b4faf0d4036fec5a61d02d2186843 Mon Sep 17 00:00:00 2001 From: Adam Michael Thompson Date: Fri, 4 Apr 2025 21:08:59 -0400 Subject: [PATCH 21/48] reset packagejson --- charts/drag-provider/package.json | 2 +- charts/series-provider/package.json | 2 +- chat/avatar/package.json | 7 +------ chat/chat-window/package.json | 7 +------ chat/input-bar/package.json | 7 +------ chat/leafygreen-chat-provider/package.json | 7 +------ chat/lg-markdown/package.json | 7 +------ chat/message-feed/package.json | 7 +------ chat/message-feedback/package.json | 7 +------ chat/message-rating/package.json | 7 +------ chat/message/package.json | 7 +------ chat/title-bar/package.json | 7 +------ packages/a11y/package.json | 7 +------ packages/avatar/package.json | 7 +------ packages/badge/package.json | 7 +------ packages/banner/package.json | 7 +------ packages/box/package.json | 7 +------ packages/button/package.json | 8 +------- packages/callout/package.json | 7 +------ packages/card/package.json | 7 +------ packages/checkbox/package.json | 7 +------ packages/code/package.json | 7 +------ packages/combobox/package.json | 7 +------ packages/confirmation-modal/package.json | 7 +------ packages/copyable/package.json | 7 +------ packages/emotion/package.json | 7 +------ packages/empty-state/package.json | 7 +------ packages/expandable-card/package.json | 7 +------ packages/form-footer/package.json | 7 +------ packages/guide-cue/package.json | 7 +------ packages/hooks/package.json | 7 +------ packages/icon-button/package.json | 7 +------ packages/icon/package.json | 7 +------ packages/inline-definition/package.json | 7 +------ packages/input-option/package.json | 7 +------ packages/leafygreen-provider/package.json | 7 +------ packages/lib/package.json | 7 +------ packages/loading-indicator/package.json | 7 +------ packages/logo/package.json | 7 +------ packages/marketing-modal/package.json | 7 +------ packages/menu/package.json | 7 +------ packages/modal/package.json | 7 +------ packages/number-input/package.json | 7 +------ packages/pagination/package.json | 7 +------ packages/palette/package.json | 7 +------ packages/password-input/package.json | 7 +------ packages/pipeline/package.json | 7 +------ packages/polymorphic/package.json | 10 ++-------- packages/popover/package.json | 7 +------ packages/portal/package.json | 7 +------ packages/radio-box-group/package.json | 7 +------ packages/radio-group/package.json | 7 +------ packages/ripple/package.json | 7 +------ packages/search-input/package.json | 7 +------ packages/segmented-control/package.json | 7 +------ packages/select/package.json | 7 +------ packages/side-nav/package.json | 7 +------ packages/skeleton-loader/package.json | 7 +------ packages/split-button/package.json | 7 +------ packages/stepper/package.json | 7 +------ packages/table/package.json | 7 +------ packages/tabs/package.json | 7 +------ packages/testing-lib/package.json | 9 ++------- packages/text-area/package.json | 7 +------ packages/text-input/package.json | 7 +------ packages/toast/package.json | 7 +------ packages/toggle/package.json | 7 +------ packages/tokens/package.json | 7 +------ packages/tooltip/package.json | 7 +------ packages/typography/package.json | 7 +------ tools/cli/package.json | 2 +- tools/codemods/package.json | 2 +- tools/create/package.json | 5 +---- tools/install/package.json | 2 +- tools/link/package.json | 2 +- tools/lint/package.json | 4 ++-- tools/meta/package.json | 2 +- tools/slackbot/package.json | 2 +- tools/storybook-addon/package.json | 3 ++- tools/storybook-decorators/package.json | 2 +- tools/test-harnesses/package.json | 2 +- tools/test/package.json | 2 +- tools/update/package.json | 5 +---- tools/validate/package.json | 2 +- 84 files changed, 88 insertions(+), 435 deletions(-) diff --git a/charts/drag-provider/package.json b/charts/drag-provider/package.json index 658f8e2730..e2f94b1a09 100644 --- a/charts/drag-provider/package.json +++ b/charts/drag-provider/package.json @@ -33,4 +33,4 @@ "devDependencies": { "@storybook/test": "8.5.3" } -} +} \ No newline at end of file diff --git a/charts/series-provider/package.json b/charts/series-provider/package.json index a6b555ee26..17d15e450b 100644 --- a/charts/series-provider/package.json +++ b/charts/series-provider/package.json @@ -24,4 +24,4 @@ "peerDependencies": { "@leafygreen-ui/leafygreen-provider": "workspace:^" } -} +} \ No newline at end of file diff --git a/chat/avatar/package.json b/chat/avatar/package.json index fe97546201..592d22dd9d 100644 --- a/chat/avatar/package.json +++ b/chat/avatar/package.json @@ -8,12 +8,7 @@ "typesVersions": { "<3.9": { "*": [ - "dist/ts3.4/*" - ] - }, - "<5.0": { - "*": [ - "dist/ts4.9/*" + "ts3.4/*" ] } }, diff --git a/chat/chat-window/package.json b/chat/chat-window/package.json index a6a798e3a9..28c34d1bce 100644 --- a/chat/chat-window/package.json +++ b/chat/chat-window/package.json @@ -8,12 +8,7 @@ "typesVersions": { "<3.9": { "*": [ - "dist/ts3.4/*" - ] - }, - "<5.0": { - "*": [ - "dist/ts4.9/*" + "ts3.4/*" ] } }, diff --git a/chat/input-bar/package.json b/chat/input-bar/package.json index f0cac24cbd..641137548b 100644 --- a/chat/input-bar/package.json +++ b/chat/input-bar/package.json @@ -8,12 +8,7 @@ "typesVersions": { "<3.9": { "*": [ - "dist/ts3.4/*" - ] - }, - "<5.0": { - "*": [ - "dist/ts4.9/*" + "ts3.4/*" ] } }, diff --git a/chat/leafygreen-chat-provider/package.json b/chat/leafygreen-chat-provider/package.json index 7cb2e33ff2..31a3923019 100644 --- a/chat/leafygreen-chat-provider/package.json +++ b/chat/leafygreen-chat-provider/package.json @@ -8,12 +8,7 @@ "typesVersions": { "<3.9": { "*": [ - "dist/ts3.4/*" - ] - }, - "<5.0": { - "*": [ - "dist/ts4.9/*" + "ts3.4/*" ] } }, diff --git a/chat/lg-markdown/package.json b/chat/lg-markdown/package.json index 4b789d6531..3f09a6cced 100644 --- a/chat/lg-markdown/package.json +++ b/chat/lg-markdown/package.json @@ -8,12 +8,7 @@ "typesVersions": { "<3.9": { "*": [ - "dist/ts3.4/*" - ] - }, - "<5.0": { - "*": [ - "dist/ts4.9/*" + "ts3.4/*" ] } }, diff --git a/chat/message-feed/package.json b/chat/message-feed/package.json index c29fd842dd..cedd039782 100644 --- a/chat/message-feed/package.json +++ b/chat/message-feed/package.json @@ -8,12 +8,7 @@ "typesVersions": { "<3.9": { "*": [ - "dist/ts3.4/*" - ] - }, - "<5.0": { - "*": [ - "dist/ts4.9/*" + "ts3.4/*" ] } }, diff --git a/chat/message-feedback/package.json b/chat/message-feedback/package.json index 98ccccd24e..7d80507727 100644 --- a/chat/message-feedback/package.json +++ b/chat/message-feedback/package.json @@ -8,12 +8,7 @@ "typesVersions": { "<3.9": { "*": [ - "dist/ts3.4/*" - ] - }, - "<5.0": { - "*": [ - "dist/ts4.9/*" + "ts3.4/*" ] } }, diff --git a/chat/message-rating/package.json b/chat/message-rating/package.json index cc7094a856..ef2886e9ac 100644 --- a/chat/message-rating/package.json +++ b/chat/message-rating/package.json @@ -8,12 +8,7 @@ "typesVersions": { "<3.9": { "*": [ - "dist/ts3.4/*" - ] - }, - "<5.0": { - "*": [ - "dist/ts4.9/*" + "ts3.4/*" ] } }, diff --git a/chat/message/package.json b/chat/message/package.json index f52253856b..198e756ea3 100644 --- a/chat/message/package.json +++ b/chat/message/package.json @@ -8,12 +8,7 @@ "typesVersions": { "<3.9": { "*": [ - "dist/ts3.4/*" - ] - }, - "<5.0": { - "*": [ - "dist/ts4.9/*" + "ts3.4/*" ] } }, diff --git a/chat/title-bar/package.json b/chat/title-bar/package.json index 785447edf4..df5ee0e689 100644 --- a/chat/title-bar/package.json +++ b/chat/title-bar/package.json @@ -8,12 +8,7 @@ "typesVersions": { "<3.9": { "*": [ - "dist/ts3.4/*" - ] - }, - "<5.0": { - "*": [ - "dist/ts4.9/*" + "ts3.4/*" ] } }, diff --git a/packages/a11y/package.json b/packages/a11y/package.json index 93ac204d57..7b690501ab 100644 --- a/packages/a11y/package.json +++ b/packages/a11y/package.json @@ -8,12 +8,7 @@ "typesVersions": { "<3.9": { "*": [ - "dist/ts3.4/*" - ] - }, - "<5.0": { - "*": [ - "dist/ts4.9/*" + "ts3.4/*" ] } }, diff --git a/packages/avatar/package.json b/packages/avatar/package.json index e551ab81ee..f1c92e9617 100644 --- a/packages/avatar/package.json +++ b/packages/avatar/package.json @@ -8,12 +8,7 @@ "typesVersions": { "<3.9": { "*": [ - "dist/ts3.4/*" - ] - }, - "<5.0": { - "*": [ - "dist/ts4.9/*" + "ts3.4/*" ] } }, diff --git a/packages/badge/package.json b/packages/badge/package.json index 75d90339ec..fe2eba011d 100644 --- a/packages/badge/package.json +++ b/packages/badge/package.json @@ -8,12 +8,7 @@ "typesVersions": { "<3.9": { "*": [ - "dist/ts3.4/*" - ] - }, - "<5.0": { - "*": [ - "dist/ts4.9/*" + "ts3.4/*" ] } }, diff --git a/packages/banner/package.json b/packages/banner/package.json index 7ac9771b66..e52997bd12 100644 --- a/packages/banner/package.json +++ b/packages/banner/package.json @@ -8,12 +8,7 @@ "typesVersions": { "<3.9": { "*": [ - "dist/ts3.4/*" - ] - }, - "<5.0": { - "*": [ - "dist/ts4.9/*" + "ts3.4/*" ] } }, diff --git a/packages/box/package.json b/packages/box/package.json index c6f8bc338b..cfd4328a7b 100644 --- a/packages/box/package.json +++ b/packages/box/package.json @@ -8,12 +8,7 @@ "typesVersions": { "<3.9": { "*": [ - "dist/ts3.4/*" - ] - }, - "<5.0": { - "*": [ - "dist/ts4.9/*" + "ts3.4/*" ] } }, diff --git a/packages/button/package.json b/packages/button/package.json index 8fba3e8cdf..a0d334afae 100644 --- a/packages/button/package.json +++ b/packages/button/package.json @@ -8,12 +8,7 @@ "typesVersions": { "<3.9": { "*": [ - "dist/ts3.4/*" - ] - }, - "<5.0": { - "*": [ - "dist/ts4.9/*" + "ts3.4/*" ] } }, @@ -37,7 +32,6 @@ "polished": "^4.2.2" }, "devDependencies": { - "next": "^13.0.5", "@leafygreen-ui/icon": "workspace:^", "@leafygreen-ui/loading-indicator": "workspace:^" }, diff --git a/packages/callout/package.json b/packages/callout/package.json index 8ef7743809..4c877be2af 100644 --- a/packages/callout/package.json +++ b/packages/callout/package.json @@ -8,12 +8,7 @@ "typesVersions": { "<3.9": { "*": [ - "dist/ts3.4/*" - ] - }, - "<5.0": { - "*": [ - "dist/ts4.9/*" + "ts3.4/*" ] } }, diff --git a/packages/card/package.json b/packages/card/package.json index 6085304701..e90f6cdb1b 100644 --- a/packages/card/package.json +++ b/packages/card/package.json @@ -8,12 +8,7 @@ "typesVersions": { "<3.9": { "*": [ - "dist/ts3.4/*" - ] - }, - "<5.0": { - "*": [ - "dist/ts4.9/*" + "ts3.4/*" ] } }, diff --git a/packages/checkbox/package.json b/packages/checkbox/package.json index 8a36f9996b..4eb375ad9e 100644 --- a/packages/checkbox/package.json +++ b/packages/checkbox/package.json @@ -8,12 +8,7 @@ "typesVersions": { "<3.9": { "*": [ - "dist/ts3.4/*" - ] - }, - "<5.0": { - "*": [ - "dist/ts4.9/*" + "ts3.4/*" ] } }, diff --git a/packages/code/package.json b/packages/code/package.json index 48cdd8fa4f..a896381343 100644 --- a/packages/code/package.json +++ b/packages/code/package.json @@ -8,12 +8,7 @@ "typesVersions": { "<3.9": { "*": [ - "dist/ts3.4/*" - ] - }, - "<5.0": { - "*": [ - "dist/ts4.9/*" + "ts3.4/*" ] } }, diff --git a/packages/combobox/package.json b/packages/combobox/package.json index fdedbf56d0..e223a9ef79 100644 --- a/packages/combobox/package.json +++ b/packages/combobox/package.json @@ -8,12 +8,7 @@ "typesVersions": { "<3.9": { "*": [ - "dist/ts3.4/*" - ] - }, - "<5.0": { - "*": [ - "dist/ts4.9/*" + "ts3.4/*" ] } }, diff --git a/packages/confirmation-modal/package.json b/packages/confirmation-modal/package.json index d57ed5f41e..efd3632da8 100644 --- a/packages/confirmation-modal/package.json +++ b/packages/confirmation-modal/package.json @@ -8,12 +8,7 @@ "typesVersions": { "<3.9": { "*": [ - "dist/ts3.4/*" - ] - }, - "<5.0": { - "*": [ - "dist/ts4.9/*" + "ts3.4/*" ] } }, diff --git a/packages/copyable/package.json b/packages/copyable/package.json index 0b441b2adc..6267a0d7ce 100644 --- a/packages/copyable/package.json +++ b/packages/copyable/package.json @@ -8,12 +8,7 @@ "typesVersions": { "<3.9": { "*": [ - "dist/ts3.4/*" - ] - }, - "<5.0": { - "*": [ - "dist/ts4.9/*" + "ts3.4/*" ] } }, diff --git a/packages/emotion/package.json b/packages/emotion/package.json index cb76457e53..133eaaf9e0 100644 --- a/packages/emotion/package.json +++ b/packages/emotion/package.json @@ -8,12 +8,7 @@ "typesVersions": { "<3.9": { "*": [ - "dist/ts3.4/*" - ] - }, - "<5.0": { - "*": [ - "dist/ts4.9/*" + "ts3.4/*" ] } }, diff --git a/packages/empty-state/package.json b/packages/empty-state/package.json index 684031867a..1fc5f89da2 100644 --- a/packages/empty-state/package.json +++ b/packages/empty-state/package.json @@ -8,12 +8,7 @@ "typesVersions": { "<3.9": { "*": [ - "dist/ts3.4/*" - ] - }, - "<5.0": { - "*": [ - "dist/ts4.9/*" + "ts3.4/*" ] } }, diff --git a/packages/expandable-card/package.json b/packages/expandable-card/package.json index 9444c110c6..eccb7e7714 100644 --- a/packages/expandable-card/package.json +++ b/packages/expandable-card/package.json @@ -8,12 +8,7 @@ "typesVersions": { "<3.9": { "*": [ - "dist/ts3.4/*" - ] - }, - "<5.0": { - "*": [ - "dist/ts4.9/*" + "ts3.4/*" ] } }, diff --git a/packages/form-footer/package.json b/packages/form-footer/package.json index 4d033624a1..0cabe992bb 100644 --- a/packages/form-footer/package.json +++ b/packages/form-footer/package.json @@ -8,12 +8,7 @@ "typesVersions": { "<3.9": { "*": [ - "dist/ts3.4/*" - ] - }, - "<5.0": { - "*": [ - "dist/ts4.9/*" + "ts3.4/*" ] } }, diff --git a/packages/guide-cue/package.json b/packages/guide-cue/package.json index 9b4e0b61c9..992aef4a04 100644 --- a/packages/guide-cue/package.json +++ b/packages/guide-cue/package.json @@ -8,12 +8,7 @@ "typesVersions": { "<3.9": { "*": [ - "dist/ts3.4/*" - ] - }, - "<5.0": { - "*": [ - "dist/ts4.9/*" + "ts3.4/*" ] } }, diff --git a/packages/hooks/package.json b/packages/hooks/package.json index c307d59d00..e2dfbe2058 100644 --- a/packages/hooks/package.json +++ b/packages/hooks/package.json @@ -8,12 +8,7 @@ "typesVersions": { "<3.9": { "*": [ - "dist/ts3.4/*" - ] - }, - "<5.0": { - "*": [ - "dist/ts4.9/*" + "ts3.4/*" ] } }, diff --git a/packages/icon-button/package.json b/packages/icon-button/package.json index f7796d1c1f..bc3b99bd26 100644 --- a/packages/icon-button/package.json +++ b/packages/icon-button/package.json @@ -8,12 +8,7 @@ "typesVersions": { "<3.9": { "*": [ - "dist/ts3.4/*" - ] - }, - "<5.0": { - "*": [ - "dist/ts4.9/*" + "ts3.4/*" ] } }, diff --git a/packages/icon/package.json b/packages/icon/package.json index 2b5fe0b049..5b439718e7 100644 --- a/packages/icon/package.json +++ b/packages/icon/package.json @@ -8,12 +8,7 @@ "typesVersions": { "<3.9": { "*": [ - "dist/ts3.4/*" - ] - }, - "<5.0": { - "*": [ - "dist/ts4.9/*" + "ts3.4/*" ] } }, diff --git a/packages/inline-definition/package.json b/packages/inline-definition/package.json index c765f07830..3cc80898e3 100644 --- a/packages/inline-definition/package.json +++ b/packages/inline-definition/package.json @@ -8,12 +8,7 @@ "typesVersions": { "<3.9": { "*": [ - "dist/ts3.4/*" - ] - }, - "<5.0": { - "*": [ - "dist/ts4.9/*" + "ts3.4/*" ] } }, diff --git a/packages/input-option/package.json b/packages/input-option/package.json index 46ac7fe335..940cdd0d22 100644 --- a/packages/input-option/package.json +++ b/packages/input-option/package.json @@ -8,12 +8,7 @@ "typesVersions": { "<3.9": { "*": [ - "dist/ts3.4/*" - ] - }, - "<5.0": { - "*": [ - "dist/ts4.9/*" + "ts3.4/*" ] } }, diff --git a/packages/leafygreen-provider/package.json b/packages/leafygreen-provider/package.json index b77750535e..d443b5ac1d 100644 --- a/packages/leafygreen-provider/package.json +++ b/packages/leafygreen-provider/package.json @@ -8,12 +8,7 @@ "typesVersions": { "<3.9": { "*": [ - "dist/ts3.4/*" - ] - }, - "<5.0": { - "*": [ - "dist/ts4.9/*" + "ts3.4/*" ] } }, diff --git a/packages/lib/package.json b/packages/lib/package.json index d2e543d86d..3a920df9a5 100644 --- a/packages/lib/package.json +++ b/packages/lib/package.json @@ -8,12 +8,7 @@ "typesVersions": { "<3.9": { "*": [ - "dist/ts3.4/*" - ] - }, - "<5.0": { - "*": [ - "dist/ts4.9/*" + "ts3.4/*" ] } }, diff --git a/packages/loading-indicator/package.json b/packages/loading-indicator/package.json index 8b35dfb171..e4a94565ff 100644 --- a/packages/loading-indicator/package.json +++ b/packages/loading-indicator/package.json @@ -8,12 +8,7 @@ "typesVersions": { "<3.9": { "*": [ - "dist/ts3.4/*" - ] - }, - "<5.0": { - "*": [ - "dist/ts4.9/*" + "ts3.4/*" ] } }, diff --git a/packages/logo/package.json b/packages/logo/package.json index 242b17a90f..4b227545e2 100644 --- a/packages/logo/package.json +++ b/packages/logo/package.json @@ -8,12 +8,7 @@ "typesVersions": { "<3.9": { "*": [ - "dist/ts3.4/*" - ] - }, - "<5.0": { - "*": [ - "dist/ts4.9/*" + "ts3.4/*" ] } }, diff --git a/packages/marketing-modal/package.json b/packages/marketing-modal/package.json index 6f928fa68a..988f153f45 100644 --- a/packages/marketing-modal/package.json +++ b/packages/marketing-modal/package.json @@ -8,12 +8,7 @@ "typesVersions": { "<3.9": { "*": [ - "dist/ts3.4/*" - ] - }, - "<5.0": { - "*": [ - "dist/ts4.9/*" + "ts3.4/*" ] } }, diff --git a/packages/menu/package.json b/packages/menu/package.json index 4654c29b40..9ab50fb613 100644 --- a/packages/menu/package.json +++ b/packages/menu/package.json @@ -8,12 +8,7 @@ "typesVersions": { "<3.9": { "*": [ - "dist/ts3.4/*" - ] - }, - "<5.0": { - "*": [ - "dist/ts4.9/*" + "ts3.4/*" ] } }, diff --git a/packages/modal/package.json b/packages/modal/package.json index dd83618354..7d658c21fd 100644 --- a/packages/modal/package.json +++ b/packages/modal/package.json @@ -8,12 +8,7 @@ "typesVersions": { "<3.9": { "*": [ - "dist/ts3.4/*" - ] - }, - "<5.0": { - "*": [ - "dist/ts4.9/*" + "ts3.4/*" ] } }, diff --git a/packages/number-input/package.json b/packages/number-input/package.json index 627e703d51..eef83572b4 100644 --- a/packages/number-input/package.json +++ b/packages/number-input/package.json @@ -8,12 +8,7 @@ "typesVersions": { "<3.9": { "*": [ - "dist/ts3.4/*" - ] - }, - "<5.0": { - "*": [ - "dist/ts4.9/*" + "ts3.4/*" ] } }, diff --git a/packages/pagination/package.json b/packages/pagination/package.json index 7a72b38ae8..8edf823ce3 100644 --- a/packages/pagination/package.json +++ b/packages/pagination/package.json @@ -8,12 +8,7 @@ "typesVersions": { "<3.9": { "*": [ - "dist/ts3.4/*" - ] - }, - "<5.0": { - "*": [ - "dist/ts4.9/*" + "ts3.4/*" ] } }, diff --git a/packages/palette/package.json b/packages/palette/package.json index ebcc1fdada..a091ce3af7 100644 --- a/packages/palette/package.json +++ b/packages/palette/package.json @@ -8,12 +8,7 @@ "typesVersions": { "<3.9": { "*": [ - "dist/ts3.4/*" - ] - }, - "<5.0": { - "*": [ - "dist/ts4.9/*" + "ts3.4/*" ] } }, diff --git a/packages/password-input/package.json b/packages/password-input/package.json index 959133ec09..1793ff72e2 100644 --- a/packages/password-input/package.json +++ b/packages/password-input/package.json @@ -8,12 +8,7 @@ "typesVersions": { "<3.9": { "*": [ - "dist/ts3.4/*" - ] - }, - "<5.0": { - "*": [ - "dist/ts4.9/*" + "ts3.4/*" ] } }, diff --git a/packages/pipeline/package.json b/packages/pipeline/package.json index 0f082cae8b..326e810bde 100644 --- a/packages/pipeline/package.json +++ b/packages/pipeline/package.json @@ -8,12 +8,7 @@ "typesVersions": { "<3.9": { "*": [ - "dist/ts3.4/*" - ] - }, - "<5.0": { - "*": [ - "dist/ts4.9/*" + "ts3.4/*" ] } }, diff --git a/packages/polymorphic/package.json b/packages/polymorphic/package.json index 9c3a57c77a..3fa1a2133f 100644 --- a/packages/polymorphic/package.json +++ b/packages/polymorphic/package.json @@ -8,12 +8,7 @@ "typesVersions": { "<3.9": { "*": [ - "dist/ts3.4/*" - ] - }, - "<5.0": { - "*": [ - "dist/ts4.9/*" + "ts3.4/*" ] } }, @@ -35,8 +30,7 @@ "access": "public" }, "devDependencies": { - "@emotion/styled": "^11.10.5", - "next": "^13.1.6" + "@emotion/styled": "^11.10.5" }, "dependencies": { "@leafygreen-ui/lib": "workspace:^", diff --git a/packages/popover/package.json b/packages/popover/package.json index 6d0c55dc09..941d1c73aa 100644 --- a/packages/popover/package.json +++ b/packages/popover/package.json @@ -8,12 +8,7 @@ "typesVersions": { "<3.9": { "*": [ - "dist/ts3.4/*" - ] - }, - "<5.0": { - "*": [ - "dist/ts4.9/*" + "ts3.4/*" ] } }, diff --git a/packages/portal/package.json b/packages/portal/package.json index 4d5d06d1e7..3d8eda830e 100644 --- a/packages/portal/package.json +++ b/packages/portal/package.json @@ -8,12 +8,7 @@ "typesVersions": { "<3.9": { "*": [ - "dist/ts3.4/*" - ] - }, - "<5.0": { - "*": [ - "dist/ts4.9/*" + "ts3.4/*" ] } }, diff --git a/packages/radio-box-group/package.json b/packages/radio-box-group/package.json index bc2c3a8011..c8a925192d 100644 --- a/packages/radio-box-group/package.json +++ b/packages/radio-box-group/package.json @@ -8,12 +8,7 @@ "typesVersions": { "<3.9": { "*": [ - "dist/ts3.4/*" - ] - }, - "<5.0": { - "*": [ - "dist/ts4.9/*" + "ts3.4/*" ] } }, diff --git a/packages/radio-group/package.json b/packages/radio-group/package.json index 24fcfec569..b33c6b3fb5 100644 --- a/packages/radio-group/package.json +++ b/packages/radio-group/package.json @@ -8,12 +8,7 @@ "typesVersions": { "<3.9": { "*": [ - "dist/ts3.4/*" - ] - }, - "<5.0": { - "*": [ - "dist/ts4.9/*" + "ts3.4/*" ] } }, diff --git a/packages/ripple/package.json b/packages/ripple/package.json index 06e60b90e3..9cff01ff3d 100644 --- a/packages/ripple/package.json +++ b/packages/ripple/package.json @@ -8,12 +8,7 @@ "typesVersions": { "<3.9": { "*": [ - "dist/ts3.4/*" - ] - }, - "<5.0": { - "*": [ - "dist/ts4.9/*" + "ts3.4/*" ] } }, diff --git a/packages/search-input/package.json b/packages/search-input/package.json index 3113e4c7aa..7ac8259dca 100644 --- a/packages/search-input/package.json +++ b/packages/search-input/package.json @@ -8,12 +8,7 @@ "typesVersions": { "<3.9": { "*": [ - "dist/ts3.4/*" - ] - }, - "<5.0": { - "*": [ - "dist/ts4.9/*" + "ts3.4/*" ] } }, diff --git a/packages/segmented-control/package.json b/packages/segmented-control/package.json index b083706dae..a7cef7a06d 100644 --- a/packages/segmented-control/package.json +++ b/packages/segmented-control/package.json @@ -8,12 +8,7 @@ "typesVersions": { "<3.9": { "*": [ - "dist/ts3.4/*" - ] - }, - "<5.0": { - "*": [ - "dist/ts4.9/*" + "ts3.4/*" ] } }, diff --git a/packages/select/package.json b/packages/select/package.json index 40b7bae87a..52d4c97ddc 100644 --- a/packages/select/package.json +++ b/packages/select/package.json @@ -8,12 +8,7 @@ "typesVersions": { "<3.9": { "*": [ - "dist/ts3.4/*" - ] - }, - "<5.0": { - "*": [ - "dist/ts4.9/*" + "ts3.4/*" ] } }, diff --git a/packages/side-nav/package.json b/packages/side-nav/package.json index d4e96883a8..3ff73cd1f7 100644 --- a/packages/side-nav/package.json +++ b/packages/side-nav/package.json @@ -8,12 +8,7 @@ "typesVersions": { "<3.9": { "*": [ - "dist/ts3.4/*" - ] - }, - "<5.0": { - "*": [ - "dist/ts4.9/*" + "ts3.4/*" ] } }, diff --git a/packages/skeleton-loader/package.json b/packages/skeleton-loader/package.json index 277a777ebd..d63c30ff59 100644 --- a/packages/skeleton-loader/package.json +++ b/packages/skeleton-loader/package.json @@ -8,12 +8,7 @@ "typesVersions": { "<3.9": { "*": [ - "dist/ts3.4/*" - ] - }, - "<5.0": { - "*": [ - "dist/ts4.9/*" + "ts3.4/*" ] } }, diff --git a/packages/split-button/package.json b/packages/split-button/package.json index 4309f244f4..3fbd8183bb 100644 --- a/packages/split-button/package.json +++ b/packages/split-button/package.json @@ -8,12 +8,7 @@ "typesVersions": { "<3.9": { "*": [ - "dist/ts3.4/*" - ] - }, - "<5.0": { - "*": [ - "dist/ts4.9/*" + "ts3.4/*" ] } }, diff --git a/packages/stepper/package.json b/packages/stepper/package.json index f27cc6b5d7..50f4252f5f 100644 --- a/packages/stepper/package.json +++ b/packages/stepper/package.json @@ -8,12 +8,7 @@ "typesVersions": { "<3.9": { "*": [ - "dist/ts3.4/*" - ] - }, - "<5.0": { - "*": [ - "dist/ts4.9/*" + "ts3.4/*" ] } }, diff --git a/packages/table/package.json b/packages/table/package.json index c42d28f467..14fdfe5c69 100644 --- a/packages/table/package.json +++ b/packages/table/package.json @@ -8,12 +8,7 @@ "typesVersions": { "<3.9": { "*": [ - "dist/ts3.4/*" - ] - }, - "<5.0": { - "*": [ - "dist/ts4.9/*" + "ts3.4/*" ] } }, diff --git a/packages/tabs/package.json b/packages/tabs/package.json index 78964c1785..5127a9af46 100644 --- a/packages/tabs/package.json +++ b/packages/tabs/package.json @@ -8,12 +8,7 @@ "typesVersions": { "<3.9": { "*": [ - "dist/ts3.4/*" - ] - }, - "<5.0": { - "*": [ - "dist/ts4.9/*" + "ts3.4/*" ] } }, diff --git a/packages/testing-lib/package.json b/packages/testing-lib/package.json index 11a8affa97..496d03f335 100644 --- a/packages/testing-lib/package.json +++ b/packages/testing-lib/package.json @@ -8,12 +8,7 @@ "typesVersions": { "<3.9": { "*": [ - "dist/ts3.4/*" - ] - }, - "<5.0": { - "*": [ - "dist/ts4.9/*" + "ts3.4/*" ] } }, @@ -30,7 +25,7 @@ }, "scripts": { "build": "lg-internal-build-package", - "tsc": "lg-internal-build-ts" + "tsc": "tsc --build tsconfig.json" }, "license": "Apache-2.0", "publishConfig": { diff --git a/packages/text-area/package.json b/packages/text-area/package.json index 93983c49b8..d0f4a5c2f7 100644 --- a/packages/text-area/package.json +++ b/packages/text-area/package.json @@ -8,12 +8,7 @@ "typesVersions": { "<3.9": { "*": [ - "dist/ts3.4/*" - ] - }, - "<5.0": { - "*": [ - "dist/ts4.9/*" + "ts3.4/*" ] } }, diff --git a/packages/text-input/package.json b/packages/text-input/package.json index ffd7709fb3..f240b4e99f 100644 --- a/packages/text-input/package.json +++ b/packages/text-input/package.json @@ -8,12 +8,7 @@ "typesVersions": { "<3.9": { "*": [ - "dist/ts3.4/*" - ] - }, - "<5.0": { - "*": [ - "dist/ts4.9/*" + "ts3.4/*" ] } }, diff --git a/packages/toast/package.json b/packages/toast/package.json index f5695257fa..2f18dfa4eb 100644 --- a/packages/toast/package.json +++ b/packages/toast/package.json @@ -8,12 +8,7 @@ "typesVersions": { "<3.9": { "*": [ - "dist/ts3.4/*" - ] - }, - "<5.0": { - "*": [ - "dist/ts4.9/*" + "ts3.4/*" ] } }, diff --git a/packages/toggle/package.json b/packages/toggle/package.json index ebe90c19fb..6129b78423 100644 --- a/packages/toggle/package.json +++ b/packages/toggle/package.json @@ -8,12 +8,7 @@ "typesVersions": { "<3.9": { "*": [ - "dist/ts3.4/*" - ] - }, - "<5.0": { - "*": [ - "dist/ts4.9/*" + "ts3.4/*" ] } }, diff --git a/packages/tokens/package.json b/packages/tokens/package.json index 8b07696494..adec06cb89 100644 --- a/packages/tokens/package.json +++ b/packages/tokens/package.json @@ -8,12 +8,7 @@ "typesVersions": { "<3.9": { "*": [ - "dist/ts3.4/*" - ] - }, - "<5.0": { - "*": [ - "dist/ts4.9/*" + "ts3.4/*" ] } }, diff --git a/packages/tooltip/package.json b/packages/tooltip/package.json index 8c328b45cc..5480d779c8 100644 --- a/packages/tooltip/package.json +++ b/packages/tooltip/package.json @@ -8,12 +8,7 @@ "typesVersions": { "<3.9": { "*": [ - "dist/ts3.4/*" - ] - }, - "<5.0": { - "*": [ - "dist/ts4.9/*" + "ts3.4/*" ] } }, diff --git a/packages/typography/package.json b/packages/typography/package.json index c2fdc5fd3a..10cc378d91 100644 --- a/packages/typography/package.json +++ b/packages/typography/package.json @@ -8,12 +8,7 @@ "typesVersions": { "<3.9": { "*": [ - "dist/ts3.4/*" - ] - }, - "<5.0": { - "*": [ - "dist/ts4.9/*" + "ts3.4/*" ] } }, diff --git a/tools/cli/package.json b/tools/cli/package.json index 5846e18251..d6770b3d80 100644 --- a/tools/cli/package.json +++ b/tools/cli/package.json @@ -13,7 +13,7 @@ }, "scripts": { "build": "lg-internal-build-package", - "tsc": "lg-internal-build-ts" + "tsc": "tsc --build tsconfig.json" }, "dependencies": { "@lg-tools/build": "workspace:^", diff --git a/tools/codemods/package.json b/tools/codemods/package.json index 90277f31dd..711b624c46 100644 --- a/tools/codemods/package.json +++ b/tools/codemods/package.json @@ -8,7 +8,7 @@ "license": "Apache-2.0", "scripts": { "build": "lg-internal-build-package", - "tsc": "lg-internal-build-ts" + "tsc": "tsc --build tsconfig.json" }, "publishConfig": { "access": "public" diff --git a/tools/create/package.json b/tools/create/package.json index 9b50e303c1..7f93c036ee 100644 --- a/tools/create/package.json +++ b/tools/create/package.json @@ -5,12 +5,9 @@ "main": "dist/index.js", "module": "dist/esm/index.js", "license": "Apache-2.0", - "bin": { - "lg-create": "./dist/legacy-create.js" - }, "scripts": { "build": "lg-internal-build-package", - "tsc": "lg-internal-build-ts" + "tsc": "tsc --build tsconfig.json" }, "publishConfig": { "access": "public" diff --git a/tools/install/package.json b/tools/install/package.json index f73349a46e..f65539ff84 100644 --- a/tools/install/package.json +++ b/tools/install/package.json @@ -8,7 +8,7 @@ "license": "Apache-2.0", "scripts": { "build": "lg-internal-build-package", - "tsc": "lg-internal-build-ts" + "tsc": "tsc --build tsconfig.json" }, "publishConfig": { "access": "public" diff --git a/tools/link/package.json b/tools/link/package.json index 4c56d30bc8..f305d5364b 100644 --- a/tools/link/package.json +++ b/tools/link/package.json @@ -7,7 +7,7 @@ "module": "dist/esm/index.js", "scripts": { "build": "lg-internal-build-package", - "tsc": "lg-internal-build-ts" + "tsc": "tsc --build tsconfig.json" }, "publishConfig": { "access": "public" diff --git a/tools/lint/package.json b/tools/lint/package.json index 63828ef9c1..e4c0cfb994 100644 --- a/tools/lint/package.json +++ b/tools/lint/package.json @@ -10,7 +10,7 @@ }, "scripts": { "build": "lg-internal-build-package", - "tsc": "lg-internal-build-ts" + "tsc": "tsc --build tsconfig.json" }, "dependencies": { "@babel/core": "7.23.2", @@ -40,6 +40,6 @@ "prettier": "2.8.8" }, "peerDependencies": { - "typescript": "~5.0.0" + "typescript": "~4.9.0" } } diff --git a/tools/meta/package.json b/tools/meta/package.json index 5be4d90729..2e963a8657 100644 --- a/tools/meta/package.json +++ b/tools/meta/package.json @@ -10,7 +10,7 @@ }, "scripts": { "build": "lg-internal-build-package", - "tsc": "lg-internal-build-ts" + "tsc": "tsc --build tsconfig.json" }, "dependencies": { "@lg-tools/build": "workspace:^", diff --git a/tools/slackbot/package.json b/tools/slackbot/package.json index 0f9eccd592..16102f63e3 100644 --- a/tools/slackbot/package.json +++ b/tools/slackbot/package.json @@ -10,7 +10,7 @@ "module": "dist/esm/index.js", "scripts": { "build": "lg-internal-build-package", - "tsc": "lg-internal-build-ts" + "tsc": "tsc --build tsconfig.json" }, "publishConfig": { "access": "public" diff --git a/tools/storybook-addon/package.json b/tools/storybook-addon/package.json index 31edae9a92..fa221b8f03 100644 --- a/tools/storybook-addon/package.json +++ b/tools/storybook-addon/package.json @@ -8,7 +8,7 @@ "license": "Apache-2.0", "scripts": { "build": "lg-internal-build-package", - "tsc": "lg-internal-build-ts", + "tsc": "tsc --build tsconfig.json", "upgrade": "npx storybook@latest upgrade --config-dir ." }, "publishConfig": { @@ -28,6 +28,7 @@ "@leafygreen-ui/tokens": "workspace:^", "@leafygreen-ui/typography": "workspace:^", "@lg-tools/build": "workspace:^", + "@lg-tools/meta": "workspace:^", "@lg-tools/storybook-decorators": "workspace:^", "@lg-tools/storybook-utils": "workspace:^", "@mdx-js/react": "2.3.0", diff --git a/tools/storybook-decorators/package.json b/tools/storybook-decorators/package.json index 5bd6a3b61c..13306dc2c6 100644 --- a/tools/storybook-decorators/package.json +++ b/tools/storybook-decorators/package.json @@ -8,7 +8,7 @@ "license": "Apache-2.0", "scripts": { "build": "lg-internal-build-package", - "tsc": "lg-internal-build-ts", + "tsc": "tsc --build tsconfig.json", "upgrade": "npx storybook@latest upgrade --config-dir ../storybook" }, "publishConfig": { diff --git a/tools/test-harnesses/package.json b/tools/test-harnesses/package.json index 1619c5ca46..3024b6722a 100644 --- a/tools/test-harnesses/package.json +++ b/tools/test-harnesses/package.json @@ -7,7 +7,7 @@ "module": "dist/esm/index.js", "scripts": { "build": "lg-internal-build-package", - "tsc": "lg-internal-build-ts" + "tsc": "tsc --build tsconfig.json" }, "publishConfig": { "access": "public" diff --git a/tools/test/package.json b/tools/test/package.json index b4c7177e08..22d043dd96 100644 --- a/tools/test/package.json +++ b/tools/test/package.json @@ -7,7 +7,7 @@ "module": "dist/esm/index.js", "scripts": { "build": "lg-internal-build-package", - "tsc": "lg-internal-build-ts" + "tsc": "tsc --build tsconfig.json" }, "publishConfig": { "access": "public" diff --git a/tools/update/package.json b/tools/update/package.json index 9bf4008577..964b8950de 100644 --- a/tools/update/package.json +++ b/tools/update/package.json @@ -7,12 +7,9 @@ "publishConfig": { "access": "public" }, - "bin": { - "lg-update": "./bin/index.js" - }, "scripts": { "build": "lg-internal-build-package", - "tsc": "lg-internal-build-ts" + "tsc": "tsc --build tsconfig.json" }, "dependencies": { "@lg-tools/build": "workspace:^", diff --git a/tools/validate/package.json b/tools/validate/package.json index 8fccd65a27..b6f042346a 100644 --- a/tools/validate/package.json +++ b/tools/validate/package.json @@ -10,7 +10,7 @@ }, "scripts": { "build": "lg-internal-build-package", - "tsc": "lg-internal-build-ts" + "tsc": "tsc --build tsconfig.json" }, "dependencies": { "@lg-tools/build": "workspace:^", From c4917f9c71761539e4a90c149cdc8a252487aec4 Mon Sep 17 00:00:00 2001 From: Adam Michael Thompson Date: Fri, 4 Apr 2025 21:40:57 -0400 Subject: [PATCH 22/48] add runTypescriptDownlevel to bin --- tools/build/bin/ts-downlevel.js | 3 ++ tools/build/package.json | 6 ++-- tools/build/src/index.ts | 1 + .../src/typescript/downlevel/downlevel-dts.ts | 35 +++++++------------ .../typescript/downlevel/getTypeVersions.ts | 24 ++++++++++--- tools/build/src/typescript/downlevel/index.ts | 15 ++++---- 6 files changed, 47 insertions(+), 37 deletions(-) create mode 100755 tools/build/bin/ts-downlevel.js diff --git a/tools/build/bin/ts-downlevel.js b/tools/build/bin/ts-downlevel.js new file mode 100755 index 0000000000..dd1ddca04c --- /dev/null +++ b/tools/build/bin/ts-downlevel.js @@ -0,0 +1,3 @@ +#! /usr/bin/env node +const { runTypescriptDownlevel } = require('../dist/index.js'); +runTypescriptDownlevel({ verbose: true }); diff --git a/tools/build/package.json b/tools/build/package.json index c0c12032ea..55a63281cb 100644 --- a/tools/build/package.json +++ b/tools/build/package.json @@ -8,13 +8,13 @@ }, "bin": { "lg-internal-build-package": "./bin/build-package.js", - "lg-internal-build-ts": "./bin/build-ts.sh" + "lg-ts-downlevel": "./bin/ts-downlevel.js" }, "main": "dist/index.js", "module": "dist/esm/index.js", "scripts": { - "build": "scripts/build.sh", - "tsc": "scripts/build-ts.sh" + "build": "rollup -c ./config/rollup.config.mjs", + "tsc": "tsc --build tsconfig.json" }, "dependencies": { "@babel/core": "7.24.3", diff --git a/tools/build/src/index.ts b/tools/build/src/index.ts index f605f948cc..08537b9fd6 100644 --- a/tools/build/src/index.ts +++ b/tools/build/src/index.ts @@ -4,6 +4,7 @@ export { buildPackage } from './rollup/build-package'; export { buildTSDoc } from './tsdoc/build-tsdoc'; export { parseTSDoc } from './tsdoc/tsdocParser'; export { buildTypescript } from './typescript/build-ts'; +export { runTypescriptDownlevel } from './typescript/downlevel'; interface BuildOptions { only: Array; diff --git a/tools/build/src/typescript/downlevel/downlevel-dts.ts b/tools/build/src/typescript/downlevel/downlevel-dts.ts index ee7a9cde40..16be26438c 100644 --- a/tools/build/src/typescript/downlevel/downlevel-dts.ts +++ b/tools/build/src/typescript/downlevel/downlevel-dts.ts @@ -2,14 +2,15 @@ import chalk from 'chalk'; import path from 'path'; import fse from 'fs-extra'; -import { sync as spawnSync } from 'cross-spawn'; +// @ts-ignore - ironically, this package doesn't have types +import { main as downlevel } from 'downlevel-dts'; interface DownlevelDtsOptions { /** Whether to print verbose output */ verbose?: boolean; /** Target TypeScript version for output */ - target?: string; + target?: `${number}.${number}`; /** Directory to output downleveled declaration files */ outDir?: string; @@ -20,7 +21,9 @@ interface DownlevelDtsOptions { * * @param options Configuration options */ -export function downlevelDts(options?: DownlevelDtsOptions): void { +export async function downlevelDts( + options?: DownlevelDtsOptions, +): Promise { const { verbose, target = '3.4', outDir } = options ?? {}; const packageDir = process.cwd(); @@ -47,25 +50,8 @@ export function downlevelDts(options?: DownlevelDtsOptions): void { verbose && console.log(chalk.gray(`Output: ${outputDirPath}`)); try { - // Run downlevel-dts - const args = [ - 'exec', - 'downlevel-dts', - typesDirPath, - outputDirPath, - '--to', - target, - ]; - - verbose && console.log(chalk.gray(`Running: pnpm ${args.join(' ')}`)); - - const result = spawnSync('pnpm', args, { - stdio: verbose ? 'inherit' : 'ignore', - }); - - if (result.status !== 0) { - throw new Error(`downlevel-dts failed with exit code: ${result.status}`); - } + const semverTarget = target + '.0'; + downlevel(typesDirPath, outputDirPath, semverTarget); console.log( verbose && @@ -74,6 +60,9 @@ export function downlevelDts(options?: DownlevelDtsOptions): void { ), ); } catch (error: any) { - throw new Error(`Error downleveling declarations: ${error.message}`); + console.error( + chalk.red(`Error downleveling declarations: ${error.message}`), + ); + process.exit(1); } } diff --git a/tools/build/src/typescript/downlevel/getTypeVersions.ts b/tools/build/src/typescript/downlevel/getTypeVersions.ts index 1a420631e9..bbbbe61b34 100644 --- a/tools/build/src/typescript/downlevel/getTypeVersions.ts +++ b/tools/build/src/typescript/downlevel/getTypeVersions.ts @@ -1,3 +1,5 @@ +import chalk from 'chalk'; + /** * Extracts TypeScript versions from the typesVersions field in package.json * and returns an array of version numbers without the 'ts' prefix. @@ -7,10 +9,10 @@ export const getTypeVersions = (typesVersions?: { [target: string]: { [files: string]: string[]; }; -}): Array | undefined => { +}): Array<`${number}.${number}`> | undefined => { if (!typesVersions || typeof typesVersions !== 'object') return; - const versions: Array = []; + const versions: Array<`${number}.${number}`> = []; Object.entries(typesVersions).forEach(([_versionRange, pathMappings]) => { // Get the output directory from the path mappings @@ -21,11 +23,25 @@ export const getTypeVersions = (typesVersions?: { if (!Array.isArray(wildcardMapping) || wildcardMapping.length === 0) return; // Extract outputDir from format like 'ts3.4/*' - const outputDirMatch = wildcardMapping[0].match(/^ts([\d.]+)\/\*/); + const outputDirMatch = wildcardMapping[0].match(/^dist\/ts([\d.]+)\/\*/); if (!outputDirMatch || !outputDirMatch[1]) return; // Get just the version number without the 'ts' prefix - const versionNumber = outputDirMatch[1]; + const versionNumber = outputDirMatch[1] as `${number}.${number}`; + // Check if the version number is valid + if (!/^\d+\.\d+$/.test(versionNumber)) { + console.log( + chalk.red( + `Invalid TS version number format in directory${outputDirMatch[0]}. Expected format is 'dist/tsX.Y/*'`, + ), + ); + return; + } + + // check if the version number is already in the array + if (versions.includes(versionNumber)) return; + + // Add the version number to the array versions.push(versionNumber); }); diff --git a/tools/build/src/typescript/downlevel/index.ts b/tools/build/src/typescript/downlevel/index.ts index bb79b9b0b0..9ba4a477a4 100644 --- a/tools/build/src/typescript/downlevel/index.ts +++ b/tools/build/src/typescript/downlevel/index.ts @@ -15,21 +15,22 @@ interface DownlevelCommandOptions { */ export function runTypescriptDownlevel({ verbose }: DownlevelCommandOptions) { const packageDir = process.cwd(); + console.log('\nRunning TypeScript downleveling...', packageDir); - const packageJson = fse.readJSONSync( - path.join(packageDir, 'package.json'), - 'utf-8', - ); + const packageJsonPath = path.join(packageDir, 'package.json'); + const packageJson = fse.readJSONSync(packageJsonPath, 'utf-8'); const typesVersions = packageJson?.typesVersions; const downlevelVersions = getTypeVersions(typesVersions); - if (downlevelVersions) { - verbose && console.log(chalk.blue.bold('Downleveling TypeScript')); + if (downlevelVersions && downlevelVersions?.length > 0) { downlevelVersions.forEach(target => { downlevelDts({ verbose, target }); }); } else { verbose && - console.log(chalk.yellow('No typesVersions found in package.json')); + console.log(chalk.yellow('No typesVersions found in package.json'), { + typesVersions, + downlevelVersions, + }); } } From 7a1967c31cb4792d31299f3214366040ceb80d43 Mon Sep 17 00:00:00 2001 From: Adam Michael Thompson Date: Fri, 4 Apr 2025 21:41:03 -0400 Subject: [PATCH 23/48] Update pnpm-lock.yaml --- pnpm-lock.yaml | 192 ++----------------------------------------------- 1 file changed, 4 insertions(+), 188 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6d6e20c1bb..ee959ca639 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -886,9 +886,6 @@ importers: '@leafygreen-ui/loading-indicator': specifier: workspace:^ version: link:../loading-indicator - next: - specifier: ^13.0.5 - version: 13.4.13(@babel/core@7.24.3)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(sass@1.64.2) packages/callout: dependencies: @@ -2137,9 +2134,6 @@ importers: '@emotion/styled': specifier: ^11.10.5 version: 11.11.0(@emotion/react@11.11.1(@types/react@18.2.23)(react@18.2.0))(@types/react@18.2.23)(react@18.2.0) - next: - specifier: ^13.1.6 - version: 13.4.13(@babel/core@7.24.3)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(sass@1.64.2) packages/popover: dependencies: @@ -3286,6 +3280,9 @@ importers: '@lg-tools/build': specifier: workspace:^ version: link:../build + '@lg-tools/meta': + specifier: workspace:^ + version: link:../meta '@lg-tools/storybook-decorators': specifier: workspace:^ version: link:../storybook-decorators @@ -4997,63 +4994,6 @@ packages: '@types/react': '>=16' react: '>=16' - '@next/env@13.4.13': - resolution: {integrity: sha512-fwz2QgVg08v7ZL7KmbQBLF2PubR/6zQdKBgmHEl3BCyWTEDsAQEijjw2gbFhI1tcKfLdOOJUXntz5vZ4S0Polg==} - - '@next/swc-darwin-arm64@13.4.13': - resolution: {integrity: sha512-ZptVhHjzUuivnXMNCJ6lER33HN7lC+rZ01z+PM10Ows21NHFYMvGhi5iXkGtBDk6VmtzsbqnAjnx4Oz5um0FjA==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [darwin] - - '@next/swc-darwin-x64@13.4.13': - resolution: {integrity: sha512-t9nTiWCLApw8W4G1kqJyYP7y6/7lyal3PftmRturIxAIBlZss9wrtVN8nci50StDHmIlIDxfguYIEGVr9DbFTg==} - engines: {node: '>= 10'} - cpu: [x64] - os: [darwin] - - '@next/swc-linux-arm64-gnu@13.4.13': - resolution: {integrity: sha512-xEHUqC8eqR5DHe8SOmMnDU1K3ggrJ28uIKltrQAwqFSSSmzjnN/XMocZkcVhuncuxYrpbri0iMQstRyRVdQVWg==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [linux] - - '@next/swc-linux-arm64-musl@13.4.13': - resolution: {integrity: sha512-sNf3MnLAm8rquSSAoeD9nVcdaDeRYOeey4stOWOyWIgbBDtP+C93amSgH/LPTDoUV7gNiU6f+ghepTjTjRgIUQ==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [linux] - - '@next/swc-linux-x64-gnu@13.4.13': - resolution: {integrity: sha512-WhcRaJJSHyx9OWmKjjz+OWHumiPZWRqmM/09Bt7Up4UqUJFFhGExeztR4trtv3rflvULatu9IH/nTV8fUUgaMA==} - engines: {node: '>= 10'} - cpu: [x64] - os: [linux] - - '@next/swc-linux-x64-musl@13.4.13': - resolution: {integrity: sha512-+Y4LLhOWWZQIDKVwr2R17lq2KSN0F1c30QVgGIWfnjjHpH8nrIWHEndhqYU+iFuW8It78CiJjQKTw4f51HD7jA==} - engines: {node: '>= 10'} - cpu: [x64] - os: [linux] - - '@next/swc-win32-arm64-msvc@13.4.13': - resolution: {integrity: sha512-rWurdOR20uxjfqd1X9vDAgv0Jb26KjyL8akF9CBeFqX8rVaBAnW/Wf6A2gYEwyYY4Bai3T7p1kro6DFrsvBAAw==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [win32] - - '@next/swc-win32-ia32-msvc@13.4.13': - resolution: {integrity: sha512-E8bSPwRuY5ibJ3CzLQmJEt8qaWrPYuUTwnrwygPUEWoLzD5YRx9SD37oXRdU81TgGwDzCxpl7z5Nqlfk50xAog==} - engines: {node: '>= 10'} - cpu: [ia32] - os: [win32] - - '@next/swc-win32-x64-msvc@13.4.13': - resolution: {integrity: sha512-4KlyC6jWRubPnppgfYsNTPeWfGCxtWLh5vaOAW/kdzAk9widqho8Qb5S4K2vHmal1tsURi7Onk2MMCV1phvyqA==} - engines: {node: '>= 10'} - cpu: [x64] - os: [win32] - '@nicolo-ribaudo/eslint-scope-5-internals@5.1.1-v1': resolution: {integrity: sha512-54/JRvkLIzzDWshCWfuhadfrfZVPiElY8Fcgmg1HroEly/EDSszzhBAsarCux+D/kOslTRquNzuyGSmUSTTHGg==} @@ -6625,10 +6565,6 @@ packages: resolution: {integrity: sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==} engines: {node: '>=6'} - busboy@1.6.0: - resolution: {integrity: sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==} - engines: {node: '>=10.16.0'} - cac@6.7.14: resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==} engines: {node: '>=8'} @@ -6739,9 +6675,6 @@ packages: resolution: {integrity: sha512-JVJbM+f3d3Q704rF4bqQ5UUyTtuJ0JRKNbTKVEeujCCBoMdkEi+V+e8oktO9qGQNSvHrFTM6JZRXrUvGR1czww==} engines: {node: '>= 10.0'} - client-only@0.0.1: - resolution: {integrity: sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==} - clipboard@2.0.11: resolution: {integrity: sha512-C+0bbOqkezLIsmWSvlsXS0Q0bmkugu7jcfMIACB+RDEntIzQIkdr148we28AfSloQLRdZlYL/QYyrq05j/3Faw==} @@ -8936,21 +8869,6 @@ packages: neo-async@2.6.2: resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==} - next@13.4.13: - resolution: {integrity: sha512-A3YVbVDNeXLhWsZ8Nf6IkxmNlmTNz0yVg186NJ97tGZqPDdPzTrHotJ+A1cuJm2XfuWPrKOUZILl5iBQkIf8Jw==} - engines: {node: '>=16.8.0'} - hasBin: true - peerDependencies: - '@opentelemetry/api': ^1.1.0 - react: ^18.2.0 - react-dom: ^18.2.0 - sass: ^1.3.0 - peerDependenciesMeta: - '@opentelemetry/api': - optional: true - sass: - optional: true - nice-try@1.0.5: resolution: {integrity: sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==} @@ -9330,10 +9248,6 @@ packages: postcss-value-parser@4.2.0: resolution: {integrity: sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==} - postcss@8.4.14: - resolution: {integrity: sha512-E398TUmfAYFPBSdzgeieK2Y1+1cpdxJx8yXbK/m57nRhKSmk1GB2tO4lbLBtlkfPQTDKfe4Xqv1ASWPpayPEig==} - engines: {node: ^10 || ^12 || >=14} - postcss@8.4.27: resolution: {integrity: sha512-gY/ACJtJPSmUFPDCHtX78+01fHa64FaU4zaaWfuh1MhGJISufJAH4cun6k/8fwsHYeK4UQmENQK+tRLCFJE8JQ==} engines: {node: ^10 || ^12 || >=14} @@ -9962,10 +9876,6 @@ packages: stream@0.0.3: resolution: {integrity: sha512-aMsbn7VKrl4A2T7QAQQbzgN7NVc70vgF5INQrBXqn4dCXN1zy3L9HGgLO5s7PExmdrzTJ8uR/27aviW8or8/+A==} - streamsearch@1.1.0: - resolution: {integrity: sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==} - engines: {node: '>=10.0.0'} - string-length@4.0.2: resolution: {integrity: sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==} engines: {node: '>=10'} @@ -10054,19 +9964,6 @@ packages: style-to-object@0.4.4: resolution: {integrity: sha512-HYNoHZa2GorYNyqiCaBgsxvcJIn7OHq6inEga+E6Ke3m5JkoqpQbnFssk4jwe+K7AhGa2fcha4wSOf1Kn01dMg==} - styled-jsx@5.1.1: - resolution: {integrity: sha512-pW7uC1l4mBZ8ugbiZrcIsiIvVx1UmTfw7UkC3Um2tmfUq9Bhk8IiyEIPl6F8agHgjzku6j0xQEZbfA5uSgSaCw==} - engines: {node: '>= 12.0.0'} - peerDependencies: - '@babel/core': '*' - babel-plugin-macros: '*' - react: '>= 16.8.0 || 17.x.x || ^18.0.0-0' - peerDependenciesMeta: - '@babel/core': - optional: true - babel-plugin-macros: - optional: true - stylis@4.2.0: resolution: {integrity: sha512-Orov6g6BB1sDfYgzWfTHDOxamtX1bE/zo104Dh9e6fqJ3PooipYyfJ0pUmrZO2wAvO8YbEyeFrkV91XTsGMSrw==} @@ -10859,9 +10756,6 @@ packages: resolution: {integrity: sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==} engines: {node: '>=12.20'} - zod@3.21.4: - resolution: {integrity: sha512-m46AKbrzKVzOzs/DZgVnG5H55N1sv1M8qZU3A8RIKbs3mrACDNeIOeilDymVb2HdmP8uwshOCF4uJ8uM9rCqJw==} - zrender@5.6.0: resolution: {integrity: sha512-uzgraf4njmmHAbEUxMJ8Oxg+P3fT04O+9p7gY+wJRVxo8Ge+KmYv0WJev945EH4wFuc4OY2NLXz46FZrWS9xJg==} @@ -12616,35 +12510,6 @@ snapshots: '@types/react': 18.2.23 react: 18.2.0 - '@next/env@13.4.13': {} - - '@next/swc-darwin-arm64@13.4.13': - optional: true - - '@next/swc-darwin-x64@13.4.13': - optional: true - - '@next/swc-linux-arm64-gnu@13.4.13': - optional: true - - '@next/swc-linux-arm64-musl@13.4.13': - optional: true - - '@next/swc-linux-x64-gnu@13.4.13': - optional: true - - '@next/swc-linux-x64-musl@13.4.13': - optional: true - - '@next/swc-win32-arm64-msvc@13.4.13': - optional: true - - '@next/swc-win32-ia32-msvc@13.4.13': - optional: true - - '@next/swc-win32-x64-msvc@13.4.13': - optional: true - '@nicolo-ribaudo/eslint-scope-5-internals@5.1.1-v1': dependencies: eslint-scope: 5.1.1 @@ -13505,6 +13370,7 @@ snapshots: '@swc/helpers@0.5.1': dependencies: tslib: 2.6.2 + optional: true '@swc/types@0.1.5': optional: true @@ -14507,10 +14373,6 @@ snapshots: builtin-modules@3.3.0: {} - busboy@1.6.0: - dependencies: - streamsearch: 1.1.0 - cac@6.7.14: {} call-bind@1.0.7: @@ -14611,8 +14473,6 @@ snapshots: dependencies: source-map: 0.6.1 - client-only@0.0.1: {} - clipboard@2.0.11: dependencies: good-listener: 1.2.2 @@ -17611,33 +17471,6 @@ snapshots: neo-async@2.6.2: {} - next@13.4.13(@babel/core@7.24.3)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(sass@1.64.2): - dependencies: - '@next/env': 13.4.13 - '@swc/helpers': 0.5.1 - busboy: 1.6.0 - caniuse-lite: 1.0.30001686 - postcss: 8.4.14 - react: 18.2.0 - react-dom: 18.2.0(react@18.2.0) - styled-jsx: 5.1.1(@babel/core@7.24.3)(react@18.2.0) - watchpack: 2.4.0 - zod: 3.21.4 - optionalDependencies: - '@next/swc-darwin-arm64': 13.4.13 - '@next/swc-darwin-x64': 13.4.13 - '@next/swc-linux-arm64-gnu': 13.4.13 - '@next/swc-linux-arm64-musl': 13.4.13 - '@next/swc-linux-x64-gnu': 13.4.13 - '@next/swc-linux-x64-musl': 13.4.13 - '@next/swc-win32-arm64-msvc': 13.4.13 - '@next/swc-win32-ia32-msvc': 13.4.13 - '@next/swc-win32-x64-msvc': 13.4.13 - sass: 1.64.2 - transitivePeerDependencies: - - '@babel/core' - - babel-plugin-macros - nice-try@1.0.5: {} no-case@3.0.4: @@ -18011,12 +17844,6 @@ snapshots: postcss-value-parser@4.2.0: {} - postcss@8.4.14: - dependencies: - nanoid: 3.3.6 - picocolors: 1.0.0 - source-map-js: 1.0.2 - postcss@8.4.27: dependencies: nanoid: 3.3.6 @@ -18797,8 +18624,6 @@ snapshots: dependencies: component-emitter: 2.0.0 - streamsearch@1.1.0: {} - string-length@4.0.2: dependencies: char-regex: 1.0.2 @@ -18905,13 +18730,6 @@ snapshots: dependencies: inline-style-parser: 0.1.1 - styled-jsx@5.1.1(@babel/core@7.24.3)(react@18.2.0): - dependencies: - client-only: 0.0.1 - react: 18.2.0 - optionalDependencies: - '@babel/core': 7.24.3 - stylis@4.2.0: {} superstruct@2.0.2: {} @@ -19788,8 +19606,6 @@ snapshots: yocto-queue@1.0.0: {} - zod@3.21.4: {} - zrender@5.6.0: dependencies: tslib: 2.3.0 From 68385bc9cc4d76a421ad675530819fc8fd13fcef Mon Sep 17 00:00:00 2001 From: Adam Michael Thompson Date: Fri, 4 Apr 2025 21:41:07 -0400 Subject: [PATCH 24/48] Update package.json --- packages/lib/package.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/lib/package.json b/packages/lib/package.json index 3a920df9a5..d2e543d86d 100644 --- a/packages/lib/package.json +++ b/packages/lib/package.json @@ -8,7 +8,12 @@ "typesVersions": { "<3.9": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, From 03a7c936b2baf7592220a9ae28b4a618c37ab580 Mon Sep 17 00:00:00 2001 From: Adam Michael Thompson Date: Fri, 4 Apr 2025 21:49:18 -0400 Subject: [PATCH 25/48] update typesVersions --- charts/chart-card/package.json | 12 ++++++++++++ charts/colors/package.json | 12 ++++++++++++ charts/core/package.json | 12 ++++++++++++ charts/drag-provider/package.json | 14 +++++++++++++- charts/legend/package.json | 12 ++++++++++++ charts/series-provider/package.json | 14 +++++++++++++- chat/avatar/package.json | 9 +++++++-- chat/chat-disclaimer/package.json | 12 ++++++++++++ chat/chat-window/package.json | 9 +++++++-- chat/fixed-chat-window/package.json | 12 ++++++++++++ chat/input-bar/package.json | 9 +++++++-- chat/leafygreen-chat-provider/package.json | 9 +++++++-- chat/lg-markdown/package.json | 9 +++++++-- chat/message-feed/package.json | 9 +++++++-- chat/message-feedback/package.json | 9 +++++++-- chat/message-prompts/package.json | 14 +++++++++++++- chat/message-rating/package.json | 9 +++++++-- chat/message/package.json | 9 +++++++-- chat/rich-links/package.json | 14 +++++++++++++- chat/title-bar/package.json | 9 +++++++-- packages/a11y/package.json | 9 +++++++-- packages/avatar/package.json | 9 +++++++-- packages/badge/package.json | 9 +++++++-- packages/banner/package.json | 9 +++++++-- packages/box/package.json | 9 +++++++-- packages/button/package.json | 9 +++++++-- packages/callout/package.json | 9 +++++++-- packages/card/package.json | 9 +++++++-- packages/checkbox/package.json | 9 +++++++-- packages/chip/package.json | 14 +++++++++++++- packages/code/package.json | 9 +++++++-- packages/combobox/package.json | 9 +++++++-- packages/confirmation-modal/package.json | 9 +++++++-- packages/copyable/package.json | 9 +++++++-- packages/date-picker/package.json | 12 ++++++++++++ packages/date-utils/package.json | 14 +++++++++++++- packages/descendants/package.json | 12 ++++++++++++ packages/drawer/package.json | 12 ++++++++++++ packages/emotion/package.json | 9 +++++++-- packages/empty-state/package.json | 9 +++++++-- packages/expandable-card/package.json | 9 +++++++-- packages/form-field/package.json | 12 ++++++++++++ packages/form-footer/package.json | 9 +++++++-- packages/gallery-indicator/package.json | 14 +++++++++++++- packages/guide-cue/package.json | 9 +++++++-- packages/hooks/package.json | 9 +++++++-- packages/icon-button/package.json | 9 +++++++-- packages/icon/package.json | 9 +++++++-- packages/info-sprinkle/package.json | 14 +++++++++++++- packages/inline-definition/package.json | 9 +++++++-- packages/input-option/package.json | 9 +++++++-- packages/leafygreen-provider/package.json | 9 +++++++-- packages/lib/package.json | 2 +- packages/loading-indicator/package.json | 9 +++++++-- packages/logo/package.json | 9 +++++++-- packages/marketing-modal/package.json | 9 +++++++-- packages/menu/package.json | 9 +++++++-- packages/modal/package.json | 9 +++++++-- packages/number-input/package.json | 9 +++++++-- packages/ordered-list/package.json | 12 ++++++++++++ packages/pagination/package.json | 9 +++++++-- packages/palette/package.json | 9 +++++++-- packages/password-input/package.json | 9 +++++++-- packages/pipeline/package.json | 9 +++++++-- packages/polymorphic/package.json | 9 +++++++-- packages/popover/package.json | 9 +++++++-- packages/portal/package.json | 9 +++++++-- packages/radio-box-group/package.json | 9 +++++++-- packages/radio-group/package.json | 9 +++++++-- packages/ripple/package.json | 9 +++++++-- packages/search-input/package.json | 9 +++++++-- packages/segmented-control/package.json | 9 +++++++-- packages/select/package.json | 9 +++++++-- packages/side-nav/package.json | 9 +++++++-- packages/skeleton-loader/package.json | 9 +++++++-- packages/split-button/package.json | 9 +++++++-- packages/stepper/package.json | 9 +++++++-- packages/table/package.json | 9 +++++++-- packages/tabs/package.json | 9 +++++++-- packages/testing-lib/package.json | 9 +++++++-- packages/text-area/package.json | 9 +++++++-- packages/text-input/package.json | 9 +++++++-- packages/toast/package.json | 9 +++++++-- packages/toggle/package.json | 9 +++++++-- packages/tokens/package.json | 9 +++++++-- packages/tooltip/package.json | 9 +++++++-- packages/typography/package.json | 9 +++++++-- tools/meta/package.json | 12 ++++++++++++ tools/storybook-addon/package.json | 7 +++++++ tools/storybook-decorators/package.json | 7 +++++++ tools/storybook-utils/package.json | 7 +++++++ tools/test-harnesses/package.json | 12 ++++++++++++ 92 files changed, 751 insertions(+), 143 deletions(-) diff --git a/charts/chart-card/package.json b/charts/chart-card/package.json index dc3732f4ae..8c134c69d3 100644 --- a/charts/chart-card/package.json +++ b/charts/chart-card/package.json @@ -34,5 +34,17 @@ }, "bugs": { "url": "https://jira.mongodb.org/projects/PD/summary" + }, + "typesVersions": { + "<4.0": { + "*": [ + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" + ] + } } } diff --git a/charts/colors/package.json b/charts/colors/package.json index 4246a3b966..df7a89ea07 100644 --- a/charts/colors/package.json +++ b/charts/colors/package.json @@ -31,5 +31,17 @@ }, "bugs": { "url": "https://jira.mongodb.org/projects/PD/summary" + }, + "typesVersions": { + "<4.0": { + "*": [ + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" + ] + } } } diff --git a/charts/core/package.json b/charts/core/package.json index 4ef2479a23..a524f34b3a 100644 --- a/charts/core/package.json +++ b/charts/core/package.json @@ -42,5 +42,17 @@ }, "bugs": { "url": "https://jira.mongodb.org/projects/PD/summary" + }, + "typesVersions": { + "<4.0": { + "*": [ + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" + ] + } } } diff --git a/charts/drag-provider/package.json b/charts/drag-provider/package.json index e2f94b1a09..296d8fd037 100644 --- a/charts/drag-provider/package.json +++ b/charts/drag-provider/package.json @@ -32,5 +32,17 @@ }, "devDependencies": { "@storybook/test": "8.5.3" + }, + "typesVersions": { + "<4.0": { + "*": [ + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" + ] + } } -} \ No newline at end of file +} diff --git a/charts/legend/package.json b/charts/legend/package.json index 0acc45c9ef..a13b768d82 100644 --- a/charts/legend/package.json +++ b/charts/legend/package.json @@ -36,5 +36,17 @@ }, "bugs": { "url": "https://jira.mongodb.org/projects/PD/summary" + }, + "typesVersions": { + "<4.0": { + "*": [ + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" + ] + } } } diff --git a/charts/series-provider/package.json b/charts/series-provider/package.json index 17d15e450b..a4846a84e5 100644 --- a/charts/series-provider/package.json +++ b/charts/series-provider/package.json @@ -23,5 +23,17 @@ }, "peerDependencies": { "@leafygreen-ui/leafygreen-provider": "workspace:^" + }, + "typesVersions": { + "<4.0": { + "*": [ + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" + ] + } } -} \ No newline at end of file +} diff --git a/chat/avatar/package.json b/chat/avatar/package.json index 592d22dd9d..4becc356ad 100644 --- a/chat/avatar/package.json +++ b/chat/avatar/package.json @@ -6,9 +6,14 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<3.9": { + "<4.0": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/chat/chat-disclaimer/package.json b/chat/chat-disclaimer/package.json index e337105842..2b484937d4 100644 --- a/chat/chat-disclaimer/package.json +++ b/chat/chat-disclaimer/package.json @@ -32,5 +32,17 @@ }, "bugs": { "url": "https://jira.mongodb.org/projects/PD/summary" + }, + "typesVersions": { + "<4.0": { + "*": [ + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" + ] + } } } diff --git a/chat/chat-window/package.json b/chat/chat-window/package.json index 28c34d1bce..495e659811 100644 --- a/chat/chat-window/package.json +++ b/chat/chat-window/package.json @@ -6,9 +6,14 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<3.9": { + "<4.0": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/chat/fixed-chat-window/package.json b/chat/fixed-chat-window/package.json index d8c1e21a62..bbdd1d384e 100644 --- a/chat/fixed-chat-window/package.json +++ b/chat/fixed-chat-window/package.json @@ -45,5 +45,17 @@ }, "bugs": { "url": "https://jira.mongodb.org/projects/PD/summary" + }, + "typesVersions": { + "<4.0": { + "*": [ + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" + ] + } } } diff --git a/chat/input-bar/package.json b/chat/input-bar/package.json index 641137548b..066d66402d 100644 --- a/chat/input-bar/package.json +++ b/chat/input-bar/package.json @@ -6,9 +6,14 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<3.9": { + "<4.0": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/chat/leafygreen-chat-provider/package.json b/chat/leafygreen-chat-provider/package.json index 31a3923019..67220c8104 100644 --- a/chat/leafygreen-chat-provider/package.json +++ b/chat/leafygreen-chat-provider/package.json @@ -6,9 +6,14 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<3.9": { + "<4.0": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/chat/lg-markdown/package.json b/chat/lg-markdown/package.json index 3f09a6cced..5af61190c7 100644 --- a/chat/lg-markdown/package.json +++ b/chat/lg-markdown/package.json @@ -6,9 +6,14 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<3.9": { + "<4.0": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/chat/message-feed/package.json b/chat/message-feed/package.json index cedd039782..8067bdd6ae 100644 --- a/chat/message-feed/package.json +++ b/chat/message-feed/package.json @@ -6,9 +6,14 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<3.9": { + "<4.0": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/chat/message-feedback/package.json b/chat/message-feedback/package.json index 7d80507727..5cc5a1d90c 100644 --- a/chat/message-feedback/package.json +++ b/chat/message-feedback/package.json @@ -6,9 +6,14 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<3.9": { + "<4.0": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/chat/message-prompts/package.json b/chat/message-prompts/package.json index 3ee55b666b..68ee0887d9 100644 --- a/chat/message-prompts/package.json +++ b/chat/message-prompts/package.json @@ -32,5 +32,17 @@ "bugs": { "url": "https://jira.mongodb.org/projects/PD/summary" }, - "devDependencies": {} + "devDependencies": {}, + "typesVersions": { + "<4.0": { + "*": [ + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" + ] + } + } } diff --git a/chat/message-rating/package.json b/chat/message-rating/package.json index ef2886e9ac..560e0b7d6a 100644 --- a/chat/message-rating/package.json +++ b/chat/message-rating/package.json @@ -6,9 +6,14 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<3.9": { + "<4.0": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/chat/message/package.json b/chat/message/package.json index 198e756ea3..d5dd71c269 100644 --- a/chat/message/package.json +++ b/chat/message/package.json @@ -6,9 +6,14 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<3.9": { + "<4.0": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/chat/rich-links/package.json b/chat/rich-links/package.json index cc622d7a75..42de71cdca 100644 --- a/chat/rich-links/package.json +++ b/chat/rich-links/package.json @@ -36,5 +36,17 @@ "bugs": { "url": "https://jira.mongodb.org/projects/PD/summary" }, - "devDependencies": {} + "devDependencies": {}, + "typesVersions": { + "<4.0": { + "*": [ + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" + ] + } + } } diff --git a/chat/title-bar/package.json b/chat/title-bar/package.json index df5ee0e689..469bc69d00 100644 --- a/chat/title-bar/package.json +++ b/chat/title-bar/package.json @@ -6,9 +6,14 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<3.9": { + "<4.0": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/a11y/package.json b/packages/a11y/package.json index 7b690501ab..7f87994dd2 100644 --- a/packages/a11y/package.json +++ b/packages/a11y/package.json @@ -6,9 +6,14 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<3.9": { + "<4.0": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/avatar/package.json b/packages/avatar/package.json index f1c92e9617..ba2612b59c 100644 --- a/packages/avatar/package.json +++ b/packages/avatar/package.json @@ -6,9 +6,14 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<3.9": { + "<4.0": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/badge/package.json b/packages/badge/package.json index fe2eba011d..c8cbd10ea1 100644 --- a/packages/badge/package.json +++ b/packages/badge/package.json @@ -6,9 +6,14 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<3.9": { + "<4.0": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/banner/package.json b/packages/banner/package.json index e52997bd12..9780f1c3eb 100644 --- a/packages/banner/package.json +++ b/packages/banner/package.json @@ -6,9 +6,14 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<3.9": { + "<4.0": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/box/package.json b/packages/box/package.json index cfd4328a7b..cfb3897f38 100644 --- a/packages/box/package.json +++ b/packages/box/package.json @@ -6,9 +6,14 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<3.9": { + "<4.0": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/button/package.json b/packages/button/package.json index a0d334afae..ab530d194c 100644 --- a/packages/button/package.json +++ b/packages/button/package.json @@ -6,9 +6,14 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<3.9": { + "<4.0": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/callout/package.json b/packages/callout/package.json index 4c877be2af..f686a48e56 100644 --- a/packages/callout/package.json +++ b/packages/callout/package.json @@ -6,9 +6,14 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<3.9": { + "<4.0": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/card/package.json b/packages/card/package.json index e90f6cdb1b..9190cec1bf 100644 --- a/packages/card/package.json +++ b/packages/card/package.json @@ -6,9 +6,14 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<3.9": { + "<4.0": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/checkbox/package.json b/packages/checkbox/package.json index 4eb375ad9e..2a63749183 100644 --- a/packages/checkbox/package.json +++ b/packages/checkbox/package.json @@ -6,9 +6,14 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<3.9": { + "<4.0": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/chip/package.json b/packages/chip/package.json index f965a5e263..0961aff348 100644 --- a/packages/chip/package.json +++ b/packages/chip/package.json @@ -33,5 +33,17 @@ "bugs": { "url": "https://jira.mongodb.org/projects/PD/summary" }, - "devDependencies": {} + "devDependencies": {}, + "typesVersions": { + "<4.0": { + "*": [ + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" + ] + } + } } diff --git a/packages/code/package.json b/packages/code/package.json index a896381343..3ed5b83b06 100644 --- a/packages/code/package.json +++ b/packages/code/package.json @@ -6,9 +6,14 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<3.9": { + "<4.0": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/combobox/package.json b/packages/combobox/package.json index e223a9ef79..94005bd65d 100644 --- a/packages/combobox/package.json +++ b/packages/combobox/package.json @@ -6,9 +6,14 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<3.9": { + "<4.0": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/confirmation-modal/package.json b/packages/confirmation-modal/package.json index efd3632da8..8ec3050ec5 100644 --- a/packages/confirmation-modal/package.json +++ b/packages/confirmation-modal/package.json @@ -6,9 +6,14 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<3.9": { + "<4.0": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/copyable/package.json b/packages/copyable/package.json index 6267a0d7ce..34a7867b08 100644 --- a/packages/copyable/package.json +++ b/packages/copyable/package.json @@ -6,9 +6,14 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<3.9": { + "<4.0": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/date-picker/package.json b/packages/date-picker/package.json index 13f646c925..c1aff538b8 100644 --- a/packages/date-picker/package.json +++ b/packages/date-picker/package.json @@ -49,5 +49,17 @@ }, "bugs": { "url": "https://jira.mongodb.org/projects/PD/summary" + }, + "typesVersions": { + "<4.0": { + "*": [ + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" + ] + } } } diff --git a/packages/date-utils/package.json b/packages/date-utils/package.json index 35973e66d2..7bad2a8ce4 100644 --- a/packages/date-utils/package.json +++ b/packages/date-utils/package.json @@ -37,5 +37,17 @@ "leafygreen", "date", "date-fns" - ] + ], + "typesVersions": { + "<4.0": { + "*": [ + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" + ] + } + } } diff --git a/packages/descendants/package.json b/packages/descendants/package.json index 0abcf7cbfe..ce8157d794 100644 --- a/packages/descendants/package.json +++ b/packages/descendants/package.json @@ -35,5 +35,17 @@ }, "bugs": { "url": "https://jira.mongodb.org/projects/PD/summary" + }, + "typesVersions": { + "<4.0": { + "*": [ + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" + ] + } } } diff --git a/packages/drawer/package.json b/packages/drawer/package.json index d2415bcb7d..ecbace7213 100644 --- a/packages/drawer/package.json +++ b/packages/drawer/package.json @@ -43,5 +43,17 @@ }, "bugs": { "url": "https://jira.mongodb.org/projects/PD/summary" + }, + "typesVersions": { + "<4.0": { + "*": [ + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" + ] + } } } diff --git a/packages/emotion/package.json b/packages/emotion/package.json index 133eaaf9e0..0b749c63d4 100644 --- a/packages/emotion/package.json +++ b/packages/emotion/package.json @@ -6,9 +6,14 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<3.9": { + "<4.0": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/empty-state/package.json b/packages/empty-state/package.json index 1fc5f89da2..12125ca06f 100644 --- a/packages/empty-state/package.json +++ b/packages/empty-state/package.json @@ -6,9 +6,14 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<3.9": { + "<4.0": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/expandable-card/package.json b/packages/expandable-card/package.json index eccb7e7714..702ff17d81 100644 --- a/packages/expandable-card/package.json +++ b/packages/expandable-card/package.json @@ -6,9 +6,14 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<3.9": { + "<4.0": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/form-field/package.json b/packages/form-field/package.json index 43b1ba312b..21217a8315 100644 --- a/packages/form-field/package.json +++ b/packages/form-field/package.json @@ -37,5 +37,17 @@ }, "bugs": { "url": "https://jira.mongodb.org/projects/PD/summary" + }, + "typesVersions": { + "<4.0": { + "*": [ + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" + ] + } } } diff --git a/packages/form-footer/package.json b/packages/form-footer/package.json index 0cabe992bb..7a2a6ac7d5 100644 --- a/packages/form-footer/package.json +++ b/packages/form-footer/package.json @@ -6,9 +6,14 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<3.9": { + "<4.0": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/gallery-indicator/package.json b/packages/gallery-indicator/package.json index bbfd55e615..0456899d73 100644 --- a/packages/gallery-indicator/package.json +++ b/packages/gallery-indicator/package.json @@ -32,5 +32,17 @@ "bugs": { "url": "https://jira.mongodb.org/projects/PD/summary" }, - "devDependencies": {} + "devDependencies": {}, + "typesVersions": { + "<4.0": { + "*": [ + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" + ] + } + } } diff --git a/packages/guide-cue/package.json b/packages/guide-cue/package.json index 992aef4a04..6bf568d271 100644 --- a/packages/guide-cue/package.json +++ b/packages/guide-cue/package.json @@ -6,9 +6,14 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<3.9": { + "<4.0": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/hooks/package.json b/packages/hooks/package.json index e2dfbe2058..39c800453e 100644 --- a/packages/hooks/package.json +++ b/packages/hooks/package.json @@ -6,9 +6,14 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<3.9": { + "<4.0": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/icon-button/package.json b/packages/icon-button/package.json index bc3b99bd26..195ce0e56a 100644 --- a/packages/icon-button/package.json +++ b/packages/icon-button/package.json @@ -6,9 +6,14 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<3.9": { + "<4.0": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/icon/package.json b/packages/icon/package.json index 5b439718e7..9768aa8d73 100644 --- a/packages/icon/package.json +++ b/packages/icon/package.json @@ -6,9 +6,14 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<3.9": { + "<4.0": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/info-sprinkle/package.json b/packages/info-sprinkle/package.json index fa3991a7aa..5035d868a2 100644 --- a/packages/info-sprinkle/package.json +++ b/packages/info-sprinkle/package.json @@ -33,5 +33,17 @@ "bugs": { "url": "https://jira.mongodb.org/projects/PD/summary" }, - "devDependencies": {} + "devDependencies": {}, + "typesVersions": { + "<4.0": { + "*": [ + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" + ] + } + } } diff --git a/packages/inline-definition/package.json b/packages/inline-definition/package.json index 3cc80898e3..2c0a5d86a2 100644 --- a/packages/inline-definition/package.json +++ b/packages/inline-definition/package.json @@ -6,9 +6,14 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<3.9": { + "<4.0": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/input-option/package.json b/packages/input-option/package.json index 940cdd0d22..4dd41222c4 100644 --- a/packages/input-option/package.json +++ b/packages/input-option/package.json @@ -6,9 +6,14 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<3.9": { + "<4.0": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/leafygreen-provider/package.json b/packages/leafygreen-provider/package.json index d443b5ac1d..2544dafe9f 100644 --- a/packages/leafygreen-provider/package.json +++ b/packages/leafygreen-provider/package.json @@ -6,9 +6,14 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<3.9": { + "<4.0": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/lib/package.json b/packages/lib/package.json index d2e543d86d..f494ac06f8 100644 --- a/packages/lib/package.json +++ b/packages/lib/package.json @@ -6,7 +6,7 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<3.9": { + "<4.0": { "*": [ "dist/ts3.4/*" ] diff --git a/packages/loading-indicator/package.json b/packages/loading-indicator/package.json index e4a94565ff..fbdf1831c5 100644 --- a/packages/loading-indicator/package.json +++ b/packages/loading-indicator/package.json @@ -6,9 +6,14 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<3.9": { + "<4.0": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/logo/package.json b/packages/logo/package.json index 4b227545e2..b2944b5ac5 100644 --- a/packages/logo/package.json +++ b/packages/logo/package.json @@ -6,9 +6,14 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<3.9": { + "<4.0": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/marketing-modal/package.json b/packages/marketing-modal/package.json index 988f153f45..46d8e08fc8 100644 --- a/packages/marketing-modal/package.json +++ b/packages/marketing-modal/package.json @@ -6,9 +6,14 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<3.9": { + "<4.0": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/menu/package.json b/packages/menu/package.json index 9ab50fb613..17d7de972a 100644 --- a/packages/menu/package.json +++ b/packages/menu/package.json @@ -6,9 +6,14 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<3.9": { + "<4.0": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/modal/package.json b/packages/modal/package.json index 7d658c21fd..0c79295118 100644 --- a/packages/modal/package.json +++ b/packages/modal/package.json @@ -6,9 +6,14 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<3.9": { + "<4.0": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/number-input/package.json b/packages/number-input/package.json index eef83572b4..6cdaee99e5 100644 --- a/packages/number-input/package.json +++ b/packages/number-input/package.json @@ -6,9 +6,14 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<3.9": { + "<4.0": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/ordered-list/package.json b/packages/ordered-list/package.json index 322fadeb73..cf45247a08 100644 --- a/packages/ordered-list/package.json +++ b/packages/ordered-list/package.json @@ -32,5 +32,17 @@ }, "bugs": { "url": "https://jira.mongodb.org/projects/PD/summary" + }, + "typesVersions": { + "<4.0": { + "*": [ + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" + ] + } } } diff --git a/packages/pagination/package.json b/packages/pagination/package.json index 8edf823ce3..1aba4f03ec 100644 --- a/packages/pagination/package.json +++ b/packages/pagination/package.json @@ -6,9 +6,14 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<3.9": { + "<4.0": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/palette/package.json b/packages/palette/package.json index a091ce3af7..ef5c735874 100644 --- a/packages/palette/package.json +++ b/packages/palette/package.json @@ -6,9 +6,14 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<3.9": { + "<4.0": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/password-input/package.json b/packages/password-input/package.json index 1793ff72e2..9c8527ecfb 100644 --- a/packages/password-input/package.json +++ b/packages/password-input/package.json @@ -6,9 +6,14 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<3.9": { + "<4.0": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/pipeline/package.json b/packages/pipeline/package.json index 326e810bde..6f0144723e 100644 --- a/packages/pipeline/package.json +++ b/packages/pipeline/package.json @@ -6,9 +6,14 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<3.9": { + "<4.0": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/polymorphic/package.json b/packages/polymorphic/package.json index 3fa1a2133f..7a06dc3c49 100644 --- a/packages/polymorphic/package.json +++ b/packages/polymorphic/package.json @@ -6,9 +6,14 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<3.9": { + "<4.0": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/popover/package.json b/packages/popover/package.json index 941d1c73aa..c4e07d318f 100644 --- a/packages/popover/package.json +++ b/packages/popover/package.json @@ -6,9 +6,14 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<3.9": { + "<4.0": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/portal/package.json b/packages/portal/package.json index 3d8eda830e..2b00ac8561 100644 --- a/packages/portal/package.json +++ b/packages/portal/package.json @@ -6,9 +6,14 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<3.9": { + "<4.0": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/radio-box-group/package.json b/packages/radio-box-group/package.json index c8a925192d..6e0ec07252 100644 --- a/packages/radio-box-group/package.json +++ b/packages/radio-box-group/package.json @@ -6,9 +6,14 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<3.9": { + "<4.0": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/radio-group/package.json b/packages/radio-group/package.json index b33c6b3fb5..d79477c6c5 100644 --- a/packages/radio-group/package.json +++ b/packages/radio-group/package.json @@ -6,9 +6,14 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<3.9": { + "<4.0": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/ripple/package.json b/packages/ripple/package.json index 9cff01ff3d..f95fb4eec8 100644 --- a/packages/ripple/package.json +++ b/packages/ripple/package.json @@ -6,9 +6,14 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<3.9": { + "<4.0": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/search-input/package.json b/packages/search-input/package.json index 7ac8259dca..8987f3cf36 100644 --- a/packages/search-input/package.json +++ b/packages/search-input/package.json @@ -6,9 +6,14 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<3.9": { + "<4.0": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/segmented-control/package.json b/packages/segmented-control/package.json index a7cef7a06d..557bc46544 100644 --- a/packages/segmented-control/package.json +++ b/packages/segmented-control/package.json @@ -6,9 +6,14 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<3.9": { + "<4.0": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/select/package.json b/packages/select/package.json index 52d4c97ddc..4536bdb1ae 100644 --- a/packages/select/package.json +++ b/packages/select/package.json @@ -6,9 +6,14 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<3.9": { + "<4.0": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/side-nav/package.json b/packages/side-nav/package.json index 3ff73cd1f7..c837de4cab 100644 --- a/packages/side-nav/package.json +++ b/packages/side-nav/package.json @@ -6,9 +6,14 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<3.9": { + "<4.0": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/skeleton-loader/package.json b/packages/skeleton-loader/package.json index d63c30ff59..765ff0d35b 100644 --- a/packages/skeleton-loader/package.json +++ b/packages/skeleton-loader/package.json @@ -6,9 +6,14 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<3.9": { + "<4.0": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/split-button/package.json b/packages/split-button/package.json index 3fbd8183bb..b67d0659db 100644 --- a/packages/split-button/package.json +++ b/packages/split-button/package.json @@ -6,9 +6,14 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<3.9": { + "<4.0": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/stepper/package.json b/packages/stepper/package.json index 50f4252f5f..7699be09ac 100644 --- a/packages/stepper/package.json +++ b/packages/stepper/package.json @@ -6,9 +6,14 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<3.9": { + "<4.0": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/table/package.json b/packages/table/package.json index 14fdfe5c69..7b1ea502cb 100644 --- a/packages/table/package.json +++ b/packages/table/package.json @@ -6,9 +6,14 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<3.9": { + "<4.0": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/tabs/package.json b/packages/tabs/package.json index 5127a9af46..683d148ddd 100644 --- a/packages/tabs/package.json +++ b/packages/tabs/package.json @@ -6,9 +6,14 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<3.9": { + "<4.0": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/testing-lib/package.json b/packages/testing-lib/package.json index 496d03f335..5741941062 100644 --- a/packages/testing-lib/package.json +++ b/packages/testing-lib/package.json @@ -6,9 +6,14 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<3.9": { + "<4.0": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/text-area/package.json b/packages/text-area/package.json index d0f4a5c2f7..d08f950be5 100644 --- a/packages/text-area/package.json +++ b/packages/text-area/package.json @@ -6,9 +6,14 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<3.9": { + "<4.0": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/text-input/package.json b/packages/text-input/package.json index f240b4e99f..5ab20026bb 100644 --- a/packages/text-input/package.json +++ b/packages/text-input/package.json @@ -6,9 +6,14 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<3.9": { + "<4.0": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/toast/package.json b/packages/toast/package.json index 2f18dfa4eb..e779fbfd89 100644 --- a/packages/toast/package.json +++ b/packages/toast/package.json @@ -6,9 +6,14 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<3.9": { + "<4.0": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/toggle/package.json b/packages/toggle/package.json index 6129b78423..539f72fc02 100644 --- a/packages/toggle/package.json +++ b/packages/toggle/package.json @@ -6,9 +6,14 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<3.9": { + "<4.0": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/tokens/package.json b/packages/tokens/package.json index adec06cb89..3c8ba7b246 100644 --- a/packages/tokens/package.json +++ b/packages/tokens/package.json @@ -6,9 +6,14 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<3.9": { + "<4.0": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/tooltip/package.json b/packages/tooltip/package.json index 5480d779c8..8efe8a2e65 100644 --- a/packages/tooltip/package.json +++ b/packages/tooltip/package.json @@ -6,9 +6,14 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<3.9": { + "<4.0": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/packages/typography/package.json b/packages/typography/package.json index 10cc378d91..84676415db 100644 --- a/packages/typography/package.json +++ b/packages/typography/package.json @@ -6,9 +6,14 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<3.9": { + "<4.0": { "*": [ - "ts3.4/*" + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" ] } }, diff --git a/tools/meta/package.json b/tools/meta/package.json index 2e963a8657..9b9e16163e 100644 --- a/tools/meta/package.json +++ b/tools/meta/package.json @@ -18,5 +18,17 @@ "chalk": "4.1.2", "fs-extra": "11.1.1", "lodash": "4.17.21" + }, + "typesVersions": { + "<4.0": { + "*": [ + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" + ] + } } } diff --git a/tools/storybook-addon/package.json b/tools/storybook-addon/package.json index fa221b8f03..ae524ba070 100644 --- a/tools/storybook-addon/package.json +++ b/tools/storybook-addon/package.json @@ -64,5 +64,12 @@ "react": "^17.0.0 || ^18.0.0", "react-dom": "^17.0.0 || ^18.0.0", "storybook": "^8.5.3" + }, + "typesVersions": { + "<5.0": { + "*": [ + "dist/ts4.9/*" + ] + } } } diff --git a/tools/storybook-decorators/package.json b/tools/storybook-decorators/package.json index 13306dc2c6..ef1a8f1b32 100644 --- a/tools/storybook-decorators/package.json +++ b/tools/storybook-decorators/package.json @@ -26,5 +26,12 @@ }, "peerDependencies": { "@leafygreen-ui/leafygreen-provider": "workspace:^" + }, + "typesVersions": { + "<5.0": { + "*": [ + "dist/ts4.9/*" + ] + } } } diff --git a/tools/storybook-utils/package.json b/tools/storybook-utils/package.json index 00c83b828c..c90250792a 100644 --- a/tools/storybook-utils/package.json +++ b/tools/storybook-utils/package.json @@ -26,5 +26,12 @@ }, "bugs": { "url": "https://jira.mongodb.org/projects/PD/summary" + }, + "typesVersions": { + "<5.0": { + "*": [ + "dist/ts4.9/*" + ] + } } } diff --git a/tools/test-harnesses/package.json b/tools/test-harnesses/package.json index 3024b6722a..7ef9d6a4d5 100644 --- a/tools/test-harnesses/package.json +++ b/tools/test-harnesses/package.json @@ -14,5 +14,17 @@ }, "dependencies": { "@testing-library/dom": "9.3.1" + }, + "typesVersions": { + "<4.0": { + "*": [ + "dist/ts3.4/*" + ] + }, + "<5.0": { + "*": [ + "dist/ts4.9/*" + ] + } } } From 0ba31885a38270e3300d8101a99a9d106d4da8fe Mon Sep 17 00:00:00 2001 From: Adam Michael Thompson Date: Fri, 4 Apr 2025 21:52:09 -0400 Subject: [PATCH 26/48] Update package.json --- tools/lint/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/lint/package.json b/tools/lint/package.json index e4c0cfb994..e57e7ce389 100644 --- a/tools/lint/package.json +++ b/tools/lint/package.json @@ -40,6 +40,6 @@ "prettier": "2.8.8" }, "peerDependencies": { - "typescript": "~4.9.0" + "typescript": "~5.0.0" } } From 667e0de3cf41922bf5b8db0abfe05fd93d1115af Mon Sep 17 00:00:00 2001 From: Adam Michael Thompson Date: Sat, 5 Apr 2025 00:48:24 -0400 Subject: [PATCH 27/48] Update package.json --- package.json | 4 ++-- tools/build/bin/ts-downlevel.js | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index fbd9a853b9..121d4500d4 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "build:cli": "turbo run build tsc --filter=@lg-tools/cli", "build:docs": "turbo run docs", "build:tsc": "turbo run tsc", - "build:tsc-downlevel": "turbo run tsc -- --downlevel", + "build:ts-downlevel": "pnpm recursive exec lg-ts-downlevel", "build-storybook": "npx storybook build", "chromatic": "npx chromatic", "clean": "npm-run-all --parallel clean:*", @@ -27,7 +27,7 @@ "fix": "lg lint --fix", "link": "lg link", "lint": "lg lint", - "prepublishOnly": "pnpm run build && pnpm run build:tsc-downlevel && turbo run docs", + "prepublishOnly": "pnpm run build && pnpm build:ts-downlevel && pnpm build:docs", "publish": "pnpm changeset publish --public", "slackbot": "lg slackbot release", "start": "npx storybook dev -p 9001 --no-version-updates --no-open", diff --git a/tools/build/bin/ts-downlevel.js b/tools/build/bin/ts-downlevel.js index dd1ddca04c..35b3f7cef8 100755 --- a/tools/build/bin/ts-downlevel.js +++ b/tools/build/bin/ts-downlevel.js @@ -1,3 +1,5 @@ #! /usr/bin/env node const { runTypescriptDownlevel } = require('../dist/index.js'); -runTypescriptDownlevel({ verbose: true }); +const args = process.argv.slice(2); +const verbose = args.includes('--verbose') || args.includes('-v'); +runTypescriptDownlevel({ verbose }); From 39c072edbb8e323916e0ac5dc3d66e244b606252 Mon Sep 17 00:00:00 2001 From: Adam Michael Thompson Date: Mon, 7 Apr 2025 13:02:51 -0400 Subject: [PATCH 28/48] lint --- tools/build/src/typescript/build-ts.ts | 3 ++- tools/build/src/typescript/downlevel/downlevel-dts.ts | 4 ++-- tools/build/src/typescript/downlevel/getTypeVersions.ts | 3 ++- tools/build/src/typescript/downlevel/index.ts | 2 +- tools/build/src/typescript/parsePassThruOptions.ts | 2 ++ 5 files changed, 9 insertions(+), 5 deletions(-) diff --git a/tools/build/src/typescript/build-ts.ts b/tools/build/src/typescript/build-ts.ts index e4524feb1e..ed8ca506ac 100644 --- a/tools/build/src/typescript/build-ts.ts +++ b/tools/build/src/typescript/build-ts.ts @@ -3,9 +3,10 @@ import chalk from 'chalk'; import fse from 'fs-extra'; import path from 'path'; import ts from 'typescript'; + +import { runTypescriptDownlevel } from './downlevel'; import { makeTypescriptDiagnosticReporter } from './makeTypescriptDiagnosticReporter'; import { parsePassThruOptions } from './parsePassThruOptions'; -import { runTypescriptDownlevel } from './downlevel'; interface BuildTypescriptOptions { /** Whether to print verbose output*/ diff --git a/tools/build/src/typescript/downlevel/downlevel-dts.ts b/tools/build/src/typescript/downlevel/downlevel-dts.ts index 16be26438c..a5baa68b81 100644 --- a/tools/build/src/typescript/downlevel/downlevel-dts.ts +++ b/tools/build/src/typescript/downlevel/downlevel-dts.ts @@ -1,9 +1,9 @@ /* eslint-disable no-console */ import chalk from 'chalk'; -import path from 'path'; -import fse from 'fs-extra'; // @ts-ignore - ironically, this package doesn't have types import { main as downlevel } from 'downlevel-dts'; +import fse from 'fs-extra'; +import path from 'path'; interface DownlevelDtsOptions { /** Whether to print verbose output */ diff --git a/tools/build/src/typescript/downlevel/getTypeVersions.ts b/tools/build/src/typescript/downlevel/getTypeVersions.ts index bbbbe61b34..6898d19ba4 100644 --- a/tools/build/src/typescript/downlevel/getTypeVersions.ts +++ b/tools/build/src/typescript/downlevel/getTypeVersions.ts @@ -7,7 +7,7 @@ import chalk from 'chalk'; */ export const getTypeVersions = (typesVersions?: { [target: string]: { - [files: string]: string[]; + [files: string]: Array; }; }): Array<`${number}.${number}`> | undefined => { if (!typesVersions || typeof typesVersions !== 'object') return; @@ -28,6 +28,7 @@ export const getTypeVersions = (typesVersions?: { // Get just the version number without the 'ts' prefix const versionNumber = outputDirMatch[1] as `${number}.${number}`; + // Check if the version number is valid if (!/^\d+\.\d+$/.test(versionNumber)) { console.log( diff --git a/tools/build/src/typescript/downlevel/index.ts b/tools/build/src/typescript/downlevel/index.ts index 9ba4a477a4..b30de460fd 100644 --- a/tools/build/src/typescript/downlevel/index.ts +++ b/tools/build/src/typescript/downlevel/index.ts @@ -1,6 +1,6 @@ import chalk from 'chalk'; -import path from 'path'; import fse from 'fs-extra'; +import path from 'path'; import { downlevelDts } from './downlevel-dts'; import { getTypeVersions } from './getTypeVersions'; diff --git a/tools/build/src/typescript/parsePassThruOptions.ts b/tools/build/src/typescript/parsePassThruOptions.ts index 7aec7c99fc..056cd6effa 100644 --- a/tools/build/src/typescript/parsePassThruOptions.ts +++ b/tools/build/src/typescript/parsePassThruOptions.ts @@ -8,11 +8,13 @@ export function parsePassThruOptions( return passThru?.reduce((acc, arg) => { const [_key, value] = arg.split('='); const key = _key.replace(/^-+/, ''); + if (value) { acc[key] = value; } else { acc[key] = true; } + return acc; }, {} as Record); } From 20ad2e03af1e27c94d7fe2633b02f16c5cca454c Mon Sep 17 00:00:00 2001 From: Adam Michael Thompson Date: Mon, 7 Apr 2025 13:59:53 -0400 Subject: [PATCH 29/48] lint console --- tools/build/src/typescript/downlevel/getTypeVersions.ts | 1 + tools/build/src/typescript/downlevel/index.ts | 1 + tools/build/src/typescript/makeTypescriptDiagnosticReporter.ts | 1 + tools/lint/src/config.ts | 3 ++- 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/build/src/typescript/downlevel/getTypeVersions.ts b/tools/build/src/typescript/downlevel/getTypeVersions.ts index 6898d19ba4..ddd7923d19 100644 --- a/tools/build/src/typescript/downlevel/getTypeVersions.ts +++ b/tools/build/src/typescript/downlevel/getTypeVersions.ts @@ -1,3 +1,4 @@ +/* eslint-disable no-console */ import chalk from 'chalk'; /** diff --git a/tools/build/src/typescript/downlevel/index.ts b/tools/build/src/typescript/downlevel/index.ts index b30de460fd..6a781e8659 100644 --- a/tools/build/src/typescript/downlevel/index.ts +++ b/tools/build/src/typescript/downlevel/index.ts @@ -1,3 +1,4 @@ +/* eslint-disable no-console */ import chalk from 'chalk'; import fse from 'fs-extra'; import path from 'path'; diff --git a/tools/build/src/typescript/makeTypescriptDiagnosticReporter.ts b/tools/build/src/typescript/makeTypescriptDiagnosticReporter.ts index 3ef9fee903..aa8771cad5 100644 --- a/tools/build/src/typescript/makeTypescriptDiagnosticReporter.ts +++ b/tools/build/src/typescript/makeTypescriptDiagnosticReporter.ts @@ -1,3 +1,4 @@ +/* eslint-disable no-console */ import chalk from 'chalk'; import ts from 'typescript'; /** diff --git a/tools/lint/src/config.ts b/tools/lint/src/config.ts index a0a595b112..0cc587d750 100644 --- a/tools/lint/src/config.ts +++ b/tools/lint/src/config.ts @@ -15,10 +15,11 @@ export const esLintExtensions = ['ts', 'tsx']; // Create an instance of ESLint with the configuration passed to the function export function createESLintInstance(options: Partial): ESLint { - return new ESLint({ + const eslint = new ESLint({ overrideConfigFile: eslintConfigPath, ...options, }); + return eslint; } /******************* From e0a48e33032b84aab895d2d356d51bb2499b94ad Mon Sep 17 00:00:00 2001 From: Adam Michael Thompson Date: Tue, 8 Apr 2025 17:51:46 -0400 Subject: [PATCH 30/48] Update build-ts.spec.ts --- tools/build/src/typescript/build-ts.spec.ts | 119 +++++++++++++++++--- 1 file changed, 104 insertions(+), 15 deletions(-) diff --git a/tools/build/src/typescript/build-ts.spec.ts b/tools/build/src/typescript/build-ts.spec.ts index 44b9e7ed18..71fbc7f7f6 100644 --- a/tools/build/src/typescript/build-ts.spec.ts +++ b/tools/build/src/typescript/build-ts.spec.ts @@ -1,24 +1,113 @@ -import xSpawn from 'cross-spawn'; +import chalk from 'chalk'; +import mockFs from 'mock-fs'; import { buildTypescript } from './build-ts'; -type SpawnType = ReturnType; -const onCb = (_e: string) => {}; +import { runTypescriptDownlevel } from './downlevel'; -const spawnSpy = jest.spyOn(xSpawn, 'spawn'); -spawnSpy.mockImplementation( - (..._args) => ({ on: onCb } as unknown as SpawnType), -); +// Only mock the downlevel function +jest.mock('./downlevel'); -describe('tools/build/build-ts', () => { - test('runs with no options', () => { +// Mock process.exit to prevent tests from actually exiting +const originalExit = process.exit; +let mockExit: jest.Mock; + +describe('buildTypescript', () => { + let consoleLogSpy: jest.SpyInstance; + let consoleErrorSpy: jest.SpyInstance; + let originalCwd: () => string; + + beforeAll(() => { + // Save original process.exit and cwd + originalCwd = process.cwd; + mockExit = jest.fn(); + process.exit = mockExit as any; + }); + + afterAll(() => { + // Restore process.exit and cwd + process.exit = originalExit; + process.cwd = originalCwd; + }); + + beforeEach(() => { + jest.clearAllMocks(); + + // Mock console methods for output verification + consoleLogSpy = jest.spyOn(console, 'log').mockImplementation(() => {}); + consoleErrorSpy = jest.spyOn(console, 'error').mockImplementation(() => {}); + }); + + afterEach(() => { + consoleLogSpy.mockRestore(); + consoleErrorSpy.mockRestore(); + mockFs.restore(); + }); + + test('should run downlevel when option is provided', () => { + buildTypescript([], { downlevel: true }); + + // Only verify the side effect we care about + expect(runTypescriptDownlevel).toHaveBeenCalled(); + }); + + test('should not run downlevel when option is not provided', () => { buildTypescript(); + expect(runTypescriptDownlevel).not.toHaveBeenCalled(); + }); - expect(spawnSpy).toHaveBeenCalledWith( - 'tsc', - expect.arrayContaining(['--build']), - expect.objectContaining({ - stdio: 'inherit', - }), + test('should log verbose information when enabled', () => { + buildTypescript([], { verbose: true }); + // Only verify the observable output + expect(consoleLogSpy).toHaveBeenCalledWith( + chalk.blue.bold(expect.stringContaining('Building TypeScript')), ); }); + + describe('with mock filesystem', () => { + test('should find tsconfig.json in the current directory', () => { + // Mock a directory with tsconfig.json + mockFs({ + '/test-project': { + 'package.json': '{"name": "test-project"}', + 'tsconfig.json': '{"compilerOptions": {}}', + src: { + 'index.ts': 'console.log("Hello world");', + }, + }, + }); + + // Set cwd to our test directory + jest.spyOn(process, 'cwd').mockReturnValue('/test-project'); + + buildTypescript(); + + // Verify no error about missing tsconfig + expect(consoleErrorSpy).not.toHaveBeenCalledWith( + chalk.red(expect.stringContaining('Could not find tsconfig')), + ); + }); + + test('should exit with error when tsconfig.json is not found', () => { + // Mock a directory without tsconfig.json + mockFs({ + '/test-project': { + 'package.json': '{"name": "test-project"}', + src: { + 'index.ts': 'console.log("Hello world");', + }, + }, + }); + + // Set cwd to our test directory + jest.spyOn(process, 'cwd').mockReturnValue('/test-project'); + + buildTypescript(); + + // Verify error was logged and process exit was called + expect(consoleErrorSpy).toHaveBeenCalledWith( + chalk.red(expect.stringContaining('Could not find tsconfig')), + ); + expect(mockExit).toHaveBeenCalledWith(1); + }); + }); }); From 0ebfad4bbb6642b43ec27bbab4a78e556664b534 Mon Sep 17 00:00:00 2001 From: Adam Michael Thompson Date: Wed, 9 Apr 2025 17:06:44 -0400 Subject: [PATCH 31/48] Update pnpm-lock.yaml --- pnpm-lock.yaml | 165 ++++++++++++------------------------------------- 1 file changed, 40 insertions(+), 125 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0dd64b361a..1c9dd9f6fd 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1624,7 +1624,7 @@ importers: version: 11.0.0 ts-node: specifier: ^10.9.2 - version: 10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.17.12)(typescript@5.9.0-dev.20250404) + version: 10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.17.12)(typescript@5.0.4) xml2json: specifier: ^0.12.0 version: 0.12.0 @@ -3336,10 +3336,10 @@ importers: version: 8.6.12(storybook@8.6.12(prettier@2.8.8)) '@storybook/react': specifier: 8.6.12 - version: 8.6.12(@storybook/test@8.6.12(storybook@8.6.12(prettier@2.8.8)))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.6.12(prettier@2.8.8))(typescript@5.9.0-dev.20250404) + version: 8.6.12(@storybook/test@8.6.12(storybook@8.6.12(prettier@2.8.8)))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.6.12(prettier@2.8.8))(typescript@5.0.4) '@storybook/react-webpack5': specifier: 8.6.12 - version: 8.6.12(@storybook/test@8.6.12(storybook@8.6.12(prettier@2.8.8)))(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.24.2)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.6.12(prettier@2.8.8))(typescript@5.9.0-dev.20250404) + version: 8.6.12(@storybook/test@8.6.12(storybook@8.6.12(prettier@2.8.8)))(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.24.2)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.6.12(prettier@2.8.8))(typescript@5.0.4) '@storybook/test': specifier: 8.6.12 version: 8.6.12(storybook@8.6.12(prettier@2.8.8)) @@ -3348,7 +3348,7 @@ importers: version: 8.6.12(storybook@8.6.12(prettier@2.8.8)) '@svgr/webpack': specifier: 8.0.1 - version: 8.0.1(typescript@5.9.0-dev.20250404) + version: 8.0.1(typescript@5.0.4) babel-loader: specifier: 9.2.1 version: 9.2.1(@babel/core@7.24.3)(webpack@5.88.0(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.24.2)) @@ -3375,7 +3375,7 @@ importers: version: 18.2.0 react-docgen-typescript: specifier: 2.2.2 - version: 2.2.2(typescript@5.9.0-dev.20250404) + version: 2.2.2(typescript@5.0.4) react-dom: specifier: ^17.0.0 || ^18.0.0 version: 18.2.0(react@18.2.0) @@ -3507,7 +3507,7 @@ importers: version: 11.1.1 jest: specifier: 29.6.2 - version: 29.6.2(@types/node@20.4.8)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@5.9.0-dev.20250404)) + version: 29.6.2(@types/node@20.4.8)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@5.0.4)) jest-axe: specifier: 8.0.0 version: 8.0.0 @@ -9958,11 +9958,6 @@ packages: engines: {node: '>=12.20'} hasBin: true - typescript@5.9.0-dev.20250404: - resolution: {integrity: sha512-GL0YP8pAL3ug0rLp7Sii/ML+kYUkfCU2wxk4O+aV2H3rYfligNa+/SaXzpXfRMaa5wjDnbNUq9mAuhGpMvIUHQ==} - engines: {node: '>=14.17'} - hasBin: true - unbox-primitive@1.0.2: resolution: {integrity: sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==} @@ -11828,7 +11823,7 @@ snapshots: - ts-node optional: true - '@jest/core@29.6.2(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@5.9.0-dev.20250404))': + '@jest/core@29.6.2(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@5.0.4))': dependencies: '@jest/console': 29.6.2 '@jest/reporters': 29.6.2 @@ -11842,7 +11837,7 @@ snapshots: exit: 0.1.2 graceful-fs: 4.2.11 jest-changed-files: 29.5.0 - jest-config: 29.6.2(@types/node@20.4.8)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@5.9.0-dev.20250404)) + jest-config: 29.6.2(@types/node@20.4.8)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@5.0.4)) jest-haste-map: 29.7.0 jest-message-util: 29.7.0 jest-regex-util: 29.6.3 @@ -12313,7 +12308,7 @@ snapshots: react: 18.2.0 react-dom: 18.2.0(react@18.2.0) - '@storybook/builder-webpack5@8.6.12(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.24.2)(storybook@8.6.12(prettier@2.8.8))(typescript@5.9.0-dev.20250404)': + '@storybook/builder-webpack5@8.6.12(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.24.2)(storybook@8.6.12(prettier@2.8.8))(typescript@5.0.4)': dependencies: '@storybook/core-webpack': 8.6.12(storybook@8.6.12(prettier@2.8.8)) '@types/semver': 7.5.0 @@ -12323,7 +12318,7 @@ snapshots: constants-browserify: 1.0.0 css-loader: 6.8.1(webpack@5.88.0(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.24.2)) es-module-lexer: 1.6.0 - fork-ts-checker-webpack-plugin: 8.0.0(typescript@5.9.0-dev.20250404)(webpack@5.88.0(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.24.2)) + fork-ts-checker-webpack-plugin: 8.0.0(typescript@5.0.4)(webpack@5.88.0(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.24.2)) html-webpack-plugin: 5.5.3(webpack@5.88.0(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.24.2)) magic-string: 0.30.17 path-browserify: 1.0.1 @@ -12341,7 +12336,7 @@ snapshots: webpack-hot-middleware: 2.25.4 webpack-virtual-modules: 0.6.2 optionalDependencies: - typescript: 5.9.0-dev.20250404 + typescript: 5.0.4 transitivePeerDependencies: - '@swc/core' - esbuild @@ -12423,11 +12418,11 @@ snapshots: dependencies: storybook: 8.6.12(prettier@2.8.8) - '@storybook/preset-react-webpack@8.6.12(@storybook/test@8.6.12(storybook@8.6.12(prettier@2.8.8)))(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.24.2)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.6.12(prettier@2.8.8))(typescript@5.9.0-dev.20250404)': + '@storybook/preset-react-webpack@8.6.12(@storybook/test@8.6.12(storybook@8.6.12(prettier@2.8.8)))(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.24.2)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.6.12(prettier@2.8.8))(typescript@5.0.4)': dependencies: '@storybook/core-webpack': 8.6.12(storybook@8.6.12(prettier@2.8.8)) - '@storybook/react': 8.6.12(@storybook/test@8.6.12(storybook@8.6.12(prettier@2.8.8)))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.6.12(prettier@2.8.8))(typescript@5.9.0-dev.20250404) - '@storybook/react-docgen-typescript-plugin': 1.0.6--canary.9.0c3f3b7.0(typescript@5.9.0-dev.20250404)(webpack@5.88.0(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.24.2)) + '@storybook/react': 8.6.12(@storybook/test@8.6.12(storybook@8.6.12(prettier@2.8.8)))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.6.12(prettier@2.8.8))(typescript@5.0.4) + '@storybook/react-docgen-typescript-plugin': 1.0.6--canary.9.0c3f3b7.0(typescript@5.0.4)(webpack@5.88.0(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.24.2)) '@types/semver': 7.5.0 find-up: 5.0.0 magic-string: 0.30.17 @@ -12440,7 +12435,7 @@ snapshots: tsconfig-paths: 4.2.0 webpack: 5.88.0(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.24.2) optionalDependencies: - typescript: 5.9.0-dev.20250404 + typescript: 5.0.4 transitivePeerDependencies: - '@storybook/test' - '@swc/core' @@ -12453,16 +12448,16 @@ snapshots: dependencies: storybook: 8.6.12(prettier@2.8.8) - '@storybook/react-docgen-typescript-plugin@1.0.6--canary.9.0c3f3b7.0(typescript@5.9.0-dev.20250404)(webpack@5.88.0(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.24.2))': + '@storybook/react-docgen-typescript-plugin@1.0.6--canary.9.0c3f3b7.0(typescript@5.0.4)(webpack@5.88.0(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.24.2))': dependencies: debug: 4.4.0 endent: 2.1.0 find-cache-dir: 3.3.2 flat-cache: 3.0.4 micromatch: 4.0.5 - react-docgen-typescript: 2.2.2(typescript@5.9.0-dev.20250404) + react-docgen-typescript: 2.2.2(typescript@5.0.4) tslib: 2.6.2 - typescript: 5.9.0-dev.20250404 + typescript: 5.0.4 webpack: 5.88.0(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.24.2) transitivePeerDependencies: - supports-color @@ -12473,16 +12468,16 @@ snapshots: react-dom: 18.2.0(react@18.2.0) storybook: 8.6.12(prettier@2.8.8) - '@storybook/react-webpack5@8.6.12(@storybook/test@8.6.12(storybook@8.6.12(prettier@2.8.8)))(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.24.2)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.6.12(prettier@2.8.8))(typescript@5.9.0-dev.20250404)': + '@storybook/react-webpack5@8.6.12(@storybook/test@8.6.12(storybook@8.6.12(prettier@2.8.8)))(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.24.2)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.6.12(prettier@2.8.8))(typescript@5.0.4)': dependencies: - '@storybook/builder-webpack5': 8.6.12(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.24.2)(storybook@8.6.12(prettier@2.8.8))(typescript@5.9.0-dev.20250404) - '@storybook/preset-react-webpack': 8.6.12(@storybook/test@8.6.12(storybook@8.6.12(prettier@2.8.8)))(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.24.2)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.6.12(prettier@2.8.8))(typescript@5.9.0-dev.20250404) - '@storybook/react': 8.6.12(@storybook/test@8.6.12(storybook@8.6.12(prettier@2.8.8)))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.6.12(prettier@2.8.8))(typescript@5.9.0-dev.20250404) + '@storybook/builder-webpack5': 8.6.12(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.24.2)(storybook@8.6.12(prettier@2.8.8))(typescript@5.0.4) + '@storybook/preset-react-webpack': 8.6.12(@storybook/test@8.6.12(storybook@8.6.12(prettier@2.8.8)))(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.24.2)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.6.12(prettier@2.8.8))(typescript@5.0.4) + '@storybook/react': 8.6.12(@storybook/test@8.6.12(storybook@8.6.12(prettier@2.8.8)))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.6.12(prettier@2.8.8))(typescript@5.0.4) react: 18.2.0 react-dom: 18.2.0(react@18.2.0) storybook: 8.6.12(prettier@2.8.8) optionalDependencies: - typescript: 5.9.0-dev.20250404 + typescript: 5.0.4 transitivePeerDependencies: - '@storybook/test' - '@swc/core' @@ -12506,21 +12501,6 @@ snapshots: '@storybook/test': 8.6.12(storybook@8.6.12(prettier@2.8.8)) typescript: 5.0.4 - '@storybook/react@8.6.12(@storybook/test@8.6.12(storybook@8.6.12(prettier@2.8.8)))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.6.12(prettier@2.8.8))(typescript@5.9.0-dev.20250404)': - dependencies: - '@storybook/components': 8.6.12(storybook@8.6.12(prettier@2.8.8)) - '@storybook/global': 5.0.0 - '@storybook/manager-api': 8.6.12(storybook@8.6.12(prettier@2.8.8)) - '@storybook/preview-api': 8.6.12(storybook@8.6.12(prettier@2.8.8)) - '@storybook/react-dom-shim': 8.6.12(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.6.12(prettier@2.8.8)) - '@storybook/theming': 8.6.12(storybook@8.6.12(prettier@2.8.8)) - react: 18.2.0 - react-dom: 18.2.0(react@18.2.0) - storybook: 8.6.12(prettier@2.8.8) - optionalDependencies: - '@storybook/test': 8.6.12(storybook@8.6.12(prettier@2.8.8)) - typescript: 5.9.0-dev.20250404 - '@storybook/test@8.5.3(storybook@8.6.12(prettier@2.8.8))': dependencies: '@storybook/csf': 0.1.12 @@ -12670,17 +12650,6 @@ snapshots: - supports-color - typescript - '@svgr/core@8.0.0(typescript@5.9.0-dev.20250404)': - dependencies: - '@babel/core': 7.24.3 - '@svgr/babel-preset': 8.0.0(@babel/core@7.24.3) - camelcase: 6.3.0 - cosmiconfig: 8.3.6(typescript@5.9.0-dev.20250404) - snake-case: 3.0.4 - transitivePeerDependencies: - - supports-color - - typescript - '@svgr/core@8.1.0(typescript@5.0.4)': dependencies: '@babel/core': 7.24.3 @@ -12720,16 +12689,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@svgr/plugin-jsx@8.0.1(@svgr/core@8.0.0(typescript@5.9.0-dev.20250404))': - dependencies: - '@babel/core': 7.24.3 - '@svgr/babel-preset': 8.0.0(@babel/core@7.24.3) - '@svgr/core': 8.0.0(typescript@5.9.0-dev.20250404) - '@svgr/hast-util-to-babel-ast': 8.0.0 - svg-parser: 2.0.4 - transitivePeerDependencies: - - supports-color - '@svgr/plugin-jsx@8.1.0(@svgr/core@8.1.0(typescript@5.0.4))': dependencies: '@babel/core': 7.24.3 @@ -12755,15 +12714,6 @@ snapshots: transitivePeerDependencies: - typescript - '@svgr/plugin-svgo@8.0.1(@svgr/core@8.0.0(typescript@5.9.0-dev.20250404))(typescript@5.9.0-dev.20250404)': - dependencies: - '@svgr/core': 8.0.0(typescript@5.9.0-dev.20250404) - cosmiconfig: 8.3.6(typescript@5.9.0-dev.20250404) - deepmerge: 4.3.1 - svgo: 3.0.2 - transitivePeerDependencies: - - typescript - '@svgr/plugin-svgo@8.1.0(@svgr/core@8.1.0(typescript@5.0.4))(typescript@5.0.4)': dependencies: '@svgr/core': 8.1.0(typescript@5.0.4) @@ -12789,16 +12739,16 @@ snapshots: - supports-color - typescript - '@svgr/webpack@8.0.1(typescript@5.9.0-dev.20250404)': + '@svgr/webpack@8.0.1(typescript@5.0.4)': dependencies: '@babel/core': 7.24.3 '@babel/plugin-transform-react-constant-elements': 7.22.5(@babel/core@7.24.3) '@babel/preset-env': 7.24.3(@babel/core@7.24.3) '@babel/preset-react': 7.24.1(@babel/core@7.24.3) '@babel/preset-typescript': 7.24.1(@babel/core@7.24.3) - '@svgr/core': 8.0.0(typescript@5.9.0-dev.20250404) - '@svgr/plugin-jsx': 8.0.1(@svgr/core@8.0.0(typescript@5.9.0-dev.20250404)) - '@svgr/plugin-svgo': 8.0.1(@svgr/core@8.0.0(typescript@5.9.0-dev.20250404))(typescript@5.9.0-dev.20250404) + '@svgr/core': 8.0.0(typescript@5.0.4) + '@svgr/plugin-jsx': 8.0.1(@svgr/core@8.0.0(typescript@5.0.4)) + '@svgr/plugin-svgo': 8.0.1(@svgr/core@8.0.0(typescript@5.0.4))(typescript@5.0.4) transitivePeerDependencies: - supports-color - typescript @@ -14014,15 +13964,6 @@ snapshots: optionalDependencies: typescript: 5.0.4 - cosmiconfig@8.3.6(typescript@5.9.0-dev.20250404): - dependencies: - import-fresh: 3.3.0 - js-yaml: 4.1.0 - parse-json: 5.2.0 - path-type: 4.0.0 - optionalDependencies: - typescript: 5.9.0-dev.20250404 - create-require@1.1.1: {} cross-spawn-async@2.2.5: @@ -14689,7 +14630,7 @@ snapshots: eslint-plugin-storybook@0.11.1(eslint@9.16.0)(typescript@5.0.4): dependencies: - '@storybook/csf': 0.1.13 + '@storybook/csf': 0.1.12 '@typescript-eslint/utils': 8.17.0(eslint@9.16.0)(typescript@5.0.4) eslint: 9.16.0 ts-dedent: 2.2.0 @@ -14957,7 +14898,7 @@ snapshots: cross-spawn: 7.0.3 signal-exit: 4.1.0 - fork-ts-checker-webpack-plugin@8.0.0(typescript@5.9.0-dev.20250404)(webpack@5.88.0(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.24.2)): + fork-ts-checker-webpack-plugin@8.0.0(typescript@5.0.4)(webpack@5.88.0(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.24.2)): dependencies: '@babel/code-frame': 7.24.2 chalk: 4.1.2 @@ -14971,7 +14912,7 @@ snapshots: schema-utils: 3.3.0 semver: 7.6.3 tapable: 2.2.1 - typescript: 5.9.0-dev.20250404 + typescript: 5.0.4 webpack: 5.88.0(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.24.2) form-data@2.5.1: @@ -15603,16 +15544,16 @@ snapshots: - ts-node optional: true - jest-cli@29.6.2(@types/node@20.4.8)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@5.9.0-dev.20250404)): + jest-cli@29.6.2(@types/node@20.4.8)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@5.0.4)): dependencies: - '@jest/core': 29.6.2(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@5.9.0-dev.20250404)) + '@jest/core': 29.6.2(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@5.0.4)) '@jest/test-result': 29.6.2 '@jest/types': 29.6.3 chalk: 4.1.2 exit: 0.1.2 graceful-fs: 4.2.11 import-local: 3.1.0 - jest-config: 29.6.2(@types/node@20.4.8)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@5.9.0-dev.20250404)) + jest-config: 29.6.2(@types/node@20.4.8)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@5.0.4)) jest-util: 29.7.0 jest-validate: 29.6.2 prompts: 2.4.2 @@ -15687,7 +15628,7 @@ snapshots: - supports-color optional: true - jest-config@29.6.2(@types/node@20.4.8)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@5.9.0-dev.20250404)): + jest-config@29.6.2(@types/node@20.4.8)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@5.0.4)): dependencies: '@babel/core': 7.24.3 '@jest/test-sequencer': 29.6.2 @@ -15713,7 +15654,7 @@ snapshots: strip-json-comments: 3.1.1 optionalDependencies: '@types/node': 20.4.8 - ts-node: 10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@5.9.0-dev.20250404) + ts-node: 10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@5.0.4) transitivePeerDependencies: - babel-plugin-macros - supports-color @@ -15981,12 +15922,12 @@ snapshots: - ts-node optional: true - jest@29.6.2(@types/node@20.4.8)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@5.9.0-dev.20250404)): + jest@29.6.2(@types/node@20.4.8)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@5.0.4)): dependencies: - '@jest/core': 29.6.2(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@5.9.0-dev.20250404)) + '@jest/core': 29.6.2(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@5.0.4)) '@jest/types': 29.6.3 import-local: 3.1.0 - jest-cli: 29.6.2(@types/node@20.4.8)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@5.9.0-dev.20250404)) + jest-cli: 29.6.2(@types/node@20.4.8)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@5.0.4)) transitivePeerDependencies: - '@types/node' - babel-plugin-macros @@ -17323,10 +17264,6 @@ snapshots: dependencies: typescript: 5.0.4 - react-docgen-typescript@2.2.2(typescript@5.9.0-dev.20250404): - dependencies: - typescript: 5.9.0-dev.20250404 - react-docgen@7.0.3: dependencies: '@babel/core': 7.24.3 @@ -18216,27 +18153,7 @@ snapshots: optionalDependencies: '@swc/core': 1.4.2(@swc/helpers@0.5.1) - ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.17.12)(typescript@5.9.0-dev.20250404): - dependencies: - '@cspotcode/source-map-support': 0.8.1 - '@tsconfig/node10': 1.0.11 - '@tsconfig/node12': 1.0.11 - '@tsconfig/node14': 1.0.3 - '@tsconfig/node16': 1.0.4 - '@types/node': 20.17.12 - acorn: 8.14.0 - acorn-walk: 8.3.3 - arg: 4.1.3 - create-require: 1.1.1 - diff: 4.0.2 - make-error: 1.3.6 - typescript: 5.9.0-dev.20250404 - v8-compile-cache-lib: 3.0.1 - yn: 3.1.1 - optionalDependencies: - '@swc/core': 1.4.2(@swc/helpers@0.5.1) - - ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@5.9.0-dev.20250404): + ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@5.0.4): dependencies: '@cspotcode/source-map-support': 0.8.1 '@tsconfig/node10': 1.0.11 @@ -18250,7 +18167,7 @@ snapshots: create-require: 1.1.1 diff: 4.0.2 make-error: 1.3.6 - typescript: 5.9.0-dev.20250404 + typescript: 5.0.4 v8-compile-cache-lib: 3.0.1 yn: 3.1.1 optionalDependencies: @@ -18377,8 +18294,6 @@ snapshots: typescript@5.0.4: {} - typescript@5.9.0-dev.20250404: {} - unbox-primitive@1.0.2: dependencies: call-bind: 1.0.7 From 65f92fc302ac2f8f645b7717f5e649402721cba1 Mon Sep 17 00:00:00 2001 From: Adam Michael Thompson Date: Wed, 9 Apr 2025 17:16:05 -0400 Subject: [PATCH 32/48] add missing mock-fs --- pnpm-lock.yaml | 10 ++++++++++ tools/build/package.json | 3 +++ 2 files changed, 13 insertions(+) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1c9dd9f6fd..8ba6391f16 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -2991,6 +2991,10 @@ importers: typescript: specifier: ~5.0.4 version: 5.0.4 + devDependencies: + mock-fs: + specifier: ^5.5.0 + version: 5.5.0 tools/cli: dependencies: @@ -8554,6 +8558,10 @@ packages: engines: {node: '>=10'} hasBin: true + mock-fs@5.5.0: + resolution: {integrity: sha512-d/P1M/RacgM3dB0sJ8rjeRNXxtapkPCUnMGmIN0ixJ16F/E4GUZCvWcSGfWGz8eaXYvn1s9baUwNjI4LOPEjiA==} + engines: {node: '>=12.0.0'} + mockdate@3.0.5: resolution: {integrity: sha512-iniQP4rj1FhBdBYS/+eQv7j1tadJ9lJtdzgOpvsOHng/GbcDh2Fhdeq+ZRldrPYdXvCyfFUmFeEwEGXZB5I/AQ==} @@ -16759,6 +16767,8 @@ snapshots: mkdirp@1.0.4: {} + mock-fs@5.5.0: {} + mockdate@3.0.5: {} moo-color@1.0.3: diff --git a/tools/build/package.json b/tools/build/package.json index ca7ac52e74..66a14561f7 100644 --- a/tools/build/package.json +++ b/tools/build/package.json @@ -51,5 +51,8 @@ "@babel/core": "7.24.0", "turbo": "^2.0.6", "typescript": "~5.0.0" + }, + "devDependencies": { + "mock-fs": "^5.5.0" } } From af384a23540e916cb8ff58d8421bc57d14e4f42f Mon Sep 17 00:00:00 2001 From: Adam Michael Thompson Date: Wed, 9 Apr 2025 17:16:45 -0400 Subject: [PATCH 33/48] @types/mock-fs --- pnpm-lock.yaml | 10 ++++++++++ tools/build/package.json | 1 + 2 files changed, 11 insertions(+) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8ba6391f16..2f2002902a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -2992,6 +2992,9 @@ importers: specifier: ~5.0.4 version: 5.0.4 devDependencies: + '@types/mock-fs': + specifier: ^4.13.4 + version: 4.13.4 mock-fs: specifier: ^5.5.0 version: 5.5.0 @@ -5744,6 +5747,9 @@ packages: '@types/minimist@1.2.2': resolution: {integrity: sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==} + '@types/mock-fs@4.13.4': + resolution: {integrity: sha512-mXmM0o6lULPI8z3XNnQCpL0BGxPwx1Ul1wXYEPBGl4efShyxW2Rln0JOPEWGyZaYZMM6OVXM/15zUuFMY52ljg==} + '@types/ms@0.7.31': resolution: {integrity: sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA==} @@ -13050,6 +13056,10 @@ snapshots: '@types/minimist@1.2.2': {} + '@types/mock-fs@4.13.4': + dependencies: + '@types/node': 20.17.12 + '@types/ms@0.7.31': {} '@types/node-fetch@2.6.12': diff --git a/tools/build/package.json b/tools/build/package.json index 66a14561f7..a36eab3608 100644 --- a/tools/build/package.json +++ b/tools/build/package.json @@ -53,6 +53,7 @@ "typescript": "~5.0.0" }, "devDependencies": { + "@types/mock-fs": "^4.13.4", "mock-fs": "^5.5.0" } } From f3139d791392e785837a1aa227753e77974a6d6d Mon Sep 17 00:00:00 2001 From: Adam Michael Thompson Date: Wed, 9 Apr 2025 17:21:45 -0400 Subject: [PATCH 34/48] remove TS 3 downleveling --- charts/chart-card/package.json | 5 ----- charts/colors/package.json | 5 ----- charts/core/package.json | 5 ----- charts/drag-provider/package.json | 5 ----- charts/legend/package.json | 5 ----- charts/series-provider/package.json | 5 ----- chat/avatar/package.json | 5 ----- chat/chat-disclaimer/package.json | 5 ----- chat/chat-window/package.json | 5 ----- chat/fixed-chat-window/package.json | 5 ----- chat/input-bar/package.json | 5 ----- chat/leafygreen-chat-provider/package.json | 5 ----- chat/lg-markdown/package.json | 5 ----- chat/message-feed/package.json | 5 ----- chat/message-feedback/package.json | 5 ----- chat/message-prompts/package.json | 5 ----- chat/message-rating/package.json | 5 ----- chat/message/package.json | 5 ----- chat/rich-links/package.json | 5 ----- chat/title-bar/package.json | 5 ----- packages/a11y/package.json | 5 ----- packages/avatar/package.json | 5 ----- packages/badge/package.json | 5 ----- packages/banner/package.json | 5 ----- packages/box/package.json | 5 ----- packages/button/package.json | 5 ----- packages/callout/package.json | 5 ----- packages/card/package.json | 5 ----- packages/checkbox/package.json | 5 ----- packages/chip/package.json | 5 ----- packages/code/package.json | 5 ----- packages/combobox/package.json | 5 ----- packages/confirmation-modal/package.json | 5 ----- packages/copyable/package.json | 5 ----- packages/date-picker/package.json | 5 ----- packages/date-utils/package.json | 5 ----- packages/descendants/package.json | 5 ----- packages/drawer/package.json | 5 ----- packages/emotion/package.json | 5 ----- packages/empty-state/package.json | 5 ----- packages/expandable-card/package.json | 5 ----- packages/form-field/package.json | 5 ----- packages/form-footer/package.json | 5 ----- packages/gallery-indicator/package.json | 5 ----- packages/guide-cue/package.json | 5 ----- packages/hooks/package.json | 5 ----- packages/icon-button/package.json | 5 ----- packages/icon/package.json | 5 ----- packages/info-sprinkle/package.json | 5 ----- packages/inline-definition/package.json | 5 ----- packages/input-option/package.json | 5 ----- packages/leafygreen-provider/package.json | 5 ----- packages/lib/package.json | 5 ----- packages/loading-indicator/package.json | 5 ----- packages/logo/package.json | 5 ----- packages/marketing-modal/package.json | 5 ----- packages/menu/package.json | 5 ----- packages/modal/package.json | 5 ----- packages/number-input/package.json | 5 ----- packages/ordered-list/package.json | 5 ----- packages/pagination/package.json | 5 ----- packages/palette/package.json | 5 ----- packages/password-input/package.json | 5 ----- packages/pipeline/package.json | 5 ----- packages/polymorphic/package.json | 5 ----- packages/popover/package.json | 5 ----- packages/portal/package.json | 5 ----- packages/radio-box-group/package.json | 5 ----- packages/radio-group/package.json | 5 ----- packages/ripple/package.json | 5 ----- packages/search-input/package.json | 5 ----- packages/segmented-control/package.json | 5 ----- packages/select/package.json | 5 ----- packages/side-nav/package.json | 5 ----- packages/skeleton-loader/package.json | 5 ----- packages/split-button/package.json | 5 ----- packages/stepper/package.json | 5 ----- packages/table/package.json | 5 ----- packages/tabs/package.json | 5 ----- packages/testing-lib/package.json | 5 ----- packages/text-area/package.json | 5 ----- packages/text-input/package.json | 5 ----- packages/toast/package.json | 5 ----- packages/toggle/package.json | 5 ----- packages/tokens/package.json | 5 ----- packages/tooltip/package.json | 5 ----- packages/typography/package.json | 5 ----- 87 files changed, 435 deletions(-) diff --git a/charts/chart-card/package.json b/charts/chart-card/package.json index af0d97b664..fa9f53b9dd 100644 --- a/charts/chart-card/package.json +++ b/charts/chart-card/package.json @@ -36,11 +36,6 @@ "url": "https://jira.mongodb.org/projects/PD/summary" }, "typesVersions": { - "<4.0": { - "*": [ - "dist/ts3.4/*" - ] - }, "<5.0": { "*": [ "dist/ts4.9/*" diff --git a/charts/colors/package.json b/charts/colors/package.json index df7a89ea07..ed4baeb068 100644 --- a/charts/colors/package.json +++ b/charts/colors/package.json @@ -33,11 +33,6 @@ "url": "https://jira.mongodb.org/projects/PD/summary" }, "typesVersions": { - "<4.0": { - "*": [ - "dist/ts3.4/*" - ] - }, "<5.0": { "*": [ "dist/ts4.9/*" diff --git a/charts/core/package.json b/charts/core/package.json index 99346ab4f8..97398a3cd6 100644 --- a/charts/core/package.json +++ b/charts/core/package.json @@ -44,11 +44,6 @@ "url": "https://jira.mongodb.org/projects/PD/summary" }, "typesVersions": { - "<4.0": { - "*": [ - "dist/ts3.4/*" - ] - }, "<5.0": { "*": [ "dist/ts4.9/*" diff --git a/charts/drag-provider/package.json b/charts/drag-provider/package.json index 8c5491ef63..86396d3349 100644 --- a/charts/drag-provider/package.json +++ b/charts/drag-provider/package.json @@ -34,11 +34,6 @@ "@storybook/test": "8.5.3" }, "typesVersions": { - "<4.0": { - "*": [ - "dist/ts3.4/*" - ] - }, "<5.0": { "*": [ "dist/ts4.9/*" diff --git a/charts/legend/package.json b/charts/legend/package.json index 373a9084a1..71c21fefd5 100644 --- a/charts/legend/package.json +++ b/charts/legend/package.json @@ -38,11 +38,6 @@ "url": "https://jira.mongodb.org/projects/PD/summary" }, "typesVersions": { - "<4.0": { - "*": [ - "dist/ts3.4/*" - ] - }, "<5.0": { "*": [ "dist/ts4.9/*" diff --git a/charts/series-provider/package.json b/charts/series-provider/package.json index a4846a84e5..56f61d9991 100644 --- a/charts/series-provider/package.json +++ b/charts/series-provider/package.json @@ -25,11 +25,6 @@ "@leafygreen-ui/leafygreen-provider": "workspace:^" }, "typesVersions": { - "<4.0": { - "*": [ - "dist/ts3.4/*" - ] - }, "<5.0": { "*": [ "dist/ts4.9/*" diff --git a/chat/avatar/package.json b/chat/avatar/package.json index f5e40d5e3c..9ccfeb96e7 100644 --- a/chat/avatar/package.json +++ b/chat/avatar/package.json @@ -6,11 +6,6 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<4.0": { - "*": [ - "dist/ts3.4/*" - ] - }, "<5.0": { "*": [ "dist/ts4.9/*" diff --git a/chat/chat-disclaimer/package.json b/chat/chat-disclaimer/package.json index 6d84b49ad4..5321a9879f 100644 --- a/chat/chat-disclaimer/package.json +++ b/chat/chat-disclaimer/package.json @@ -34,11 +34,6 @@ "url": "https://jira.mongodb.org/projects/PD/summary" }, "typesVersions": { - "<4.0": { - "*": [ - "dist/ts3.4/*" - ] - }, "<5.0": { "*": [ "dist/ts4.9/*" diff --git a/chat/chat-window/package.json b/chat/chat-window/package.json index dba44155a5..870c77db97 100644 --- a/chat/chat-window/package.json +++ b/chat/chat-window/package.json @@ -6,11 +6,6 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<4.0": { - "*": [ - "dist/ts3.4/*" - ] - }, "<5.0": { "*": [ "dist/ts4.9/*" diff --git a/chat/fixed-chat-window/package.json b/chat/fixed-chat-window/package.json index ea30711d92..e798da7f09 100644 --- a/chat/fixed-chat-window/package.json +++ b/chat/fixed-chat-window/package.json @@ -47,11 +47,6 @@ "url": "https://jira.mongodb.org/projects/PD/summary" }, "typesVersions": { - "<4.0": { - "*": [ - "dist/ts3.4/*" - ] - }, "<5.0": { "*": [ "dist/ts4.9/*" diff --git a/chat/input-bar/package.json b/chat/input-bar/package.json index 486ad2833d..dc403516d8 100644 --- a/chat/input-bar/package.json +++ b/chat/input-bar/package.json @@ -6,11 +6,6 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<4.0": { - "*": [ - "dist/ts3.4/*" - ] - }, "<5.0": { "*": [ "dist/ts4.9/*" diff --git a/chat/leafygreen-chat-provider/package.json b/chat/leafygreen-chat-provider/package.json index 67220c8104..a5d31c6579 100644 --- a/chat/leafygreen-chat-provider/package.json +++ b/chat/leafygreen-chat-provider/package.json @@ -6,11 +6,6 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<4.0": { - "*": [ - "dist/ts3.4/*" - ] - }, "<5.0": { "*": [ "dist/ts4.9/*" diff --git a/chat/lg-markdown/package.json b/chat/lg-markdown/package.json index cb1db5e53a..5e37623b89 100644 --- a/chat/lg-markdown/package.json +++ b/chat/lg-markdown/package.json @@ -6,11 +6,6 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<4.0": { - "*": [ - "dist/ts3.4/*" - ] - }, "<5.0": { "*": [ "dist/ts4.9/*" diff --git a/chat/message-feed/package.json b/chat/message-feed/package.json index 1a9e0dbbc3..4cf8b72f25 100644 --- a/chat/message-feed/package.json +++ b/chat/message-feed/package.json @@ -6,11 +6,6 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<4.0": { - "*": [ - "dist/ts3.4/*" - ] - }, "<5.0": { "*": [ "dist/ts4.9/*" diff --git a/chat/message-feedback/package.json b/chat/message-feedback/package.json index ebcf2f215e..deca1576ba 100644 --- a/chat/message-feedback/package.json +++ b/chat/message-feedback/package.json @@ -6,11 +6,6 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<4.0": { - "*": [ - "dist/ts3.4/*" - ] - }, "<5.0": { "*": [ "dist/ts4.9/*" diff --git a/chat/message-prompts/package.json b/chat/message-prompts/package.json index a09d7d21db..82fe664857 100644 --- a/chat/message-prompts/package.json +++ b/chat/message-prompts/package.json @@ -34,11 +34,6 @@ }, "devDependencies": {}, "typesVersions": { - "<4.0": { - "*": [ - "dist/ts3.4/*" - ] - }, "<5.0": { "*": [ "dist/ts4.9/*" diff --git a/chat/message-rating/package.json b/chat/message-rating/package.json index 295a5e6e37..c7317c3b3c 100644 --- a/chat/message-rating/package.json +++ b/chat/message-rating/package.json @@ -6,11 +6,6 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<4.0": { - "*": [ - "dist/ts3.4/*" - ] - }, "<5.0": { "*": [ "dist/ts4.9/*" diff --git a/chat/message/package.json b/chat/message/package.json index 6263e42c2a..3d9386a55d 100644 --- a/chat/message/package.json +++ b/chat/message/package.json @@ -6,11 +6,6 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<4.0": { - "*": [ - "dist/ts3.4/*" - ] - }, "<5.0": { "*": [ "dist/ts4.9/*" diff --git a/chat/rich-links/package.json b/chat/rich-links/package.json index 7308ecb772..195928dc64 100644 --- a/chat/rich-links/package.json +++ b/chat/rich-links/package.json @@ -38,11 +38,6 @@ }, "devDependencies": {}, "typesVersions": { - "<4.0": { - "*": [ - "dist/ts3.4/*" - ] - }, "<5.0": { "*": [ "dist/ts4.9/*" diff --git a/chat/title-bar/package.json b/chat/title-bar/package.json index 94aa532f67..2b4bfe7217 100644 --- a/chat/title-bar/package.json +++ b/chat/title-bar/package.json @@ -6,11 +6,6 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<4.0": { - "*": [ - "dist/ts3.4/*" - ] - }, "<5.0": { "*": [ "dist/ts4.9/*" diff --git a/packages/a11y/package.json b/packages/a11y/package.json index 71a65031e3..146339cfb1 100644 --- a/packages/a11y/package.json +++ b/packages/a11y/package.json @@ -6,11 +6,6 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<4.0": { - "*": [ - "dist/ts3.4/*" - ] - }, "<5.0": { "*": [ "dist/ts4.9/*" diff --git a/packages/avatar/package.json b/packages/avatar/package.json index d47a393f1c..5704a812e0 100644 --- a/packages/avatar/package.json +++ b/packages/avatar/package.json @@ -6,11 +6,6 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<4.0": { - "*": [ - "dist/ts3.4/*" - ] - }, "<5.0": { "*": [ "dist/ts4.9/*" diff --git a/packages/badge/package.json b/packages/badge/package.json index a96d9c0f75..3763a61f4d 100644 --- a/packages/badge/package.json +++ b/packages/badge/package.json @@ -6,11 +6,6 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<4.0": { - "*": [ - "dist/ts3.4/*" - ] - }, "<5.0": { "*": [ "dist/ts4.9/*" diff --git a/packages/banner/package.json b/packages/banner/package.json index b985ed581e..1bd94f6f43 100644 --- a/packages/banner/package.json +++ b/packages/banner/package.json @@ -6,11 +6,6 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<4.0": { - "*": [ - "dist/ts3.4/*" - ] - }, "<5.0": { "*": [ "dist/ts4.9/*" diff --git a/packages/box/package.json b/packages/box/package.json index cfb3897f38..c3eee4d2aa 100644 --- a/packages/box/package.json +++ b/packages/box/package.json @@ -6,11 +6,6 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<4.0": { - "*": [ - "dist/ts3.4/*" - ] - }, "<5.0": { "*": [ "dist/ts4.9/*" diff --git a/packages/button/package.json b/packages/button/package.json index 0e519733e2..873d7aa072 100644 --- a/packages/button/package.json +++ b/packages/button/package.json @@ -6,11 +6,6 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<4.0": { - "*": [ - "dist/ts3.4/*" - ] - }, "<5.0": { "*": [ "dist/ts4.9/*" diff --git a/packages/callout/package.json b/packages/callout/package.json index 7610c37cc9..c67e97040d 100644 --- a/packages/callout/package.json +++ b/packages/callout/package.json @@ -6,11 +6,6 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<4.0": { - "*": [ - "dist/ts3.4/*" - ] - }, "<5.0": { "*": [ "dist/ts4.9/*" diff --git a/packages/card/package.json b/packages/card/package.json index 2484c7bcf1..84a804dfb0 100644 --- a/packages/card/package.json +++ b/packages/card/package.json @@ -6,11 +6,6 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<4.0": { - "*": [ - "dist/ts3.4/*" - ] - }, "<5.0": { "*": [ "dist/ts4.9/*" diff --git a/packages/checkbox/package.json b/packages/checkbox/package.json index cc428d6660..86a45ae986 100644 --- a/packages/checkbox/package.json +++ b/packages/checkbox/package.json @@ -6,11 +6,6 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<4.0": { - "*": [ - "dist/ts3.4/*" - ] - }, "<5.0": { "*": [ "dist/ts4.9/*" diff --git a/packages/chip/package.json b/packages/chip/package.json index 3677b8e837..073cd7eeb4 100644 --- a/packages/chip/package.json +++ b/packages/chip/package.json @@ -35,11 +35,6 @@ }, "devDependencies": {}, "typesVersions": { - "<4.0": { - "*": [ - "dist/ts3.4/*" - ] - }, "<5.0": { "*": [ "dist/ts4.9/*" diff --git a/packages/code/package.json b/packages/code/package.json index 8d6e6aff4b..4184305a37 100644 --- a/packages/code/package.json +++ b/packages/code/package.json @@ -6,11 +6,6 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<4.0": { - "*": [ - "dist/ts3.4/*" - ] - }, "<5.0": { "*": [ "dist/ts4.9/*" diff --git a/packages/combobox/package.json b/packages/combobox/package.json index 1060bc1b88..fbfba725e0 100644 --- a/packages/combobox/package.json +++ b/packages/combobox/package.json @@ -6,11 +6,6 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<4.0": { - "*": [ - "dist/ts3.4/*" - ] - }, "<5.0": { "*": [ "dist/ts4.9/*" diff --git a/packages/confirmation-modal/package.json b/packages/confirmation-modal/package.json index 59be1e5a3b..61ffdd0879 100644 --- a/packages/confirmation-modal/package.json +++ b/packages/confirmation-modal/package.json @@ -6,11 +6,6 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<4.0": { - "*": [ - "dist/ts3.4/*" - ] - }, "<5.0": { "*": [ "dist/ts4.9/*" diff --git a/packages/copyable/package.json b/packages/copyable/package.json index 03776a0b23..de5b5026a1 100644 --- a/packages/copyable/package.json +++ b/packages/copyable/package.json @@ -6,11 +6,6 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<4.0": { - "*": [ - "dist/ts3.4/*" - ] - }, "<5.0": { "*": [ "dist/ts4.9/*" diff --git a/packages/date-picker/package.json b/packages/date-picker/package.json index a2f04c065f..85a263d948 100644 --- a/packages/date-picker/package.json +++ b/packages/date-picker/package.json @@ -51,11 +51,6 @@ "url": "https://jira.mongodb.org/projects/PD/summary" }, "typesVersions": { - "<4.0": { - "*": [ - "dist/ts3.4/*" - ] - }, "<5.0": { "*": [ "dist/ts4.9/*" diff --git a/packages/date-utils/package.json b/packages/date-utils/package.json index 7bad2a8ce4..581b9d9382 100644 --- a/packages/date-utils/package.json +++ b/packages/date-utils/package.json @@ -39,11 +39,6 @@ "date-fns" ], "typesVersions": { - "<4.0": { - "*": [ - "dist/ts3.4/*" - ] - }, "<5.0": { "*": [ "dist/ts4.9/*" diff --git a/packages/descendants/package.json b/packages/descendants/package.json index ce8157d794..95fd67d79d 100644 --- a/packages/descendants/package.json +++ b/packages/descendants/package.json @@ -37,11 +37,6 @@ "url": "https://jira.mongodb.org/projects/PD/summary" }, "typesVersions": { - "<4.0": { - "*": [ - "dist/ts3.4/*" - ] - }, "<5.0": { "*": [ "dist/ts4.9/*" diff --git a/packages/drawer/package.json b/packages/drawer/package.json index 14f444b4bf..24d7e3fd71 100644 --- a/packages/drawer/package.json +++ b/packages/drawer/package.json @@ -45,11 +45,6 @@ "url": "https://jira.mongodb.org/projects/PD/summary" }, "typesVersions": { - "<4.0": { - "*": [ - "dist/ts3.4/*" - ] - }, "<5.0": { "*": [ "dist/ts4.9/*" diff --git a/packages/emotion/package.json b/packages/emotion/package.json index 3cea23bd1f..2726d5555f 100644 --- a/packages/emotion/package.json +++ b/packages/emotion/package.json @@ -6,11 +6,6 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<4.0": { - "*": [ - "dist/ts3.4/*" - ] - }, "<5.0": { "*": [ "dist/ts4.9/*" diff --git a/packages/empty-state/package.json b/packages/empty-state/package.json index bd2ca31dd2..7d5d5a0d9a 100644 --- a/packages/empty-state/package.json +++ b/packages/empty-state/package.json @@ -6,11 +6,6 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<4.0": { - "*": [ - "dist/ts3.4/*" - ] - }, "<5.0": { "*": [ "dist/ts4.9/*" diff --git a/packages/expandable-card/package.json b/packages/expandable-card/package.json index 067a7f8843..2db1cf7b1b 100644 --- a/packages/expandable-card/package.json +++ b/packages/expandable-card/package.json @@ -6,11 +6,6 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<4.0": { - "*": [ - "dist/ts3.4/*" - ] - }, "<5.0": { "*": [ "dist/ts4.9/*" diff --git a/packages/form-field/package.json b/packages/form-field/package.json index 6af956e0a3..edcea57534 100644 --- a/packages/form-field/package.json +++ b/packages/form-field/package.json @@ -39,11 +39,6 @@ "url": "https://jira.mongodb.org/projects/PD/summary" }, "typesVersions": { - "<4.0": { - "*": [ - "dist/ts3.4/*" - ] - }, "<5.0": { "*": [ "dist/ts4.9/*" diff --git a/packages/form-footer/package.json b/packages/form-footer/package.json index f192068a8f..a1f5d9a7e9 100644 --- a/packages/form-footer/package.json +++ b/packages/form-footer/package.json @@ -6,11 +6,6 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<4.0": { - "*": [ - "dist/ts3.4/*" - ] - }, "<5.0": { "*": [ "dist/ts4.9/*" diff --git a/packages/gallery-indicator/package.json b/packages/gallery-indicator/package.json index e6d711cac9..0323d6510e 100644 --- a/packages/gallery-indicator/package.json +++ b/packages/gallery-indicator/package.json @@ -34,11 +34,6 @@ }, "devDependencies": {}, "typesVersions": { - "<4.0": { - "*": [ - "dist/ts3.4/*" - ] - }, "<5.0": { "*": [ "dist/ts4.9/*" diff --git a/packages/guide-cue/package.json b/packages/guide-cue/package.json index 7e44fe0f6d..cde3cf11f1 100644 --- a/packages/guide-cue/package.json +++ b/packages/guide-cue/package.json @@ -6,11 +6,6 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<4.0": { - "*": [ - "dist/ts3.4/*" - ] - }, "<5.0": { "*": [ "dist/ts4.9/*" diff --git a/packages/hooks/package.json b/packages/hooks/package.json index 39c800453e..b8bbef3366 100644 --- a/packages/hooks/package.json +++ b/packages/hooks/package.json @@ -6,11 +6,6 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<4.0": { - "*": [ - "dist/ts3.4/*" - ] - }, "<5.0": { "*": [ "dist/ts4.9/*" diff --git a/packages/icon-button/package.json b/packages/icon-button/package.json index f576cd0a9b..c3a2184e5e 100644 --- a/packages/icon-button/package.json +++ b/packages/icon-button/package.json @@ -6,11 +6,6 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<4.0": { - "*": [ - "dist/ts3.4/*" - ] - }, "<5.0": { "*": [ "dist/ts4.9/*" diff --git a/packages/icon/package.json b/packages/icon/package.json index 15727a2d8f..b44356ec42 100644 --- a/packages/icon/package.json +++ b/packages/icon/package.json @@ -6,11 +6,6 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<4.0": { - "*": [ - "dist/ts3.4/*" - ] - }, "<5.0": { "*": [ "dist/ts4.9/*" diff --git a/packages/info-sprinkle/package.json b/packages/info-sprinkle/package.json index 06dc7c8e9b..196d88e9c2 100644 --- a/packages/info-sprinkle/package.json +++ b/packages/info-sprinkle/package.json @@ -35,11 +35,6 @@ }, "devDependencies": {}, "typesVersions": { - "<4.0": { - "*": [ - "dist/ts3.4/*" - ] - }, "<5.0": { "*": [ "dist/ts4.9/*" diff --git a/packages/inline-definition/package.json b/packages/inline-definition/package.json index 964f8b721c..9c7f152c0e 100644 --- a/packages/inline-definition/package.json +++ b/packages/inline-definition/package.json @@ -6,11 +6,6 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<4.0": { - "*": [ - "dist/ts3.4/*" - ] - }, "<5.0": { "*": [ "dist/ts4.9/*" diff --git a/packages/input-option/package.json b/packages/input-option/package.json index a1abb74659..ecab93efc8 100644 --- a/packages/input-option/package.json +++ b/packages/input-option/package.json @@ -6,11 +6,6 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<4.0": { - "*": [ - "dist/ts3.4/*" - ] - }, "<5.0": { "*": [ "dist/ts4.9/*" diff --git a/packages/leafygreen-provider/package.json b/packages/leafygreen-provider/package.json index 2544dafe9f..715f2c4485 100644 --- a/packages/leafygreen-provider/package.json +++ b/packages/leafygreen-provider/package.json @@ -6,11 +6,6 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<4.0": { - "*": [ - "dist/ts3.4/*" - ] - }, "<5.0": { "*": [ "dist/ts4.9/*" diff --git a/packages/lib/package.json b/packages/lib/package.json index f494ac06f8..e5b9dbfe94 100644 --- a/packages/lib/package.json +++ b/packages/lib/package.json @@ -6,11 +6,6 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<4.0": { - "*": [ - "dist/ts3.4/*" - ] - }, "<5.0": { "*": [ "dist/ts4.9/*" diff --git a/packages/loading-indicator/package.json b/packages/loading-indicator/package.json index a84e3b890a..29806212fb 100644 --- a/packages/loading-indicator/package.json +++ b/packages/loading-indicator/package.json @@ -6,11 +6,6 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<4.0": { - "*": [ - "dist/ts3.4/*" - ] - }, "<5.0": { "*": [ "dist/ts4.9/*" diff --git a/packages/logo/package.json b/packages/logo/package.json index 7a908bd998..149f8e473c 100644 --- a/packages/logo/package.json +++ b/packages/logo/package.json @@ -6,11 +6,6 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<4.0": { - "*": [ - "dist/ts3.4/*" - ] - }, "<5.0": { "*": [ "dist/ts4.9/*" diff --git a/packages/marketing-modal/package.json b/packages/marketing-modal/package.json index 83642ef800..1f83c4def1 100644 --- a/packages/marketing-modal/package.json +++ b/packages/marketing-modal/package.json @@ -6,11 +6,6 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<4.0": { - "*": [ - "dist/ts3.4/*" - ] - }, "<5.0": { "*": [ "dist/ts4.9/*" diff --git a/packages/menu/package.json b/packages/menu/package.json index 10fca52313..3b8d4022ea 100644 --- a/packages/menu/package.json +++ b/packages/menu/package.json @@ -6,11 +6,6 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<4.0": { - "*": [ - "dist/ts3.4/*" - ] - }, "<5.0": { "*": [ "dist/ts4.9/*" diff --git a/packages/modal/package.json b/packages/modal/package.json index 6fb9c52abc..bba841b3e5 100644 --- a/packages/modal/package.json +++ b/packages/modal/package.json @@ -6,11 +6,6 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<4.0": { - "*": [ - "dist/ts3.4/*" - ] - }, "<5.0": { "*": [ "dist/ts4.9/*" diff --git a/packages/number-input/package.json b/packages/number-input/package.json index daf702f1ec..efc512c8ec 100644 --- a/packages/number-input/package.json +++ b/packages/number-input/package.json @@ -6,11 +6,6 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<4.0": { - "*": [ - "dist/ts3.4/*" - ] - }, "<5.0": { "*": [ "dist/ts4.9/*" diff --git a/packages/ordered-list/package.json b/packages/ordered-list/package.json index 338136803d..0b67ea745a 100644 --- a/packages/ordered-list/package.json +++ b/packages/ordered-list/package.json @@ -34,11 +34,6 @@ "url": "https://jira.mongodb.org/projects/PD/summary" }, "typesVersions": { - "<4.0": { - "*": [ - "dist/ts3.4/*" - ] - }, "<5.0": { "*": [ "dist/ts4.9/*" diff --git a/packages/pagination/package.json b/packages/pagination/package.json index d04ab7c287..58eb748543 100644 --- a/packages/pagination/package.json +++ b/packages/pagination/package.json @@ -6,11 +6,6 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<4.0": { - "*": [ - "dist/ts3.4/*" - ] - }, "<5.0": { "*": [ "dist/ts4.9/*" diff --git a/packages/palette/package.json b/packages/palette/package.json index ef5c735874..1b26482848 100644 --- a/packages/palette/package.json +++ b/packages/palette/package.json @@ -6,11 +6,6 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<4.0": { - "*": [ - "dist/ts3.4/*" - ] - }, "<5.0": { "*": [ "dist/ts4.9/*" diff --git a/packages/password-input/package.json b/packages/password-input/package.json index c61817736f..a6f3eb6caa 100644 --- a/packages/password-input/package.json +++ b/packages/password-input/package.json @@ -6,11 +6,6 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<4.0": { - "*": [ - "dist/ts3.4/*" - ] - }, "<5.0": { "*": [ "dist/ts4.9/*" diff --git a/packages/pipeline/package.json b/packages/pipeline/package.json index b3c5baad70..a88d39812e 100644 --- a/packages/pipeline/package.json +++ b/packages/pipeline/package.json @@ -6,11 +6,6 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<4.0": { - "*": [ - "dist/ts3.4/*" - ] - }, "<5.0": { "*": [ "dist/ts4.9/*" diff --git a/packages/polymorphic/package.json b/packages/polymorphic/package.json index f344ec0fdc..277745afd6 100644 --- a/packages/polymorphic/package.json +++ b/packages/polymorphic/package.json @@ -6,11 +6,6 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<4.0": { - "*": [ - "dist/ts3.4/*" - ] - }, "<5.0": { "*": [ "dist/ts4.9/*" diff --git a/packages/popover/package.json b/packages/popover/package.json index f6cfb0fabe..3c15171dc5 100644 --- a/packages/popover/package.json +++ b/packages/popover/package.json @@ -6,11 +6,6 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<4.0": { - "*": [ - "dist/ts3.4/*" - ] - }, "<5.0": { "*": [ "dist/ts4.9/*" diff --git a/packages/portal/package.json b/packages/portal/package.json index 2b00ac8561..4cb2f40347 100644 --- a/packages/portal/package.json +++ b/packages/portal/package.json @@ -6,11 +6,6 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<4.0": { - "*": [ - "dist/ts3.4/*" - ] - }, "<5.0": { "*": [ "dist/ts4.9/*" diff --git a/packages/radio-box-group/package.json b/packages/radio-box-group/package.json index 05e381424b..44c61897c3 100644 --- a/packages/radio-box-group/package.json +++ b/packages/radio-box-group/package.json @@ -6,11 +6,6 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<4.0": { - "*": [ - "dist/ts3.4/*" - ] - }, "<5.0": { "*": [ "dist/ts4.9/*" diff --git a/packages/radio-group/package.json b/packages/radio-group/package.json index 5b96ea1ce4..08adf2196c 100644 --- a/packages/radio-group/package.json +++ b/packages/radio-group/package.json @@ -6,11 +6,6 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<4.0": { - "*": [ - "dist/ts3.4/*" - ] - }, "<5.0": { "*": [ "dist/ts4.9/*" diff --git a/packages/ripple/package.json b/packages/ripple/package.json index 384e3ac739..75cdc0459b 100644 --- a/packages/ripple/package.json +++ b/packages/ripple/package.json @@ -6,11 +6,6 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<4.0": { - "*": [ - "dist/ts3.4/*" - ] - }, "<5.0": { "*": [ "dist/ts4.9/*" diff --git a/packages/search-input/package.json b/packages/search-input/package.json index 67cc64fb0d..22bc98d0f5 100644 --- a/packages/search-input/package.json +++ b/packages/search-input/package.json @@ -6,11 +6,6 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<4.0": { - "*": [ - "dist/ts3.4/*" - ] - }, "<5.0": { "*": [ "dist/ts4.9/*" diff --git a/packages/segmented-control/package.json b/packages/segmented-control/package.json index a00b7fd80d..e97681aad1 100644 --- a/packages/segmented-control/package.json +++ b/packages/segmented-control/package.json @@ -6,11 +6,6 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<4.0": { - "*": [ - "dist/ts3.4/*" - ] - }, "<5.0": { "*": [ "dist/ts4.9/*" diff --git a/packages/select/package.json b/packages/select/package.json index a57aa2984e..0f526741df 100644 --- a/packages/select/package.json +++ b/packages/select/package.json @@ -6,11 +6,6 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<4.0": { - "*": [ - "dist/ts3.4/*" - ] - }, "<5.0": { "*": [ "dist/ts4.9/*" diff --git a/packages/side-nav/package.json b/packages/side-nav/package.json index 422eaa1c8d..a770aa6516 100644 --- a/packages/side-nav/package.json +++ b/packages/side-nav/package.json @@ -6,11 +6,6 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<4.0": { - "*": [ - "dist/ts3.4/*" - ] - }, "<5.0": { "*": [ "dist/ts4.9/*" diff --git a/packages/skeleton-loader/package.json b/packages/skeleton-loader/package.json index 0d8266336d..6fa37a1275 100644 --- a/packages/skeleton-loader/package.json +++ b/packages/skeleton-loader/package.json @@ -6,11 +6,6 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<4.0": { - "*": [ - "dist/ts3.4/*" - ] - }, "<5.0": { "*": [ "dist/ts4.9/*" diff --git a/packages/split-button/package.json b/packages/split-button/package.json index 1452659ecd..88b09717c6 100644 --- a/packages/split-button/package.json +++ b/packages/split-button/package.json @@ -6,11 +6,6 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<4.0": { - "*": [ - "dist/ts3.4/*" - ] - }, "<5.0": { "*": [ "dist/ts4.9/*" diff --git a/packages/stepper/package.json b/packages/stepper/package.json index 323a821a3d..3005ea02fc 100644 --- a/packages/stepper/package.json +++ b/packages/stepper/package.json @@ -6,11 +6,6 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<4.0": { - "*": [ - "dist/ts3.4/*" - ] - }, "<5.0": { "*": [ "dist/ts4.9/*" diff --git a/packages/table/package.json b/packages/table/package.json index c0e53e178c..d72e3155e3 100644 --- a/packages/table/package.json +++ b/packages/table/package.json @@ -6,11 +6,6 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<4.0": { - "*": [ - "dist/ts3.4/*" - ] - }, "<5.0": { "*": [ "dist/ts4.9/*" diff --git a/packages/tabs/package.json b/packages/tabs/package.json index 09b65f5147..d5d868d5d6 100644 --- a/packages/tabs/package.json +++ b/packages/tabs/package.json @@ -6,11 +6,6 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<4.0": { - "*": [ - "dist/ts3.4/*" - ] - }, "<5.0": { "*": [ "dist/ts4.9/*" diff --git a/packages/testing-lib/package.json b/packages/testing-lib/package.json index 7c1580a356..4be3099198 100644 --- a/packages/testing-lib/package.json +++ b/packages/testing-lib/package.json @@ -6,11 +6,6 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<4.0": { - "*": [ - "dist/ts3.4/*" - ] - }, "<5.0": { "*": [ "dist/ts4.9/*" diff --git a/packages/text-area/package.json b/packages/text-area/package.json index 572bb61d94..ab917942ce 100644 --- a/packages/text-area/package.json +++ b/packages/text-area/package.json @@ -6,11 +6,6 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<4.0": { - "*": [ - "dist/ts3.4/*" - ] - }, "<5.0": { "*": [ "dist/ts4.9/*" diff --git a/packages/text-input/package.json b/packages/text-input/package.json index 331e566336..eab31e7fab 100644 --- a/packages/text-input/package.json +++ b/packages/text-input/package.json @@ -6,11 +6,6 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<4.0": { - "*": [ - "dist/ts3.4/*" - ] - }, "<5.0": { "*": [ "dist/ts4.9/*" diff --git a/packages/toast/package.json b/packages/toast/package.json index 5d1fecafc0..054d5d8607 100644 --- a/packages/toast/package.json +++ b/packages/toast/package.json @@ -6,11 +6,6 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<4.0": { - "*": [ - "dist/ts3.4/*" - ] - }, "<5.0": { "*": [ "dist/ts4.9/*" diff --git a/packages/toggle/package.json b/packages/toggle/package.json index 43cb89c837..d432c35b0a 100644 --- a/packages/toggle/package.json +++ b/packages/toggle/package.json @@ -6,11 +6,6 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<4.0": { - "*": [ - "dist/ts3.4/*" - ] - }, "<5.0": { "*": [ "dist/ts4.9/*" diff --git a/packages/tokens/package.json b/packages/tokens/package.json index 0e7074ee1e..fe825f6ff3 100644 --- a/packages/tokens/package.json +++ b/packages/tokens/package.json @@ -6,11 +6,6 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<4.0": { - "*": [ - "dist/ts3.4/*" - ] - }, "<5.0": { "*": [ "dist/ts4.9/*" diff --git a/packages/tooltip/package.json b/packages/tooltip/package.json index 3bbfd78b9c..a99743e4dd 100644 --- a/packages/tooltip/package.json +++ b/packages/tooltip/package.json @@ -6,11 +6,6 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<4.0": { - "*": [ - "dist/ts3.4/*" - ] - }, "<5.0": { "*": [ "dist/ts4.9/*" diff --git a/packages/typography/package.json b/packages/typography/package.json index a6fbacd248..6c17ce4f7d 100644 --- a/packages/typography/package.json +++ b/packages/typography/package.json @@ -6,11 +6,6 @@ "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", "typesVersions": { - "<4.0": { - "*": [ - "dist/ts3.4/*" - ] - }, "<5.0": { "*": [ "dist/ts4.9/*" From 5fa36725f3944eaefe61e6b2ce854444eba65a34 Mon Sep 17 00:00:00 2001 From: Adam Michael Thompson Date: Wed, 9 Apr 2025 18:20:23 -0400 Subject: [PATCH 35/48] rm chalk. fix mockFs --- tools/build/src/typescript/build-ts.spec.ts | 83 +++++++++------------ 1 file changed, 36 insertions(+), 47 deletions(-) diff --git a/tools/build/src/typescript/build-ts.spec.ts b/tools/build/src/typescript/build-ts.spec.ts index 71fbc7f7f6..a5f8374e7a 100644 --- a/tools/build/src/typescript/build-ts.spec.ts +++ b/tools/build/src/typescript/build-ts.spec.ts @@ -1,4 +1,3 @@ -import chalk from 'chalk'; import mockFs from 'mock-fs'; import { buildTypescript } from './build-ts'; @@ -35,6 +34,20 @@ describe('buildTypescript', () => { // Mock console methods for output verification consoleLogSpy = jest.spyOn(console, 'log').mockImplementation(() => {}); consoleErrorSpy = jest.spyOn(console, 'error').mockImplementation(() => {}); + + // Set up base mock filesystem for all tests + mockFs({ + '/test-project': { + 'package.json': '{"name": "test-project"}', + 'tsconfig.json': '{"compilerOptions": {}}', + src: { + 'index.ts': 'console.log("Hello world");', + }, + }, + }); + + // Set cwd to our test directory + jest.spyOn(process, 'cwd').mockReturnValue('/test-project'); }); afterEach(() => { @@ -45,8 +58,6 @@ describe('buildTypescript', () => { test('should run downlevel when option is provided', () => { buildTypescript([], { downlevel: true }); - - // Only verify the side effect we care about expect(runTypescriptDownlevel).toHaveBeenCalled(); }); @@ -57,57 +68,35 @@ describe('buildTypescript', () => { test('should log verbose information when enabled', () => { buildTypescript([], { verbose: true }); - // Only verify the observable output expect(consoleLogSpy).toHaveBeenCalledWith( - chalk.blue.bold(expect.stringContaining('Building TypeScript')), + expect.stringContaining('Building TypeScript'), ); }); - describe('with mock filesystem', () => { - test('should find tsconfig.json in the current directory', () => { - // Mock a directory with tsconfig.json - mockFs({ - '/test-project': { - 'package.json': '{"name": "test-project"}', - 'tsconfig.json': '{"compilerOptions": {}}', - src: { - 'index.ts': 'console.log("Hello world");', - }, - }, - }); - - // Set cwd to our test directory - jest.spyOn(process, 'cwd').mockReturnValue('/test-project'); - - buildTypescript(); - - // Verify no error about missing tsconfig - expect(consoleErrorSpy).not.toHaveBeenCalledWith( - chalk.red(expect.stringContaining('Could not find tsconfig')), - ); - }); + test('should find tsconfig.json in the current directory', () => { + buildTypescript(); + expect(consoleErrorSpy).not.toHaveBeenCalledWith( + expect.stringContaining('Could not find tsconfig'), + ); + }); - test('should exit with error when tsconfig.json is not found', () => { - // Mock a directory without tsconfig.json - mockFs({ - '/test-project': { - 'package.json': '{"name": "test-project"}', - src: { - 'index.ts': 'console.log("Hello world");', - }, + test('should exit with error when tsconfig.json is not found', () => { + // Remove tsconfig.json from mock filesystem + mockFs.restore(); + mockFs({ + '/test-project': { + 'package.json': '{"name": "test-project"}', + src: { + 'index.ts': 'console.log("Hello world");', }, - }); - - // Set cwd to our test directory - jest.spyOn(process, 'cwd').mockReturnValue('/test-project'); + }, + }); - buildTypescript(); + buildTypescript(); - // Verify error was logged and process exit was called - expect(consoleErrorSpy).toHaveBeenCalledWith( - chalk.red(expect.stringContaining('Could not find tsconfig')), - ); - expect(mockExit).toHaveBeenCalledWith(1); - }); + expect(consoleErrorSpy).toHaveBeenCalledWith( + expect.stringContaining('Could not find tsconfig'), + ); + expect(mockExit).toHaveBeenCalledWith(1); }); }); From d994c1a23942688883a6894653a0473ce3784ac5 Mon Sep 17 00:00:00 2001 From: Adam Michael Thompson Date: Mon, 14 Apr 2025 16:16:33 -0400 Subject: [PATCH 36/48] creates updateTypesVersions script --- tools/build/package.json | 3 +- tools/build/scripts/tsconfig.json | 8 +++ tools/build/scripts/updateTypesVersions.ts | 64 ++++++++++++++++++++++ 3 files changed, 74 insertions(+), 1 deletion(-) create mode 100644 tools/build/scripts/tsconfig.json create mode 100644 tools/build/scripts/updateTypesVersions.ts diff --git a/tools/build/package.json b/tools/build/package.json index a36eab3608..8c2a27d60b 100644 --- a/tools/build/package.json +++ b/tools/build/package.json @@ -14,7 +14,8 @@ "module": "dist/esm/index.js", "scripts": { "build": "rollup -c ./config/rollup.config.mjs", - "tsc": "tsc --build tsconfig.json" + "tsc": "tsc --build tsconfig.json", + "update-types-versions": "ts-node ./scripts/updateTypesVersions.ts" }, "dependencies": { "@babel/core": "7.24.3", diff --git a/tools/build/scripts/tsconfig.json b/tools/build/scripts/tsconfig.json new file mode 100644 index 0000000000..0d7684cfc6 --- /dev/null +++ b/tools/build/scripts/tsconfig.json @@ -0,0 +1,8 @@ +{ + "extends": "../config/root.tsconfig.json", + "compilerOptions": { + "noUnusedLocals": false, + "strict": true, + "baseUrl": ".", + } +} diff --git a/tools/build/scripts/updateTypesVersions.ts b/tools/build/scripts/updateTypesVersions.ts new file mode 100644 index 0000000000..d98dab70bd --- /dev/null +++ b/tools/build/scripts/updateTypesVersions.ts @@ -0,0 +1,64 @@ +/* eslint-disable no-console */ +import fs from 'fs'; +import { glob } from 'glob'; +import path from 'path'; +import { promisify } from 'util'; + +const readFile = promisify(fs.readFile); +const writeFile = promisify(fs.writeFile); + +const TYPES_VERSIONS_CONFIG = { + '<5.0': { + '*': ['dist/ts4.9/*'], + }, +}; + +/** + * Updates the `typesVersions` field in all package.json files + * + * Run this script if we need to change the TypeScript downleveling. + * + * The current build script parses the `typesVersions` field + * to determine which TypeScript version to use for downleveling. + */ +async function updateTypesVersions() { + try { + console.log('Updating typesVersions in package.json files...'); + + // Find the repository root (assuming this script is in tools/build/scripts) + const repoRoot = path.resolve(__dirname, '../../../'); + console.log(`Repository root: ${repoRoot}`); + + // Find all package.json files in the packages directory from the repo root + const packageJsonPaths = await glob('packages/*/package.json', { + cwd: repoRoot, + absolute: true, + }); + + console.log(`Found ${packageJsonPaths.length} package.json files`); + + // Process each package.json file + for (const filePath of packageJsonPaths) { + console.log(`Processing ${path.relative(repoRoot, filePath)}`); + + // Read the file + const content = await readFile(filePath, 'utf-8'); + const packageJson = JSON.parse(content); + + // Update the typesVersions field + packageJson.typesVersions = TYPES_VERSIONS_CONFIG; + + // Write the updated content back to the file + const updatedContent = JSON.stringify(packageJson, null, 2) + '\n'; + await writeFile(filePath, updatedContent); + } + + console.log('Successfully updated typesVersions in all package.json files'); + } catch (error) { + console.error('Error updating typesVersions:', error); + process.exit(1); + } +} + +// Execute the function +updateTypesVersions(); From cfb9da919ead2227cb9fcf5af05eefc68421c150 Mon Sep 17 00:00:00 2001 From: Adam Michael Thompson Date: Mon, 14 Apr 2025 16:24:38 -0400 Subject: [PATCH 37/48] exclude packages from ts downlevel script --- package.json | 9 +++++- tools/build/scripts/updateTypesVersions.ts | 32 ++++++++++++++++++---- tools/codemods/package.json | 7 +++++ tools/lint/package.json | 7 +++++ tools/meta/package.json | 5 ---- tools/test-harnesses/package.json | 5 ---- 6 files changed, 49 insertions(+), 16 deletions(-) diff --git a/package.json b/package.json index 30c5d59c30..3d4dda494d 100644 --- a/package.json +++ b/package.json @@ -106,5 +106,12 @@ "bugs": { "url": "https://github.com/mongodb/leafygreen-ui/issues" }, - "packageManager": "pnpm@9.15.0" + "packageManager": "pnpm@9.15.0", + "typesVersions": { + "<5.0": { + "*": [ + "dist/ts4.9/*" + ] + } + } } diff --git a/tools/build/scripts/updateTypesVersions.ts b/tools/build/scripts/updateTypesVersions.ts index d98dab70bd..3b1c2cd051 100644 --- a/tools/build/scripts/updateTypesVersions.ts +++ b/tools/build/scripts/updateTypesVersions.ts @@ -1,4 +1,5 @@ /* eslint-disable no-console */ +import chalk from 'chalk'; import fs from 'fs'; import { glob } from 'glob'; import path from 'path'; @@ -7,6 +8,21 @@ import { promisify } from 'util'; const readFile = promisify(fs.readFile); const writeFile = promisify(fs.writeFile); +// Packages to exclude from typesVersions updates +// These packages are CLI-only, and don't need to be down-leveled +const EXCLUDED_PACKAGES = [ + '@lg-tools/build', + '@lg-tools/cli', + '@lg-tools/create', + '@lg-tools/install', + '@lg-tools/link', + '@lg-tools/slackbot', + '@lg-tools/build', + '@lg-tools/test', + '@lg-tools/update', + '@lg-tools/validate', +]; + const TYPES_VERSIONS_CONFIG = { '<5.0': { '*': ['dist/ts4.9/*'], @@ -27,24 +43,30 @@ async function updateTypesVersions() { // Find the repository root (assuming this script is in tools/build/scripts) const repoRoot = path.resolve(__dirname, '../../../'); - console.log(`Repository root: ${repoRoot}`); // Find all package.json files in the packages directory from the repo root - const packageJsonPaths = await glob('packages/*/package.json', { + const packageJsonPaths = await glob('**/package.json', { cwd: repoRoot, absolute: true, }); - console.log(`Found ${packageJsonPaths.length} package.json files`); + console.log(`Found ${packageJsonPaths.length} packages`); // Process each package.json file for (const filePath of packageJsonPaths) { - console.log(`Processing ${path.relative(repoRoot, filePath)}`); - // Read the file const content = await readFile(filePath, 'utf-8'); const packageJson = JSON.parse(content); + const packageName = packageJson.name; + + if (EXCLUDED_PACKAGES.includes(packageName)) { + console.log(chalk.gray(`\tSkipping excluded package: ${packageName}`)); + continue; + } + + console.log(chalk.gray(`\tProcessing ${packageName}`)); + // Update the typesVersions field packageJson.typesVersions = TYPES_VERSIONS_CONFIG; diff --git a/tools/codemods/package.json b/tools/codemods/package.json index 4ffe089e86..0c529b13fd 100644 --- a/tools/codemods/package.json +++ b/tools/codemods/package.json @@ -34,5 +34,12 @@ }, "bugs": { "url": "https://jira.mongodb.org/projects/PD/summary" + }, + "typesVersions": { + "<5.0": { + "*": [ + "dist/ts4.9/*" + ] + } } } diff --git a/tools/lint/package.json b/tools/lint/package.json index 38b9ae88c4..fb74a95588 100644 --- a/tools/lint/package.json +++ b/tools/lint/package.json @@ -44,5 +44,12 @@ }, "peerDependencies": { "typescript": "~5.0.0" + }, + "typesVersions": { + "<5.0": { + "*": [ + "dist/ts4.9/*" + ] + } } } diff --git a/tools/meta/package.json b/tools/meta/package.json index d10b45d43f..ee352979df 100644 --- a/tools/meta/package.json +++ b/tools/meta/package.json @@ -22,11 +22,6 @@ "lodash": "4.17.21" }, "typesVersions": { - "<4.0": { - "*": [ - "dist/ts3.4/*" - ] - }, "<5.0": { "*": [ "dist/ts4.9/*" diff --git a/tools/test-harnesses/package.json b/tools/test-harnesses/package.json index 7ef9d6a4d5..63008cc0ab 100644 --- a/tools/test-harnesses/package.json +++ b/tools/test-harnesses/package.json @@ -16,11 +16,6 @@ "@testing-library/dom": "9.3.1" }, "typesVersions": { - "<4.0": { - "*": [ - "dist/ts3.4/*" - ] - }, "<5.0": { "*": [ "dist/ts4.9/*" From b11ab500301067a1a556b46b3e4df6dbda98c3aa Mon Sep 17 00:00:00 2001 From: Adam Michael Thompson Date: Mon, 14 Apr 2025 16:25:09 -0400 Subject: [PATCH 38/48] remove typesVersions --- charts/chart-card/package.json | 8 +------- charts/colors/package.json | 8 +------- charts/core/package.json | 8 +------- charts/drag-provider/package.json | 8 +------- charts/legend/package.json | 8 +------- charts/series-provider/package.json | 8 +------- chat/avatar/package.json | 8 +------- chat/chat-disclaimer/package.json | 8 +------- chat/chat-window/package.json | 8 +------- chat/fixed-chat-window/package.json | 8 +------- chat/input-bar/package.json | 8 +------- chat/leafygreen-chat-provider/package.json | 8 +------- chat/lg-markdown/package.json | 8 +------- chat/message-feed/package.json | 8 +------- chat/message-feedback/package.json | 8 +------- chat/message-prompts/package.json | 8 +------- chat/message-rating/package.json | 8 +------- chat/message/package.json | 8 +------- chat/rich-links/package.json | 8 +------- chat/title-bar/package.json | 8 +------- package.json | 8 +------- packages/a11y/package.json | 8 +------- packages/avatar/package.json | 8 +------- packages/badge/package.json | 8 +------- packages/banner/package.json | 8 +------- packages/box/package.json | 8 +------- packages/button/package.json | 8 +------- packages/callout/package.json | 8 +------- packages/card/package.json | 8 +------- packages/checkbox/package.json | 8 +------- packages/chip/package.json | 8 +------- packages/code/package.json | 8 +------- packages/combobox/package.json | 8 +------- packages/confirmation-modal/package.json | 8 +------- packages/copyable/package.json | 8 +------- packages/date-picker/package.json | 8 +------- packages/date-utils/package.json | 8 +------- packages/descendants/package.json | 8 +------- packages/drawer/package.json | 8 +------- packages/emotion/package.json | 8 +------- packages/empty-state/package.json | 8 +------- packages/expandable-card/package.json | 8 +------- packages/form-field/package.json | 8 +------- packages/form-footer/package.json | 8 +------- packages/gallery-indicator/package.json | 8 +------- packages/guide-cue/package.json | 8 +------- packages/hooks/package.json | 8 +------- packages/icon-button/package.json | 8 +------- packages/icon/package.json | 8 +------- packages/info-sprinkle/package.json | 8 +------- packages/inline-definition/package.json | 8 +------- packages/input-option/package.json | 8 +------- packages/leafygreen-provider/package.json | 8 +------- packages/lib/package.json | 8 +------- packages/loading-indicator/package.json | 8 +------- packages/logo/package.json | 8 +------- packages/marketing-modal/package.json | 8 +------- packages/menu/package.json | 8 +------- packages/modal/package.json | 8 +------- packages/number-input/package.json | 8 +------- packages/ordered-list/package.json | 8 +------- packages/pagination/package.json | 8 +------- packages/palette/package.json | 8 +------- packages/password-input/package.json | 8 +------- packages/pipeline/package.json | 8 +------- packages/polymorphic/package.json | 8 +------- packages/popover/package.json | 8 +------- packages/portal/package.json | 8 +------- packages/radio-box-group/package.json | 8 +------- packages/radio-group/package.json | 8 +------- packages/ripple/package.json | 8 +------- packages/search-input/package.json | 8 +------- packages/segmented-control/package.json | 8 +------- packages/select/package.json | 8 +------- packages/side-nav/package.json | 8 +------- packages/skeleton-loader/package.json | 8 +------- packages/split-button/package.json | 8 +------- packages/stepper/package.json | 8 +------- packages/table/package.json | 8 +------- packages/tabs/package.json | 8 +------- packages/testing-lib/package.json | 8 +------- packages/text-area/package.json | 8 +------- packages/text-input/package.json | 8 +------- packages/toast/package.json | 8 +------- packages/toggle/package.json | 8 +------- packages/tokens/package.json | 8 +------- packages/tooltip/package.json | 8 +------- packages/typography/package.json | 8 +------- tools/build/scripts/updateTypesVersions.ts | 7 ++----- tools/codemods/package.json | 8 +------- tools/lint/package.json | 8 +------- tools/meta/package.json | 8 +------- tools/storybook-addon/package.json | 8 +------- tools/storybook-decorators/package.json | 8 +------- tools/storybook-utils/package.json | 8 +------- tools/test-harnesses/package.json | 8 +------- 96 files changed, 97 insertions(+), 670 deletions(-) diff --git a/charts/chart-card/package.json b/charts/chart-card/package.json index fa9f53b9dd..52ddf6c0fb 100644 --- a/charts/chart-card/package.json +++ b/charts/chart-card/package.json @@ -35,11 +35,5 @@ "bugs": { "url": "https://jira.mongodb.org/projects/PD/summary" }, - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - } + "typesVersions": {} } diff --git a/charts/colors/package.json b/charts/colors/package.json index ed4baeb068..55207577d2 100644 --- a/charts/colors/package.json +++ b/charts/colors/package.json @@ -32,11 +32,5 @@ "bugs": { "url": "https://jira.mongodb.org/projects/PD/summary" }, - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - } + "typesVersions": {} } diff --git a/charts/core/package.json b/charts/core/package.json index 97398a3cd6..1a5a7cae67 100644 --- a/charts/core/package.json +++ b/charts/core/package.json @@ -43,11 +43,5 @@ "bugs": { "url": "https://jira.mongodb.org/projects/PD/summary" }, - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - } + "typesVersions": {} } diff --git a/charts/drag-provider/package.json b/charts/drag-provider/package.json index 86396d3349..b8d4eb0f30 100644 --- a/charts/drag-provider/package.json +++ b/charts/drag-provider/package.json @@ -33,11 +33,5 @@ "devDependencies": { "@storybook/test": "8.5.3" }, - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - } + "typesVersions": {} } diff --git a/charts/legend/package.json b/charts/legend/package.json index 71c21fefd5..947c2923a2 100644 --- a/charts/legend/package.json +++ b/charts/legend/package.json @@ -37,11 +37,5 @@ "bugs": { "url": "https://jira.mongodb.org/projects/PD/summary" }, - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - } + "typesVersions": {} } diff --git a/charts/series-provider/package.json b/charts/series-provider/package.json index 56f61d9991..d43696d228 100644 --- a/charts/series-provider/package.json +++ b/charts/series-provider/package.json @@ -24,11 +24,5 @@ "peerDependencies": { "@leafygreen-ui/leafygreen-provider": "workspace:^" }, - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - } + "typesVersions": {} } diff --git a/chat/avatar/package.json b/chat/avatar/package.json index 9ccfeb96e7..9d97659c18 100644 --- a/chat/avatar/package.json +++ b/chat/avatar/package.json @@ -5,13 +5,7 @@ "main": "./dist/index.js", "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - }, + "typesVersions": {}, "scripts": { "build": "lg build-package", "tsc": "lg build-ts" diff --git a/chat/chat-disclaimer/package.json b/chat/chat-disclaimer/package.json index 5321a9879f..20bac4f0c5 100644 --- a/chat/chat-disclaimer/package.json +++ b/chat/chat-disclaimer/package.json @@ -33,11 +33,5 @@ "bugs": { "url": "https://jira.mongodb.org/projects/PD/summary" }, - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - } + "typesVersions": {} } diff --git a/chat/chat-window/package.json b/chat/chat-window/package.json index 870c77db97..3d981f0569 100644 --- a/chat/chat-window/package.json +++ b/chat/chat-window/package.json @@ -5,13 +5,7 @@ "main": "./dist/index.js", "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - }, + "typesVersions": {}, "scripts": { "build": "lg build-package", "tsc": "lg build-ts" diff --git a/chat/fixed-chat-window/package.json b/chat/fixed-chat-window/package.json index e798da7f09..5ee2fd46e5 100644 --- a/chat/fixed-chat-window/package.json +++ b/chat/fixed-chat-window/package.json @@ -46,11 +46,5 @@ "bugs": { "url": "https://jira.mongodb.org/projects/PD/summary" }, - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - } + "typesVersions": {} } diff --git a/chat/input-bar/package.json b/chat/input-bar/package.json index dc403516d8..56db749890 100644 --- a/chat/input-bar/package.json +++ b/chat/input-bar/package.json @@ -5,13 +5,7 @@ "main": "./dist/index.js", "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - }, + "typesVersions": {}, "scripts": { "build": "lg build-package", "tsc": "lg build-ts" diff --git a/chat/leafygreen-chat-provider/package.json b/chat/leafygreen-chat-provider/package.json index a5d31c6579..59fc43ec6e 100644 --- a/chat/leafygreen-chat-provider/package.json +++ b/chat/leafygreen-chat-provider/package.json @@ -5,13 +5,7 @@ "main": "./dist/index.js", "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - }, + "typesVersions": {}, "scripts": { "build": "lg build-package", "tsc": "lg build-ts" diff --git a/chat/lg-markdown/package.json b/chat/lg-markdown/package.json index 5e37623b89..631dbdd14f 100644 --- a/chat/lg-markdown/package.json +++ b/chat/lg-markdown/package.json @@ -5,13 +5,7 @@ "main": "./dist/index.js", "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - }, + "typesVersions": {}, "scripts": { "build": "lg build-package", "tsc": "lg build-ts" diff --git a/chat/message-feed/package.json b/chat/message-feed/package.json index 4cf8b72f25..6a5f0eaa97 100644 --- a/chat/message-feed/package.json +++ b/chat/message-feed/package.json @@ -5,13 +5,7 @@ "main": "./dist/index.js", "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - }, + "typesVersions": {}, "scripts": { "build": "lg build-package", "tsc": "lg build-ts" diff --git a/chat/message-feedback/package.json b/chat/message-feedback/package.json index deca1576ba..35dd3103b0 100644 --- a/chat/message-feedback/package.json +++ b/chat/message-feedback/package.json @@ -5,13 +5,7 @@ "main": "./dist/index.js", "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - }, + "typesVersions": {}, "license": "Apache-2.0", "scripts": { "build": "lg build-package", diff --git a/chat/message-prompts/package.json b/chat/message-prompts/package.json index 82fe664857..aa101b043e 100644 --- a/chat/message-prompts/package.json +++ b/chat/message-prompts/package.json @@ -33,11 +33,5 @@ "url": "https://jira.mongodb.org/projects/PD/summary" }, "devDependencies": {}, - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - } + "typesVersions": {} } diff --git a/chat/message-rating/package.json b/chat/message-rating/package.json index c7317c3b3c..0a02b3990f 100644 --- a/chat/message-rating/package.json +++ b/chat/message-rating/package.json @@ -5,13 +5,7 @@ "main": "./dist/index.js", "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - }, + "typesVersions": {}, "scripts": { "build": "lg build-package", "tsc": "lg build-ts" diff --git a/chat/message/package.json b/chat/message/package.json index 3d9386a55d..8bf69fd6fb 100644 --- a/chat/message/package.json +++ b/chat/message/package.json @@ -5,13 +5,7 @@ "main": "./dist/index.js", "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - }, + "typesVersions": {}, "scripts": { "build": "lg build-package", "tsc": "lg build-ts" diff --git a/chat/rich-links/package.json b/chat/rich-links/package.json index 195928dc64..cf55145acd 100644 --- a/chat/rich-links/package.json +++ b/chat/rich-links/package.json @@ -37,11 +37,5 @@ "url": "https://jira.mongodb.org/projects/PD/summary" }, "devDependencies": {}, - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - } + "typesVersions": {} } diff --git a/chat/title-bar/package.json b/chat/title-bar/package.json index 2b4bfe7217..4ab7078fca 100644 --- a/chat/title-bar/package.json +++ b/chat/title-bar/package.json @@ -5,13 +5,7 @@ "main": "./dist/index.js", "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - }, + "typesVersions": {}, "scripts": { "build": "lg build-package", "tsc": "lg build-ts" diff --git a/package.json b/package.json index 3d4dda494d..2cbaaa0393 100644 --- a/package.json +++ b/package.json @@ -107,11 +107,5 @@ "url": "https://github.com/mongodb/leafygreen-ui/issues" }, "packageManager": "pnpm@9.15.0", - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - } + "typesVersions": {} } diff --git a/packages/a11y/package.json b/packages/a11y/package.json index 146339cfb1..3ce07718b3 100644 --- a/packages/a11y/package.json +++ b/packages/a11y/package.json @@ -5,13 +5,7 @@ "main": "./dist/index.js", "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - }, + "typesVersions": {}, "scripts": { "build": "lg build-package", "tsc": "lg build-ts", diff --git a/packages/avatar/package.json b/packages/avatar/package.json index 5704a812e0..d621227fb2 100644 --- a/packages/avatar/package.json +++ b/packages/avatar/package.json @@ -5,13 +5,7 @@ "main": "./dist/index.js", "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - }, + "typesVersions": {}, "scripts": { "build": "lg build-package", "tsc": "lg build-ts", diff --git a/packages/badge/package.json b/packages/badge/package.json index 3763a61f4d..a658d30cce 100644 --- a/packages/badge/package.json +++ b/packages/badge/package.json @@ -5,13 +5,7 @@ "main": "./dist/index.js", "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - }, + "typesVersions": {}, "scripts": { "build": "lg build-package", "tsc": "lg build-ts", diff --git a/packages/banner/package.json b/packages/banner/package.json index 1bd94f6f43..605d808ba3 100644 --- a/packages/banner/package.json +++ b/packages/banner/package.json @@ -5,13 +5,7 @@ "main": "./dist/index.js", "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - }, + "typesVersions": {}, "scripts": { "build": "lg build-package", "tsc": "lg build-ts", diff --git a/packages/box/package.json b/packages/box/package.json index c3eee4d2aa..2c19c14f95 100644 --- a/packages/box/package.json +++ b/packages/box/package.json @@ -5,13 +5,7 @@ "main": "./dist/index.js", "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - }, + "typesVersions": {}, "scripts": { "build": "lg build-package", "tsc": "lg build-ts", diff --git a/packages/button/package.json b/packages/button/package.json index 873d7aa072..6795c19073 100644 --- a/packages/button/package.json +++ b/packages/button/package.json @@ -5,13 +5,7 @@ "main": "./dist/index.js", "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - }, + "typesVersions": {}, "scripts": { "build": "lg build-package", "tsc": "lg build-ts", diff --git a/packages/callout/package.json b/packages/callout/package.json index c67e97040d..c17d1f1bd1 100644 --- a/packages/callout/package.json +++ b/packages/callout/package.json @@ -5,13 +5,7 @@ "main": "./dist/index.js", "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - }, + "typesVersions": {}, "scripts": { "build": "lg build-package", "tsc": "lg build-ts", diff --git a/packages/card/package.json b/packages/card/package.json index 84a804dfb0..22a1342361 100644 --- a/packages/card/package.json +++ b/packages/card/package.json @@ -5,13 +5,7 @@ "main": "./dist/index.js", "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - }, + "typesVersions": {}, "scripts": { "build": "lg build-package", "tsc": "lg build-ts", diff --git a/packages/checkbox/package.json b/packages/checkbox/package.json index 86a45ae986..1b64df505b 100644 --- a/packages/checkbox/package.json +++ b/packages/checkbox/package.json @@ -5,13 +5,7 @@ "main": "./dist/index.js", "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - }, + "typesVersions": {}, "scripts": { "build": "lg build-package", "tsc": "lg build-ts", diff --git a/packages/chip/package.json b/packages/chip/package.json index 073cd7eeb4..25b7aeefb0 100644 --- a/packages/chip/package.json +++ b/packages/chip/package.json @@ -34,11 +34,5 @@ "url": "https://jira.mongodb.org/projects/PD/summary" }, "devDependencies": {}, - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - } + "typesVersions": {} } diff --git a/packages/code/package.json b/packages/code/package.json index 4184305a37..3b2ebd1b6f 100644 --- a/packages/code/package.json +++ b/packages/code/package.json @@ -5,13 +5,7 @@ "main": "./dist/index.js", "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - }, + "typesVersions": {}, "scripts": { "build": "lg build-package", "tsc": "lg build-ts", diff --git a/packages/combobox/package.json b/packages/combobox/package.json index fbfba725e0..da391e731f 100644 --- a/packages/combobox/package.json +++ b/packages/combobox/package.json @@ -5,13 +5,7 @@ "main": "./dist/index.js", "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - }, + "typesVersions": {}, "scripts": { "build": "lg build-package", "tsc": "lg build-ts", diff --git a/packages/confirmation-modal/package.json b/packages/confirmation-modal/package.json index 61ffdd0879..44a831fb83 100644 --- a/packages/confirmation-modal/package.json +++ b/packages/confirmation-modal/package.json @@ -5,13 +5,7 @@ "main": "./dist/index.js", "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - }, + "typesVersions": {}, "scripts": { "build": "lg build-package", "tsc": "lg build-ts", diff --git a/packages/copyable/package.json b/packages/copyable/package.json index de5b5026a1..a2fa6c3a83 100644 --- a/packages/copyable/package.json +++ b/packages/copyable/package.json @@ -5,13 +5,7 @@ "main": "./dist/index.js", "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - }, + "typesVersions": {}, "scripts": { "build": "lg build-package", "tsc": "lg build-ts", diff --git a/packages/date-picker/package.json b/packages/date-picker/package.json index 85a263d948..43ada593e3 100644 --- a/packages/date-picker/package.json +++ b/packages/date-picker/package.json @@ -50,11 +50,5 @@ "bugs": { "url": "https://jira.mongodb.org/projects/PD/summary" }, - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - } + "typesVersions": {} } diff --git a/packages/date-utils/package.json b/packages/date-utils/package.json index 581b9d9382..e8e9bac161 100644 --- a/packages/date-utils/package.json +++ b/packages/date-utils/package.json @@ -38,11 +38,5 @@ "date", "date-fns" ], - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - } + "typesVersions": {} } diff --git a/packages/descendants/package.json b/packages/descendants/package.json index 95fd67d79d..ee9ae775fa 100644 --- a/packages/descendants/package.json +++ b/packages/descendants/package.json @@ -36,11 +36,5 @@ "bugs": { "url": "https://jira.mongodb.org/projects/PD/summary" }, - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - } + "typesVersions": {} } diff --git a/packages/drawer/package.json b/packages/drawer/package.json index 24d7e3fd71..be19a9ef73 100644 --- a/packages/drawer/package.json +++ b/packages/drawer/package.json @@ -44,11 +44,5 @@ "bugs": { "url": "https://jira.mongodb.org/projects/PD/summary" }, - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - } + "typesVersions": {} } diff --git a/packages/emotion/package.json b/packages/emotion/package.json index 2726d5555f..8e8d04ec2d 100644 --- a/packages/emotion/package.json +++ b/packages/emotion/package.json @@ -5,13 +5,7 @@ "main": "./dist/index.js", "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - }, + "typesVersions": {}, "scripts": { "prebuild": "ts-node scripts/prebuild.ts", "build": "lg build-package", diff --git a/packages/empty-state/package.json b/packages/empty-state/package.json index 7d5d5a0d9a..3806f1be04 100644 --- a/packages/empty-state/package.json +++ b/packages/empty-state/package.json @@ -5,13 +5,7 @@ "main": "./dist/index.js", "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - }, + "typesVersions": {}, "scripts": { "build": "lg build-package", "tsc": "lg build-ts", diff --git a/packages/expandable-card/package.json b/packages/expandable-card/package.json index 2db1cf7b1b..e880a5b553 100644 --- a/packages/expandable-card/package.json +++ b/packages/expandable-card/package.json @@ -5,13 +5,7 @@ "main": "./dist/index.js", "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - }, + "typesVersions": {}, "scripts": { "build": "lg build-package", "tsc": "lg build-ts", diff --git a/packages/form-field/package.json b/packages/form-field/package.json index edcea57534..20ba381c98 100644 --- a/packages/form-field/package.json +++ b/packages/form-field/package.json @@ -38,11 +38,5 @@ "bugs": { "url": "https://jira.mongodb.org/projects/PD/summary" }, - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - } + "typesVersions": {} } diff --git a/packages/form-footer/package.json b/packages/form-footer/package.json index a1f5d9a7e9..3e77a0c73b 100644 --- a/packages/form-footer/package.json +++ b/packages/form-footer/package.json @@ -5,13 +5,7 @@ "main": "./dist/index.js", "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - }, + "typesVersions": {}, "scripts": { "build": "lg build-package", "tsc": "lg build-ts", diff --git a/packages/gallery-indicator/package.json b/packages/gallery-indicator/package.json index 0323d6510e..224f25e42c 100644 --- a/packages/gallery-indicator/package.json +++ b/packages/gallery-indicator/package.json @@ -33,11 +33,5 @@ "url": "https://jira.mongodb.org/projects/PD/summary" }, "devDependencies": {}, - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - } + "typesVersions": {} } diff --git a/packages/guide-cue/package.json b/packages/guide-cue/package.json index cde3cf11f1..05ff9d326c 100644 --- a/packages/guide-cue/package.json +++ b/packages/guide-cue/package.json @@ -5,13 +5,7 @@ "main": "./dist/index.js", "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - }, + "typesVersions": {}, "scripts": { "build": "lg build-package", "tsc": "lg build-ts", diff --git a/packages/hooks/package.json b/packages/hooks/package.json index b8bbef3366..5edffe4f84 100644 --- a/packages/hooks/package.json +++ b/packages/hooks/package.json @@ -5,13 +5,7 @@ "main": "./dist/index.js", "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - }, + "typesVersions": {}, "scripts": { "build": "lg build-package", "tsc": "lg build-ts", diff --git a/packages/icon-button/package.json b/packages/icon-button/package.json index c3a2184e5e..051525dcfa 100644 --- a/packages/icon-button/package.json +++ b/packages/icon-button/package.json @@ -5,13 +5,7 @@ "main": "./dist/index.js", "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - }, + "typesVersions": {}, "scripts": { "build": "lg build-package", "tsc": "lg build-ts", diff --git a/packages/icon/package.json b/packages/icon/package.json index b44356ec42..e9e46078fc 100644 --- a/packages/icon/package.json +++ b/packages/icon/package.json @@ -5,13 +5,7 @@ "main": "./dist/index.js", "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - }, + "typesVersions": {}, "scripts": { "prebuild": "ts-node ./scripts/prebuild.ts", "build": "lg build-package", diff --git a/packages/info-sprinkle/package.json b/packages/info-sprinkle/package.json index 196d88e9c2..b01161a409 100644 --- a/packages/info-sprinkle/package.json +++ b/packages/info-sprinkle/package.json @@ -34,11 +34,5 @@ "url": "https://jira.mongodb.org/projects/PD/summary" }, "devDependencies": {}, - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - } + "typesVersions": {} } diff --git a/packages/inline-definition/package.json b/packages/inline-definition/package.json index 9c7f152c0e..de719ae3bf 100644 --- a/packages/inline-definition/package.json +++ b/packages/inline-definition/package.json @@ -5,13 +5,7 @@ "main": "./dist/index.js", "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - }, + "typesVersions": {}, "scripts": { "build": "lg build-package", "tsc": "lg build-ts", diff --git a/packages/input-option/package.json b/packages/input-option/package.json index ecab93efc8..2051416cf5 100644 --- a/packages/input-option/package.json +++ b/packages/input-option/package.json @@ -5,13 +5,7 @@ "main": "./dist/index.js", "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - }, + "typesVersions": {}, "scripts": { "build": "lg build-package", "tsc": "lg build-ts", diff --git a/packages/leafygreen-provider/package.json b/packages/leafygreen-provider/package.json index 715f2c4485..7977b673c1 100644 --- a/packages/leafygreen-provider/package.json +++ b/packages/leafygreen-provider/package.json @@ -5,13 +5,7 @@ "main": "./dist/index.js", "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - }, + "typesVersions": {}, "scripts": { "build": "lg build-package", "tsc": "lg build-ts", diff --git a/packages/lib/package.json b/packages/lib/package.json index e5b9dbfe94..737a338e9a 100644 --- a/packages/lib/package.json +++ b/packages/lib/package.json @@ -5,13 +5,7 @@ "main": "./dist/index.js", "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - }, + "typesVersions": {}, "scripts": { "build": "lg build-package", "tsc": "lg build-ts", diff --git a/packages/loading-indicator/package.json b/packages/loading-indicator/package.json index 29806212fb..900558a174 100644 --- a/packages/loading-indicator/package.json +++ b/packages/loading-indicator/package.json @@ -5,13 +5,7 @@ "main": "./dist/index.js", "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - }, + "typesVersions": {}, "scripts": { "build": "lg build-package", "tsc": "lg build-ts", diff --git a/packages/logo/package.json b/packages/logo/package.json index 149f8e473c..24d6413b7c 100644 --- a/packages/logo/package.json +++ b/packages/logo/package.json @@ -5,13 +5,7 @@ "main": "./dist/index.js", "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - }, + "typesVersions": {}, "scripts": { "build": "lg build-package", "tsc": "lg build-ts", diff --git a/packages/marketing-modal/package.json b/packages/marketing-modal/package.json index 1f83c4def1..37425263fd 100644 --- a/packages/marketing-modal/package.json +++ b/packages/marketing-modal/package.json @@ -5,13 +5,7 @@ "main": "./dist/index.js", "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - }, + "typesVersions": {}, "scripts": { "build": "lg build-package", "tsc": "lg build-ts", diff --git a/packages/menu/package.json b/packages/menu/package.json index 3b8d4022ea..a46a94cde2 100644 --- a/packages/menu/package.json +++ b/packages/menu/package.json @@ -5,13 +5,7 @@ "main": "./dist/index.js", "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - }, + "typesVersions": {}, "scripts": { "build": "lg build-package", "tsc": "lg build-ts", diff --git a/packages/modal/package.json b/packages/modal/package.json index bba841b3e5..1b85da25ff 100644 --- a/packages/modal/package.json +++ b/packages/modal/package.json @@ -5,13 +5,7 @@ "main": "./dist/index.js", "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - }, + "typesVersions": {}, "scripts": { "build": "lg build-package", "tsc": "lg build-ts", diff --git a/packages/number-input/package.json b/packages/number-input/package.json index efc512c8ec..a125fe77f5 100644 --- a/packages/number-input/package.json +++ b/packages/number-input/package.json @@ -5,13 +5,7 @@ "main": "./dist/index.js", "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - }, + "typesVersions": {}, "scripts": { "build": "lg build-package", "tsc": "lg build-ts", diff --git a/packages/ordered-list/package.json b/packages/ordered-list/package.json index 0b67ea745a..80990c3353 100644 --- a/packages/ordered-list/package.json +++ b/packages/ordered-list/package.json @@ -33,11 +33,5 @@ "bugs": { "url": "https://jira.mongodb.org/projects/PD/summary" }, - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - } + "typesVersions": {} } diff --git a/packages/pagination/package.json b/packages/pagination/package.json index 58eb748543..c762ed58ac 100644 --- a/packages/pagination/package.json +++ b/packages/pagination/package.json @@ -5,13 +5,7 @@ "main": "./dist/index.js", "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - }, + "typesVersions": {}, "scripts": { "build": "lg build-package", "tsc": "lg build-ts", diff --git a/packages/palette/package.json b/packages/palette/package.json index 1b26482848..0eb9dff255 100644 --- a/packages/palette/package.json +++ b/packages/palette/package.json @@ -5,13 +5,7 @@ "main": "./dist/index.js", "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - }, + "typesVersions": {}, "scripts": { "build": "lg build-package", "tsc": "lg build-ts", diff --git a/packages/password-input/package.json b/packages/password-input/package.json index a6f3eb6caa..02ee49e312 100644 --- a/packages/password-input/package.json +++ b/packages/password-input/package.json @@ -5,13 +5,7 @@ "main": "./dist/index.js", "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - }, + "typesVersions": {}, "scripts": { "build": "lg build-package", "tsc": "lg build-ts", diff --git a/packages/pipeline/package.json b/packages/pipeline/package.json index a88d39812e..eaf67bda0f 100644 --- a/packages/pipeline/package.json +++ b/packages/pipeline/package.json @@ -5,13 +5,7 @@ "main": "./dist/index.js", "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - }, + "typesVersions": {}, "scripts": { "build": "lg build-package", "tsc": "lg build-ts", diff --git a/packages/polymorphic/package.json b/packages/polymorphic/package.json index 277745afd6..50d411352f 100644 --- a/packages/polymorphic/package.json +++ b/packages/polymorphic/package.json @@ -5,13 +5,7 @@ "main": "./dist/index.js", "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - }, + "typesVersions": {}, "scripts": { "build": "lg build-package", "tsc": "lg build-ts", diff --git a/packages/popover/package.json b/packages/popover/package.json index 3c15171dc5..17acd0a9f0 100644 --- a/packages/popover/package.json +++ b/packages/popover/package.json @@ -5,13 +5,7 @@ "main": "./dist/index.js", "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - }, + "typesVersions": {}, "scripts": { "build": "lg build-package", "tsc": "lg build-ts", diff --git a/packages/portal/package.json b/packages/portal/package.json index 4cb2f40347..51dbb7437e 100644 --- a/packages/portal/package.json +++ b/packages/portal/package.json @@ -5,13 +5,7 @@ "main": "./dist/index.js", "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - }, + "typesVersions": {}, "scripts": { "build": "lg build-package", "tsc": "lg build-ts", diff --git a/packages/radio-box-group/package.json b/packages/radio-box-group/package.json index 44c61897c3..788102d5dc 100644 --- a/packages/radio-box-group/package.json +++ b/packages/radio-box-group/package.json @@ -5,13 +5,7 @@ "main": "./dist/index.js", "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - }, + "typesVersions": {}, "scripts": { "build": "lg build-package", "tsc": "lg build-ts", diff --git a/packages/radio-group/package.json b/packages/radio-group/package.json index 08adf2196c..eec4f7bb47 100644 --- a/packages/radio-group/package.json +++ b/packages/radio-group/package.json @@ -5,13 +5,7 @@ "main": "./dist/index.js", "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - }, + "typesVersions": {}, "scripts": { "build": "lg build-package", "tsc": "lg build-ts", diff --git a/packages/ripple/package.json b/packages/ripple/package.json index 75cdc0459b..217d9c97cf 100644 --- a/packages/ripple/package.json +++ b/packages/ripple/package.json @@ -5,13 +5,7 @@ "main": "./dist/index.js", "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - }, + "typesVersions": {}, "scripts": { "build": "lg build-package", "tsc": "lg build-ts", diff --git a/packages/search-input/package.json b/packages/search-input/package.json index 22bc98d0f5..d09789ef89 100644 --- a/packages/search-input/package.json +++ b/packages/search-input/package.json @@ -5,13 +5,7 @@ "main": "./dist/index.js", "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - }, + "typesVersions": {}, "scripts": { "build": "lg build-package", "tsc": "lg build-ts", diff --git a/packages/segmented-control/package.json b/packages/segmented-control/package.json index e97681aad1..c40337c111 100644 --- a/packages/segmented-control/package.json +++ b/packages/segmented-control/package.json @@ -5,13 +5,7 @@ "main": "./dist/index.js", "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - }, + "typesVersions": {}, "scripts": { "build": "lg build-package", "tsc": "lg build-ts", diff --git a/packages/select/package.json b/packages/select/package.json index 0f526741df..3379f20a2f 100644 --- a/packages/select/package.json +++ b/packages/select/package.json @@ -5,13 +5,7 @@ "main": "./dist/index.js", "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - }, + "typesVersions": {}, "scripts": { "build": "lg build-package", "tsc": "lg build-ts", diff --git a/packages/side-nav/package.json b/packages/side-nav/package.json index a770aa6516..6beb4534b2 100644 --- a/packages/side-nav/package.json +++ b/packages/side-nav/package.json @@ -5,13 +5,7 @@ "main": "./dist/index.js", "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - }, + "typesVersions": {}, "scripts": { "build": "lg build-package", "tsc": "lg build-ts", diff --git a/packages/skeleton-loader/package.json b/packages/skeleton-loader/package.json index 6fa37a1275..029162abe0 100644 --- a/packages/skeleton-loader/package.json +++ b/packages/skeleton-loader/package.json @@ -5,13 +5,7 @@ "main": "./dist/index.js", "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - }, + "typesVersions": {}, "scripts": { "build": "lg build-package", "tsc": "lg build-ts", diff --git a/packages/split-button/package.json b/packages/split-button/package.json index 88b09717c6..1da91a61d1 100644 --- a/packages/split-button/package.json +++ b/packages/split-button/package.json @@ -5,13 +5,7 @@ "main": "./dist/index.js", "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - }, + "typesVersions": {}, "scripts": { "build": "lg build-package", "tsc": "lg build-ts", diff --git a/packages/stepper/package.json b/packages/stepper/package.json index 3005ea02fc..6b7b9e8f32 100644 --- a/packages/stepper/package.json +++ b/packages/stepper/package.json @@ -5,13 +5,7 @@ "main": "./dist/index.js", "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - }, + "typesVersions": {}, "scripts": { "build": "lg build-package", "tsc": "lg build-ts", diff --git a/packages/table/package.json b/packages/table/package.json index d72e3155e3..0418aaa5cf 100644 --- a/packages/table/package.json +++ b/packages/table/package.json @@ -5,13 +5,7 @@ "main": "./dist/index.js", "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - }, + "typesVersions": {}, "scripts": { "build": "lg build-package", "tsc": "lg build-ts", diff --git a/packages/tabs/package.json b/packages/tabs/package.json index d5d868d5d6..832ad67e68 100644 --- a/packages/tabs/package.json +++ b/packages/tabs/package.json @@ -5,13 +5,7 @@ "main": "./dist/index.js", "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - }, + "typesVersions": {}, "scripts": { "build": "lg build-package", "tsc": "lg build-ts", diff --git a/packages/testing-lib/package.json b/packages/testing-lib/package.json index 4be3099198..2c07f07607 100644 --- a/packages/testing-lib/package.json +++ b/packages/testing-lib/package.json @@ -5,13 +5,7 @@ "main": "./dist/index.js", "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - }, + "typesVersions": {}, "dependencies": { "@lg-tools/build": "workspace:^", "@testing-library/user-event": "13.5.0", diff --git a/packages/text-area/package.json b/packages/text-area/package.json index ab917942ce..295e92ccaf 100644 --- a/packages/text-area/package.json +++ b/packages/text-area/package.json @@ -5,13 +5,7 @@ "main": "./dist/index.js", "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - }, + "typesVersions": {}, "scripts": { "build": "lg build-package", "tsc": "lg build-ts", diff --git a/packages/text-input/package.json b/packages/text-input/package.json index eab31e7fab..2bf3920d6b 100644 --- a/packages/text-input/package.json +++ b/packages/text-input/package.json @@ -5,13 +5,7 @@ "main": "./dist/index.js", "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - }, + "typesVersions": {}, "scripts": { "build": "lg build-package", "tsc": "lg build-ts", diff --git a/packages/toast/package.json b/packages/toast/package.json index 054d5d8607..e0238abadf 100644 --- a/packages/toast/package.json +++ b/packages/toast/package.json @@ -5,13 +5,7 @@ "main": "./dist/index.js", "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - }, + "typesVersions": {}, "scripts": { "build": "lg build-package", "tsc": "lg build-ts", diff --git a/packages/toggle/package.json b/packages/toggle/package.json index d432c35b0a..1bb9cd9ae1 100644 --- a/packages/toggle/package.json +++ b/packages/toggle/package.json @@ -5,13 +5,7 @@ "main": "./dist/index.js", "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - }, + "typesVersions": {}, "scripts": { "build": "lg build-package", "tsc": "lg build-ts", diff --git a/packages/tokens/package.json b/packages/tokens/package.json index fe825f6ff3..46150abec6 100644 --- a/packages/tokens/package.json +++ b/packages/tokens/package.json @@ -5,13 +5,7 @@ "main": "./dist/index.js", "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - }, + "typesVersions": {}, "scripts": { "build": "lg build-package", "tsc": "lg build-ts", diff --git a/packages/tooltip/package.json b/packages/tooltip/package.json index a99743e4dd..0c5197da8f 100644 --- a/packages/tooltip/package.json +++ b/packages/tooltip/package.json @@ -5,13 +5,7 @@ "main": "./dist/index.js", "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - }, + "typesVersions": {}, "scripts": { "build": "lg build-package", "tsc": "lg build-ts", diff --git a/packages/typography/package.json b/packages/typography/package.json index 6c17ce4f7d..0730554d85 100644 --- a/packages/typography/package.json +++ b/packages/typography/package.json @@ -5,13 +5,7 @@ "main": "./dist/index.js", "module": "./dist/esm/index.js", "types": "./dist/index.d.ts", - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - }, + "typesVersions": {}, "scripts": { "build": "lg build-package", "tsc": "lg build-ts", diff --git a/tools/build/scripts/updateTypesVersions.ts b/tools/build/scripts/updateTypesVersions.ts index 3b1c2cd051..067c184bea 100644 --- a/tools/build/scripts/updateTypesVersions.ts +++ b/tools/build/scripts/updateTypesVersions.ts @@ -23,11 +23,8 @@ const EXCLUDED_PACKAGES = [ '@lg-tools/validate', ]; -const TYPES_VERSIONS_CONFIG = { - '<5.0': { - '*': ['dist/ts4.9/*'], - }, -}; +// Currently we don't downlevel TS +const TYPES_VERSIONS_CONFIG = {}; /** * Updates the `typesVersions` field in all package.json files diff --git a/tools/codemods/package.json b/tools/codemods/package.json index 0c529b13fd..d3fbe6767a 100644 --- a/tools/codemods/package.json +++ b/tools/codemods/package.json @@ -35,11 +35,5 @@ "bugs": { "url": "https://jira.mongodb.org/projects/PD/summary" }, - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - } + "typesVersions": {} } diff --git a/tools/lint/package.json b/tools/lint/package.json index fb74a95588..4d76739411 100644 --- a/tools/lint/package.json +++ b/tools/lint/package.json @@ -45,11 +45,5 @@ "peerDependencies": { "typescript": "~5.0.0" }, - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - } + "typesVersions": {} } diff --git a/tools/meta/package.json b/tools/meta/package.json index ee352979df..7c90721574 100644 --- a/tools/meta/package.json +++ b/tools/meta/package.json @@ -21,11 +21,5 @@ "fs-extra": "11.1.1", "lodash": "4.17.21" }, - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - } + "typesVersions": {} } diff --git a/tools/storybook-addon/package.json b/tools/storybook-addon/package.json index 54295ad4eb..331ff28c6d 100644 --- a/tools/storybook-addon/package.json +++ b/tools/storybook-addon/package.json @@ -66,11 +66,5 @@ "react-dom": "^17.0.0 || ^18.0.0", "storybook": "^8.6.0" }, - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - } + "typesVersions": {} } diff --git a/tools/storybook-decorators/package.json b/tools/storybook-decorators/package.json index 42485f1d48..4963547d15 100644 --- a/tools/storybook-decorators/package.json +++ b/tools/storybook-decorators/package.json @@ -27,11 +27,5 @@ "peerDependencies": { "@leafygreen-ui/leafygreen-provider": "workspace:^" }, - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - } + "typesVersions": {} } diff --git a/tools/storybook-utils/package.json b/tools/storybook-utils/package.json index a7eec4cff2..e09e856c82 100644 --- a/tools/storybook-utils/package.json +++ b/tools/storybook-utils/package.json @@ -27,11 +27,5 @@ "bugs": { "url": "https://jira.mongodb.org/projects/PD/summary" }, - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - } + "typesVersions": {} } diff --git a/tools/test-harnesses/package.json b/tools/test-harnesses/package.json index 63008cc0ab..80e165cd26 100644 --- a/tools/test-harnesses/package.json +++ b/tools/test-harnesses/package.json @@ -15,11 +15,5 @@ "dependencies": { "@testing-library/dom": "9.3.1" }, - "typesVersions": { - "<5.0": { - "*": [ - "dist/ts4.9/*" - ] - } - } + "typesVersions": {} } From 9c0239b64a37032fa2d15ea66b71ae251748211b Mon Sep 17 00:00:00 2001 From: Adam Michael Thompson Date: Mon, 21 Apr 2025 15:59:54 -0400 Subject: [PATCH 39/48] Create typescript-5-all.md --- .changeset/typescript-5-all.md | 102 +++++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 .changeset/typescript-5-all.md diff --git a/.changeset/typescript-5-all.md b/.changeset/typescript-5-all.md new file mode 100644 index 0000000000..4d415a0dce --- /dev/null +++ b/.changeset/typescript-5-all.md @@ -0,0 +1,102 @@ +--- +'@leafygreen-ui/a11y': major +'@leafygreen-ui/avatar': major +'@leafygreen-ui/badge': major +'@leafygreen-ui/banner': major +'@leafygreen-ui/box': major +'@leafygreen-ui/button': major +'@leafygreen-ui/callout': major +'@leafygreen-ui/card': major +'@leafygreen-ui/checkbox': major +'@leafygreen-ui/chip': major +'@leafygreen-ui/code': major +'@leafygreen-ui/combobox': major +'@leafygreen-ui/confirmation-modal': major +'@leafygreen-ui/copyable': major +'@leafygreen-ui/date-picker': major +'@leafygreen-ui/descendants': major +'@leafygreen-ui/drawer': major +'@leafygreen-ui/emotion': major +'@leafygreen-ui/empty-state': major +'@leafygreen-ui/expandable-card': major +'@leafygreen-ui/form-field': major +'@leafygreen-ui/form-footer': major +'@leafygreen-ui/gallery-indicator': major +'@leafygreen-ui/guide-cue': major +'@leafygreen-ui/hooks': major +'@leafygreen-ui/icon': major +'@leafygreen-ui/icon-button': major +'@leafygreen-ui/info-sprinkle': major +'@leafygreen-ui/inline-definition': major +'@leafygreen-ui/input-option': major +'@leafygreen-ui/leafygreen-provider': major +'@leafygreen-ui/lib': major +'@leafygreen-ui/loading-indicator': major +'@leafygreen-ui/logo': major +'@leafygreen-ui/marketing-modal': major +'@leafygreen-ui/menu': major +'@leafygreen-ui/modal': major +'@leafygreen-ui/number-input': major +'@leafygreen-ui/ordered-list': major +'@leafygreen-ui/pagination': major +'@leafygreen-ui/palette': major +'@leafygreen-ui/password-input': major +'@leafygreen-ui/pipeline': major +'@leafygreen-ui/polymorphic': major +'@leafygreen-ui/popover': major +'@leafygreen-ui/portal': major +'@leafygreen-ui/radio-box-group': major +'@leafygreen-ui/radio-group': major +'@leafygreen-ui/ripple': major +'@leafygreen-ui/search-input': major +'@leafygreen-ui/segmented-control': major +'@leafygreen-ui/select': major +'@leafygreen-ui/side-nav': major +'@leafygreen-ui/skeleton-loader': major +'@leafygreen-ui/split-button': major +'@leafygreen-ui/stepper': major +'@leafygreen-ui/table': major +'@leafygreen-ui/tabs': major +'@leafygreen-ui/text-area': major +'@leafygreen-ui/text-input': major +'@leafygreen-ui/toast': major +'@leafygreen-ui/toggle': major +'@leafygreen-ui/tokens': major +'@leafygreen-ui/tooltip': major +'@leafygreen-ui/typography': major +'@lg-chat/avatar': major +'@lg-chat/chat-disclaimer': major +'@lg-chat/chat-window': major +'@lg-chat/fixed-chat-window': major +'@lg-chat/input-bar': major +'@lg-chat/leafygreen-chat-provider': major +'@lg-chat/lg-markdown': major +'@lg-chat/message': major +'@lg-chat/message-feed': major +'@lg-chat/message-feedback': major +'@lg-chat/message-prompts': major +'@lg-chat/message-rating': major +'@lg-chat/rich-links': major +'@lg-chat/title-bar': major +'@lg-tools/lint': major + +'@lg-tools/build': minor +'@lg-tools/cli': minor +'@lg-tools/meta': minor +'@lg-tools/codemods': minor +'@leafygreen-ui/date-utils': minor +'@leafygreen-ui/testing-lib': minor +'@lg-tools/storybook-addon': minor +'@lg-tools/storybook-decorators': minor +'@lg-tools/storybook-utils': minor +'@lg-tools/test-harnesses': minor +'@lg-charts/chart-card': minor +'@lg-charts/colors': minor +'@lg-charts/core': minor +'@lg-charts/drag-provider': minor +'@lg-charts/legend': minor +'@lg-charts/series-provider': minor + +--- + +Updates Typescript build to TS5.0 From 48d9603cbffe9edd3060e2360aecd1cbcebab06f Mon Sep 17 00:00:00 2001 From: Adam Michael Thompson Date: Mon, 21 Apr 2025 17:20:31 -0400 Subject: [PATCH 40/48] updates all tsconfigs --- packages/code/tsconfig.json | 15 +++++++------ packages/emotion/scripts/tsconfig.json | 5 ++++- packages/icon/scripts/tsconfig.json | 4 +--- tools/build/config/node.tsconfig.json | 8 +++++++ tools/build/config/package.tsconfig.json | 22 +++++++++---------- ...oot.tsconfig.json => script.tsconfig.json} | 22 ++++++++++--------- tools/build/src/rollup/build-package.ts | 2 +- tools/build/tsconfig.json | 2 +- tools/cli/tsconfig.json | 2 +- tools/codemods/tsconfig.json | 2 +- tools/create/tsconfig.json | 2 +- tools/install/tsconfig.json | 2 +- tools/link/tsconfig.json | 2 +- tools/lint/tsconfig.json | 2 +- tools/meta/tsconfig.json | 2 +- tools/slackbot/tsconfig.json | 2 +- tools/storybook-addon/tsconfig.json | 2 +- tools/test/scripts/tsconfig.json | 20 +---------------- tools/test/tsconfig.json | 2 +- tools/update/tsconfig.json | 2 +- tools/validate/tsconfig.json | 2 +- tsconfig.json | 5 +++-- 22 files changed, 62 insertions(+), 67 deletions(-) create mode 100644 tools/build/config/node.tsconfig.json rename tools/build/config/{root.tsconfig.json => script.tsconfig.json} (52%) diff --git a/packages/code/tsconfig.json b/packages/code/tsconfig.json index b266709304..d7fc91c421 100644 --- a/packages/code/tsconfig.json +++ b/packages/code/tsconfig.json @@ -11,16 +11,17 @@ ], "@leafygreen-ui/*": [ "../*/src" - ] + ], + "highlight.js": [ + "./node_modules/highlight.js" + ], } }, - "include": [ - "src/**/*", - "../../typings" - ], + "include": ["src/**/*",], "exclude": [ - "**/*.spec.*", - "**/*.stories.*" + "**/*.spec.*", + "**/*.stories.*", + "node_modules" ], "references": [ { diff --git a/packages/emotion/scripts/tsconfig.json b/packages/emotion/scripts/tsconfig.json index 64bae4d3ed..dcc14b3519 100644 --- a/packages/emotion/scripts/tsconfig.json +++ b/packages/emotion/scripts/tsconfig.json @@ -1,3 +1,6 @@ { - "extends": "@lg-tools/build/config/root.tsconfig.json" + "extends": "@lg-tools/build/config/script.tsconfig.json", + "compilerOptions": { + "baseUrl": ".", + } } diff --git a/packages/icon/scripts/tsconfig.json b/packages/icon/scripts/tsconfig.json index 8b474f56ce..dcc14b3519 100644 --- a/packages/icon/scripts/tsconfig.json +++ b/packages/icon/scripts/tsconfig.json @@ -1,8 +1,6 @@ { - "extends": "@lg-tools/build/config/root.tsconfig.json", + "extends": "@lg-tools/build/config/script.tsconfig.json", "compilerOptions": { - "noUnusedLocals": false, - "strict": true, "baseUrl": ".", } } diff --git a/tools/build/config/node.tsconfig.json b/tools/build/config/node.tsconfig.json new file mode 100644 index 0000000000..86a2d11196 --- /dev/null +++ b/tools/build/config/node.tsconfig.json @@ -0,0 +1,8 @@ +{ + "$schema": "https://json.schemastore.org/tsconfig", + "extends": "./package.tsconfig.json", + "compilerOptions": { + "resolveJsonModule": true, + "lib": ["ES2020"] + } +} diff --git a/tools/build/config/package.tsconfig.json b/tools/build/config/package.tsconfig.json index 3c69443fe2..42c183ec46 100644 --- a/tools/build/config/package.tsconfig.json +++ b/tools/build/config/package.tsconfig.json @@ -1,22 +1,22 @@ { "$schema": "https://json.schemastore.org/tsconfig", "compilerOptions": { - "module": "esnext", + "module": "ESNext", "moduleResolution": "node", + "target": "ES2017", + "jsx": "react", + "incremental": true, + "composite": true, "declaration": true, "declarationMap": true, "emitDeclarationOnly": true, - "importHelpers": false, - "composite": true, - "target": "ES2017", - "jsx": "react", - "allowJs": false, - "pretty": true, - "strictNullChecks": true, - "noUnusedLocals": true, "esModuleInterop": true, - "strict": true, "allowSyntheticDefaultImports": true, - "skipLibCheck": true + "importHelpers": false, + "allowJs": true, + "strict": true, + "strictNullChecks": true, + "pretty": true, + "skipLibCheck": true, } } diff --git a/tools/build/config/root.tsconfig.json b/tools/build/config/script.tsconfig.json similarity index 52% rename from tools/build/config/root.tsconfig.json rename to tools/build/config/script.tsconfig.json index 679381ebe5..ab15f461b6 100644 --- a/tools/build/config/root.tsconfig.json +++ b/tools/build/config/script.tsconfig.json @@ -1,20 +1,22 @@ { "$schema": "https://json.schemastore.org/tsconfig", "compilerOptions": { - "module": "CommonJS", - "moduleResolution": "node", - "target": "ES6", - "jsx": "react", - "incremental": true, + "module": "NodeNext", + "moduleResolution": "nodenext", + "target": "ESNext", + "incremental": false, + "composite": false, + "declaration": false, + "declarationMap": false, "noEmit": true, "emitDeclarationOnly": false, - "allowJs": true, - "pretty": true, - "strictNullChecks": true, - "noUnusedLocals": true, "esModuleInterop": true, "allowSyntheticDefaultImports": true, + "allowJs": true, + "strict": true, "resolveJsonModule": true, - "skipLibCheck": true + "pretty": true, + "skipLibCheck": true, + "lib": ["ESNext"] } } diff --git a/tools/build/src/rollup/build-package.ts b/tools/build/src/rollup/build-package.ts index 0d9099ab24..b24adcc29d 100644 --- a/tools/build/src/rollup/build-package.ts +++ b/tools/build/src/rollup/build-package.ts @@ -4,8 +4,8 @@ import rollup, { type MergedRollupOptions } from 'rollup'; import { type BatchWarnings, type LoadConfigFile, + // @ts-expect-error - type declaration incorrectly defined } from 'rollup/dist/loadConfigFile'; -// @ts-expect-error - type declaration incorrectly defined import { loadConfigFile as _loadConfigFile } from 'rollup/loadConfigFile'; import { findRollupConfigFile } from './findRollupConfigFile'; diff --git a/tools/build/tsconfig.json b/tools/build/tsconfig.json index 5eec8d81f7..36ac1f48de 100644 --- a/tools/build/tsconfig.json +++ b/tools/build/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "./config/package.tsconfig.json", + "extends": "./config/node.tsconfig.json", "compilerOptions": { "declarationDir": "dist", "outDir": "dist", diff --git a/tools/cli/tsconfig.json b/tools/cli/tsconfig.json index 7a5936bebb..e48ee335ce 100644 --- a/tools/cli/tsconfig.json +++ b/tools/cli/tsconfig.json @@ -1,6 +1,6 @@ { "$schema": "https://json.schemastore.org/tsconfig", - "extends": "@lg-tools/build/config/package.tsconfig.json", + "extends": "@lg-tools/build/config/node.tsconfig.json", "compilerOptions": { "declarationDir": "dist", "outDir": "dist", diff --git a/tools/codemods/tsconfig.json b/tools/codemods/tsconfig.json index 8355aef68a..9241b199cb 100644 --- a/tools/codemods/tsconfig.json +++ b/tools/codemods/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "@lg-tools/build/config/package.tsconfig.json", + "extends": "@lg-tools/build/config/node.tsconfig.json", "compilerOptions": { "declarationDir": "dist", "outDir": "dist", diff --git a/tools/create/tsconfig.json b/tools/create/tsconfig.json index 8aa47f44f2..26e7d3c9f4 100644 --- a/tools/create/tsconfig.json +++ b/tools/create/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "@lg-tools/build/config/package.tsconfig.json", + "extends": "@lg-tools/build/config/node.tsconfig.json", "compilerOptions": { "declarationDir": "dist", "outDir": "dist", diff --git a/tools/install/tsconfig.json b/tools/install/tsconfig.json index 4e2c6dd331..2863411147 100644 --- a/tools/install/tsconfig.json +++ b/tools/install/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "@lg-tools/build/config/package.tsconfig.json", + "extends": "@lg-tools/build/config/node.tsconfig.json", "compilerOptions": { "declarationDir": "dist", "outDir": "dist", diff --git a/tools/link/tsconfig.json b/tools/link/tsconfig.json index df524d7435..5eec0fcfa1 100644 --- a/tools/link/tsconfig.json +++ b/tools/link/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "@lg-tools/build/config/package.tsconfig.json", + "extends": "@lg-tools/build/config/node.tsconfig.json", "compilerOptions": { "declarationDir": "dist", "outDir": "dist", diff --git a/tools/lint/tsconfig.json b/tools/lint/tsconfig.json index 138b1ff296..2d8c266657 100644 --- a/tools/lint/tsconfig.json +++ b/tools/lint/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "@lg-tools/build/config/package.tsconfig.json", + "extends": "@lg-tools/build/config/node.tsconfig.json", "compilerOptions": { "declarationDir": "dist", "outDir": "dist", diff --git a/tools/meta/tsconfig.json b/tools/meta/tsconfig.json index 5cf2118d39..3f4d88e47a 100644 --- a/tools/meta/tsconfig.json +++ b/tools/meta/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "@lg-tools/build/config/package.tsconfig.json", + "extends": "@lg-tools/build/config/node.tsconfig.json", "compilerOptions": { "declarationDir": "dist", "outDir": "dist", diff --git a/tools/slackbot/tsconfig.json b/tools/slackbot/tsconfig.json index 56246f186f..d28416e26f 100644 --- a/tools/slackbot/tsconfig.json +++ b/tools/slackbot/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "@lg-tools/build/config/package.tsconfig.json", + "extends": "@lg-tools/build/config/node.tsconfig.json", "compilerOptions": { "declarationDir": "dist", "outDir": "dist", diff --git a/tools/storybook-addon/tsconfig.json b/tools/storybook-addon/tsconfig.json index 9bd3637ea3..4819377ef9 100644 --- a/tools/storybook-addon/tsconfig.json +++ b/tools/storybook-addon/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "@lg-tools/build/config/package.tsconfig.json", + "extends": "@lg-tools/build/config/node.tsconfig.json", "compilerOptions": { "declarationDir": "dist", "outDir": "dist", diff --git a/tools/test/scripts/tsconfig.json b/tools/test/scripts/tsconfig.json index 8a87b66e02..693fb6c516 100644 --- a/tools/test/scripts/tsconfig.json +++ b/tools/test/scripts/tsconfig.json @@ -1,21 +1,3 @@ { - "compilerOptions": { - "module": "CommonJS", - "noEmit": true, - "tsBuildInfoFile": "./tsconfig.tsbuildinfo", - "incremental": true, - "target": "ES6", - "jsx": "react", - "allowJs": true, - "pretty": true, - "strictNullChecks": true, - "noUnusedLocals": false, - "esModuleInterop": true, - "strict": true, - "allowSyntheticDefaultImports": true, - "moduleResolution": "node", - "baseUrl": ".", - "skipLibCheck": true, - "resolveJsonModule": true, - } + "extends": "@lg-tools/build/config/scripts.tsconfig.json", } diff --git a/tools/test/tsconfig.json b/tools/test/tsconfig.json index b84fcb1e92..a4f4e58d33 100644 --- a/tools/test/tsconfig.json +++ b/tools/test/tsconfig.json @@ -1,6 +1,6 @@ { "$schema": "https://json.schemastore.org/tsconfig", - "extends": "@lg-tools/build/config/package.tsconfig.json", + "extends": "@lg-tools/build/config/node.tsconfig.json", "compilerOptions": { "declarationDir": "dist", "outDir": "dist", diff --git a/tools/update/tsconfig.json b/tools/update/tsconfig.json index 9adbfb12f2..083e921781 100644 --- a/tools/update/tsconfig.json +++ b/tools/update/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "@lg-tools/build/config/package.tsconfig.json", + "extends": "@lg-tools/build/config/node.tsconfig.json", "compilerOptions": { "declarationDir": "dist", "outDir": "dist", diff --git a/tools/validate/tsconfig.json b/tools/validate/tsconfig.json index 7ecd464d13..a47d7178ef 100644 --- a/tools/validate/tsconfig.json +++ b/tools/validate/tsconfig.json @@ -1,6 +1,6 @@ { "$schema": "https://json.schemastore.org/tsconfig", - "extends": "@lg-tools/build/config/package.tsconfig.json", + "extends": "@lg-tools/build/config/node.tsconfig.json", "compilerOptions": { "declarationDir": "dist", "outDir": "dist", diff --git a/tsconfig.json b/tsconfig.json index 724dab671b..97f9701916 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,7 +1,8 @@ { "$schema": "https://json.schemastore.org/tsconfig", - "extends": "@lg-tools/build/config/root.tsconfig.json", "compilerOptions": { + "module": "None", + "composite": true, "baseUrl": ".", "paths": { "@leafygreen-ui/icon/dist/*": ["./packages/icon/src/generated/*"], @@ -11,6 +12,6 @@ "@lg-tools/*": ["tools/*/src"], } }, - "include": ["./charts", "./chat", "./packages", "./tools", "./scripts" ], + "include": ["./charts", "./chat", "./packages", "./tools" ], "exclude": ["node_modules", "**/dist"] } From 2e15153a053b95d98dfc52d40527fe8b903c4a36 Mon Sep 17 00:00:00 2001 From: Adam Michael Thompson Date: Mon, 21 Apr 2025 17:28:01 -0400 Subject: [PATCH 41/48] Update build-package.ts --- tools/build/src/rollup/build-package.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/build/src/rollup/build-package.ts b/tools/build/src/rollup/build-package.ts index b24adcc29d..71e08a282f 100644 --- a/tools/build/src/rollup/build-package.ts +++ b/tools/build/src/rollup/build-package.ts @@ -4,9 +4,9 @@ import rollup, { type MergedRollupOptions } from 'rollup'; import { type BatchWarnings, type LoadConfigFile, - // @ts-expect-error - type declaration incorrectly defined -} from 'rollup/dist/loadConfigFile'; -import { loadConfigFile as _loadConfigFile } from 'rollup/loadConfigFile'; + loadConfigFile as _loadConfigFile, + // @ts-expect-error - types not declared correctly in rollup +} from 'rollup/loadConfigFile'; import { findRollupConfigFile } from './findRollupConfigFile'; From b00a933a9525f23b4c6d383db5557c18132608f3 Mon Sep 17 00:00:00 2001 From: Adam Michael Thompson Date: Mon, 21 Apr 2025 18:06:00 -0400 Subject: [PATCH 42/48] updates scripts --- pnpm-lock.yaml | 292 ++++++++++++++------- pnpm-workspace.yaml | 3 +- scripts/package.json | 13 + scripts/tsconfig.json | 2 +- scripts/update-readme.ts | 1 - scripts/updateTypesVersions.ts | 100 +++++++ tools/build/scripts/tsconfig.json | 2 +- tools/build/scripts/updateTypesVersions.ts | 83 ------ 8 files changed, 316 insertions(+), 180 deletions(-) create mode 100644 scripts/package.json create mode 100644 scripts/updateTypesVersions.ts delete mode 100644 tools/build/scripts/updateTypesVersions.ts diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d59eefe596..1b30fc9949 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -236,7 +236,7 @@ importers: devDependencies: '@storybook/test': specifier: 8.5.3 - version: 8.5.3(storybook@8.6.12(prettier@2.8.8)) + version: 8.5.3(storybook@8.6.12(prettier@3.5.3)) charts/legend: dependencies: @@ -2899,6 +2899,18 @@ importers: specifier: workspace:^ version: link:../tokens + scripts: + dependencies: + '@lg-tools/meta': + specifier: workspace:* + version: link:../tools/meta + chalk: + specifier: ^4.1.2 + version: 4.1.2 + prettier: + specifier: ^3.5.3 + version: 3.5.3 + tools/build: dependencies: '@babel/core': @@ -3316,43 +3328,43 @@ importers: version: 2.3.0(react@18.2.0) '@storybook/addon-a11y': specifier: 8.6.12 - version: 8.6.12(storybook@8.6.12(prettier@2.8.8)) + version: 8.6.12(storybook@8.6.12(prettier@3.5.3)) '@storybook/addon-essentials': specifier: 8.6.12 - version: 8.6.12(@types/react@18.2.23)(storybook@8.6.12(prettier@2.8.8)) + version: 8.6.12(@types/react@18.2.23)(storybook@8.6.12(prettier@3.5.3)) '@storybook/addon-interactions': specifier: 8.6.12 - version: 8.6.12(storybook@8.6.12(prettier@2.8.8)) + version: 8.6.12(storybook@8.6.12(prettier@3.5.3)) '@storybook/addon-links': specifier: 8.6.12 - version: 8.6.12(react@18.2.0)(storybook@8.6.12(prettier@2.8.8)) + version: 8.6.12(react@18.2.0)(storybook@8.6.12(prettier@3.5.3)) '@storybook/addon-mdx-gfm': specifier: 8.6.12 - version: 8.6.12(storybook@8.6.12(prettier@2.8.8)) + version: 8.6.12(storybook@8.6.12(prettier@3.5.3)) '@storybook/components': specifier: 8.6.12 - version: 8.6.12(storybook@8.6.12(prettier@2.8.8)) + version: 8.6.12(storybook@8.6.12(prettier@3.5.3)) '@storybook/core-events': specifier: 8.6.12 - version: 8.6.12(storybook@8.6.12(prettier@2.8.8)) + version: 8.6.12(storybook@8.6.12(prettier@3.5.3)) '@storybook/manager-api': specifier: 8.6.12 - version: 8.6.12(storybook@8.6.12(prettier@2.8.8)) + version: 8.6.12(storybook@8.6.12(prettier@3.5.3)) '@storybook/preview-api': specifier: 8.6.12 - version: 8.6.12(storybook@8.6.12(prettier@2.8.8)) + version: 8.6.12(storybook@8.6.12(prettier@3.5.3)) '@storybook/react': specifier: 8.6.12 - version: 8.6.12(@storybook/test@8.6.12(storybook@8.6.12(prettier@2.8.8)))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.6.12(prettier@2.8.8))(typescript@5.0.4) + version: 8.6.12(@storybook/test@8.6.12(storybook@8.6.12(prettier@3.5.3)))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.6.12(prettier@3.5.3))(typescript@5.0.4) '@storybook/react-webpack5': specifier: 8.6.12 - version: 8.6.12(@storybook/test@8.6.12(storybook@8.6.12(prettier@2.8.8)))(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.24.2)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.6.12(prettier@2.8.8))(typescript@5.0.4) + version: 8.6.12(@storybook/test@8.6.12(storybook@8.6.12(prettier@3.5.3)))(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.24.2)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.6.12(prettier@3.5.3))(typescript@5.0.4) '@storybook/test': specifier: 8.6.12 - version: 8.6.12(storybook@8.6.12(prettier@2.8.8)) + version: 8.6.12(storybook@8.6.12(prettier@3.5.3)) '@storybook/theming': specifier: 8.6.12 - version: 8.6.12(storybook@8.6.12(prettier@2.8.8)) + version: 8.6.12(storybook@8.6.12(prettier@3.5.3)) '@svgr/webpack': specifier: 8.0.1 version: 8.0.1(typescript@5.0.4) @@ -3403,10 +3415,10 @@ importers: version: 18.2.0(react@18.2.0) storybook: specifier: ^8.6.0 - version: 8.6.12(prettier@2.8.8) + version: 8.6.12(prettier@3.5.3) storybook-dark-mode: specifier: ^4.0.1 - version: 4.0.1(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.6.12(prettier@2.8.8)) + version: 4.0.1(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.6.12(prettier@3.5.3)) stream-browserify: specifier: 3.0.0 version: 3.0.0 @@ -3457,7 +3469,7 @@ importers: version: link:../storybook-utils '@storybook/react': specifier: 8.6.12 - version: 8.6.12(@storybook/test@8.6.12(storybook@8.6.12(prettier@2.8.8)))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.6.12(prettier@2.8.8))(typescript@5.0.4) + version: 8.6.12(@storybook/test@8.6.12(storybook@8.6.12(prettier@3.5.3)))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.6.12(prettier@3.5.3))(typescript@5.0.4) lodash: specifier: 4.17.21 version: 4.17.21 @@ -3469,7 +3481,7 @@ importers: version: 0.1.13 '@storybook/react': specifier: 8.6.12 - version: 8.6.12(@storybook/test@8.6.12(storybook@8.6.12(prettier@2.8.8)))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.6.12(prettier@2.8.8))(typescript@5.0.4) + version: 8.6.12(@storybook/test@8.6.12(storybook@8.6.12(prettier@3.5.3)))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.6.12(prettier@3.5.3))(typescript@5.0.4) glob: specifier: 10.3.12 version: 10.3.12 @@ -9215,6 +9227,11 @@ packages: engines: {node: '>=10.13.0'} hasBin: true + prettier@3.5.3: + resolution: {integrity: sha512-QQtaxnoDJeAkDvDKWCLiwIXkTgRhwYDEQCghU9Z6q03iyek/rxRh/2lC3HB7P8sWT2xC/y5JDctPLBIGzHKbhw==} + engines: {node: '>=14'} + hasBin: true + pretty-error@4.0.0: resolution: {integrity: sha512-AoJ5YMAcXKYxKhuJGdcvse+Voc6v1RgnsR3nWcYU7q4t6z0Q6T86sv5Zq8VIRbOWWFpvdGE83LtdSMNd+6Y0xw==} @@ -12459,129 +12476,129 @@ snapshots: transitivePeerDependencies: - debug - '@storybook/addon-a11y@8.6.12(storybook@8.6.12(prettier@2.8.8))': + '@storybook/addon-a11y@8.6.12(storybook@8.6.12(prettier@3.5.3))': dependencies: - '@storybook/addon-highlight': 8.6.12(storybook@8.6.12(prettier@2.8.8)) + '@storybook/addon-highlight': 8.6.12(storybook@8.6.12(prettier@3.5.3)) '@storybook/global': 5.0.0 - '@storybook/test': 8.6.12(storybook@8.6.12(prettier@2.8.8)) + '@storybook/test': 8.6.12(storybook@8.6.12(prettier@3.5.3)) axe-core: 4.10.2 - storybook: 8.6.12(prettier@2.8.8) + storybook: 8.6.12(prettier@3.5.3) - '@storybook/addon-actions@8.6.12(storybook@8.6.12(prettier@2.8.8))': + '@storybook/addon-actions@8.6.12(storybook@8.6.12(prettier@3.5.3))': dependencies: '@storybook/global': 5.0.0 '@types/uuid': 9.0.8 dequal: 2.0.3 polished: 4.3.1 - storybook: 8.6.12(prettier@2.8.8) + storybook: 8.6.12(prettier@3.5.3) uuid: 9.0.0 - '@storybook/addon-backgrounds@8.6.12(storybook@8.6.12(prettier@2.8.8))': + '@storybook/addon-backgrounds@8.6.12(storybook@8.6.12(prettier@3.5.3))': dependencies: '@storybook/global': 5.0.0 memoizerific: 1.11.3 - storybook: 8.6.12(prettier@2.8.8) + storybook: 8.6.12(prettier@3.5.3) ts-dedent: 2.2.0 - '@storybook/addon-controls@8.6.12(storybook@8.6.12(prettier@2.8.8))': + '@storybook/addon-controls@8.6.12(storybook@8.6.12(prettier@3.5.3))': dependencies: '@storybook/global': 5.0.0 dequal: 2.0.3 - storybook: 8.6.12(prettier@2.8.8) + storybook: 8.6.12(prettier@3.5.3) ts-dedent: 2.2.0 - '@storybook/addon-docs@8.6.12(@types/react@18.2.23)(storybook@8.6.12(prettier@2.8.8))': + '@storybook/addon-docs@8.6.12(@types/react@18.2.23)(storybook@8.6.12(prettier@3.5.3))': dependencies: '@mdx-js/react': 3.1.0(@types/react@18.2.23)(react@18.2.0) - '@storybook/blocks': 8.6.12(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.6.12(prettier@2.8.8)) - '@storybook/csf-plugin': 8.6.12(storybook@8.6.12(prettier@2.8.8)) - '@storybook/react-dom-shim': 8.6.12(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.6.12(prettier@2.8.8)) + '@storybook/blocks': 8.6.12(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.6.12(prettier@3.5.3)) + '@storybook/csf-plugin': 8.6.12(storybook@8.6.12(prettier@3.5.3)) + '@storybook/react-dom-shim': 8.6.12(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.6.12(prettier@3.5.3)) react: 18.2.0 react-dom: 18.2.0(react@18.2.0) - storybook: 8.6.12(prettier@2.8.8) + storybook: 8.6.12(prettier@3.5.3) ts-dedent: 2.2.0 transitivePeerDependencies: - '@types/react' - '@storybook/addon-essentials@8.6.12(@types/react@18.2.23)(storybook@8.6.12(prettier@2.8.8))': - dependencies: - '@storybook/addon-actions': 8.6.12(storybook@8.6.12(prettier@2.8.8)) - '@storybook/addon-backgrounds': 8.6.12(storybook@8.6.12(prettier@2.8.8)) - '@storybook/addon-controls': 8.6.12(storybook@8.6.12(prettier@2.8.8)) - '@storybook/addon-docs': 8.6.12(@types/react@18.2.23)(storybook@8.6.12(prettier@2.8.8)) - '@storybook/addon-highlight': 8.6.12(storybook@8.6.12(prettier@2.8.8)) - '@storybook/addon-measure': 8.6.12(storybook@8.6.12(prettier@2.8.8)) - '@storybook/addon-outline': 8.6.12(storybook@8.6.12(prettier@2.8.8)) - '@storybook/addon-toolbars': 8.6.12(storybook@8.6.12(prettier@2.8.8)) - '@storybook/addon-viewport': 8.6.12(storybook@8.6.12(prettier@2.8.8)) - storybook: 8.6.12(prettier@2.8.8) + '@storybook/addon-essentials@8.6.12(@types/react@18.2.23)(storybook@8.6.12(prettier@3.5.3))': + dependencies: + '@storybook/addon-actions': 8.6.12(storybook@8.6.12(prettier@3.5.3)) + '@storybook/addon-backgrounds': 8.6.12(storybook@8.6.12(prettier@3.5.3)) + '@storybook/addon-controls': 8.6.12(storybook@8.6.12(prettier@3.5.3)) + '@storybook/addon-docs': 8.6.12(@types/react@18.2.23)(storybook@8.6.12(prettier@3.5.3)) + '@storybook/addon-highlight': 8.6.12(storybook@8.6.12(prettier@3.5.3)) + '@storybook/addon-measure': 8.6.12(storybook@8.6.12(prettier@3.5.3)) + '@storybook/addon-outline': 8.6.12(storybook@8.6.12(prettier@3.5.3)) + '@storybook/addon-toolbars': 8.6.12(storybook@8.6.12(prettier@3.5.3)) + '@storybook/addon-viewport': 8.6.12(storybook@8.6.12(prettier@3.5.3)) + storybook: 8.6.12(prettier@3.5.3) ts-dedent: 2.2.0 transitivePeerDependencies: - '@types/react' - '@storybook/addon-highlight@8.6.12(storybook@8.6.12(prettier@2.8.8))': + '@storybook/addon-highlight@8.6.12(storybook@8.6.12(prettier@3.5.3))': dependencies: '@storybook/global': 5.0.0 - storybook: 8.6.12(prettier@2.8.8) + storybook: 8.6.12(prettier@3.5.3) - '@storybook/addon-interactions@8.6.12(storybook@8.6.12(prettier@2.8.8))': + '@storybook/addon-interactions@8.6.12(storybook@8.6.12(prettier@3.5.3))': dependencies: '@storybook/global': 5.0.0 - '@storybook/instrumenter': 8.6.12(storybook@8.6.12(prettier@2.8.8)) - '@storybook/test': 8.6.12(storybook@8.6.12(prettier@2.8.8)) + '@storybook/instrumenter': 8.6.12(storybook@8.6.12(prettier@3.5.3)) + '@storybook/test': 8.6.12(storybook@8.6.12(prettier@3.5.3)) polished: 4.3.1 - storybook: 8.6.12(prettier@2.8.8) + storybook: 8.6.12(prettier@3.5.3) ts-dedent: 2.2.0 - '@storybook/addon-links@8.6.12(react@18.2.0)(storybook@8.6.12(prettier@2.8.8))': + '@storybook/addon-links@8.6.12(react@18.2.0)(storybook@8.6.12(prettier@3.5.3))': dependencies: '@storybook/global': 5.0.0 - storybook: 8.6.12(prettier@2.8.8) + storybook: 8.6.12(prettier@3.5.3) ts-dedent: 2.2.0 optionalDependencies: react: 18.2.0 - '@storybook/addon-mdx-gfm@8.6.12(storybook@8.6.12(prettier@2.8.8))': + '@storybook/addon-mdx-gfm@8.6.12(storybook@8.6.12(prettier@3.5.3))': dependencies: remark-gfm: 4.0.0 - storybook: 8.6.12(prettier@2.8.8) + storybook: 8.6.12(prettier@3.5.3) ts-dedent: 2.2.0 transitivePeerDependencies: - supports-color - '@storybook/addon-measure@8.6.12(storybook@8.6.12(prettier@2.8.8))': + '@storybook/addon-measure@8.6.12(storybook@8.6.12(prettier@3.5.3))': dependencies: '@storybook/global': 5.0.0 - storybook: 8.6.12(prettier@2.8.8) + storybook: 8.6.12(prettier@3.5.3) tiny-invariant: 1.3.3 - '@storybook/addon-outline@8.6.12(storybook@8.6.12(prettier@2.8.8))': + '@storybook/addon-outline@8.6.12(storybook@8.6.12(prettier@3.5.3))': dependencies: '@storybook/global': 5.0.0 - storybook: 8.6.12(prettier@2.8.8) + storybook: 8.6.12(prettier@3.5.3) ts-dedent: 2.2.0 - '@storybook/addon-toolbars@8.6.12(storybook@8.6.12(prettier@2.8.8))': + '@storybook/addon-toolbars@8.6.12(storybook@8.6.12(prettier@3.5.3))': dependencies: - storybook: 8.6.12(prettier@2.8.8) + storybook: 8.6.12(prettier@3.5.3) - '@storybook/addon-viewport@8.6.12(storybook@8.6.12(prettier@2.8.8))': + '@storybook/addon-viewport@8.6.12(storybook@8.6.12(prettier@3.5.3))': dependencies: memoizerific: 1.11.3 - storybook: 8.6.12(prettier@2.8.8) + storybook: 8.6.12(prettier@3.5.3) - '@storybook/blocks@8.6.12(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.6.12(prettier@2.8.8))': + '@storybook/blocks@8.6.12(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.6.12(prettier@3.5.3))': dependencies: '@storybook/icons': 1.3.2(react-dom@18.2.0(react@18.2.0))(react@18.2.0) - storybook: 8.6.12(prettier@2.8.8) + storybook: 8.6.12(prettier@3.5.3) ts-dedent: 2.2.0 optionalDependencies: react: 18.2.0 react-dom: 18.2.0(react@18.2.0) - '@storybook/builder-webpack5@8.6.12(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.24.2)(storybook@8.6.12(prettier@2.8.8))(typescript@5.0.4)': + '@storybook/builder-webpack5@8.6.12(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.24.2)(storybook@8.6.12(prettier@3.5.3))(typescript@5.0.4)': dependencies: - '@storybook/core-webpack': 8.6.12(storybook@8.6.12(prettier@2.8.8)) + '@storybook/core-webpack': 8.6.12(storybook@8.6.12(prettier@3.5.3)) '@types/semver': 7.5.0 browser-assert: 1.2.1 case-sensitive-paths-webpack-plugin: 2.4.0 @@ -12595,7 +12612,7 @@ snapshots: path-browserify: 1.0.1 process: 0.11.10 semver: 7.6.3 - storybook: 8.6.12(prettier@2.8.8) + storybook: 8.6.12(prettier@3.5.3) style-loader: 3.3.3(webpack@5.88.0(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.24.2)) terser-webpack-plugin: 5.3.9(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.24.2)(webpack@5.88.0(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.24.2)) ts-dedent: 2.2.0 @@ -12618,13 +12635,17 @@ snapshots: dependencies: storybook: 8.6.12(prettier@2.8.8) - '@storybook/core-events@8.6.12(storybook@8.6.12(prettier@2.8.8))': + '@storybook/components@8.6.12(storybook@8.6.12(prettier@3.5.3))': dependencies: - storybook: 8.6.12(prettier@2.8.8) + storybook: 8.6.12(prettier@3.5.3) - '@storybook/core-webpack@8.6.12(storybook@8.6.12(prettier@2.8.8))': + '@storybook/core-events@8.6.12(storybook@8.6.12(prettier@3.5.3))': dependencies: - storybook: 8.6.12(prettier@2.8.8) + storybook: 8.6.12(prettier@3.5.3) + + '@storybook/core-webpack@8.6.12(storybook@8.6.12(prettier@3.5.3))': + dependencies: + storybook: 8.6.12(prettier@3.5.3) ts-dedent: 2.2.0 '@storybook/core@8.6.12(prettier@2.8.8)(storybook@8.6.12(prettier@2.8.8))': @@ -12648,9 +12669,30 @@ snapshots: - supports-color - utf-8-validate - '@storybook/csf-plugin@8.6.12(storybook@8.6.12(prettier@2.8.8))': + '@storybook/core@8.6.12(prettier@3.5.3)(storybook@8.6.12(prettier@3.5.3))': dependencies: - storybook: 8.6.12(prettier@2.8.8) + '@storybook/theming': 8.6.12(storybook@8.6.12(prettier@3.5.3)) + better-opn: 3.0.2 + browser-assert: 1.2.1 + esbuild: 0.24.2 + esbuild-register: 3.5.0(esbuild@0.24.2) + jsdoc-type-pratt-parser: 4.1.0 + process: 0.11.10 + recast: 0.23.9 + semver: 7.6.3 + util: 0.12.5 + ws: 8.16.0 + optionalDependencies: + prettier: 3.5.3 + transitivePeerDependencies: + - bufferutil + - storybook + - supports-color + - utf-8-validate + + '@storybook/csf-plugin@8.6.12(storybook@8.6.12(prettier@3.5.3))': + dependencies: + storybook: 8.6.12(prettier@3.5.3) unplugin: 1.4.0 '@storybook/csf@0.1.12': @@ -12673,26 +12715,37 @@ snapshots: react: 18.2.0 react-dom: 18.2.0(react@18.2.0) - '@storybook/instrumenter@8.5.3(storybook@8.6.12(prettier@2.8.8))': + '@storybook/instrumenter@8.5.3(storybook@8.6.12(prettier@3.5.3))': dependencies: '@storybook/global': 5.0.0 '@vitest/utils': 2.1.9 - storybook: 8.6.12(prettier@2.8.8) + storybook: 8.6.12(prettier@3.5.3) '@storybook/instrumenter@8.6.12(storybook@8.6.12(prettier@2.8.8))': dependencies: '@storybook/global': 5.0.0 '@vitest/utils': 2.1.9 storybook: 8.6.12(prettier@2.8.8) + optional: true + + '@storybook/instrumenter@8.6.12(storybook@8.6.12(prettier@3.5.3))': + dependencies: + '@storybook/global': 5.0.0 + '@vitest/utils': 2.1.9 + storybook: 8.6.12(prettier@3.5.3) '@storybook/manager-api@8.6.12(storybook@8.6.12(prettier@2.8.8))': dependencies: storybook: 8.6.12(prettier@2.8.8) - '@storybook/preset-react-webpack@8.6.12(@storybook/test@8.6.12(storybook@8.6.12(prettier@2.8.8)))(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.24.2)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.6.12(prettier@2.8.8))(typescript@5.0.4)': + '@storybook/manager-api@8.6.12(storybook@8.6.12(prettier@3.5.3))': + dependencies: + storybook: 8.6.12(prettier@3.5.3) + + '@storybook/preset-react-webpack@8.6.12(@storybook/test@8.6.12(storybook@8.6.12(prettier@3.5.3)))(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.24.2)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.6.12(prettier@3.5.3))(typescript@5.0.4)': dependencies: - '@storybook/core-webpack': 8.6.12(storybook@8.6.12(prettier@2.8.8)) - '@storybook/react': 8.6.12(@storybook/test@8.6.12(storybook@8.6.12(prettier@2.8.8)))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.6.12(prettier@2.8.8))(typescript@5.0.4) + '@storybook/core-webpack': 8.6.12(storybook@8.6.12(prettier@3.5.3)) + '@storybook/react': 8.6.12(@storybook/test@8.6.12(storybook@8.6.12(prettier@3.5.3)))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.6.12(prettier@3.5.3))(typescript@5.0.4) '@storybook/react-docgen-typescript-plugin': 1.0.6--canary.9.0c3f3b7.0(typescript@5.0.4)(webpack@5.88.0(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.24.2)) '@types/semver': 7.5.0 find-up: 5.0.0 @@ -12702,7 +12755,7 @@ snapshots: react-dom: 18.2.0(react@18.2.0) resolve: 1.22.10 semver: 7.6.3 - storybook: 8.6.12(prettier@2.8.8) + storybook: 8.6.12(prettier@3.5.3) tsconfig-paths: 4.2.0 webpack: 5.88.0(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.24.2) optionalDependencies: @@ -12719,6 +12772,10 @@ snapshots: dependencies: storybook: 8.6.12(prettier@2.8.8) + '@storybook/preview-api@8.6.12(storybook@8.6.12(prettier@3.5.3))': + dependencies: + storybook: 8.6.12(prettier@3.5.3) + '@storybook/react-docgen-typescript-plugin@1.0.6--canary.9.0c3f3b7.0(typescript@5.0.4)(webpack@5.88.0(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.24.2))': dependencies: debug: 4.4.0 @@ -12739,14 +12796,20 @@ snapshots: react-dom: 18.2.0(react@18.2.0) storybook: 8.6.12(prettier@2.8.8) - '@storybook/react-webpack5@8.6.12(@storybook/test@8.6.12(storybook@8.6.12(prettier@2.8.8)))(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.24.2)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.6.12(prettier@2.8.8))(typescript@5.0.4)': + '@storybook/react-dom-shim@8.6.12(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.6.12(prettier@3.5.3))': dependencies: - '@storybook/builder-webpack5': 8.6.12(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.24.2)(storybook@8.6.12(prettier@2.8.8))(typescript@5.0.4) - '@storybook/preset-react-webpack': 8.6.12(@storybook/test@8.6.12(storybook@8.6.12(prettier@2.8.8)))(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.24.2)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.6.12(prettier@2.8.8))(typescript@5.0.4) - '@storybook/react': 8.6.12(@storybook/test@8.6.12(storybook@8.6.12(prettier@2.8.8)))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.6.12(prettier@2.8.8))(typescript@5.0.4) react: 18.2.0 react-dom: 18.2.0(react@18.2.0) - storybook: 8.6.12(prettier@2.8.8) + storybook: 8.6.12(prettier@3.5.3) + + '@storybook/react-webpack5@8.6.12(@storybook/test@8.6.12(storybook@8.6.12(prettier@3.5.3)))(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.24.2)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.6.12(prettier@3.5.3))(typescript@5.0.4)': + dependencies: + '@storybook/builder-webpack5': 8.6.12(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.24.2)(storybook@8.6.12(prettier@3.5.3))(typescript@5.0.4) + '@storybook/preset-react-webpack': 8.6.12(@storybook/test@8.6.12(storybook@8.6.12(prettier@3.5.3)))(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.24.2)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.6.12(prettier@3.5.3))(typescript@5.0.4) + '@storybook/react': 8.6.12(@storybook/test@8.6.12(storybook@8.6.12(prettier@3.5.3)))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.6.12(prettier@3.5.3))(typescript@5.0.4) + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + storybook: 8.6.12(prettier@3.5.3) optionalDependencies: typescript: 5.0.4 transitivePeerDependencies: @@ -12772,17 +12835,32 @@ snapshots: '@storybook/test': 8.6.12(storybook@8.6.12(prettier@2.8.8)) typescript: 5.0.4 - '@storybook/test@8.5.3(storybook@8.6.12(prettier@2.8.8))': + '@storybook/react@8.6.12(@storybook/test@8.6.12(storybook@8.6.12(prettier@3.5.3)))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.6.12(prettier@3.5.3))(typescript@5.0.4)': + dependencies: + '@storybook/components': 8.6.12(storybook@8.6.12(prettier@3.5.3)) + '@storybook/global': 5.0.0 + '@storybook/manager-api': 8.6.12(storybook@8.6.12(prettier@3.5.3)) + '@storybook/preview-api': 8.6.12(storybook@8.6.12(prettier@3.5.3)) + '@storybook/react-dom-shim': 8.6.12(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.6.12(prettier@3.5.3)) + '@storybook/theming': 8.6.12(storybook@8.6.12(prettier@3.5.3)) + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + storybook: 8.6.12(prettier@3.5.3) + optionalDependencies: + '@storybook/test': 8.6.12(storybook@8.6.12(prettier@3.5.3)) + typescript: 5.0.4 + + '@storybook/test@8.5.3(storybook@8.6.12(prettier@3.5.3))': dependencies: '@storybook/csf': 0.1.12 '@storybook/global': 5.0.0 - '@storybook/instrumenter': 8.5.3(storybook@8.6.12(prettier@2.8.8)) + '@storybook/instrumenter': 8.5.3(storybook@8.6.12(prettier@3.5.3)) '@testing-library/dom': 9.3.4 '@testing-library/jest-dom': 6.5.0 '@testing-library/user-event': 13.5.0(@testing-library/dom@9.3.4) '@vitest/expect': 2.0.5 '@vitest/spy': 2.0.5 - storybook: 8.6.12(prettier@2.8.8) + storybook: 8.6.12(prettier@3.5.3) '@storybook/test@8.6.12(storybook@8.6.12(prettier@2.8.8))': dependencies: @@ -12794,11 +12872,27 @@ snapshots: '@vitest/expect': 2.0.5 '@vitest/spy': 2.0.5 storybook: 8.6.12(prettier@2.8.8) + optional: true + + '@storybook/test@8.6.12(storybook@8.6.12(prettier@3.5.3))': + dependencies: + '@storybook/global': 5.0.0 + '@storybook/instrumenter': 8.6.12(storybook@8.6.12(prettier@3.5.3)) + '@testing-library/dom': 9.3.4 + '@testing-library/jest-dom': 6.5.0 + '@testing-library/user-event': 13.5.0(@testing-library/dom@9.3.4) + '@vitest/expect': 2.0.5 + '@vitest/spy': 2.0.5 + storybook: 8.6.12(prettier@3.5.3) '@storybook/theming@8.6.12(storybook@8.6.12(prettier@2.8.8))': dependencies: storybook: 8.6.12(prettier@2.8.8) + '@storybook/theming@8.6.12(storybook@8.6.12(prettier@3.5.3))': + dependencies: + storybook: 8.6.12(prettier@3.5.3) + '@svgr/babel-plugin-add-jsx-attribute@5.4.0': {} '@svgr/babel-plugin-add-jsx-attribute@8.0.0(@babel/core@7.24.3)': @@ -17752,6 +17846,8 @@ snapshots: prettier@2.8.8: {} + prettier@3.5.3: {} + pretty-error@4.0.0: dependencies: lodash: 4.17.21 @@ -18464,14 +18560,14 @@ snapshots: dependencies: internal-slot: 1.0.7 - storybook-dark-mode@4.0.1(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.6.12(prettier@2.8.8)): + storybook-dark-mode@4.0.1(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.6.12(prettier@3.5.3)): dependencies: - '@storybook/components': 8.6.12(storybook@8.6.12(prettier@2.8.8)) - '@storybook/core-events': 8.6.12(storybook@8.6.12(prettier@2.8.8)) + '@storybook/components': 8.6.12(storybook@8.6.12(prettier@3.5.3)) + '@storybook/core-events': 8.6.12(storybook@8.6.12(prettier@3.5.3)) '@storybook/global': 5.0.0 '@storybook/icons': 1.2.9(react-dom@18.2.0(react@18.2.0))(react@18.2.0) - '@storybook/manager-api': 8.6.12(storybook@8.6.12(prettier@2.8.8)) - '@storybook/theming': 8.6.12(storybook@8.6.12(prettier@2.8.8)) + '@storybook/manager-api': 8.6.12(storybook@8.6.12(prettier@3.5.3)) + '@storybook/theming': 8.6.12(storybook@8.6.12(prettier@3.5.3)) fast-deep-equal: 3.1.3 memoizerific: 1.11.3 transitivePeerDependencies: @@ -18489,6 +18585,16 @@ snapshots: - supports-color - utf-8-validate + storybook@8.6.12(prettier@3.5.3): + dependencies: + '@storybook/core': 8.6.12(prettier@3.5.3)(storybook@8.6.12(prettier@3.5.3)) + optionalDependencies: + prettier: 3.5.3 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + stream-browserify@3.0.0: dependencies: inherits: 2.0.4 diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 4951654c3a..f3dd7b7ed6 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -3,4 +3,5 @@ packages: - 'charts/*' - 'chat/*' - 'packages/*' - - 'tools/*' \ No newline at end of file + - 'tools/*' + - 'scripts' diff --git a/scripts/package.json b/scripts/package.json new file mode 100644 index 0000000000..86770c517d --- /dev/null +++ b/scripts/package.json @@ -0,0 +1,13 @@ +{ + "name": "lg-scripts", + "description": "Defines dependencies for LeafyGreen scripts, so they don't need to be installed at the root level.", + "version": "0.0.0", + "keywords": [], + "author": "", + "license": "", + "dependencies": { + "@lg-tools/meta": "workspace:*", + "chalk": "^4.1.2", + "prettier": "^3.5.3" + } +} diff --git a/scripts/tsconfig.json b/scripts/tsconfig.json index 8b474f56ce..87becf0a5a 100644 --- a/scripts/tsconfig.json +++ b/scripts/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "@lg-tools/build/config/root.tsconfig.json", + "extends": "@lg-tools/build/config/script.tsconfig.json", "compilerOptions": { "noUnusedLocals": false, "strict": true, diff --git a/scripts/update-readme.ts b/scripts/update-readme.ts index f0a8d75730..0de29e97b3 100644 --- a/scripts/update-readme.ts +++ b/scripts/update-readme.ts @@ -1,7 +1,6 @@ import { getAllPackageNames, getLGConfig } from '@lg-tools/meta'; import fs from 'fs'; import path from 'path'; -// @ts-expect-error - no prettier types import * as prettier from 'prettier'; updateReadme(); diff --git a/scripts/updateTypesVersions.ts b/scripts/updateTypesVersions.ts new file mode 100644 index 0000000000..236214e571 --- /dev/null +++ b/scripts/updateTypesVersions.ts @@ -0,0 +1,100 @@ +/* eslint-disable no-console */ +import { getLGConfig } from '@lg-tools/meta'; +import chalk from 'chalk'; +import fs from 'fs'; +import path from 'path'; +import { promisify } from 'util'; + +const readFile = promisify(fs.readFile); +const writeFile = promisify(fs.writeFile); + +// Packages to exclude from typesVersions updates +// These packages are CLI-only, and don't need to be down-leveled +const EXCLUDED_PACKAGES = [ + '@lg-tools/build', + '@lg-tools/cli', + '@lg-tools/create', + '@lg-tools/install', + '@lg-tools/link', + '@lg-tools/slackbot', + '@lg-tools/build', + '@lg-tools/test', + '@lg-tools/update', + '@lg-tools/validate', +]; + +// Currently we don't downlevel TS +const TYPES_VERSIONS_CONFIG = {}; + +updateAllTypesVersions(); + +/** + * Updates the `typesVersions` field in a package's package.json files + * + * Run this script if we need to change the TypeScript downleveling. + * + * The current build script parses the `typesVersions` field + * to determine which TypeScript version to use for downleveling. + */ +async function updateAllTypesVersions() { + try { + const { scopes } = getLGConfig(); + + // for each scope, + // get the packages in that scope + // and run updateTypesVersionsForPackage + for (const scope in scopes) { + const scopePath = scopes[scope]; + const scopeDir = path.join(process.cwd(), scopePath); + console.log(`Processing scope: ${scope}: ${scopeDir}`); + + const packageDirs = fs + .readdirSync(scopeDir) + .filter(dir => fs.statSync(path.join(scopeDir, dir)).isDirectory()); + + // Process each package directory + for (const pkg of packageDirs) { + console.log(`Processing package: ${chalk.green(pkg)}`); + const dir = path.join(scopeDir, pkg); + await updateTypesVersionsForPackage(dir); + } + } + } catch (error) { + console.error('Error updating typesVersions:', error); + process.exit(1); + } +} + +async function updateTypesVersionsForPackage(cwd: string) { + try { + // Find all package.json files in the packages directory from the repo root + const packageJsonPath = path.join(cwd, 'package.json'); + + // Read the file + const content = await readFile(packageJsonPath, 'utf-8'); + const packageJson = JSON.parse(content); + + const { name: packageName } = packageJson; + + if (EXCLUDED_PACKAGES.includes(packageName)) { + console.log(chalk.gray(`\tSkipping excluded package: ${packageName}`)); + return; + } + + // Update the typesVersions field + packageJson.typesVersions = TYPES_VERSIONS_CONFIG; + + // Write the updated content back to the file + const updatedContent = JSON.stringify(packageJson, null, 2) + '\n'; + await writeFile(packageJsonPath, updatedContent); + + console.log( + `Successfully updated \`typesVersions\` in ${chalk.bold( + packageName, + )} to ${chalk.gray(JSON.stringify(packageJson.typesVersions, null, 2))}`, + ); + } catch (error) { + console.error('Error updating typesVersions:', error); + process.exit(1); + } +} diff --git a/tools/build/scripts/tsconfig.json b/tools/build/scripts/tsconfig.json index 0d7684cfc6..cfac9cffbf 100644 --- a/tools/build/scripts/tsconfig.json +++ b/tools/build/scripts/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../config/root.tsconfig.json", + "extends": "../config/script.tsconfig.json", "compilerOptions": { "noUnusedLocals": false, "strict": true, diff --git a/tools/build/scripts/updateTypesVersions.ts b/tools/build/scripts/updateTypesVersions.ts deleted file mode 100644 index 067c184bea..0000000000 --- a/tools/build/scripts/updateTypesVersions.ts +++ /dev/null @@ -1,83 +0,0 @@ -/* eslint-disable no-console */ -import chalk from 'chalk'; -import fs from 'fs'; -import { glob } from 'glob'; -import path from 'path'; -import { promisify } from 'util'; - -const readFile = promisify(fs.readFile); -const writeFile = promisify(fs.writeFile); - -// Packages to exclude from typesVersions updates -// These packages are CLI-only, and don't need to be down-leveled -const EXCLUDED_PACKAGES = [ - '@lg-tools/build', - '@lg-tools/cli', - '@lg-tools/create', - '@lg-tools/install', - '@lg-tools/link', - '@lg-tools/slackbot', - '@lg-tools/build', - '@lg-tools/test', - '@lg-tools/update', - '@lg-tools/validate', -]; - -// Currently we don't downlevel TS -const TYPES_VERSIONS_CONFIG = {}; - -/** - * Updates the `typesVersions` field in all package.json files - * - * Run this script if we need to change the TypeScript downleveling. - * - * The current build script parses the `typesVersions` field - * to determine which TypeScript version to use for downleveling. - */ -async function updateTypesVersions() { - try { - console.log('Updating typesVersions in package.json files...'); - - // Find the repository root (assuming this script is in tools/build/scripts) - const repoRoot = path.resolve(__dirname, '../../../'); - - // Find all package.json files in the packages directory from the repo root - const packageJsonPaths = await glob('**/package.json', { - cwd: repoRoot, - absolute: true, - }); - - console.log(`Found ${packageJsonPaths.length} packages`); - - // Process each package.json file - for (const filePath of packageJsonPaths) { - // Read the file - const content = await readFile(filePath, 'utf-8'); - const packageJson = JSON.parse(content); - - const packageName = packageJson.name; - - if (EXCLUDED_PACKAGES.includes(packageName)) { - console.log(chalk.gray(`\tSkipping excluded package: ${packageName}`)); - continue; - } - - console.log(chalk.gray(`\tProcessing ${packageName}`)); - - // Update the typesVersions field - packageJson.typesVersions = TYPES_VERSIONS_CONFIG; - - // Write the updated content back to the file - const updatedContent = JSON.stringify(packageJson, null, 2) + '\n'; - await writeFile(filePath, updatedContent); - } - - console.log('Successfully updated typesVersions in all package.json files'); - } catch (error) { - console.error('Error updating typesVersions:', error); - process.exit(1); - } -} - -// Execute the function -updateTypesVersions(); From bc7a0704c64ba403fa3171f0998772fd670cf93e Mon Sep 17 00:00:00 2001 From: Adam Michael Thompson Date: Mon, 21 Apr 2025 18:44:04 -0400 Subject: [PATCH 43/48] updates downlevel script --- .changeset/build-typescript-5.md | 3 +- scripts/updateTypesVersions.ts | 100 ------------- .../typescript/downlevel/TYPES_VERSIONS.ts | 21 +++ .../src/typescript/downlevel/downlevel-dts.ts | 14 +- .../typescript/downlevel/getTypeVersions.ts | 51 ------- tools/build/src/typescript/downlevel/index.ts | 30 ++-- .../downlevel/updateTypesVersions.ts | 137 ++++++++++++++++++ 7 files changed, 188 insertions(+), 168 deletions(-) delete mode 100644 scripts/updateTypesVersions.ts create mode 100644 tools/build/src/typescript/downlevel/TYPES_VERSIONS.ts delete mode 100644 tools/build/src/typescript/downlevel/getTypeVersions.ts create mode 100644 tools/build/src/typescript/downlevel/updateTypesVersions.ts diff --git a/.changeset/build-typescript-5.md b/.changeset/build-typescript-5.md index 921cedf7bd..0db0b02c6a 100644 --- a/.changeset/build-typescript-5.md +++ b/.changeset/build-typescript-5.md @@ -3,4 +3,5 @@ --- - Upgrades to TS 5.0. -- Adds `--downlevel` option for `build-ts`. This option reads a package's package.json and exports downleveled `*.d.ts` files for all targets listed in `"typesVersions"`. This uses [downlevel-dts](https://github.com/sandersn/downlevel-dts) under the hood. +- Adds `--downlevel` option for `build-ts`. This option exports downleveled `*.d.ts` files for a defined set of targets. Updates a package's `package.json` if necessary. +This uses [downlevel-dts](https://github.com/sandersn/downlevel-dts) under the hood. diff --git a/scripts/updateTypesVersions.ts b/scripts/updateTypesVersions.ts deleted file mode 100644 index 236214e571..0000000000 --- a/scripts/updateTypesVersions.ts +++ /dev/null @@ -1,100 +0,0 @@ -/* eslint-disable no-console */ -import { getLGConfig } from '@lg-tools/meta'; -import chalk from 'chalk'; -import fs from 'fs'; -import path from 'path'; -import { promisify } from 'util'; - -const readFile = promisify(fs.readFile); -const writeFile = promisify(fs.writeFile); - -// Packages to exclude from typesVersions updates -// These packages are CLI-only, and don't need to be down-leveled -const EXCLUDED_PACKAGES = [ - '@lg-tools/build', - '@lg-tools/cli', - '@lg-tools/create', - '@lg-tools/install', - '@lg-tools/link', - '@lg-tools/slackbot', - '@lg-tools/build', - '@lg-tools/test', - '@lg-tools/update', - '@lg-tools/validate', -]; - -// Currently we don't downlevel TS -const TYPES_VERSIONS_CONFIG = {}; - -updateAllTypesVersions(); - -/** - * Updates the `typesVersions` field in a package's package.json files - * - * Run this script if we need to change the TypeScript downleveling. - * - * The current build script parses the `typesVersions` field - * to determine which TypeScript version to use for downleveling. - */ -async function updateAllTypesVersions() { - try { - const { scopes } = getLGConfig(); - - // for each scope, - // get the packages in that scope - // and run updateTypesVersionsForPackage - for (const scope in scopes) { - const scopePath = scopes[scope]; - const scopeDir = path.join(process.cwd(), scopePath); - console.log(`Processing scope: ${scope}: ${scopeDir}`); - - const packageDirs = fs - .readdirSync(scopeDir) - .filter(dir => fs.statSync(path.join(scopeDir, dir)).isDirectory()); - - // Process each package directory - for (const pkg of packageDirs) { - console.log(`Processing package: ${chalk.green(pkg)}`); - const dir = path.join(scopeDir, pkg); - await updateTypesVersionsForPackage(dir); - } - } - } catch (error) { - console.error('Error updating typesVersions:', error); - process.exit(1); - } -} - -async function updateTypesVersionsForPackage(cwd: string) { - try { - // Find all package.json files in the packages directory from the repo root - const packageJsonPath = path.join(cwd, 'package.json'); - - // Read the file - const content = await readFile(packageJsonPath, 'utf-8'); - const packageJson = JSON.parse(content); - - const { name: packageName } = packageJson; - - if (EXCLUDED_PACKAGES.includes(packageName)) { - console.log(chalk.gray(`\tSkipping excluded package: ${packageName}`)); - return; - } - - // Update the typesVersions field - packageJson.typesVersions = TYPES_VERSIONS_CONFIG; - - // Write the updated content back to the file - const updatedContent = JSON.stringify(packageJson, null, 2) + '\n'; - await writeFile(packageJsonPath, updatedContent); - - console.log( - `Successfully updated \`typesVersions\` in ${chalk.bold( - packageName, - )} to ${chalk.gray(JSON.stringify(packageJson.typesVersions, null, 2))}`, - ); - } catch (error) { - console.error('Error updating typesVersions:', error); - process.exit(1); - } -} diff --git a/tools/build/src/typescript/downlevel/TYPES_VERSIONS.ts b/tools/build/src/typescript/downlevel/TYPES_VERSIONS.ts new file mode 100644 index 0000000000..202f2c4144 --- /dev/null +++ b/tools/build/src/typescript/downlevel/TYPES_VERSIONS.ts @@ -0,0 +1,21 @@ +// TS Downlevel mapping +export const DOWNLEVEL_VERSIONS = [ + { condition: '<4.8', target: '4.0' }, + { condition: '<5.0', target: '4.9' }, +] as const; + +// Packages to exclude from typesVersions updates +// These packages are CLI-only, and don't need to be down-leveled +export const EXCLUDED_PACKAGES = [ + 'lg-scripts', + '@lg-tools/build', + '@lg-tools/cli', + '@lg-tools/create', + '@lg-tools/install', + '@lg-tools/link', + '@lg-tools/slackbot', + '@lg-tools/build', + '@lg-tools/test', + '@lg-tools/update', + '@lg-tools/validate', +]; diff --git a/tools/build/src/typescript/downlevel/downlevel-dts.ts b/tools/build/src/typescript/downlevel/downlevel-dts.ts index a5baa68b81..c10b796ecb 100644 --- a/tools/build/src/typescript/downlevel/downlevel-dts.ts +++ b/tools/build/src/typescript/downlevel/downlevel-dts.ts @@ -19,12 +19,14 @@ interface DownlevelDtsOptions { /** * Runs downlevel-dts to create backward compatible TypeScript declaration files * + * This function is called from the command line as `lg build-ts --downlevel` + * * @param options Configuration options */ export async function downlevelDts( options?: DownlevelDtsOptions, ): Promise { - const { verbose, target = '3.4', outDir } = options ?? {}; + const { verbose, target, outDir } = options ?? {}; const packageDir = process.cwd(); // Default to types directory if not specified @@ -40,11 +42,11 @@ export async function downlevelDts( // Ensure types directory exists if (!fse.existsSync(typesDirPath)) { console.error(chalk.red(`Types directory not found: ${typesDirPath}`)); - process.exit(1); + return; } console.log( - chalk.blue.bold(`Downleveling TypeScript declarations to TS ${target}`), + chalk.blue.bold(`Downlevelling TypeScript declarations to TS${target}`), ); verbose && console.log(chalk.gray(`Input: ${typesDirPath}`)); verbose && console.log(chalk.gray(`Output: ${outputDirPath}`)); @@ -53,12 +55,12 @@ export async function downlevelDts( const semverTarget = target + '.0'; downlevel(typesDirPath, outputDirPath, semverTarget); - console.log( - verbose && + verbose && + console.log( chalk.green( `Successfully created downleveled declarations in ${outputDirPath}`, ), - ); + ); } catch (error: any) { console.error( chalk.red(`Error downleveling declarations: ${error.message}`), diff --git a/tools/build/src/typescript/downlevel/getTypeVersions.ts b/tools/build/src/typescript/downlevel/getTypeVersions.ts deleted file mode 100644 index ddd7923d19..0000000000 --- a/tools/build/src/typescript/downlevel/getTypeVersions.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* eslint-disable no-console */ -import chalk from 'chalk'; - -/** - * Extracts TypeScript versions from the typesVersions field in package.json - * and returns an array of version numbers without the 'ts' prefix. - * @returns - */ -export const getTypeVersions = (typesVersions?: { - [target: string]: { - [files: string]: Array; - }; -}): Array<`${number}.${number}`> | undefined => { - if (!typesVersions || typeof typesVersions !== 'object') return; - - const versions: Array<`${number}.${number}`> = []; - - Object.entries(typesVersions).forEach(([_versionRange, pathMappings]) => { - // Get the output directory from the path mappings - // Typical format is { '*': ['ts3.4/*'] } - if (!pathMappings || typeof pathMappings !== 'object') return; - - const wildcardMapping = pathMappings['*']; - if (!Array.isArray(wildcardMapping) || wildcardMapping.length === 0) return; - - // Extract outputDir from format like 'ts3.4/*' - const outputDirMatch = wildcardMapping[0].match(/^dist\/ts([\d.]+)\/\*/); - if (!outputDirMatch || !outputDirMatch[1]) return; - - // Get just the version number without the 'ts' prefix - const versionNumber = outputDirMatch[1] as `${number}.${number}`; - - // Check if the version number is valid - if (!/^\d+\.\d+$/.test(versionNumber)) { - console.log( - chalk.red( - `Invalid TS version number format in directory${outputDirMatch[0]}. Expected format is 'dist/tsX.Y/*'`, - ), - ); - return; - } - - // check if the version number is already in the array - if (versions.includes(versionNumber)) return; - - // Add the version number to the array - versions.push(versionNumber); - }); - - return versions; -}; diff --git a/tools/build/src/typescript/downlevel/index.ts b/tools/build/src/typescript/downlevel/index.ts index 6a781e8659..a48ffd4231 100644 --- a/tools/build/src/typescript/downlevel/index.ts +++ b/tools/build/src/typescript/downlevel/index.ts @@ -4,7 +4,8 @@ import fse from 'fs-extra'; import path from 'path'; import { downlevelDts } from './downlevel-dts'; -import { getTypeVersions } from './getTypeVersions'; +import { DOWNLEVEL_VERSIONS, EXCLUDED_PACKAGES } from './TYPES_VERSIONS'; +import { updateTypesVersions } from './updateTypesVersions'; interface DownlevelCommandOptions { verbose?: boolean; @@ -16,22 +17,31 @@ interface DownlevelCommandOptions { */ export function runTypescriptDownlevel({ verbose }: DownlevelCommandOptions) { const packageDir = process.cwd(); - console.log('\nRunning TypeScript downleveling...', packageDir); + console.log('\nRunning TypeScript downlevel...', packageDir); const packageJsonPath = path.join(packageDir, 'package.json'); - const packageJson = fse.readJSONSync(packageJsonPath, 'utf-8'); - const typesVersions = packageJson?.typesVersions; - const downlevelVersions = getTypeVersions(typesVersions); + const packageJsonContent = fse.readFileSync(packageJsonPath, 'utf8'); + const packageJson = JSON.parse(packageJsonContent); + const { name: packageName } = packageJson; - if (downlevelVersions && downlevelVersions?.length > 0) { - downlevelVersions.forEach(target => { + // Skip excluded packages + if (EXCLUDED_PACKAGES.includes(packageName)) { + console.log(chalk.gray(`\tSkipping excluded package: ${packageName}`)); + return; + } + + if (DOWNLEVEL_VERSIONS && DOWNLEVEL_VERSIONS?.length > 0) { + // First update typesVersions and exports in package.json + updateTypesVersions(packageDir, { verbose }); + + // Then generate downlevelled TypeScript declaration files + DOWNLEVEL_VERSIONS.forEach(({ target }) => { downlevelDts({ verbose, target }); }); } else { verbose && - console.log(chalk.yellow('No typesVersions found in package.json'), { - typesVersions, - downlevelVersions, + console.log(chalk.yellow('No downlevel versions configured'), { + DOWNLEVEL_VERSIONS, }); } } diff --git a/tools/build/src/typescript/downlevel/updateTypesVersions.ts b/tools/build/src/typescript/downlevel/updateTypesVersions.ts new file mode 100644 index 0000000000..94f5ca9553 --- /dev/null +++ b/tools/build/src/typescript/downlevel/updateTypesVersions.ts @@ -0,0 +1,137 @@ +/* eslint-disable no-console */ +import chalk from 'chalk'; +import fs from 'fs'; +import path from 'path'; + +import { DOWNLEVEL_VERSIONS, EXCLUDED_PACKAGES } from './TYPES_VERSIONS'; + +/** + * Updates the `typesVersions` and `exports` fields in a package's package.json file + * based on the TypeScript downlevel versions we support. + * + * For TS targets < 4.9, it adds a `typesVersions` field with the downlevelled + * TypeScript declaration files. + * For TS targets >= 4.9, it adds an `exports` field with the types condition. + * + * e.g. + * ```json + * { + * "typesVersions": { + * "*": { + * ".": ["./index.d.ts"] + * }, + * "<4.8": { + * ".": ["./ts4.0/index.d.ts"] + * } + * }, + * "exports": { + * ".": { + * "import": "./index.d.ts", + * "require": "./index.d.ts", + * "types<4.8": "./ts4.0/index.d.ts", + * "types<5.0": "./ts4.9/index.d.ts" + * } + * } + * } + * ``` + */ +export function updateTypesVersions( + packageDir: string = process.cwd(), + { verbose }: { verbose?: boolean } = {}, +) { + try { + const packageJsonPath = path.join(packageDir, 'package.json'); + + // Check if package.json exists + if (!fs.existsSync(packageJsonPath)) { + console.log(chalk.yellow(`No package.json found in ${packageDir}`)); + return; + } + + // Read the package.json file + const packageJsonContent = fs.readFileSync(packageJsonPath, 'utf8'); + const packageJson = JSON.parse(packageJsonContent); + + const { name: packageName } = packageJson; + + // Skip excluded packages + if (EXCLUDED_PACKAGES.includes(packageName)) { + console.log(chalk.gray(`\tSkipping excluded package: ${packageName}`)); + return; + } + + // Construct the base typesVersions field + const typesVersions: Record>> = { + '*': { + '.': ['./index.d.ts'], + }, + }; + + // Construct the exports field with types conditions + let exportsField = packageJson.exports || { '.': {} }; + + // If exports field is a string, convert it to an object + if (typeof exportsField === 'string') { + exportsField = { '.': exportsField }; + } + + // Ensure the main export path exists + if (!exportsField['.']) { + exportsField['.'] = {}; + } else if (typeof exportsField['.'] === 'string') { + // If the main export is a string, convert it to an object + const mainExport = exportsField['.']; + exportsField['.'] = { + import: mainExport, + require: mainExport, + }; + } + + // set the default types export + if (!exportsField['.'].types) { + exportsField['.'].types = './index.d.ts'; + } + + // Add entries for each TypeScript version we support + DOWNLEVEL_VERSIONS.forEach(({ condition, target }) => { + // Add to typesVersions if target is less than 4.9 + // https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-9.html#exports-is-prioritized-over-typesversions + if (parseFloat(target) < 4.9) { + typesVersions[condition] = { + '.': [`./ts${target}/index.d.ts`], + }; + } + + // Add to exports field with types condition + if (typeof exportsField['.'] === 'object') { + exportsField['.'][`types${condition}`] = `./ts${target}/index.d.ts`; + } + }); + + // Update package.json + packageJson.typesVersions = typesVersions; + + // TODO: Add this once the multiple exports PR is merged + // packageJson.exports = exportsField; + + // Write the updated package.json + fs.writeFileSync( + packageJsonPath, + JSON.stringify(packageJson, null, 2) + '\n', + ); + + console.log( + chalk.green.bold(`Updated typesVersions and exports in ${packageName}`), + ); + verbose && + console.log( + chalk.gray(`typesVersions: ${JSON.stringify(typesVersions, null, 2)}`), + ); + verbose && + console.log( + chalk.gray(`exports: ${JSON.stringify(exportsField, null, 2)}`), + ); + } catch (error) { + console.error(chalk.red('Error updating typesVersions:'), error); + } +} From 41dad03253e97ee654bb2d4e7e5fba48da0dc446 Mon Sep 17 00:00:00 2001 From: Adam Michael Thompson Date: Tue, 22 Apr 2025 15:41:55 -0400 Subject: [PATCH 44/48] comments --- .../typescript/downlevel/TYPES_VERSIONS.ts | 19 +++++++++++++++--- tools/build/src/typescript/downlevel/index.ts | 20 +++++++++++++++---- ...sVersions.ts => updatePackageJsonTypes.ts} | 16 +++++---------- 3 files changed, 37 insertions(+), 18 deletions(-) rename tools/build/src/typescript/downlevel/{updateTypesVersions.ts => updatePackageJsonTypes.ts} (89%) diff --git a/tools/build/src/typescript/downlevel/TYPES_VERSIONS.ts b/tools/build/src/typescript/downlevel/TYPES_VERSIONS.ts index 202f2c4144..a473e4dd94 100644 --- a/tools/build/src/typescript/downlevel/TYPES_VERSIONS.ts +++ b/tools/build/src/typescript/downlevel/TYPES_VERSIONS.ts @@ -1,8 +1,21 @@ +interface DownlevelVersion { + /** If the consuming application's TS version satisfies the condition... */ + condition: `${'<' | '>' | ''}${number}.${number}`; + /** ...we should use this version of the package */ + target: `${number}.${number}`; +} + // TS Downlevel mapping export const DOWNLEVEL_VERSIONS = [ - { condition: '<4.8', target: '4.0' }, - { condition: '<5.0', target: '4.9' }, -] as const; + { + condition: '<4.8', + target: '4.0', + }, + { + condition: '<5.0', + target: '4.9', + }, +] as const satisfies Readonly>; // Packages to exclude from typesVersions updates // These packages are CLI-only, and don't need to be down-leveled diff --git a/tools/build/src/typescript/downlevel/index.ts b/tools/build/src/typescript/downlevel/index.ts index a48ffd4231..4c5773c616 100644 --- a/tools/build/src/typescript/downlevel/index.ts +++ b/tools/build/src/typescript/downlevel/index.ts @@ -5,17 +5,24 @@ import path from 'path'; import { downlevelDts } from './downlevel-dts'; import { DOWNLEVEL_VERSIONS, EXCLUDED_PACKAGES } from './TYPES_VERSIONS'; -import { updateTypesVersions } from './updateTypesVersions'; +import { updatePackageJsonTypes } from './updatePackageJsonTypes'; interface DownlevelCommandOptions { verbose?: boolean; + update?: boolean; } /** * Downlevel TypeScript definitions * based on the typesVersions field in package.json. + * + * @param options.verbose - Enable verbose logging + * @param options.update - When true, updates the package.json typesVersions and exports fields */ -export function runTypescriptDownlevel({ verbose }: DownlevelCommandOptions) { +export function runTypescriptDownlevel({ + verbose, + update = false, +}: DownlevelCommandOptions) { const packageDir = process.cwd(); console.log('\nRunning TypeScript downlevel...', packageDir); @@ -31,8 +38,13 @@ export function runTypescriptDownlevel({ verbose }: DownlevelCommandOptions) { } if (DOWNLEVEL_VERSIONS && DOWNLEVEL_VERSIONS?.length > 0) { - // First update typesVersions and exports in package.json - updateTypesVersions(packageDir, { verbose }); + // Only update typesVersions and exports in package.json when flag is true + if (update) { + console.log( + chalk.blue('Updating package.json typesVersions and exports fields...'), + ); + updatePackageJsonTypes(packageDir, { verbose }); + } // Then generate downlevelled TypeScript declaration files DOWNLEVEL_VERSIONS.forEach(({ target }) => { diff --git a/tools/build/src/typescript/downlevel/updateTypesVersions.ts b/tools/build/src/typescript/downlevel/updatePackageJsonTypes.ts similarity index 89% rename from tools/build/src/typescript/downlevel/updateTypesVersions.ts rename to tools/build/src/typescript/downlevel/updatePackageJsonTypes.ts index 94f5ca9553..a65052deb7 100644 --- a/tools/build/src/typescript/downlevel/updateTypesVersions.ts +++ b/tools/build/src/typescript/downlevel/updatePackageJsonTypes.ts @@ -35,7 +35,7 @@ import { DOWNLEVEL_VERSIONS, EXCLUDED_PACKAGES } from './TYPES_VERSIONS'; * } * ``` */ -export function updateTypesVersions( +export function updatePackageJsonTypes( packageDir: string = process.cwd(), { verbose }: { verbose?: boolean } = {}, ) { @@ -56,7 +56,8 @@ export function updateTypesVersions( // Skip excluded packages if (EXCLUDED_PACKAGES.includes(packageName)) { - console.log(chalk.gray(`\tSkipping excluded package: ${packageName}`)); + verbose && + console.log(chalk.gray(`\tSkipping excluded package: ${packageName}`)); return; } @@ -121,16 +122,9 @@ export function updateTypesVersions( ); console.log( - chalk.green.bold(`Updated typesVersions and exports in ${packageName}`), + verbose && + chalk.green.bold(`Updated typesVersions and exports in ${packageName}`), ); - verbose && - console.log( - chalk.gray(`typesVersions: ${JSON.stringify(typesVersions, null, 2)}`), - ); - verbose && - console.log( - chalk.gray(`exports: ${JSON.stringify(exportsField, null, 2)}`), - ); } catch (error) { console.error(chalk.red('Error updating typesVersions:'), error); } From e64560b0db72ec266442cb38b4666ed8dbcd2e55 Mon Sep 17 00:00:00 2001 From: Adam Thompson <2414030+TheSonOfThomp@users.noreply.github.com> Date: Tue, 22 Apr 2025 15:47:12 -0400 Subject: [PATCH 45/48] T 5.8 (#2816) * upgrade to TS 5.8 * fix or ignore new errors --- charts/core/src/XAxis/XAxis.tsx | 1 + charts/core/src/YAxis/YAxis.tsx | 1 + package.json | 5 +- packages/code/src/CopyButton/CopyButton.tsx | 1 + .../polymorphic/src/Polymorphic/Polymorph.tsx | 1 + packages/popover/src/Popover/Popover.tsx | 2 - pnpm-lock.yaml | 332 +++++++++++++----- tools/build/package.json | 4 +- .../PropCombinations/utils/valStr.ts | 5 +- 9 files changed, 249 insertions(+), 103 deletions(-) diff --git a/charts/core/src/XAxis/XAxis.tsx b/charts/core/src/XAxis/XAxis.tsx index 97b414c7bd..213ed26b1f 100644 --- a/charts/core/src/XAxis/XAxis.tsx +++ b/charts/core/src/XAxis/XAxis.tsx @@ -33,6 +33,7 @@ const getOptions = ({ width: 1, }, }, + // @ts-expect-error TODO: axisLabel: { show: true, fontFamily: fontFamilies.default, diff --git a/charts/core/src/YAxis/YAxis.tsx b/charts/core/src/YAxis/YAxis.tsx index db663c9ef0..eb8940bca9 100644 --- a/charts/core/src/YAxis/YAxis.tsx +++ b/charts/core/src/YAxis/YAxis.tsx @@ -33,6 +33,7 @@ const getOptions = ({ width: 1, }, }, + // @ts-expect-error TODO: axisLabel: { show: true, fontFamily: fontFamilies.default, diff --git a/package.json b/package.json index 2cbaaa0393..1eb82aab35 100644 --- a/package.json +++ b/package.json @@ -71,15 +71,14 @@ "stream": "^0.0.3", "ts-node": "10.9.2", "turbo": "^2.0.6", - "typescript": "~5.0.4" + "typescript": "~5.8.0" }, "pnpm": { "overrides": { "@testing-library/dom": "9.3.4", "@testing-library/user-event": "13.5.0", "caniuse-lite": "^1.0.30001585", - "jackspeak": "2.1.1", - "typescript": "~5.0.4" + "jackspeak": "2.1.1" } }, "lg": { diff --git a/packages/code/src/CopyButton/CopyButton.tsx b/packages/code/src/CopyButton/CopyButton.tsx index 213ba5299e..39b94f3a05 100644 --- a/packages/code/src/CopyButton/CopyButton.tsx +++ b/packages/code/src/CopyButton/CopyButton.tsx @@ -62,6 +62,7 @@ function CopyButton({ onCopy, contents, className, ...rest }: CopyProps) { const clipboard = new ClipboardJS(buttonRef.current, { text: () => contents, + // @ts-expect-error TODO: types container: portalContainer, }); diff --git a/packages/polymorphic/src/Polymorphic/Polymorph.tsx b/packages/polymorphic/src/Polymorphic/Polymorph.tsx index ba0df3c508..9e4d8e68b0 100644 --- a/packages/polymorphic/src/Polymorphic/Polymorph.tsx +++ b/packages/polymorphic/src/Polymorphic/Polymorph.tsx @@ -36,6 +36,7 @@ export const BasePolymorph = ( * However: If you want to expose `as` as a prop of your component, * prefer the `{@link Polymorphic}` factory function and related hooks. */ +// @ts-expect-error TODO: Polymorphic TS export const Polymorph: PolymorphicComponentType = React.forwardRef(BasePolymorph); Polymorph.displayName = 'Polymorph'; diff --git a/packages/popover/src/Popover/Popover.tsx b/packages/popover/src/Popover/Popover.tsx index 5ea4691905..1b8ad5ff48 100644 --- a/packages/popover/src/Popover/Popover.tsx +++ b/packages/popover/src/Popover/Popover.tsx @@ -177,7 +177,6 @@ export const Popover = forwardRef( if (renderMode === RenderMode.TopLayer) { // @ts-expect-error - `toggle` event not supported pre-typescript v5 elements.floating?.addEventListener('toggle', onToggle); - // @ts-expect-error - Popover API not currently supported in react v18 https://github.com/facebook/react/pull/27981 elements.floating?.showPopover?.(); } @@ -195,7 +194,6 @@ export const Popover = forwardRef( if (renderMode === RenderMode.TopLayer) { // @ts-expect-error - `toggle` event not supported pre-typescript v5 elements.floating?.removeEventListener('toggle', onToggle); - // @ts-expect-error - Popover API not currently supported in react v18 https://github.com/facebook/react/pull/27981 elements.floating?.hidePopover?.(); } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1b30fc9949..02ee390c95 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,7 +9,6 @@ overrides: '@testing-library/user-event': 13.5.0 caniuse-lite: ^1.0.30001585 jackspeak: 2.1.1 - typescript: ~5.0.4 importers: @@ -50,7 +49,7 @@ importers: version: link:tools/test '@storybook/react': specifier: ^8.6.12 - version: 8.6.12(@storybook/test@8.6.12(storybook@8.6.12(prettier@2.8.8)))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.6.12(prettier@2.8.8))(typescript@5.0.4) + version: 8.6.12(@storybook/test@8.6.12(storybook@8.6.12(prettier@2.8.8)))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.6.12(prettier@2.8.8))(typescript@5.8.3) '@testing-library/react': specifier: ^14.0.0 version: 14.0.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0) @@ -83,7 +82,7 @@ importers: version: 3.2.3 npm-package-json-lint: specifier: 8.0.0 - version: 8.0.0(typescript@5.0.4) + version: 8.0.0(typescript@5.8.3) npm-run-all: specifier: ^4.1.5 version: 4.1.5 @@ -104,13 +103,13 @@ importers: version: 0.0.3 ts-node: specifier: 10.9.2 - version: 10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.17.12)(typescript@5.0.4) + version: 10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.17.12)(typescript@5.8.3) turbo: specifier: ^2.0.6 version: 2.0.6 typescript: - specifier: ~5.0.4 - version: 5.0.4 + specifier: ~5.8.0 + version: 5.8.3 charts/chart-card: dependencies: @@ -1624,7 +1623,7 @@ importers: version: 11.0.0 ts-node: specifier: ^10.9.2 - version: 10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.17.12)(typescript@5.0.4) + version: 10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.17.12)(typescript@5.9.0-dev.20250422) xml2json: specifier: ^0.12.0 version: 0.12.0 @@ -2954,10 +2953,10 @@ importers: version: 8.0.0(@babel/core@7.24.3) '@svgr/cli': specifier: 8.0.1 - version: 8.0.1(typescript@5.0.4) + version: 8.0.1(typescript@5.8.3) '@svgr/rollup': specifier: ^8.1.0 - version: 8.1.0(rollup@4.16.1)(typescript@5.0.4) + version: 8.1.0(rollup@4.16.1)(typescript@5.8.3) '@types/cross-spawn': specifier: 6.0.2 version: 6.0.2 @@ -2984,7 +2983,7 @@ importers: version: 4.17.21 react-docgen-typescript: specifier: 2.2.2 - version: 2.2.2(typescript@5.0.4) + version: 2.2.2(typescript@5.8.3) rollup: specifier: 4.16.1 version: 4.16.1 @@ -3001,8 +3000,8 @@ importers: specifier: ^2.0.6 version: 2.0.6 typescript: - specifier: ~5.0.4 - version: 5.0.4 + specifier: ~5.8.0 + version: 5.8.3 devDependencies: '@types/mock-fs': specifier: ^4.13.4 @@ -3242,7 +3241,7 @@ importers: specifier: 2.8.8 version: 2.8.8 typescript: - specifier: ~5.0.4 + specifier: ~5.0.0 version: 5.0.4 tools/meta: @@ -3355,10 +3354,10 @@ importers: version: 8.6.12(storybook@8.6.12(prettier@3.5.3)) '@storybook/react': specifier: 8.6.12 - version: 8.6.12(@storybook/test@8.6.12(storybook@8.6.12(prettier@3.5.3)))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.6.12(prettier@3.5.3))(typescript@5.0.4) + version: 8.6.12(@storybook/test@8.6.12(storybook@8.6.12(prettier@3.5.3)))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.6.12(prettier@3.5.3))(typescript@5.9.0-dev.20250422) '@storybook/react-webpack5': specifier: 8.6.12 - version: 8.6.12(@storybook/test@8.6.12(storybook@8.6.12(prettier@3.5.3)))(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.24.2)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.6.12(prettier@3.5.3))(typescript@5.0.4) + version: 8.6.12(@storybook/test@8.6.12(storybook@8.6.12(prettier@3.5.3)))(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.24.2)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.6.12(prettier@3.5.3))(typescript@5.9.0-dev.20250422) '@storybook/test': specifier: 8.6.12 version: 8.6.12(storybook@8.6.12(prettier@3.5.3)) @@ -3367,7 +3366,7 @@ importers: version: 8.6.12(storybook@8.6.12(prettier@3.5.3)) '@svgr/webpack': specifier: 8.0.1 - version: 8.0.1(typescript@5.0.4) + version: 8.0.1(typescript@5.9.0-dev.20250422) assert: specifier: ^2.1.0 version: 2.1.0 @@ -3409,7 +3408,7 @@ importers: version: 18.2.0 react-docgen-typescript: specifier: 2.2.2 - version: 2.2.2(typescript@5.0.4) + version: 2.2.2(typescript@5.9.0-dev.20250422) react-dom: specifier: ^17.0.0 || ^18.0.0 version: 18.2.0(react@18.2.0) @@ -3469,7 +3468,7 @@ importers: version: link:../storybook-utils '@storybook/react': specifier: 8.6.12 - version: 8.6.12(@storybook/test@8.6.12(storybook@8.6.12(prettier@3.5.3)))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.6.12(prettier@3.5.3))(typescript@5.0.4) + version: 8.6.12(@storybook/test@8.6.12(storybook@8.6.12(prettier@3.5.3)))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.6.12(prettier@3.5.3))(typescript@5.8.3) lodash: specifier: 4.17.21 version: 4.17.21 @@ -3481,7 +3480,7 @@ importers: version: 0.1.13 '@storybook/react': specifier: 8.6.12 - version: 8.6.12(@storybook/test@8.6.12(storybook@8.6.12(prettier@3.5.3)))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.6.12(prettier@3.5.3))(typescript@5.0.4) + version: 8.6.12(@storybook/test@8.6.12(storybook@8.6.12(prettier@3.5.3)))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.6.12(prettier@3.5.3))(typescript@5.8.3) glob: specifier: 10.3.12 version: 10.3.12 @@ -3556,7 +3555,7 @@ importers: version: 11.1.1 jest: specifier: 29.6.2 - version: 29.6.2(@types/node@20.4.8)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@5.0.4)) + version: 29.6.2(@types/node@20.4.8)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@5.9.0-dev.20250422)) jest-axe: specifier: 8.0.0 version: 8.0.0 @@ -5288,7 +5287,7 @@ packages: '@storybook/react-docgen-typescript-plugin@1.0.6--canary.9.0c3f3b7.0': resolution: {integrity: sha512-KUqXC3oa9JuQ0kZJLBhVdS4lOneKTOopnNBK4tUAgoxWQ3u/IjzdueZjFr7gyBrXMoU6duutk3RQR9u8ZpYJ4Q==} peerDependencies: - typescript: ~5.0.4 + typescript: '>= 4.x' webpack: '>= 4' '@storybook/react-dom-shim@8.6.12': @@ -5305,7 +5304,7 @@ packages: react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta storybook: ^8.6.12 - typescript: ~5.0.4 + typescript: '>= 4.2.x' peerDependenciesMeta: typescript: optional: true @@ -5318,7 +5317,7 @@ packages: react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta storybook: ^8.6.12 - typescript: ~5.0.4 + typescript: '>= 4.2.x' peerDependenciesMeta: '@storybook/test': optional: true @@ -6650,7 +6649,7 @@ packages: resolution: {integrity: sha512-kcZ6+W5QzcJ3P1Mt+83OUv/oHFqZHIx8DuxG6eZ5RGMERoLqp4BuGjhHLYGK+Kf5XVkQvqBSmAy/nGWN3qDgEA==} engines: {node: '>=14'} peerDependencies: - typescript: ~5.0.4 + typescript: '>=4.9.5' peerDependenciesMeta: typescript: optional: true @@ -7438,7 +7437,7 @@ packages: resolution: {integrity: sha512-mX3qW3idpueT2klaQXBzrIM/pHw+T0B/V9KHEvNrqijTq9NFnMZU6oreVxDYcf33P8a5cW+67PjodNHthGnNVg==} engines: {node: '>=12.13.0', yarn: '>=1.0.0'} peerDependencies: - typescript: ~5.0.4 + typescript: '>3.6.0' webpack: ^5.11.0 form-data@2.5.1: @@ -9313,7 +9312,7 @@ packages: react-docgen-typescript@2.2.2: resolution: {integrity: sha512-tvg2ZtOpOi6QDwsb3GZhOjDkkX0h8Z2gipvTg6OVMUyoYoURhEiRNePT8NZItTVCDh39JJHnLdfCOkzoLbFnTg==} peerDependencies: - typescript: ~5.0.4 + typescript: '>= 4.3.x' react-docgen@7.0.3: resolution: {integrity: sha512-i8aF1nyKInZnANZ4uZrH49qn1paRgBZ7wZiCNBMnenlPzEv0mRl+ShpTVEI6wZNl8sSc79xZkivtgLKQArcanQ==} @@ -10093,7 +10092,7 @@ packages: resolution: {integrity: sha512-i3eMG77UTMD0hZhgRS562pv83RC6ukSAC2GMNWc+9dieh/+jDM5u5YG+NHX6VNDRHQcHwmsTHctP9LhbC3WxVw==} engines: {node: '>=16'} peerDependencies: - typescript: ~5.0.4 + typescript: '>=4.2.0' ts-dedent@2.2.0: resolution: {integrity: sha512-q5W7tVM71e2xjHZTlgfTDoPF/SmqKG5hddq9SzR49CH2hayqRKJtQ4mtRlSxKaJlR/+9rEM+mnBHf7I2/BQcpQ==} @@ -10106,7 +10105,7 @@ packages: '@swc/core': '>=1.2.50' '@swc/wasm': '>=1.2.50' '@types/node': '*' - typescript: ~5.0.4 + typescript: '>=2.7' peerDependenciesMeta: '@swc/core': optional: true @@ -10133,7 +10132,7 @@ packages: resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} engines: {node: '>= 6'} peerDependencies: - typescript: ~5.0.4 + typescript: '>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta' tty-browserify@0.0.1: resolution: {integrity: sha512-C3TaO7K81YvjCgQH9Q1S3R3P3BtN3RIM8n+OvX4il1K1zgE8ZhI0op7kClgkxtutIE8hQrcrHBXvIheqKUUCxw==} @@ -10238,6 +10237,16 @@ packages: engines: {node: '>=12.20'} hasBin: true + typescript@5.8.3: + resolution: {integrity: sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==} + engines: {node: '>=14.17'} + hasBin: true + + typescript@5.9.0-dev.20250422: + resolution: {integrity: sha512-nhqzYEg74esioK1dt0zLZBEdpDv1VXZqX9qWe9qFi3pkYjXr2Rok3MTV0+CEDc7DIL6sKeJ5YBRuePpIsSmmfA==} + engines: {node: '>=14.17'} + hasBin: true + unbox-primitive@1.0.2: resolution: {integrity: sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==} @@ -12111,7 +12120,7 @@ snapshots: - ts-node optional: true - '@jest/core@29.6.2(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@5.0.4))': + '@jest/core@29.6.2(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@5.9.0-dev.20250422))': dependencies: '@jest/console': 29.6.2 '@jest/reporters': 29.6.2 @@ -12125,7 +12134,7 @@ snapshots: exit: 0.1.2 graceful-fs: 4.2.11 jest-changed-files: 29.5.0 - jest-config: 29.6.2(@types/node@20.4.8)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@5.0.4)) + jest-config: 29.6.2(@types/node@20.4.8)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@5.9.0-dev.20250422)) jest-haste-map: 29.7.0 jest-message-util: 29.7.0 jest-regex-util: 29.6.3 @@ -12596,7 +12605,7 @@ snapshots: react: 18.2.0 react-dom: 18.2.0(react@18.2.0) - '@storybook/builder-webpack5@8.6.12(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.24.2)(storybook@8.6.12(prettier@3.5.3))(typescript@5.0.4)': + '@storybook/builder-webpack5@8.6.12(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.24.2)(storybook@8.6.12(prettier@3.5.3))(typescript@5.9.0-dev.20250422)': dependencies: '@storybook/core-webpack': 8.6.12(storybook@8.6.12(prettier@3.5.3)) '@types/semver': 7.5.0 @@ -12606,7 +12615,7 @@ snapshots: constants-browserify: 1.0.0 css-loader: 6.8.1(webpack@5.88.0(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.24.2)) es-module-lexer: 1.6.0 - fork-ts-checker-webpack-plugin: 8.0.0(typescript@5.0.4)(webpack@5.88.0(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.24.2)) + fork-ts-checker-webpack-plugin: 8.0.0(typescript@5.9.0-dev.20250422)(webpack@5.88.0(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.24.2)) html-webpack-plugin: 5.5.3(webpack@5.88.0(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.24.2)) magic-string: 0.30.17 path-browserify: 1.0.1 @@ -12624,7 +12633,7 @@ snapshots: webpack-hot-middleware: 2.25.4 webpack-virtual-modules: 0.6.2 optionalDependencies: - typescript: 5.0.4 + typescript: 5.9.0-dev.20250422 transitivePeerDependencies: - '@swc/core' - esbuild @@ -12742,11 +12751,11 @@ snapshots: dependencies: storybook: 8.6.12(prettier@3.5.3) - '@storybook/preset-react-webpack@8.6.12(@storybook/test@8.6.12(storybook@8.6.12(prettier@3.5.3)))(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.24.2)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.6.12(prettier@3.5.3))(typescript@5.0.4)': + '@storybook/preset-react-webpack@8.6.12(@storybook/test@8.6.12(storybook@8.6.12(prettier@3.5.3)))(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.24.2)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.6.12(prettier@3.5.3))(typescript@5.9.0-dev.20250422)': dependencies: '@storybook/core-webpack': 8.6.12(storybook@8.6.12(prettier@3.5.3)) - '@storybook/react': 8.6.12(@storybook/test@8.6.12(storybook@8.6.12(prettier@3.5.3)))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.6.12(prettier@3.5.3))(typescript@5.0.4) - '@storybook/react-docgen-typescript-plugin': 1.0.6--canary.9.0c3f3b7.0(typescript@5.0.4)(webpack@5.88.0(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.24.2)) + '@storybook/react': 8.6.12(@storybook/test@8.6.12(storybook@8.6.12(prettier@3.5.3)))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.6.12(prettier@3.5.3))(typescript@5.9.0-dev.20250422) + '@storybook/react-docgen-typescript-plugin': 1.0.6--canary.9.0c3f3b7.0(typescript@5.9.0-dev.20250422)(webpack@5.88.0(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.24.2)) '@types/semver': 7.5.0 find-up: 5.0.0 magic-string: 0.30.17 @@ -12759,7 +12768,7 @@ snapshots: tsconfig-paths: 4.2.0 webpack: 5.88.0(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.24.2) optionalDependencies: - typescript: 5.0.4 + typescript: 5.9.0-dev.20250422 transitivePeerDependencies: - '@storybook/test' - '@swc/core' @@ -12776,16 +12785,16 @@ snapshots: dependencies: storybook: 8.6.12(prettier@3.5.3) - '@storybook/react-docgen-typescript-plugin@1.0.6--canary.9.0c3f3b7.0(typescript@5.0.4)(webpack@5.88.0(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.24.2))': + '@storybook/react-docgen-typescript-plugin@1.0.6--canary.9.0c3f3b7.0(typescript@5.9.0-dev.20250422)(webpack@5.88.0(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.24.2))': dependencies: debug: 4.4.0 endent: 2.1.0 find-cache-dir: 3.3.2 flat-cache: 3.0.4 micromatch: 4.0.5 - react-docgen-typescript: 2.2.2(typescript@5.0.4) + react-docgen-typescript: 2.2.2(typescript@5.9.0-dev.20250422) tslib: 2.6.2 - typescript: 5.0.4 + typescript: 5.9.0-dev.20250422 webpack: 5.88.0(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.24.2) transitivePeerDependencies: - supports-color @@ -12802,16 +12811,16 @@ snapshots: react-dom: 18.2.0(react@18.2.0) storybook: 8.6.12(prettier@3.5.3) - '@storybook/react-webpack5@8.6.12(@storybook/test@8.6.12(storybook@8.6.12(prettier@3.5.3)))(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.24.2)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.6.12(prettier@3.5.3))(typescript@5.0.4)': + '@storybook/react-webpack5@8.6.12(@storybook/test@8.6.12(storybook@8.6.12(prettier@3.5.3)))(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.24.2)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.6.12(prettier@3.5.3))(typescript@5.9.0-dev.20250422)': dependencies: - '@storybook/builder-webpack5': 8.6.12(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.24.2)(storybook@8.6.12(prettier@3.5.3))(typescript@5.0.4) - '@storybook/preset-react-webpack': 8.6.12(@storybook/test@8.6.12(storybook@8.6.12(prettier@3.5.3)))(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.24.2)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.6.12(prettier@3.5.3))(typescript@5.0.4) - '@storybook/react': 8.6.12(@storybook/test@8.6.12(storybook@8.6.12(prettier@3.5.3)))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.6.12(prettier@3.5.3))(typescript@5.0.4) + '@storybook/builder-webpack5': 8.6.12(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.24.2)(storybook@8.6.12(prettier@3.5.3))(typescript@5.9.0-dev.20250422) + '@storybook/preset-react-webpack': 8.6.12(@storybook/test@8.6.12(storybook@8.6.12(prettier@3.5.3)))(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.24.2)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.6.12(prettier@3.5.3))(typescript@5.9.0-dev.20250422) + '@storybook/react': 8.6.12(@storybook/test@8.6.12(storybook@8.6.12(prettier@3.5.3)))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.6.12(prettier@3.5.3))(typescript@5.9.0-dev.20250422) react: 18.2.0 react-dom: 18.2.0(react@18.2.0) storybook: 8.6.12(prettier@3.5.3) optionalDependencies: - typescript: 5.0.4 + typescript: 5.9.0-dev.20250422 transitivePeerDependencies: - '@storybook/test' - '@swc/core' @@ -12820,7 +12829,7 @@ snapshots: - uglify-js - webpack-cli - '@storybook/react@8.6.12(@storybook/test@8.6.12(storybook@8.6.12(prettier@2.8.8)))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.6.12(prettier@2.8.8))(typescript@5.0.4)': + '@storybook/react@8.6.12(@storybook/test@8.6.12(storybook@8.6.12(prettier@2.8.8)))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.6.12(prettier@2.8.8))(typescript@5.8.3)': dependencies: '@storybook/components': 8.6.12(storybook@8.6.12(prettier@2.8.8)) '@storybook/global': 5.0.0 @@ -12833,9 +12842,9 @@ snapshots: storybook: 8.6.12(prettier@2.8.8) optionalDependencies: '@storybook/test': 8.6.12(storybook@8.6.12(prettier@2.8.8)) - typescript: 5.0.4 + typescript: 5.8.3 - '@storybook/react@8.6.12(@storybook/test@8.6.12(storybook@8.6.12(prettier@3.5.3)))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.6.12(prettier@3.5.3))(typescript@5.0.4)': + '@storybook/react@8.6.12(@storybook/test@8.6.12(storybook@8.6.12(prettier@3.5.3)))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.6.12(prettier@3.5.3))(typescript@5.8.3)': dependencies: '@storybook/components': 8.6.12(storybook@8.6.12(prettier@3.5.3)) '@storybook/global': 5.0.0 @@ -12848,7 +12857,22 @@ snapshots: storybook: 8.6.12(prettier@3.5.3) optionalDependencies: '@storybook/test': 8.6.12(storybook@8.6.12(prettier@3.5.3)) - typescript: 5.0.4 + typescript: 5.8.3 + + '@storybook/react@8.6.12(@storybook/test@8.6.12(storybook@8.6.12(prettier@3.5.3)))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.6.12(prettier@3.5.3))(typescript@5.9.0-dev.20250422)': + dependencies: + '@storybook/components': 8.6.12(storybook@8.6.12(prettier@3.5.3)) + '@storybook/global': 5.0.0 + '@storybook/manager-api': 8.6.12(storybook@8.6.12(prettier@3.5.3)) + '@storybook/preview-api': 8.6.12(storybook@8.6.12(prettier@3.5.3)) + '@storybook/react-dom-shim': 8.6.12(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(storybook@8.6.12(prettier@3.5.3)) + '@storybook/theming': 8.6.12(storybook@8.6.12(prettier@3.5.3)) + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + storybook: 8.6.12(prettier@3.5.3) + optionalDependencies: + '@storybook/test': 8.6.12(storybook@8.6.12(prettier@3.5.3)) + typescript: 5.9.0-dev.20250422 '@storybook/test@8.5.3(storybook@8.6.12(prettier@3.5.3))': dependencies: @@ -12980,12 +13004,12 @@ snapshots: '@svgr/babel-plugin-transform-react-native-svg': 8.1.0(@babel/core@7.24.3) '@svgr/babel-plugin-transform-svg-component': 8.0.0(@babel/core@7.24.3) - '@svgr/cli@8.0.1(typescript@5.0.4)': + '@svgr/cli@8.0.1(typescript@5.8.3)': dependencies: - '@svgr/core': 8.0.0(typescript@5.0.4) - '@svgr/plugin-jsx': 8.0.1(@svgr/core@8.0.0(typescript@5.0.4)) - '@svgr/plugin-prettier': 8.0.1(@svgr/core@8.0.0(typescript@5.0.4)) - '@svgr/plugin-svgo': 8.0.1(@svgr/core@8.0.0(typescript@5.0.4))(typescript@5.0.4) + '@svgr/core': 8.0.0(typescript@5.8.3) + '@svgr/plugin-jsx': 8.0.1(@svgr/core@8.0.0(typescript@5.8.3)) + '@svgr/plugin-prettier': 8.0.1(@svgr/core@8.0.0(typescript@5.8.3)) + '@svgr/plugin-svgo': 8.0.1(@svgr/core@8.0.0(typescript@5.8.3))(typescript@5.8.3) camelcase: 6.3.0 chalk: 4.1.2 commander: 9.5.0 @@ -13004,23 +13028,34 @@ snapshots: transitivePeerDependencies: - supports-color - '@svgr/core@8.0.0(typescript@5.0.4)': + '@svgr/core@8.0.0(typescript@5.8.3)': dependencies: '@babel/core': 7.24.3 '@svgr/babel-preset': 8.0.0(@babel/core@7.24.3) camelcase: 6.3.0 - cosmiconfig: 8.3.6(typescript@5.0.4) + cosmiconfig: 8.3.6(typescript@5.8.3) snake-case: 3.0.4 transitivePeerDependencies: - supports-color - typescript - '@svgr/core@8.1.0(typescript@5.0.4)': + '@svgr/core@8.0.0(typescript@5.9.0-dev.20250422)': + dependencies: + '@babel/core': 7.24.3 + '@svgr/babel-preset': 8.0.0(@babel/core@7.24.3) + camelcase: 6.3.0 + cosmiconfig: 8.3.6(typescript@5.9.0-dev.20250422) + snake-case: 3.0.4 + transitivePeerDependencies: + - supports-color + - typescript + + '@svgr/core@8.1.0(typescript@5.8.3)': dependencies: '@babel/core': 7.24.3 '@svgr/babel-preset': 8.1.0(@babel/core@7.24.3) camelcase: 6.3.0 - cosmiconfig: 8.3.6(typescript@5.0.4) + cosmiconfig: 8.3.6(typescript@5.8.3) snake-case: 3.0.4 transitivePeerDependencies: - supports-color @@ -13044,51 +13079,70 @@ snapshots: transitivePeerDependencies: - supports-color - '@svgr/plugin-jsx@8.0.1(@svgr/core@8.0.0(typescript@5.0.4))': + '@svgr/plugin-jsx@8.0.1(@svgr/core@8.0.0(typescript@5.8.3))': dependencies: '@babel/core': 7.24.3 '@svgr/babel-preset': 8.0.0(@babel/core@7.24.3) - '@svgr/core': 8.0.0(typescript@5.0.4) + '@svgr/core': 8.0.0(typescript@5.8.3) '@svgr/hast-util-to-babel-ast': 8.0.0 svg-parser: 2.0.4 transitivePeerDependencies: - supports-color - '@svgr/plugin-jsx@8.1.0(@svgr/core@8.1.0(typescript@5.0.4))': + '@svgr/plugin-jsx@8.0.1(@svgr/core@8.0.0(typescript@5.9.0-dev.20250422))': + dependencies: + '@babel/core': 7.24.3 + '@svgr/babel-preset': 8.0.0(@babel/core@7.24.3) + '@svgr/core': 8.0.0(typescript@5.9.0-dev.20250422) + '@svgr/hast-util-to-babel-ast': 8.0.0 + svg-parser: 2.0.4 + transitivePeerDependencies: + - supports-color + + '@svgr/plugin-jsx@8.1.0(@svgr/core@8.1.0(typescript@5.8.3))': dependencies: '@babel/core': 7.24.3 '@svgr/babel-preset': 8.1.0(@babel/core@7.24.3) - '@svgr/core': 8.1.0(typescript@5.0.4) + '@svgr/core': 8.1.0(typescript@5.8.3) '@svgr/hast-util-to-babel-ast': 8.0.0 svg-parser: 2.0.4 transitivePeerDependencies: - supports-color - '@svgr/plugin-prettier@8.0.1(@svgr/core@8.0.0(typescript@5.0.4))': + '@svgr/plugin-prettier@8.0.1(@svgr/core@8.0.0(typescript@5.8.3))': dependencies: - '@svgr/core': 8.0.0(typescript@5.0.4) + '@svgr/core': 8.0.0(typescript@5.8.3) deepmerge: 4.3.1 prettier: 2.8.8 - '@svgr/plugin-svgo@8.0.1(@svgr/core@8.0.0(typescript@5.0.4))(typescript@5.0.4)': + '@svgr/plugin-svgo@8.0.1(@svgr/core@8.0.0(typescript@5.8.3))(typescript@5.8.3)': dependencies: - '@svgr/core': 8.0.0(typescript@5.0.4) - cosmiconfig: 8.3.6(typescript@5.0.4) + '@svgr/core': 8.0.0(typescript@5.8.3) + cosmiconfig: 8.3.6(typescript@5.8.3) deepmerge: 4.3.1 svgo: 3.0.2 transitivePeerDependencies: - typescript - '@svgr/plugin-svgo@8.1.0(@svgr/core@8.1.0(typescript@5.0.4))(typescript@5.0.4)': + '@svgr/plugin-svgo@8.0.1(@svgr/core@8.0.0(typescript@5.9.0-dev.20250422))(typescript@5.9.0-dev.20250422)': dependencies: - '@svgr/core': 8.1.0(typescript@5.0.4) - cosmiconfig: 8.3.6(typescript@5.0.4) + '@svgr/core': 8.0.0(typescript@5.9.0-dev.20250422) + cosmiconfig: 8.3.6(typescript@5.9.0-dev.20250422) deepmerge: 4.3.1 svgo: 3.0.2 transitivePeerDependencies: - typescript - '@svgr/rollup@8.1.0(rollup@4.16.1)(typescript@5.0.4)': + '@svgr/plugin-svgo@8.1.0(@svgr/core@8.1.0(typescript@5.8.3))(typescript@5.8.3)': + dependencies: + '@svgr/core': 8.1.0(typescript@5.8.3) + cosmiconfig: 8.3.6(typescript@5.8.3) + deepmerge: 4.3.1 + svgo: 3.0.2 + transitivePeerDependencies: + - typescript + + '@svgr/rollup@8.1.0(rollup@4.16.1)(typescript@5.8.3)': dependencies: '@babel/core': 7.24.3 '@babel/plugin-transform-react-constant-elements': 7.22.5(@babel/core@7.24.3) @@ -13096,24 +13150,24 @@ snapshots: '@babel/preset-react': 7.24.1(@babel/core@7.24.3) '@babel/preset-typescript': 7.24.1(@babel/core@7.24.3) '@rollup/pluginutils': 5.0.2(rollup@4.16.1) - '@svgr/core': 8.1.0(typescript@5.0.4) - '@svgr/plugin-jsx': 8.1.0(@svgr/core@8.1.0(typescript@5.0.4)) - '@svgr/plugin-svgo': 8.1.0(@svgr/core@8.1.0(typescript@5.0.4))(typescript@5.0.4) + '@svgr/core': 8.1.0(typescript@5.8.3) + '@svgr/plugin-jsx': 8.1.0(@svgr/core@8.1.0(typescript@5.8.3)) + '@svgr/plugin-svgo': 8.1.0(@svgr/core@8.1.0(typescript@5.8.3))(typescript@5.8.3) transitivePeerDependencies: - rollup - supports-color - typescript - '@svgr/webpack@8.0.1(typescript@5.0.4)': + '@svgr/webpack@8.0.1(typescript@5.9.0-dev.20250422)': dependencies: '@babel/core': 7.24.3 '@babel/plugin-transform-react-constant-elements': 7.22.5(@babel/core@7.24.3) '@babel/preset-env': 7.24.3(@babel/core@7.24.3) '@babel/preset-react': 7.24.1(@babel/core@7.24.3) '@babel/preset-typescript': 7.24.1(@babel/core@7.24.3) - '@svgr/core': 8.0.0(typescript@5.0.4) - '@svgr/plugin-jsx': 8.0.1(@svgr/core@8.0.0(typescript@5.0.4)) - '@svgr/plugin-svgo': 8.0.1(@svgr/core@8.0.0(typescript@5.0.4))(typescript@5.0.4) + '@svgr/core': 8.0.0(typescript@5.9.0-dev.20250422) + '@svgr/plugin-jsx': 8.0.1(@svgr/core@8.0.0(typescript@5.9.0-dev.20250422)) + '@svgr/plugin-svgo': 8.0.1(@svgr/core@8.0.0(typescript@5.9.0-dev.20250422))(typescript@5.9.0-dev.20250422) transitivePeerDependencies: - supports-color - typescript @@ -14420,6 +14474,24 @@ snapshots: optionalDependencies: typescript: 5.0.4 + cosmiconfig@8.3.6(typescript@5.8.3): + dependencies: + import-fresh: 3.3.0 + js-yaml: 4.1.0 + parse-json: 5.2.0 + path-type: 4.0.0 + optionalDependencies: + typescript: 5.8.3 + + cosmiconfig@8.3.6(typescript@5.9.0-dev.20250422): + dependencies: + import-fresh: 3.3.0 + js-yaml: 4.1.0 + parse-json: 5.2.0 + path-type: 4.0.0 + optionalDependencies: + typescript: 5.9.0-dev.20250422 + create-ecdh@4.0.4: dependencies: bn.js: 4.12.1 @@ -14814,7 +14886,7 @@ snapshots: dependencies: semver: 7.6.3 shelljs: 0.8.5 - typescript: 5.0.4 + typescript: 5.9.0-dev.20250422 dunder-proto@1.0.1: dependencies: @@ -15431,7 +15503,7 @@ snapshots: cross-spawn: 7.0.3 signal-exit: 4.1.0 - fork-ts-checker-webpack-plugin@8.0.0(typescript@5.0.4)(webpack@5.88.0(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.24.2)): + fork-ts-checker-webpack-plugin@8.0.0(typescript@5.9.0-dev.20250422)(webpack@5.88.0(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.24.2)): dependencies: '@babel/code-frame': 7.24.2 chalk: 4.1.2 @@ -15445,7 +15517,7 @@ snapshots: schema-utils: 3.3.0 semver: 7.6.3 tapable: 2.2.1 - typescript: 5.0.4 + typescript: 5.9.0-dev.20250422 webpack: 5.88.0(@swc/core@1.4.2(@swc/helpers@0.5.1))(esbuild@0.24.2) form-data@2.5.1: @@ -16119,16 +16191,16 @@ snapshots: - ts-node optional: true - jest-cli@29.6.2(@types/node@20.4.8)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@5.0.4)): + jest-cli@29.6.2(@types/node@20.4.8)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@5.9.0-dev.20250422)): dependencies: - '@jest/core': 29.6.2(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@5.0.4)) + '@jest/core': 29.6.2(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@5.9.0-dev.20250422)) '@jest/test-result': 29.6.2 '@jest/types': 29.6.3 chalk: 4.1.2 exit: 0.1.2 graceful-fs: 4.2.11 import-local: 3.1.0 - jest-config: 29.6.2(@types/node@20.4.8)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@5.0.4)) + jest-config: 29.6.2(@types/node@20.4.8)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@5.9.0-dev.20250422)) jest-util: 29.7.0 jest-validate: 29.6.2 prompts: 2.4.2 @@ -16203,7 +16275,7 @@ snapshots: - supports-color optional: true - jest-config@29.6.2(@types/node@20.4.8)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@5.0.4)): + jest-config@29.6.2(@types/node@20.4.8)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@5.9.0-dev.20250422)): dependencies: '@babel/core': 7.24.3 '@jest/test-sequencer': 29.6.2 @@ -16229,7 +16301,7 @@ snapshots: strip-json-comments: 3.1.1 optionalDependencies: '@types/node': 20.4.8 - ts-node: 10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@5.0.4) + ts-node: 10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@5.9.0-dev.20250422) transitivePeerDependencies: - babel-plugin-macros - supports-color @@ -16497,12 +16569,12 @@ snapshots: - ts-node optional: true - jest@29.6.2(@types/node@20.4.8)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@5.0.4)): + jest@29.6.2(@types/node@20.4.8)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@5.9.0-dev.20250422)): dependencies: - '@jest/core': 29.6.2(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@5.0.4)) + '@jest/core': 29.6.2(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@5.9.0-dev.20250422)) '@jest/types': 29.6.3 import-local: 3.1.0 - jest-cli: 29.6.2(@types/node@20.4.8)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@5.0.4)) + jest-cli: 29.6.2(@types/node@20.4.8)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@5.9.0-dev.20250422)) transitivePeerDependencies: - '@types/node' - babel-plugin-macros @@ -17502,6 +17574,29 @@ snapshots: - supports-color - typescript + npm-package-json-lint@8.0.0(typescript@5.8.3): + dependencies: + ajv: 6.12.6 + ajv-errors: 1.0.1(ajv@6.12.6) + chalk: 4.1.2 + cosmiconfig: 8.3.6(typescript@5.8.3) + debug: 4.3.4 + globby: 11.1.0 + ignore: 5.3.2 + is-plain-obj: 3.0.0 + jsonc-parser: 3.3.1 + log-symbols: 4.1.0 + meow: 9.0.0 + plur: 4.0.0 + semver: 7.6.3 + slash: 3.0.0 + strip-json-comments: 3.1.1 + type-fest: 4.30.0 + validate-npm-package-name: 5.0.1 + transitivePeerDependencies: + - supports-color + - typescript + npm-run-all@4.1.5: dependencies: ansi-styles: 3.2.1 @@ -17929,9 +18024,13 @@ snapshots: range-parser@1.2.1: {} - react-docgen-typescript@2.2.2(typescript@5.0.4): + react-docgen-typescript@2.2.2(typescript@5.8.3): dependencies: - typescript: 5.0.4 + typescript: 5.8.3 + + react-docgen-typescript@2.2.2(typescript@5.9.0-dev.20250422): + dependencies: + typescript: 5.9.0-dev.20250422 react-docgen@7.0.3: dependencies: @@ -18888,8 +18987,49 @@ snapshots: yn: 3.1.1 optionalDependencies: '@swc/core': 1.4.2(@swc/helpers@0.5.1) + optional: true + + ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.17.12)(typescript@5.8.3): + dependencies: + '@cspotcode/source-map-support': 0.8.1 + '@tsconfig/node10': 1.0.11 + '@tsconfig/node12': 1.0.11 + '@tsconfig/node14': 1.0.3 + '@tsconfig/node16': 1.0.4 + '@types/node': 20.17.12 + acorn: 8.14.0 + acorn-walk: 8.3.3 + arg: 4.1.3 + create-require: 1.1.1 + diff: 4.0.2 + make-error: 1.3.6 + typescript: 5.8.3 + v8-compile-cache-lib: 3.0.1 + yn: 3.1.1 + optionalDependencies: + '@swc/core': 1.4.2(@swc/helpers@0.5.1) - ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@5.0.4): + ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.17.12)(typescript@5.9.0-dev.20250422): + dependencies: + '@cspotcode/source-map-support': 0.8.1 + '@tsconfig/node10': 1.0.11 + '@tsconfig/node12': 1.0.11 + '@tsconfig/node14': 1.0.3 + '@tsconfig/node16': 1.0.4 + '@types/node': 20.17.12 + acorn: 8.14.0 + acorn-walk: 8.3.3 + arg: 4.1.3 + create-require: 1.1.1 + diff: 4.0.2 + make-error: 1.3.6 + typescript: 5.9.0-dev.20250422 + v8-compile-cache-lib: 3.0.1 + yn: 3.1.1 + optionalDependencies: + '@swc/core': 1.4.2(@swc/helpers@0.5.1) + + ts-node@10.9.2(@swc/core@1.4.2(@swc/helpers@0.5.1))(@types/node@20.4.8)(typescript@5.9.0-dev.20250422): dependencies: '@cspotcode/source-map-support': 0.8.1 '@tsconfig/node10': 1.0.11 @@ -18903,7 +19043,7 @@ snapshots: create-require: 1.1.1 diff: 4.0.2 make-error: 1.3.6 - typescript: 5.0.4 + typescript: 5.9.0-dev.20250422 v8-compile-cache-lib: 3.0.1 yn: 3.1.1 optionalDependencies: @@ -19030,6 +19170,10 @@ snapshots: typescript@5.0.4: {} + typescript@5.8.3: {} + + typescript@5.9.0-dev.20250422: {} + unbox-primitive@1.0.2: dependencies: call-bind: 1.0.7 diff --git a/tools/build/package.json b/tools/build/package.json index 8c2a27d60b..9905b89f36 100644 --- a/tools/build/package.json +++ b/tools/build/package.json @@ -46,12 +46,12 @@ "rollup-plugin-bundle-stats": "^4.18.2", "rollup-plugin-node-externals": "7.1.1", "rollup-plugin-polyfill-node": "0.13.0", - "typescript": "~5.0.0" + "typescript": "~5.8.0" }, "peerDependencies": { "@babel/core": "7.24.0", "turbo": "^2.0.6", - "typescript": "~5.0.0" + "typescript": "~5.8.0" }, "devDependencies": { "@types/mock-fs": "^4.13.4", diff --git a/tools/storybook-decorators/src/decorators/PropCombinations/utils/valStr.ts b/tools/storybook-decorators/src/decorators/PropCombinations/utils/valStr.ts index c1d81815bd..458efe2923 100644 --- a/tools/storybook-decorators/src/decorators/PropCombinations/utils/valStr.ts +++ b/tools/storybook-decorators/src/decorators/PropCombinations/utils/valStr.ts @@ -13,8 +13,9 @@ export function valStr(val: any): string { if (typeof val === 'object') { if (val.type) { if (typeof val.type === 'string') return `<${val.type} />`; - // eslint-disable-next-line no-constant-binary-expression - return `<${val.type.displayName} />` ?? 'JSX Element'; + return val.type.displayName + ? `<${val.type.displayName} />` + : 'JSX Element'; } if (Array.isArray(val)) return 'Array'; From b488bbe777977f6e689f8c3f3aa09c3d47e46df1 Mon Sep 17 00:00:00 2001 From: Adam Michael Thompson Date: Tue, 22 Apr 2025 15:48:13 -0400 Subject: [PATCH 46/48] Update build-typescript-5.md --- .changeset/build-typescript-5.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.changeset/build-typescript-5.md b/.changeset/build-typescript-5.md index 0db0b02c6a..2d701c7d5b 100644 --- a/.changeset/build-typescript-5.md +++ b/.changeset/build-typescript-5.md @@ -2,6 +2,7 @@ '@lg-tools/build': minor --- -- Upgrades to TS 5.0. -- Adds `--downlevel` option for `build-ts`. This option exports downleveled `*.d.ts` files for a defined set of targets. Updates a package's `package.json` if necessary. +- Upgrades to TS 5.8. +- Adds `--downlevel` option for `build-ts`. This option exports downleveled `*.d.ts` files for a defined set of targets. +Updates a package's `package.json` if necessary `--update` flag is provided. This uses [downlevel-dts](https://github.com/sandersn/downlevel-dts) under the hood. From 768915edd5dffdae63a0208b234fae5c685eced4 Mon Sep 17 00:00:00 2001 From: Adam Michael Thompson Date: Tue, 22 Apr 2025 16:38:41 -0400 Subject: [PATCH 47/48] Update tsconfig.json --- tools/install/scripts/tsconfig.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/install/scripts/tsconfig.json b/tools/install/scripts/tsconfig.json index b2cb3a1768..1c195bbc16 100644 --- a/tools/install/scripts/tsconfig.json +++ b/tools/install/scripts/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "@lg-tools/build/config/root.tsconfig.json", + "extends": "@lg-tools/build/config/script.tsconfig.json", "compilerOptions": { "strict": true, "baseUrl": ".", From 1f6a890914e4f48e3c475004577143f1bcd521de Mon Sep 17 00:00:00 2001 From: Adam Michael Thompson Date: Tue, 22 Apr 2025 16:59:01 -0400 Subject: [PATCH 48/48] lint fix --- scripts/package.json | 2 +- tools/build/config/package.tsconfig.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/package.json b/scripts/package.json index 86770c517d..db580a0db5 100644 --- a/scripts/package.json +++ b/scripts/package.json @@ -4,7 +4,7 @@ "version": "0.0.0", "keywords": [], "author": "", - "license": "", + "license": "Apache-2.0", "dependencies": { "@lg-tools/meta": "workspace:*", "chalk": "^4.1.2", diff --git a/tools/build/config/package.tsconfig.json b/tools/build/config/package.tsconfig.json index 42c183ec46..143abf8ddc 100644 --- a/tools/build/config/package.tsconfig.json +++ b/tools/build/config/package.tsconfig.json @@ -17,6 +17,6 @@ "strict": true, "strictNullChecks": true, "pretty": true, - "skipLibCheck": true, + "skipLibCheck": true } }