Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bugfix: Add script to generate package json in the ESM folder #92

Merged
merged 1 commit into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading