date-fns-tz
Advanced tools
Comparing version 1.3.8 to 2.0.0
100
package.json
{ | ||
"name": "date-fns-tz", | ||
"version": "1.3.8", | ||
"version": "2.0.0", | ||
"sideEffects": false, | ||
@@ -27,31 +27,73 @@ "description": "Time zone support for date-fns v2 with the Intl API", | ||
"exports": { | ||
".": "./index.js", | ||
"./package.json": "./package.json", | ||
"./format": "./format/index.js", | ||
"./formatInTimeZone": "./formatInTimeZone/index.js", | ||
"./getTimezoneOffset": "./getTimezoneOffset/index.js", | ||
"./toDate": "./toDate/index.js", | ||
"./utcToZonedTime": "./utcToZonedTime/index.js", | ||
"./zonedTimeToUtc": "./zonedTimeToUtc/index.js", | ||
"./fp": "./fp/index.js", | ||
"./fp/format": "./fp/format/index.js", | ||
"./fp/formatInTimeZone": "./fp/formatInTimeZone/index.js", | ||
"./fp/getTimezoneOffset": "./fp/getTimezoneOffset/index.js", | ||
"./fp/toDate": "./fp/toDate/index.js", | ||
"./fp/utcToZonedTime": "./fp/utcToZonedTime/index.js", | ||
"./fp/zonedTimeToUtc": "./fp/zonedTimeToUtc/index.js", | ||
"./esm": "./esm/index.js", | ||
"./esm/format": "./esm/format/index.js", | ||
"./esm/formatInTimeZone": "./esm/formatInTimeZone/index.js", | ||
"./esm/getTimezoneOffset": "./esm/getTimezoneOffset/index.js", | ||
"./esm/toDate": "./esm/toDate/index.js", | ||
"./esm/utcToZonedTime": "./esm/utcToZonedTime/index.js", | ||
"./esm/zonedTimeToUtc": "./esm/zonedTimeToUtc/index.js", | ||
"./esm/fp": "./esm/fp/index.js", | ||
"./esm/fp/format": "./esm/fp/format/index.js", | ||
"./esm/fp/formatInTimeZone": "./esm/fp/formatInTimeZone/index.js", | ||
"./esm/fp/getTimezoneOffset": "./esm/fp/getTimezoneOffset/index.js", | ||
"./esm/fp/toDate": "./esm/fp/toDate/index.js", | ||
"./esm/fp/utcToZonedTime": "./esm/fp/utcToZonedTime/index.js", | ||
"./esm/fp/zonedTimeToUtc": "./esm/fp/zonedTimeToUtc/index.js" | ||
".": { | ||
"types": "./typings.d.ts", | ||
"import": "./esm/index.js", | ||
"require": "./index.js" | ||
}, | ||
"./format": { | ||
"types": "./format/index.d.ts", | ||
"import": "./esm/format/index.js", | ||
"require": "./format/index.js" | ||
}, | ||
"./formatInTimeZone": { | ||
"types": "./formatInTimeZone/index.d.ts", | ||
"import": "./esm/formatInTimeZone/index.js", | ||
"require": "./formatInTimeZone/index.js" | ||
}, | ||
"./getTimezoneOffset": { | ||
"types": "./getTimezoneOffset/index.d.ts", | ||
"import": "./esm/getTimezoneOffset/index.js", | ||
"require": "./getTimezoneOffset/index.js" | ||
}, | ||
"./toDate": { | ||
"types": "./toDate/index.d.ts", | ||
"import": "./esm/toDate/index.js", | ||
"require": "./toDate/index.js" | ||
}, | ||
"./utcToZonedTime": { | ||
"types": "./utcToZonedTime/index.d.ts", | ||
"import": "./esm/utcToZonedTime/index.js", | ||
"require": "./utcToZonedTime/index.js" | ||
}, | ||
"./zonedTimeToUtc": { | ||
"types": "./zonedTimeToUtc/index.d.ts", | ||
"import": "./esm/zonedTimeToUtc/index.js", | ||
"require": "./zonedTimeToUtc/index.js" | ||
}, | ||
"./fp": { | ||
"types": "./fp/index.d.ts", | ||
"import": "./esm/fp/index.js", | ||
"require": "./fp/index.js" | ||
}, | ||
"./fp/format": { | ||
"types": "./fp/format/index.d.ts", | ||
"import": "./esm/fp/format/index.js", | ||
"require": "./fp/format/index.js" | ||
}, | ||
"./fp/formatInTimeZone": { | ||
"types": "./fp/formatInTimeZone/index.d.ts", | ||
"import": "./esm/fp/formatInTimeZone/index.js", | ||
"require": "./fp/formatInTimeZone/index.js" | ||
}, | ||
"./fp/getTimezoneOffset": { | ||
"types": "./fp/getTimezoneOffset/index.d.ts", | ||
"import": "./esm/fp/getTimezoneOffset/index.js", | ||
"require": "./fp/getTimezoneOffset/index.js" | ||
}, | ||
"./fp/toDate": { | ||
"types": "./fp/toDate/index.d.ts", | ||
"import": "./esm/fp/toDate/index.js", | ||
"require": "./fp/toDate/index.js" | ||
}, | ||
"./fp/utcToZonedTime": { | ||
"types": "./fp/utcToZonedTime/index.d.ts", | ||
"import": "./esm/fp/utcToZonedTime/index.js", | ||
"require": "./fp/utcToZonedTime/index.js" | ||
}, | ||
"./fp/zonedTimeToUtc": { | ||
"types": "./fp/zonedTimeToUtc/index.d.ts", | ||
"import": "./esm/fp/zonedTimeToUtc/index.js", | ||
"require": "./fp/zonedTimeToUtc/index.js" | ||
} | ||
}, | ||
@@ -58,0 +100,0 @@ "scripts": { |
@@ -21,12 +21,9 @@ # date-fns-tz | ||
As of `v1.3.0` this library supports native ESM imports in Node.js. It is important to | ||
use the proper import path for your use case. Set the `type` property in your project's | ||
`package.json` to either `module`, for ESM, or `commonjs` and | ||
This library supports CommonJS and native ESM imports. The exports field in [package.json](./package.json) | ||
defines the correct entry point depending on project type, so the same import path is used for both. | ||
Make sure to set the `type` property in your project's `package.json` to either `module`, for ESM, or `commonjs`. | ||
- For **ESM** import from `date-fns-tz/esm` or its sub-paths | ||
- For **CommonJS** import from `date-fns-tz` or its sub-paths | ||
Even when using ESM some CommonJS imports from `date-fns` will be used until they support | ||
ESM natively as well [date-fns#1781](https://github.com/date-fns/date-fns/issues/1781). | ||
This is because an ESM projects cannot use ESM imports from a library that doesn't specify | ||
This is because an ESM project cannot use ESM imports from a library that doesn't specify | ||
`{"type": "module"}`. | ||
@@ -33,0 +30,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
212240
314