diff --git a/package-lock.json b/package-lock.json index 6dad90b1eb..d5ec61eecf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3425,10 +3425,6 @@ "node": ">=6.9.0" } }, - "node_modules/@instructure/babel-plugin-transform-imports": { - "resolved": "packages/babel-plugin-transform-imports", - "link": true - }, "node_modules/@instructure/browserslist-config-instui": { "resolved": "packages/browserslist-config-instui", "link": true @@ -37254,6 +37250,7 @@ "packages/babel-plugin-transform-imports": { "name": "@instructure/babel-plugin-transform-imports", "version": "10.11.0", + "extraneous": true, "license": "MIT", "dependencies": { "globby": "^11.1.0" @@ -37659,7 +37656,6 @@ "@babel/preset-react": "^7.26.3", "@babel/preset-typescript": "^7.26.0", "@babel/runtime": "^7.26.0", - "@instructure/babel-plugin-transform-imports": "10.11.0", "@instructure/browserslist-config-instui": "10.11.0", "babel-loader": "^9.2.1", "babel-plugin-dynamic-import-node": "^2.3.3", diff --git a/packages/babel-plugin-transform-imports/.gitignore b/packages/babel-plugin-transform-imports/.gitignore deleted file mode 100644 index a7c47537dc..0000000000 --- a/packages/babel-plugin-transform-imports/.gitignore +++ /dev/null @@ -1 +0,0 @@ -types/ diff --git a/packages/babel-plugin-transform-imports/.npmignore b/packages/babel-plugin-transform-imports/.npmignore deleted file mode 100644 index 9b51f84223..0000000000 --- a/packages/babel-plugin-transform-imports/.npmignore +++ /dev/null @@ -1,5 +0,0 @@ -**/.* -**/__tests__ -**/__testfixtures__ -*.config.js -*.conf.js diff --git a/packages/babel-plugin-transform-imports/CHANGELOG.md b/packages/babel-plugin-transform-imports/CHANGELOG.md deleted file mode 100644 index 4e48788ab3..0000000000 --- a/packages/babel-plugin-transform-imports/CHANGELOG.md +++ /dev/null @@ -1,796 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -# [10.11.0](https://github.com/instructure/instructure-ui/compare/v10.10.0...v10.11.0) (2025-02-03) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - - - - - -# [10.10.0](https://github.com/instructure/instructure-ui/compare/v10.9.0...v10.10.0) (2024-12-18) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - - - - - -# [10.9.0](https://github.com/instructure/instructure-ui/compare/v10.8.0...v10.9.0) (2024-12-12) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - - - - - -# [10.8.0](https://github.com/instructure/instructure-ui/compare/v10.7.0...v10.8.0) (2024-12-09) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - - - - - -# [10.7.0](https://github.com/instructure/instructure-ui/compare/v10.6.1...v10.7.0) (2024-12-03) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - - - - - -## [10.6.1](https://github.com/instructure/instructure-ui/compare/v10.6.0...v10.6.1) (2024-11-26) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - - - - - -# [10.6.0](https://github.com/instructure/instructure-ui/compare/v10.5.0...v10.6.0) (2024-11-18) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - - - - - -# [10.5.0](https://github.com/instructure/instructure-ui/compare/v10.4.1...v10.5.0) (2024-11-07) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - - - - - -## [10.4.1](https://github.com/instructure/instructure-ui/compare/v10.4.0...v10.4.1) (2024-10-28) - - -### Bug Fixes - -* update license ([1c039d9](https://github.com/instructure/instructure-ui/commit/1c039d9cbf5a3ea99b59803ddde5c6c0b2d76ba5)) - - - - - -# [10.4.0](https://github.com/instructure/instructure-ui/compare/v10.3.0...v10.4.0) (2024-10-16) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - - - - - -# [10.3.0](https://github.com/instructure/instructure-ui/compare/v10.2.2...v10.3.0) (2024-10-03) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - - - - - -## [10.2.2](https://github.com/instructure/instructure-ui/compare/v10.2.1...v10.2.2) (2024-09-13) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - - - - - -## [10.2.1](https://github.com/instructure/instructure-ui/compare/v10.2.0...v10.2.1) (2024-08-30) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - - - - - -# [10.2.0](https://github.com/instructure/instructure-ui/compare/v10.0.0...v10.2.0) (2024-08-23) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - - - - - -# [10.1.0](https://github.com/instructure/instructure-ui/compare/v10.0.0...v10.1.0) (2024-08-23) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - - - - - -# [10.0.0](https://github.com/instructure/instructure-ui/compare/v9.5.1...v10.0.0) (2024-07-31) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - - - - - -## [9.5.1](https://github.com/instructure/instructure-ui/compare/v9.5.0...v9.5.1) (2024-07-30) - - -### Bug Fixes - -* **ui-color-picker,ui-color-utils:** fix corrupted CJS build ([e1016be](https://github.com/instructure/instructure-ui/commit/e1016be3bc32307f8b05fdf1d4176e4915cc8dd6)) - - - - - -# [9.5.0](https://github.com/instructure/instructure-ui/compare/v9.3.0...v9.5.0) (2024-07-26) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - - - - - -# [9.4.0](https://github.com/instructure/instructure-ui/compare/v9.3.0...v9.4.0) (2024-07-26) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - - - - - -# [9.3.0](https://github.com/instructure/instructure-ui/compare/v9.2.0...v9.3.0) (2024-07-17) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - - - - - -# [9.2.0](https://github.com/instructure/instructure-ui/compare/v9.1.0...v9.2.0) (2024-07-09) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - - - - - -# [9.1.0](https://github.com/instructure/instructure-ui/compare/v9.0.1...v9.1.0) (2024-06-14) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - - - - - -## [9.0.1](https://github.com/instructure/instructure-ui/compare/v9.0.0...v9.0.1) (2024-05-09) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - - - - - -# [9.0.0](https://github.com/instructure/instructure-ui/compare/v8.56.0...v9.0.0) (2024-05-09) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - - - - - -# [8.56.0](https://github.com/instructure/instructure-ui/compare/v8.55.1...v8.56.0) (2024-05-06) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - - - - - -## [8.55.1](https://github.com/instructure/instructure-ui/compare/v8.55.0...v8.55.1) (2024-04-30) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - - - - - -# [8.55.0](https://github.com/instructure/instructure-ui/compare/v8.54.0...v8.55.0) (2024-04-09) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - - - - - -# [8.54.0](https://github.com/instructure/instructure-ui/compare/v8.53.2...v8.54.0) (2024-03-21) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - - - - - -## [8.53.2](https://github.com/instructure/instructure-ui/compare/v8.53.1...v8.53.2) (2024-02-15) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - - - - - -## [8.53.1](https://github.com/instructure/instructure-ui/compare/v8.53.0...v8.53.1) (2024-02-09) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - - - - - -# [8.53.0](https://github.com/instructure/instructure-ui/compare/v8.52.0...v8.53.0) (2024-02-08) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -# [8.52.0](https://github.com/instructure/instructure-ui/compare/v8.51.0...v8.52.0) (2024-02-02) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -# [8.51.0](https://github.com/instructure/instructure-ui/compare/v8.50.0...v8.51.0) (2023-12-14) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -# [8.50.0](https://github.com/instructure/instructure-ui/compare/v8.49.0...v8.50.0) (2023-12-05) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -# [8.49.0](https://github.com/instructure/instructure-ui/compare/v8.48.3...v8.49.0) (2023-11-24) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -## [8.48.3](https://github.com/instructure/instructure-ui/compare/v8.48.2...v8.48.3) (2023-11-23) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -## [8.48.2](https://github.com/instructure/instructure-ui/compare/v8.48.1...v8.48.2) (2023-11-21) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -## [8.48.1](https://github.com/instructure/instructure-ui/compare/v8.48.0...v8.48.1) (2023-11-17) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -# [8.48.0](https://github.com/instructure/instructure-ui/compare/v8.47.1...v8.48.0) (2023-11-10) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -## [8.47.1](https://github.com/instructure/instructure-ui/compare/v8.47.0...v8.47.1) (2023-11-06) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -# [8.47.0](https://github.com/instructure/instructure-ui/compare/v8.46.1...v8.47.0) (2023-10-27) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -## [8.46.1](https://github.com/instructure/instructure-ui/compare/v8.46.0...v8.46.1) (2023-10-13) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -# [8.46.0](https://github.com/instructure/instructure-ui/compare/v8.45.0...v8.46.0) (2023-10-11) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -# [8.45.0](https://github.com/instructure/instructure-ui/compare/v8.44.0...v8.45.0) (2023-10-03) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -# [8.44.0](https://github.com/instructure/instructure-ui/compare/v8.43.1...v8.44.0) (2023-09-21) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -## [8.43.1](https://github.com/instructure/instructure-ui/compare/v8.43.0...v8.43.1) (2023-09-11) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -# [8.43.0](https://github.com/instructure/instructure-ui/compare/v8.41.1...v8.43.0) (2023-09-07) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -# [8.42.0](https://github.com/instructure/instructure-ui/compare/v8.41.1...v8.42.0) (2023-09-07) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -## [8.41.1](https://github.com/instructure/instructure-ui/compare/v8.41.0...v8.41.1) (2023-08-24) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -# [8.41.0](https://github.com/instructure/instructure-ui/compare/v8.40.1...v8.41.0) (2023-08-21) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -## [8.40.1](https://github.com/instructure/instructure-ui/compare/v8.40.0...v8.40.1) (2023-08-18) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -# [8.40.0](https://github.com/instructure/instructure-ui/compare/v8.39.0...v8.40.0) (2023-08-17) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -# [8.39.0](https://github.com/instructure/instructure-ui/compare/v8.38.1...v8.39.0) (2023-07-21) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -## [8.38.1](https://github.com/instructure/instructure-ui/compare/v8.38.0...v8.38.1) (2023-06-13) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -# [8.38.0](https://github.com/instructure/instructure-ui/compare/v8.37.0...v8.38.0) (2023-05-15) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -# [8.37.0](https://github.com/instructure/instructure-ui/compare/v8.36.0...v8.37.0) (2023-04-25) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -# [8.36.0](https://github.com/instructure/instructure-ui/compare/v8.35.1...v8.36.0) (2023-03-23) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -## [8.35.1](https://github.com/instructure/instructure-ui/compare/v8.35.0...v8.35.1) (2023-03-10) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -# [8.35.0](https://github.com/instructure/instructure-ui/compare/v8.34.0...v8.35.0) (2023-02-17) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -# [8.34.0](https://github.com/instructure/instructure-ui/compare/v8.33.2...v8.34.0) (2023-02-10) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -## [8.33.2](https://github.com/instructure/instructure-ui/compare/v8.33.1...v8.33.2) (2023-01-25) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -## [8.33.1](https://github.com/instructure/instructure-ui/compare/v8.33.0...v8.33.1) (2023-01-06) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -# [8.33.0](https://github.com/instructure/instructure-ui/compare/v8.32.1...v8.33.0) (2023-01-04) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -## [8.32.1](https://github.com/instructure/instructure-ui/compare/v8.30.0...v8.32.1) (2022-12-01) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -# [8.32.0](https://github.com/instructure/instructure-ui/compare/v8.31.0...v8.32.0) (2022-11-23) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -# [8.31.0](https://github.com/instructure/instructure-ui/compare/v8.30.0...v8.31.0) (2022-11-21) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -# [8.30.0](https://github.com/instructure/instructure-ui/compare/v8.29.0...v8.30.0) (2022-10-26) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -# [8.29.0](https://github.com/instructure/instructure-ui/compare/v8.28.0...v8.29.0) (2022-09-29) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -## [8.28.2](https://github.com/instructure/instructure-ui/compare/v8.28.0...v8.28.2) (2022-09-16) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -## [8.28.1](https://github.com/instructure/instructure-ui/compare/v8.28.0...v8.28.1) (2022-09-12) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -# [8.28.0](https://github.com/instructure/instructure-ui/compare/v8.27.0...v8.28.0) (2022-09-02) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -# [8.27.0](https://github.com/instructure/instructure-ui/compare/v8.26.3...v8.27.0) (2022-07-25) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -## [8.26.3](https://github.com/instructure/instructure-ui/compare/v8.26.2...v8.26.3) (2022-07-14) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -## [8.26.2](https://github.com/instructure/instructure-ui/compare/v8.26.1...v8.26.2) (2022-07-11) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -## [8.26.1](https://github.com/instructure/instructure-ui/compare/v8.26.0...v8.26.1) (2022-07-06) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -# [8.26.0](https://github.com/instructure/instructure-ui/compare/v8.25.0...v8.26.0) (2022-06-30) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -# [8.25.0](https://github.com/instructure/instructure-ui/compare/v8.24.5...v8.25.0) (2022-06-03) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -## [8.24.5](https://github.com/instructure/instructure-ui/compare/v8.24.3...v8.24.5) (2022-05-31) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -## [8.24.4](https://github.com/instructure/instructure-ui/compare/v8.24.3...v8.24.4) (2022-05-27) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -## [8.24.3](https://github.com/instructure/instructure-ui/compare/v8.24.2...v8.24.3) (2022-05-25) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -## [8.24.2](https://github.com/instructure/instructure-ui/compare/v8.24.1...v8.24.2) (2022-05-02) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -## [8.24.1](https://github.com/instructure/instructure-ui/compare/v8.24.0...v8.24.1) (2022-04-29) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -# [8.24.0](https://github.com/instructure/instructure-ui/compare/v8.23.0...v8.24.0) (2022-04-26) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -# [8.23.0](https://github.com/instructure/instructure-ui/compare/v8.22.0...v8.23.0) (2022-04-07) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -# [8.22.0](https://github.com/instructure/instructure-ui/compare/v8.21.0...v8.22.0) (2022-03-31) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -# [8.21.0](https://github.com/instructure/instructure-ui/compare/v8.20.0...v8.21.0) (2022-03-30) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -# [8.20.0](https://github.com/instructure/instructure-ui/compare/v8.19.0...v8.20.0) (2022-03-22) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -# [8.19.0](https://github.com/instructure/instructure-ui/compare/v8.18.0...v8.19.0) (2022-03-16) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -# [8.18.0](https://github.com/instructure/instructure-ui/compare/v8.17.0...v8.18.0) (2022-02-23) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -# [8.17.0](https://github.com/instructure/instructure-ui/compare/v8.16.0...v8.17.0) (2022-02-07) - -### Bug Fixes - -- remove type:"commonjs" from package.json files ([0b243be](https://github.com/instructure/instructure-ui/commit/0b243bee389ee14493e6b3dbb30a8b660c295d3d)) - -# [8.16.0](https://github.com/instructure/instructure-ui/compare/v8.15.0...v8.16.0) (2022-02-03) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -# [8.15.0](https://github.com/instructure/instructure-ui/compare/v8.14.0...v8.15.0) (2022-01-26) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -# [8.14.0](https://github.com/instructure/instructure-ui/compare/v8.13.0...v8.14.0) (2021-12-16) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -# [8.13.0](https://github.com/instructure/instructure-ui/compare/v8.12.0...v8.13.0) (2021-12-01) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -# [8.12.0](https://github.com/instructure/instructure-ui/compare/v8.11.1...v8.12.0) (2021-11-17) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -## [8.11.1](https://github.com/instructure/instructure-ui/compare/v8.11.0...v8.11.1) (2021-10-19) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -# [8.11.0](https://github.com/instructure/instructure-ui/compare/v8.10.2...v8.11.0) (2021-10-15) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -## [8.10.2](https://github.com/instructure/instructure-ui/compare/v8.10.1...v8.10.2) (2021-10-01) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -## [8.10.1](https://github.com/instructure/instructure-ui/compare/v8.10.0...v8.10.1) (2021-10-01) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -# [8.10.0](https://github.com/instructure/instructure-ui/compare/v8.9.1...v8.10.0) (2021-09-28) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -## [8.9.1](https://github.com/instructure/instructure-ui/compare/v8.9.0...v8.9.1) (2021-09-16) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -# [8.9.0](https://github.com/instructure/instructure-ui/compare/v8.8.0...v8.9.0) (2021-09-15) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -# [8.8.0](https://github.com/instructure/instructure-ui/compare/v8.7.0...v8.8.0) (2021-08-27) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -# [8.7.0](https://github.com/instructure/instructure-ui/compare/v8.6.0...v8.7.0) (2021-07-16) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -# [8.6.0](https://github.com/instructure/instructure-ui/compare/v8.5.0...v8.6.0) (2021-06-18) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -# [8.5.0](https://github.com/instructure/instructure-ui/compare/v8.4.0...v8.5.0) (2021-06-09) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -# [8.4.0](https://github.com/instructure/instructure-ui/compare/v8.3.0...v8.4.0) (2021-05-11) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -# [8.3.0](https://github.com/instructure/instructure-ui/compare/v8.2.1...v8.3.0) (2021-05-04) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -## [8.2.1](https://github.com/instructure/instructure-ui/compare/v8.2.0...v8.2.1) (2021-04-22) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -# [8.2.0](https://github.com/instructure/instructure-ui/compare/v8.1.0...v8.2.0) (2021-04-22) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -# [8.1.0](https://github.com/instructure/instructure-ui/compare/v8.0.0...v8.1.0) (2021-04-15) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -# [8.0.0](https://github.com/instructure/instructure-ui/compare/v7.5.0...v8.0.0) (2021-03-29) - -### Bug Fixes - -- **babel-plugin-transform-imports:** throw errors not just log a message if something goes wrong ([b39565f](https://github.com/instructure/instructure-ui/commit/b39565f46c141c9a431b86a95880cbc470bcc880)) - -# [7.5.0](https://github.com/instructure/instructure-ui/compare/v7.4.4...v7.5.0) (2021-03-22) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -## [7.4.4](https://github.com/instructure/instructure-ui/compare/v7.4.3...v7.4.4) (2021-03-12) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -## [7.4.3](https://github.com/instructure/instructure-ui/compare/v7.4.1...v7.4.3) (2021-03-11) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -## [7.4.2](https://github.com/instructure/instructure-ui/compare/v7.4.1...v7.4.2) (2021-03-11) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -## [7.4.1](https://github.com/instructure/instructure-ui/compare/v7.4.0...v7.4.1) (2021-03-04) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -# [7.4.0](https://github.com/instructure/instructure-ui/compare/v7.3.5...v7.4.0) (2021-02-01) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -## [7.3.5](https://github.com/instructure/instructure-ui/compare/v7.3.2...v7.3.5) (2021-01-21) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -## [7.3.4](https://github.com/instructure/instructure-ui/compare/v7.3.2...v7.3.4) (2021-01-14) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -## [7.3.3](https://github.com/instructure/instructure-ui/compare/v7.3.2...v7.3.3) (2021-01-13) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -## [7.3.2](https://github.com/instructure/instructure-ui/compare/v7.3.1...v7.3.2) (2020-12-10) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -## [7.3.1](https://github.com/instructure/instructure-ui/compare/v7.3.0...v7.3.1) (2020-11-30) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -# [7.3.0](https://github.com/instructure/instructure-ui/compare/v7.2.4...v7.3.0) (2020-10-26) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -## [7.2.4](https://github.com/instructure/instructure-ui/compare/v7.2.0...v7.2.4) (2020-10-09) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -## [7.2.3](https://github.com/instructure/instructure-ui/compare/v7.2.0...v7.2.3) (2020-10-08) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -## [7.2.2](https://github.com/instructure/instructure-ui/compare/v7.2.0...v7.2.2) (2020-10-08) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -## [7.2.1](https://github.com/instructure/instructure-ui/compare/v7.2.0...v7.2.1) (2020-10-07) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -# [7.2.0](https://github.com/instructure/instructure-ui/compare/v7.1.4...v7.2.0) (2020-09-23) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -## [7.1.4](https://github.com/instructure/instructure-ui/compare/v7.1.3...v7.1.4) (2020-09-09) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -## [7.1.3](https://github.com/instructure/instructure-ui/compare/v7.1.2...v7.1.3) (2020-08-10) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -## [7.1.2](https://github.com/instructure/instructure-ui/compare/v7.1.1...v7.1.2) (2020-07-17) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -## [7.1.1](https://github.com/instructure/instructure-ui/compare/v7.1.0...v7.1.1) (2020-07-01) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -# [7.1.0](https://github.com/instructure/instructure-ui/compare/v7.0.0...v7.1.0) (2020-06-25) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -# [7.0.0](https://github.com/instructure/instructure-ui/compare/v6.26.0...v7.0.0) (2020-05-27) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -# [6.26.0](https://github.com/instructure/instructure-ui/compare/v6.25.0...v6.26.0) (2020-04-30) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -# [6.25.0](https://github.com/instructure/instructure-ui/compare/v6.24.0...v6.25.0) (2020-04-27) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -# [6.24.0](https://github.com/instructure/instructure-ui/compare/v6.23.0...v6.24.0) (2020-04-14) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -# [6.23.0](https://github.com/instructure/instructure-ui/compare/v6.22.0...v6.23.0) (2020-04-02) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -# [6.22.0](https://github.com/instructure/instructure-ui/compare/v6.21.0...v6.22.0) (2020-03-16) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -# [6.21.0](https://github.com/instructure/instructure-ui/compare/v6.20.0...v6.21.0) (2020-02-26) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -# [6.20.0](https://github.com/instructure/instructure-ui/compare/v6.19.0...v6.20.0) (2020-02-13) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -# [6.19.0](https://github.com/instructure/instructure-ui/compare/v6.18.0...v6.19.0) (2020-02-11) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -# [6.18.0](https://github.com/instructure/instructure-ui/compare/v6.17.0...v6.18.0) (2020-02-04) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -# [6.17.0](https://github.com/instructure/instructure-ui/compare/v6.16.0...v6.17.0) (2020-01-22) - -### Bug Fixes - -- Update Package READMEs and align deprecation statements ([8f892e4](https://github.com/instructure/instructure-ui/commit/8f892e4)) - -### Features - -- **babel-plugin-transform-imports:** allow imports that are not at the root level of src ([d239362](https://github.com/instructure/instructure-ui/commit/d239362)) - -# [6.16.0](https://github.com/instructure/instructure-ui/compare/v6.15.0...v6.16.0) (2019-12-13) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -# [6.15.0](https://github.com/instructure/instructure-ui/compare/v6.14.0...v6.15.0) (2019-11-18) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -# [6.14.0](https://github.com/instructure/instructure-ui/compare/v6.13.0...v6.14.0) (2019-10-14) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -# [6.13.0](https://github.com/instructure/instructure-ui/compare/v6.12.0...v6.13.0) (2019-09-24) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -# [6.12.0](https://github.com/instructure/instructure-ui/compare/v6.11.0...v6.12.0) (2019-09-17) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -# [6.11.0](https://github.com/instructure/instructure-ui/compare/v6.10.0...v6.11.0) (2019-09-16) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -# [6.10.0](https://github.com/instructure/instructure-ui/compare/v6.9.0...v6.10.0) (2019-08-27) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -# [6.9.0](https://github.com/instructure/instructure-ui/compare/v6.8.1...v6.9.0) (2019-08-07) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -## [6.8.1](https://github.com/instructure/instructure-ui/compare/v6.8.0...v6.8.1) (2019-08-02) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -# [6.8.0](https://github.com/instructure/instructure-ui/compare/v6.7.0...v6.8.0) (2019-07-31) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -# [6.7.0](https://github.com/instructure/instructure-ui/compare/v6.6.0...v6.7.0) (2019-07-15) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -# [6.6.0](https://github.com/instructure/instructure-ui/compare/v6.5.0...v6.6.0) (2019-07-03) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -# [6.5.0](https://github.com/instructure/instructure-ui/compare/v6.4.0...v6.5.0) (2019-07-01) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -# [6.4.0](https://github.com/instructure/instructure-ui/compare/v6.3.0...v6.4.0) (2019-06-13) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -# [6.3.0](https://github.com/instructure/instructure-ui/compare/v6.2.0...v6.3.0) (2019-05-28) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -# [6.2.0](https://github.com/instructure/instructure-ui/compare/v6.1.0...v6.2.0) (2019-05-13) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -# [6.1.0](https://github.com/instructure/instructure-ui/compare/v6.0.0...v6.1.0) (2019-05-09) - -**Note:** Version bump only for package @instructure/babel-plugin-transform-imports - -# [6.0.0](https://github.com/instructure/instructure-ui/compare/v5.52.3...v6.0.0) (2019-05-03) - -### Features - -- **ui-babel-preset:** transform member imports to full paths ([d02cc45](https://github.com/instructure/instructure-ui/commit/d02cc45)) - -See the instructure-ui mono-repo [change log](#CHANGELOG) for past changes. diff --git a/packages/babel-plugin-transform-imports/README.md b/packages/babel-plugin-transform-imports/README.md deleted file mode 100644 index cc406fd55b..0000000000 --- a/packages/babel-plugin-transform-imports/README.md +++ /dev/null @@ -1,56 +0,0 @@ ---- -category: packages ---- - -## babel-plugin-transform-imports - -This will convert any non-default imports that are referencing the package only to reference the full path to the module instead. For example: - -```js ---- - type: code ---- -// a named member import: -import { Text } from '@instructure/ui-elements' -``` - -would be converted to - -```js ---- - type: code ---- -// a named import using the full module path: -import { Text } from '@instructure/ui-elements/lib/Text' -``` - -Note that any default imports you are currently using will not be transformed: - -```js ---- - type: code ---- -// a default import using the full path (will not be transformed): -import Text from '@instructure/ui-elements/lib/Text' -``` - -Note that this plugin will fail if the exported name is not the filename! This means that it cannot handle multiple exports from the same file. - -[![npm][npm]][npm-url] -[![MIT License][license-badge]][license] -[![Code of Conduct][coc-badge]][coc] - -A babel plugin made by Instructure Inc. - -### Installation - -```sh -npm install @instructure/babel-plugin-transform-imports -``` - -[npm]: https://img.shields.io/npm/v/@instructure/babel-plugin-transform-imports.svg -[npm-url]: https://npmjs.com/package/@instructure/babel-plugin-transform-imports -[license-badge]: https://img.shields.io/npm/l/instructure-ui.svg?style=flat-square -[license]: https://github.com/instructure/instructure-ui/blob/master/LICENSE.md -[coc-badge]: https://img.shields.io/badge/code%20of-conduct-ff69b4.svg?style=flat-square -[coc]: https://github.com/instructure/instructure-ui/blob/master/CODE_OF_CONDUCT.md diff --git a/packages/babel-plugin-transform-imports/lib/index.js b/packages/babel-plugin-transform-imports/lib/index.js deleted file mode 100644 index 523c629fc6..0000000000 --- a/packages/babel-plugin-transform-imports/lib/index.js +++ /dev/null @@ -1,181 +0,0 @@ -/* - * The MIT License (MIT) - * - * Copyright (c) 2015 - present Instructure, Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -const { dirname, relative } = require('path') -const globby = require('globby') - -const transformName = 'babel-plugin-transform-imports' - -function getOptKeyFromSource(source, opts) { - if (opts[source]) { - return source - } else { - return Object.keys(opts).find((optKey) => new RegExp(optKey).test(source)) - } -} - -function getMatchesFromSource(source, regex) { - const matches = [] - let match - let matcher = regex - - matcher.lastIndex = 0 - matcher = new RegExp(matcher.source, 'g') - - while ((match = matcher.exec(source)) !== null) { - match.forEach((m) => { - matches.push(m) - }) - - if (matcher.lastIndex === match.index) { - matcher.lastIndex++ - } - } - return matches -} - -function transform(transformOption, importName, matches) { - const isFunction = typeof transformOption === 'function' - if (/\.js$/i.test(transformOption) || isFunction) { - let transformFn - try { - transformFn = isFunction ? transformOption : require(transformOption) - } catch (error) { - throw { - err: `[${transformName}] failed to require transform file ${transformOption} ${error}` - } - } - - if (typeof transformFn !== 'function') { - throw { - err: `[${transformName}] expected transform function to be exported from ${transformOption}` - } - } - - let importPath = importName - - // Sometimes the import is not located at root level of the src. Examine the source of the specified package and if the designated - // import is not at the root level, construct a relative path from the source root to it's location. - if (matches && matches[1]) { - const packageName = matches[1] - const sourceIndex = require.resolve(packageName) - const sourceRoot = dirname(sourceIndex) - - const importPaths = globby.sync( - [ - `${sourceRoot}/**/${importName}.js`, - `${sourceRoot}/**/${importName}/index.js` - ], - { cwd: sourceRoot } - ) - - if (!importPaths || importPaths.length === 0) { - // If there are no import paths found it is the same as if globby or the require.resolve failed, we cannot construct a relative import path - // so throw an error and just fall back to using the import name as the path. - console.error( - `[${transformName}] no modules match '${importName}' in '${packageName}'. Continuing with '${importName}' as the import path. If that is unexpected or incorrect, make sure '${importName}' exists in '${packageName}' and you have run 'npm install' to download the package source.` - ) - return null - } - - if (importPaths.length > 1) { - console.error( - `[${transformName}] multiple modules found with the name '${importName}' in '${packageName}'. Continuing using the first match: '${importPaths[0]}'.` - ) - } - - importPath = relative( - sourceRoot, - importPaths[0].endsWith('index.js') - ? dirname(importPaths[0]) - : importPaths[0] - ) - } - return transformFn(importPath, matches) - } - - return transformOption.replace(/\$\{\s?([\w\d]*)\s?\}/gi, (str, g1) => { - if (g1 === 'member') return importName - return matches[g1] - }) -} - -module.exports = function transformImports({ types: t }) { - return { - visitor: { - ImportDeclaration: function (path, state) { - const { source, specifiers } = path.node - const optKey = getOptKeyFromSource(source.value, state.opts) - const opts = state.opts[optKey] - - if (!opts) return - - if (!opts.transform) { - console.error( - `[${transformName}] transform option is required for module ${source.value}` - ) - return - } - - const matches = - getMatchesFromSource(source.value, new RegExp(optKey, 'g')) || [] - - let transforms = [] - - const defaultImports = specifiers.filter( - (specifier) => specifier.type !== 'ImportSpecifier' - ) - const memberImports = specifiers.filter( - (specifier) => specifier.type === 'ImportSpecifier' - ) - - if (defaultImports.length > 0) { - if (memberImports.length > 0) { - transforms.push( - t.importDeclaration(defaultImports, t.stringLiteral(source)) - ) - } - } - - memberImports.forEach((memberImport) => { - const importName = memberImport.imported.name - const newImportPath = transform(opts.transform, importName, matches) - - if (newImportPath) { - transforms.push( - t.importDeclaration( - [memberImport], - t.stringLiteral(newImportPath) - ) - ) - } - }) - - if (transforms.length > 0) { - path.replaceWithMultiple(transforms) - } - } - } - } -} diff --git a/packages/babel-plugin-transform-imports/package.json b/packages/babel-plugin-transform-imports/package.json deleted file mode 100644 index 280d0b330a..0000000000 --- a/packages/babel-plugin-transform-imports/package.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "name": "@instructure/babel-plugin-transform-imports", - "version": "10.11.0", - "description": "A babel plugin made by Instructure Inc.", - "author": "Instructure, Inc. Engineering and Product Design", - "main": "./lib/index.js", - "repository": { - "type": "git", - "url": "https://github.com/instructure/instructure-ui.git" - }, - "homepage": "https://instructure.github.io/instructure-ui/", - "bugs": "https://github.com/instructure/instructure-ui/issues", - "scripts": { - "lint": "ui-scripts lint", - "lint:fix": "ui-scripts lint --fix" - }, - "license": "MIT", - "dependencies": { - "globby": "^11.1.0" - }, - "//dependency-comments": { - "globby": "since 12.0.0 globby is pure ESM, it cannot be require()'d" - }, - "publishConfig": { - "access": "public" - } -} diff --git a/packages/babel-plugin-transform-imports/tsconfig.build.json b/packages/babel-plugin-transform-imports/tsconfig.build.json deleted file mode 100644 index cff611f41e..0000000000 --- a/packages/babel-plugin-transform-imports/tsconfig.build.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": "../../tsconfig.build.json", - "compilerOptions": { - "outDir": "./types", - "module": "CommonJS", - "composite": true, - "rootDir": "./lib" - }, - "include": ["lib"] -} diff --git a/packages/babel-plugin-transform-imports/tsconfig.json b/packages/babel-plugin-transform-imports/tsconfig.json deleted file mode 100644 index b29a7b46c4..0000000000 --- a/packages/babel-plugin-transform-imports/tsconfig.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compilerOptions": {} -} diff --git a/packages/ui-babel-preset/lib/index.js b/packages/ui-babel-preset/lib/index.js index 484004eac8..286c842582 100644 --- a/packages/ui-babel-preset/lib/index.js +++ b/packages/ui-babel-preset/lib/index.js @@ -43,33 +43,6 @@ module.exports = function ( let plugins = [] - if (opts.transformImports) { - plugins.push([ - require('@instructure/babel-plugin-transform-imports'), - { - '(@instructure/ui-[^(/|\\s)]+)$': { - transform: (importName, matches) => { - const ignore = [ - '@instructure/ui-test-queries', - '@instructure/ui-test-sandbox', - '@instructure/ui-test-utils' - ] - - if (!matches || !matches[1] || ignore.includes(matches[1])) return - return `${matches[1]}/lib/${importName}` - } - }, - // Convert any es imports to lib imports - '(@instructure/ui-[^(/|\\s)]+/es/[^\\s]+)$': { - transform: (importName, matches) => { - if (!matches || !matches[1]) return - return matches[1].replace(new RegExp('/es/'), '/lib/') - } - }, - ...(opts.importTransforms || {}) - } - ]) - } // Work around https://github.com/babel/babel/issues/10261, which causes // Babel to not use the runtime helpers for things like _objectSpread. // Remove this once that babel issue is fixed diff --git a/packages/ui-babel-preset/package.json b/packages/ui-babel-preset/package.json index b5fb22be6b..4fbee91660 100644 --- a/packages/ui-babel-preset/package.json +++ b/packages/ui-babel-preset/package.json @@ -32,7 +32,6 @@ "@babel/preset-react": "^7.26.3", "@babel/preset-typescript": "^7.26.0", "@babel/runtime": "^7.26.0", - "@instructure/babel-plugin-transform-imports": "10.11.0", "@instructure/browserslist-config-instui": "10.11.0", "babel-loader": "^9.2.1", "babel-plugin-dynamic-import-node": "^2.3.3", diff --git a/packages/ui-babel-preset/tsconfig.build.json b/packages/ui-babel-preset/tsconfig.build.json index 8091a73050..4729fd9be5 100644 --- a/packages/ui-babel-preset/tsconfig.build.json +++ b/packages/ui-babel-preset/tsconfig.build.json @@ -6,10 +6,5 @@ "composite": true, "outDir": "./types" }, - "include": ["lib"], - "references": [ - { - "path": "../babel-plugin-transform-imports/tsconfig.build.json" - } - ] + "include": ["lib"] }