Skip to content

Commit d5ec59c

Browse files
committed
deps: add undici-types package
1 parent 34e5abe commit d5ec59c

4 files changed

Lines changed: 13 additions & 7 deletions

File tree

bun.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/ducjs/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"name": "ducjs",
33
"version": "0.0.0-development",
44
"description": "The duc 2D CAD file format is a cornerstone of our advanced design system, conceived to cater to professionals seeking precision and efficiency in their design work.",
5+
"type": "module",
56
"main": "dist/index.js",
67
"module": "dist/index.js",
78
"types": "dist/index.d.ts",
@@ -29,7 +30,8 @@
2930
"@types/tinycolor2": "^1.4.6",
3031
"semantic-release": "^24.1.2",
3132
"turbo": "^2.1.3",
32-
"typescript": "^5.8.3"
33+
"typescript": "^5.8.3",
34+
"undici-types": "^6.21.0"
3335
},
3436
"dependencies": {
3537
"flatbuffers": "^24.12.23",

packages/ducjs/scripts/build.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
#!/usr/bin/env node
22

3-
const fs = require('fs');
4-
const path = require('path');
5-
const { spawn } = require('child_process');
3+
import fs from 'fs';
4+
import path from 'path';
5+
import { spawn } from 'child_process';
6+
import { fileURLToPath } from 'url';
7+
8+
const __filename = fileURLToPath(import.meta.url);
9+
const __dirname = path.dirname(__filename);
610

711
function getSchemaVersionFromFbs(fbsFilePath) {
812
try {
@@ -61,6 +65,4 @@ function main() {
6165
});
6266
}
6367

64-
if (require.main === module) {
65-
main();
66-
}
68+
main();

packages/ducjs/tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"rootDir": "src",
88
"esModuleInterop": true,
99
"module": "ES2020",
10+
"moduleResolution": "bundler",
1011
"paths": {
1112
"ducjs/*": ["./src/*"]
1213
}

0 commit comments

Comments
 (0)