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: fixed package.json export declarations for types and base transl… #90

Merged
merged 3 commits into from
Feb 11, 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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ Prefix your message with one of the following:
All notable changes to this project will be documented in this file. This
project adheres to [Semantic Versioning](http://semver.org/).

## Unreleased

- [Fixed] Reference full file path as the types import.

## v4.4.0 - Feb 10, 2024

- [Fixed] `I18n#formatNumber` now formats numbers with default options,
Expand Down
25 changes: 13 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"author": "Nando Vieira <me@fnando.com>",
"browser": "./dist/browser/index.js",
"dependencies": {
"bignumber.js": "*",
"lodash": "*",
Expand Down Expand Up @@ -27,6 +28,15 @@
"webpack": "*",
"webpack-cli": "*"
},
"exports": {
".": {
"browser": "./dist/browser/index.js",
"import": "./dist/import/index.js",
"require": "./dist/require/index.js",
"types": "./typings/index.d.ts"
},
"./json/*.json": "./json/*.json"
},
"files": [
"dist/**/*",
"json/**/*",
Expand All @@ -36,25 +46,16 @@
"license": "MIT",
"main": "./dist/require/index.js",
"module": "./dist/import/index.js",
"browser": "./dist/browser/index.js",
"exports": {
".": {
"require": "./dist/require/index.js",
"import": "./dist/import/index.js",
"types": "./typings",
"browser": "./dist/browser/index.js"
}
},
"name": "i18n-js",
"repository": "https://github.com/fnando/i18n",
"scripts": {
"build": "yarn clean && yarn build:js && yarn docs",
"build:bignumber": "cp node_modules/bignumber.js/bignumber.mjs dist/import/bignumber.js",
"build:browser": "webpack --output-path ./dist/browser/ --output-filename index.js --mode production --entry ./dist/import/index.js --output-library-type var --output-library-name I18n --devtool source-map",
"build:import": "tsc --outDir ./dist/import --module ESNext && yarn build:lodash && yarn build:make-plural && yarn build:bignumber",
"build:js": "yarn build:import && yarn build:require && yarn build:browser",
"build:lodash": "esbuild --bundle src/lodash.ts --outfile=dist/import/lodash.js",
"build:make-plural": "cp node_modules/make-plural/plurals.mjs dist/import/make-plural.js",
"build:bignumber": "cp node_modules/bignumber.js/bignumber.mjs dist/import/bignumber.js",
"build:js": "yarn build:import && yarn build:require && yarn build:browser",
"build:require": "tsc --outDir ./dist/require --module commonjs",
"clean": "rm -rf ./dist",
"docs": "./bin/docs",
Expand All @@ -64,6 +65,6 @@
"test": "jest --watch --coverage",
"test:ci": "jest --ci --coverage --verbose"
},
"typings": "./typings",
"types": "./typings/index.d.ts",
"version": "4.4.0"
}