Skip to content

v2.1.0

@prantlf prantlf tagged this 04 Dec 17:48
* Build ESM output to dist
* Announce ESM exports in package.json
* Add exports for lookup-convert, parse-format, data and limited data
* Replace `commander` with a hand-coded command-line parsing

* Upgrade dev dependencies
* Replace npm with pnpm (worked slower)
* Replace cpy-cli with cp.js (started to create wrong paths)
* Replace eslint with denolint (worked slower)
* Replace coveralls with codecov (they cancel accounts)
* Replace travis with github actions (more work to maintain)

BREAKING CHANGES: The initial ESM support exposed the sources at paths like `src/index.js` and worked only if you used a bundler. **The proper ESM support** has been provided by files built to paths like `dist/index.mjs`, which are mapped to export modules in `package.json`. For example, if you imported the main module like this:

    import { getZonedTime } from ./node_modules/timezone-support/src/index.js

Change it to this:

    import { getZonedTime } from timezone-support

See also sections "Loading" and "Modules" in `API.md`.

**Replacing `commander` in `create-timezone-data`** with a hand-coded command-line parsing should not affect anybody, because the command-line format did not change, but there might be some undetected difference.

Declaring export modules in `package.json` **works reliably since Node.js 14.8**, but the rest of the source code and loading the files from the `dist` directory directly should work since Node.js 6. The script `create-timezone-data` needs the `fs/promises` implementation, which was introduced in Node.js 14.
Assets 2
Loading