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

fix: Hybrid ESM/CJS format #128

Merged
merged 3 commits into from
Oct 20, 2023
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: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ Built files are in the `dist` directory of this repository, and `packages/countr

**Note**: JS build contains ES modules, CommonJS and IIFE (for now)

- CJS `index.min.js`.
- ESM `index.min.mjs`.
- IIFE `index.iife.min.js`.
- CJS `cjs/index.js`
- ESM `mjs/index.js`
- IIFE `index.iife.js`

## Data structure examples

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "annexare/countries-list",
"version": "3.0.5",
"version": "3.0.6",
"description": "Continents & countries: ISO 3166-1 alpha-2 code, name, ISO 639-1 languages, capital, currency, native name, phone. JSON, CSV and SQL.",
"type": "library",
"keywords": [
Expand Down
2 changes: 2 additions & 0 deletions dist/cjs/index.js

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions dist/cjs/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"main": "index.js",
"type": "commonjs",
"types": "../index.d.ts"
}
2 changes: 2 additions & 0 deletions dist/index.iife.js

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions dist/index.iife.min.js

This file was deleted.

2 changes: 0 additions & 2 deletions dist/index.min.js

This file was deleted.

2 changes: 0 additions & 2 deletions dist/index.min.mjs

This file was deleted.

2 changes: 2 additions & 0 deletions dist/mjs/index.js

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions dist/mjs/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"main": "index.js",
"type": "module",
"types": "../index.d.ts"
}
12 changes: 6 additions & 6 deletions dist/package.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
{
"name": "countries-list",
"version": "3.0.5",
"version": "3.0.6",
"description": "Continents & countries: ISO 3166-1 alpha-2 code, name, ISO 639-1 languages, capital, currency, native name, phone. JSON, CSV and SQL.",
"type": "module",
"main": "index.min.mjs",
"main": "cjs/index.js",
"module": "mjs/index.js",
"exports": {
"./minimal/*": "./minimal/*",
".": {
"require": {
"types": "./index.d.ts",
"default": "./index.min.js"
"default": "./cjs/index.js"
},
"import": {
"types": "./index.d.ts",
"default": "./index.min.mjs"
"default": "./mjs/index.js"
}
}
},
"sideEffects": [
"index.iife.min.js"
"index.iife.js"
],
"types": "index.d.ts",
"repository": {
Expand Down
Loading