Skip to content

Commit 84c8ab4

Browse files
authored
Merge pull request #207 from UW-Macrostrat/cjs-interop
CommonJS interop
2 parents 7217361 + f2d28c4 commit 84c8ab4

File tree

11 files changed

+327
-9
lines changed

11 files changed

+327
-9
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@
5353
"tsx": "^4.19.1",
5454
"typescript": "^5.8.3",
5555
"underscore": "^1.13.7",
56-
"use-async-effect": "^2.2.1"
56+
"use-async-effect": "^2.2.1",
57+
"vite-plugin-cjs-interop": "^2.4.0"
5758
},
5859
"devDependencies": {
5960
"prettier": "^3.7.4",

packages/column-components/CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@ All notable changes to this project will be documented in this file. The format
44
is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this
55
project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7-
## [2.0.0] - Unreleased
7+
## [2.0.1] - 2026-01-28
8+
9+
- Improve linking of CommonJS dependencies
10+
11+
## [2.0.0] - 2026-01-26
812

913
- Standardize bundling
1014
- Require separate import of `@macrostrat/column-components/style.css` or

packages/column-components/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@macrostrat/column-components",
3-
"version": "2.0.0",
3+
"version": "2.0.1",
44
"description": "React rendering primitives for stratigraphic columns",
55
"keywords": [
66
"geology",

packages/column-creator/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@macrostrat/column-creator",
3-
"version": "0.2.0",
3+
"version": "0.2.1",
44
"private": true,
55
"description": "Interface for defining stratigraphic columns in a standardized format",
66
"repository": {

packages/form-components/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
## [1.0.1] - 2026-01-28
4+
5+
- Fix CommonJS dependency linking issues
6+
- Add `ui-box` dependency
7+
38
## [1.0.0] - 2026-01-26
49

510
- Update peer dependencies to React 18

packages/form-components/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@macrostrat/form-components",
3-
"version": "1.0.0",
3+
"version": "1.0.1",
44
"description": "Form components for user input into Macrostrat apps",
55
"repository": {
66
"type": "git",
@@ -57,7 +57,8 @@
5757
"@types/react-dom": "^18",
5858
"axios": "^1.13.2",
5959
"classnames": "^2.5.1",
60-
"mapbox-gl": "^2.15.0||^3.0.0"
60+
"mapbox-gl": "^2.15.0||^3.0.0",
61+
"ui-box": "^5.4.1"
6162
},
6263
"devDependencies": {
6364
"@macrostrat/web-components-bundler": "workspace:*"

packages/ui-components/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## [5.0.1] - 2026-01-28
4+
5+
Fix CommonJS dependency linking issues (centered around `ui-box` dependency)
6+
37
## [5.0.0] - 2026-01-26
48

59
- Change bundling process to use `@macrostrat/web-components-bundler`

packages/ui-components/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@macrostrat/ui-components",
3-
"version": "5.0.0",
3+
"version": "5.0.1",
44
"description": "UI components for React and Blueprint.js",
55
"repository": {
66
"type": "git",

toolchain/bundler/src/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import {
1010
readPackageJSON,
1111
} from "./check-entries.js";
1212
import chalk from "chalk";
13+
import { cjsInterop } from "vite-plugin-cjs-interop";
1314

1415
const module = import.meta.url;
1516
const __file = fileURLToPath(module);
@@ -97,6 +98,9 @@ function buildStandardViteConfig(
9798
logLevel: verbose ? "info" : "silent",
9899
}) as any,
99100
checkExportsPlugin,
101+
cjsInterop({
102+
dependencies: ["labella", "ui-box"],
103+
}),
100104
],
101105
build: {
102106
outDir: resolve(root, "dist"),

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"extends": "./tsconfig.base.json",
33
"compilerOptions": {
4-
"types": ["vite/client", "./global.d.ts"],
4+
"types": ["vite/client", "./global.d.ts"]
55
},
66
"include": ["./packages/**/src/*.ts"]
77
}

0 commit comments

Comments
 (0)