Skip to content

Commit

Permalink
bugfix: Add script to generate package json in the ESM folder
Browse files Browse the repository at this point in the history
  • Loading branch information
manuelmhtr committed Oct 14, 2024
1 parent d06086a commit 710ae31
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions bin/addEsmPackage.sh
Original file line number Diff line number Diff line change
@@ -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
File renamed without changes.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -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\"",
Expand Down

0 comments on commit 710ae31

Please sign in to comment.