diff --git a/CHANGELOG.md b/CHANGELOG.md index 0153559..9d648e0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ All notable changes to this project will be documented in this file. +## [3.7.2] - 2024-10-14 + +### Fixed + +- Add script to add missing ESM package.json + ## [3.7.1] - 2024-10-13 ### Changed diff --git a/bin/addEsmPackage.sh b/bin/addEsmPackage.sh new file mode 100644 index 0000000..d625c81 --- /dev/null +++ b/bin/addEsmPackage.sh @@ -0,0 +1,6 @@ +# sh + +# Add missing package.json to ./esm folder to enable ESM import +if [[ ! -e ./esm/package.json ]]; then + echo "{ \"type\": \"module\" }" > ./esm/package.json +fi diff --git a/.fixTypes.sh b/bin/fixTypes.sh similarity index 100% rename from .fixTypes.sh rename to bin/fixTypes.sh diff --git a/package.json b/package.json index 28b6c7e..25d0eda 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "countries-and-timezones", - "version": "3.7.1", + "version": "3.7.2", "description": "Minimalistic library to work with countries and timezones data.", "main": "./dist/index.js", "module": "./esm/index.js", @@ -20,7 +20,7 @@ "esm" ], "scripts": { - "build": "rollup -c && sh .fixTypes.sh", + "build": "rollup -c && sh bin/fixTypes.sh && sh bin/addEsmPackage.sh", "lint:js": "xo --fix", "lint:json": "prettier --write \"**/*.json\"", "lint:md": "markdownlint \"**/*.md\" --fix --dot --ignore-path .gitignore && prettier --write \"**/*.md\"",