From 61851a93986e241123908d392ea8ee0705f8bf77 Mon Sep 17 00:00:00 2001 From: Quan Nguyen Date: Fri, 21 Jul 2023 12:48:43 -0700 Subject: [PATCH] Fix ono commonjs hack in script Details in https://github.com/JS-DevTools/ono/issues/19, It's fixed in https://github.com/JS-DevTools/ono/pull/20 This package is not maintained but it's depended on by swagger-parser --- core/CHANGELOG.md | 12 ++++++++++++ core/fix-ono.sh | 1 + core/package.json | 4 ++-- 3 files changed, 15 insertions(+), 2 deletions(-) create mode 100755 core/fix-ono.sh diff --git a/core/CHANGELOG.md b/core/CHANGELOG.md index 688c06f..708a46b 100644 --- a/core/CHANGELOG.md +++ b/core/CHANGELOG.md @@ -1,5 +1,17 @@ # @api2ai/core +## 0.3.0 + +### Minor Changes + +- Fix ono commonjs hack problem in script + +## 0.2.1 + +### Patch Changes + +- Patch ono commonjs problem + ## 0.2.0 ### Minor Changes diff --git a/core/fix-ono.sh b/core/fix-ono.sh new file mode 100755 index 0000000..d9eb66c --- /dev/null +++ b/core/fix-ono.sh @@ -0,0 +1 @@ +sed -i '' -e 's,typeof module === "object" && typeof module.exports === "object",typeof module === "object" \&\& typeof module.exports === "object" \&\& typeof module.exports.default === "object",g' dist/* \ No newline at end of file diff --git a/core/package.json b/core/package.json index 9aa3fa2..47275d0 100644 --- a/core/package.json +++ b/core/package.json @@ -1,13 +1,13 @@ { "name": "@api2ai/core", - "version": "0.2.0", + "version": "0.3.0", "main": "./dist/index.js", "types": "./dist/index.d.ts", "license": "MIT", "scripts": { "lint": "eslint \"**/*.ts*\"", "test": "jest", - "build": "tsup ./index.ts --format esm --dts --clean" + "build": "tsup ./index.ts --format cjs,esm --dts --clean && ./fix-ono.sh" }, "devDependencies": { "@changesets/cli": "^2.26.2",