diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 70210a8..d2e809a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -13,7 +13,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] - node: [16, 18, 20, 22, 24] + node: [18, 20, 22, 24] steps: - uses: actions/checkout@v6 diff --git a/.gitignore b/.gitignore index 2a7be2b..03ef1cf 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,4 @@ .DS_store node_modules coverage -dist/ -arc.js +dist diff --git a/.npmignore b/.npmignore deleted file mode 100644 index b5c33bd..0000000 --- a/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -.DS_store -node_modules -coverage -index.html diff --git a/CHANGELOG.md b/CHANGELOG.md index cc06509..8fb14ca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,9 +5,36 @@ This project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased][unreleased] +## [1.0.0] - 2026-03-29 + +### Breaking change + +- arc.js is now a [pure](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c) ESM package. + +If you need to `require()` arc.js as CJS (CommonJS), or have a runtime older than Node.js 18, please use `0.1.4`. + +0.x syntax: +```js +const arc = require('arc'); +const gc = new arc.GreatCircle(/* */); +``` + +1.x syntax: +```js +import { GreatCircle } from 'arc'; +const gc = new GreatCircle(/* */); +``` + +### Fixed + +- antimeridian splitting in GreatCircle.Arc (From @copilot) + ## [0.2.0] - 2025-09-22 +### Breaking +- Node.js 16 is now the minimum supported runtime + ### Changed -- TypeScript support with back compatibilty (From @thomas-hervey) +- TypeScript support with backwards compatibility (From @thomas-hervey) ## [0.1.4] - 2022-11-16 ### Changed @@ -39,7 +66,9 @@ This project adheres to [Semantic Versioning](http://semver.org/). ### Fixed - Fixed jshint strict errors -[unreleased]: https://github.com/springmeyer/arc.js/compare/v0.1.4..HEAD +[unreleased]: https://github.com/springmeyer/arc.js/compare/v1.0.0..HEAD +[1.0.0]: https://github.com/springmeyer/arc.js/compare/v0.2.0...v1.0.0 +[0.2.0]: https://github.com/springmeyer/arc.js/compare/v0.1.4...v0.2.0 [0.1.4]: https://github.com/springmeyer/arc.js/compare/v0.1.3...v0.1.4 [0.1.3]: https://github.com/springmeyer/arc.js/compare/v0.1.2...v0.1.3 [0.1.2]: https://github.com/springmeyer/arc.js/compare/v0.1.1...v0.1.2 diff --git a/README.md b/README.md index 7003614..7840aee 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Calculate great circle routes as lines in GeoJSON or WKT format. **Features:** - Full TypeScript support with type definitions -- Works in Node.js (CommonJS & ES modules) and browsers +- Works in Node.js and browsers - Generates GeoJSON and WKT output formats - Handles dateline crossing automatically - Based on [Ed Williams' Aviation Formulary](https://edwilliams.org/avform.htm#Intermediate) algorithms and the GDAL source code @@ -19,15 +19,6 @@ npm install arc ## Quick Start -### CommonJS (Node.js) -```js -const arc = require('arc'); -const gc = new arc.GreatCircle({x: -122, y: 48}, {x: -77, y: 39}); -const line = gc.Arc(100); -console.log(line.json()); // GeoJSON output -``` - -### ES Modules (Node.js, bundlers) ```js import { GreatCircle } from 'arc'; const gc = new GreatCircle({x: -122, y: 48}, {x: -77, y: 39}); @@ -45,10 +36,10 @@ const gc = new GreatCircle(start, end); const line = gc.Arc(100); ``` -### Browser (Global) +### Browser (ESM) ```html - - @@ -165,7 +156,7 @@ arc.js powers the [`greatCircle`](https://turfjs.org/docs/api/greatCircle) funct ## License -This project is licensed under the BSD license. See [LICENSE.md](LICENSE.md) for details. +This project is licensed under the BSD license. See [LICENSE.md](LICENSE) for details. ### Third-Party Licenses diff --git a/index.html b/index.html index ec7dc7b..a6787c6 100644 --- a/index.html +++ b/index.html @@ -6,7 +6,6 @@