From ae238246d8023cd964df3bc879a416200687400f Mon Sep 17 00:00:00 2001 From: Isaac Brodsky Date: Wed, 3 Aug 2022 16:44:50 -0700 Subject: [PATCH 1/6] Add changelog for v4.0.0 --- CHANGELOG.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5a94740..990d326 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,14 +4,23 @@ All notable changes to this project will be documented in this file. This librar ## [Unreleased] -## [4.0.0-rc1] - 2022-07-28 +## [4.0.0] - 2022-08-16 +### Breaking Changes +- Updated the core library to `v4.0.0`. This update renames the majority of the H3 functions. You can see a [list of changed function names](https://h3geo.org/docs/next/library/migration-3.x/functions) in the core library documentation. For the most part, upgrading to v4 for Javascript consumers should be a straightforward search & replace between the old names and the new. (#141, #139) +- Added more cases in which JS errors may be thrown. In H3 v3, many functions would fail silently with invalid input, returning `null` or similar signal values. In H3 v4, we will throw descriptive errors for most instances of bad input. (#139) + ### Added - Added vertex mode functions (#138) + +## [4.0.0-rc1] - 2022-07-28 ### Breaking Changes - Updated the core library to `v4.0.0-rc4`. (#141) - Updated the core library to `v4.0.0-rc2`. This update renames the majority of the H3 functions. You can see a [list of changed function names](https://h3geo.org/docs/next/library/migration-3.x/functions) in the core library documentation. For the most part, upgrading to v4 for Javascript consumers should be a straightforward search & replace between the old names and the new. (#139) - Added more cases in which JS errors may be thrown. In H3 v3, many functions would fail silently with invalid input, returning `null` or similar signal values. In H3 v4, we will throw descriptive errors for most instances of bad input. (#139) +### Added +- Added vertex mode functions (#138) + ## [3.7.2] - 2021-04-29 ### Fixed - Accept integer input to `h3GetResolution` (#113) From ea55e1665e0ec9c3494e321482d720117dfb0ed8 Mon Sep 17 00:00:00 2001 From: Isaac Brodsky Date: Wed, 3 Aug 2022 16:45:26 -0700 Subject: [PATCH 2/6] PR number --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 990d326..64b8e4b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ All notable changes to this project will be documented in this file. This librar ## [4.0.0] - 2022-08-16 ### Breaking Changes -- Updated the core library to `v4.0.0`. This update renames the majority of the H3 functions. You can see a [list of changed function names](https://h3geo.org/docs/next/library/migration-3.x/functions) in the core library documentation. For the most part, upgrading to v4 for Javascript consumers should be a straightforward search & replace between the old names and the new. (#141, #139) +- Updated the core library to `v4.0.0`. This update renames the majority of the H3 functions. You can see a [list of changed function names](https://h3geo.org/docs/next/library/migration-3.x/functions) in the core library documentation. For the most part, upgrading to v4 for Javascript consumers should be a straightforward search & replace between the old names and the new. (#144, #141, #139) - Added more cases in which JS errors may be thrown. In H3 v3, many functions would fail silently with invalid input, returning `null` or similar signal values. In H3 v4, we will throw descriptive errors for most instances of bad input. (#139) ### Added From c01656cf7ba7a3cba04eeb131e6860a554895957 Mon Sep 17 00:00:00 2001 From: Isaac Brodsky Date: Tue, 23 Aug 2022 08:10:58 -0700 Subject: [PATCH 3/6] update release date --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index af035ed..64e851b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ All notable changes to this project will be documented in this file. This librar ## [Unreleased] -## [4.0.0] - 2022-08-16 +## [4.0.0] - 2022-08-23 ### Breaking Changes - Updated the core library to `v4.0.0`. This update renames the majority of the H3 functions. You can see a [list of changed function names](https://h3geo.org/docs/next/library/migration-3.x/functions) in the core library documentation. For the most part, upgrading to v4 for Javascript consumers should be a straightforward search & replace between the old names and the new. (#151, #144, #141, #139) - Added more cases in which JS errors may be thrown. In H3 v3, many functions would fail silently with invalid input, returning `null` or similar signal values. In H3 v4, we will throw descriptive errors for most instances of bad input. (#139) From e6387ed2b43c70487dba0dbd587754825bb8642f Mon Sep 17 00:00:00 2001 From: Nick Rabinowitz Date: Tue, 23 Aug 2022 09:15:04 -0700 Subject: [PATCH 4/6] Update version and H3_VERSION to 4.0.0 --- H3_VERSION | 2 +- README.md | 2 +- doc-files/README.tmpl.md | 2 +- package.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/H3_VERSION b/H3_VERSION index 1882577..fcdb2e1 100644 --- a/H3_VERSION +++ b/H3_VERSION @@ -1 +1 @@ -4.0.0-rc5 +4.0.0 diff --git a/README.md b/README.md index a392ebf..2211a28 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ [![Coverage Status](https://coveralls.io/repos/github/uber/h3-js/badge.svg?branch=master)](https://coveralls.io/github/uber/h3-js?branch=master) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE) [![npm version](https://badge.fury.io/js/h3-js.svg)](https://badge.fury.io/js/h3-js) -[![H3 Version](https://img.shields.io/static/v1?label=h3%20api&message=v4.0.0-rc4&color=blue)](https://github.com/uber/h3/releases/tag/v4.0.0-rc4) +[![H3 Version](https://img.shields.io/static/v1?label=h3%20api&message=v4.0.0&color=blue)](https://github.com/uber/h3/releases/tag/v4.0.0) The `h3-js` library provides a pure-JavaScript version of the [H3 Core Library](https://github.com/uber/h3), a hexagon-based geographic grid system. It can be used either in Node >= 6 or in the browser. The core library is transpiled from C using [emscripten](http://kripken.github.io/emscripten-site), offering full parity with the C API and highly efficient operations. diff --git a/doc-files/README.tmpl.md b/doc-files/README.tmpl.md index 63af53b..c006aa6 100644 --- a/doc-files/README.tmpl.md +++ b/doc-files/README.tmpl.md @@ -8,7 +8,7 @@ [![Coverage Status](https://coveralls.io/repos/github/uber/h3-js/badge.svg?branch=master)](https://coveralls.io/github/uber/h3-js?branch=master) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE) [![npm version](https://badge.fury.io/js/h3-js.svg)](https://badge.fury.io/js/h3-js) -[![H3 Version](https://img.shields.io/static/v1?label=h3%20api&message=v4.0.0-rc4&color=blue)](https://github.com/uber/h3/releases/tag/v4.0.0-rc4) +[![H3 Version](https://img.shields.io/static/v1?label=h3%20api&message=v4.0.0&color=blue)](https://github.com/uber/h3/releases/tag/v4.0.0) The `h3-js` library provides a pure-JavaScript version of the [H3 Core Library](https://github.com/uber/h3), a hexagon-based geographic grid system. It can be used either in Node >= 6 or in the browser. The core library is transpiled from C using [emscripten](http://kripken.github.io/emscripten-site), offering full parity with the C API and highly efficient operations. diff --git a/package.json b/package.json index c8afeca..731fcb4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "h3-js", - "version": "4.0.0-rc4", + "version": "4.0.0", "description": "Pure-Javascript version of the H3 library, a hexagon-based geographic grid system", "author": "Nick Rabinowitz ", "contributors": [ From 7b0ec5bc993db251c3620f258dca208bad44806f Mon Sep 17 00:00:00 2001 From: Nick Rabinowitz Date: Tue, 23 Aug 2022 09:19:41 -0700 Subject: [PATCH 5/6] Update the v4 note in README --- README.md | 2 +- doc-files/README.tmpl.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2211a28..c134eef 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ For more information on H3 and for the full API documentation, please see the [H ## Usage -> :construction: **Note:** The following usage docs apply to **H3 v4**, which is currently still in the Release Candidate stage. +> :tada: **Note:** The following usage docs apply to **H3 v4**, which was released on August 23, 2022. > > - For v3 docs, [see the latest v3.x.x release](https://github.com/uber/h3-js/blob/v3.7.2/README.md). > - For breaking changes in v4, [see the CHANGELOG](./CHANGELOG.md). In particular, most [function names have changed](https://h3geo.org/docs/next/library/migration-3.x/functions). diff --git a/doc-files/README.tmpl.md b/doc-files/README.tmpl.md index c006aa6..40ee631 100644 --- a/doc-files/README.tmpl.md +++ b/doc-files/README.tmpl.md @@ -23,7 +23,7 @@ For more information on H3 and for the full API documentation, please see the [H ## Usage -> :construction: **Note:** The following usage docs apply to **H3 v4**, which is currently still in the Release Candidate stage. +> :tada: **Note:** The following usage docs apply to **H3 v4**, which was released on August 23, 2022. > > - For v3 docs, [see the latest v3.x.x release](https://github.com/uber/h3-js/blob/v3.7.2/README.md). > - For breaking changes in v4, [see the CHANGELOG](./CHANGELOG.md). In particular, most [function names have changed](https://h3geo.org/docs/next/library/migration-3.x/functions). From cfeb7ee62f47e7a36541069d5454095bb92a84da Mon Sep 17 00:00:00 2001 From: Nick Rabinowitz Date: Tue, 23 Aug 2022 09:24:00 -0700 Subject: [PATCH 6/6] Update h3geo.org URLs to remove /next --- CHANGELOG.md | 4 ++-- README.md | 4 ++-- doc-files/README.tmpl.md | 2 +- lib/errors.js | 2 +- lib/h3core.js | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 64e851b..f995fcb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ All notable changes to this project will be documented in this file. This librar ## [4.0.0] - 2022-08-23 ### Breaking Changes -- Updated the core library to `v4.0.0`. This update renames the majority of the H3 functions. You can see a [list of changed function names](https://h3geo.org/docs/next/library/migration-3.x/functions) in the core library documentation. For the most part, upgrading to v4 for Javascript consumers should be a straightforward search & replace between the old names and the new. (#151, #144, #141, #139) +- Updated the core library to `v4.0.0`. This update renames the majority of the H3 functions. You can see a [list of changed function names](https://h3geo.org/docs/library/migration-3.x/functions) in the core library documentation. For the most part, upgrading to v4 for Javascript consumers should be a straightforward search & replace between the old names and the new. (#151, #144, #141, #139) - Added more cases in which JS errors may be thrown. In H3 v3, many functions would fail silently with invalid input, returning `null` or similar signal values. In H3 v4, we will throw descriptive errors for most instances of bad input. (#139) ### Changed @@ -35,7 +35,7 @@ All notable changes to this project will be documented in this file. This librar ## [4.0.0-rc1] - 2022-07-28 ### Breaking Changes - Updated the core library to `v4.0.0-rc4`. (#141) -- Updated the core library to `v4.0.0-rc2`. This update renames the majority of the H3 functions. You can see a [list of changed function names](https://h3geo.org/docs/next/library/migration-3.x/functions) in the core library documentation. For the most part, upgrading to v4 for Javascript consumers should be a straightforward search & replace between the old names and the new. (#139) +- Updated the core library to `v4.0.0-rc2`. This update renames the majority of the H3 functions. You can see a [list of changed function names](https://h3geo.org/docs/library/migration-3.x/functions) in the core library documentation. For the most part, upgrading to v4 for Javascript consumers should be a straightforward search & replace between the old names and the new. (#139) - Added more cases in which JS errors may be thrown. In H3 v3, many functions would fail silently with invalid input, returning `null` or similar signal values. In H3 v4, we will throw descriptive errors for most instances of bad input. (#139) ### Added diff --git a/README.md b/README.md index c134eef..f605bd5 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ For more information on H3 and for the full API documentation, please see the [H > :tada: **Note:** The following usage docs apply to **H3 v4**, which was released on August 23, 2022. > > - For v3 docs, [see the latest v3.x.x release](https://github.com/uber/h3-js/blob/v3.7.2/README.md). -> - For breaking changes in v4, [see the CHANGELOG](./CHANGELOG.md). In particular, most [function names have changed](https://h3geo.org/docs/next/library/migration-3.x/functions). +> - For breaking changes in v4, [see the CHANGELOG](./CHANGELOG.md). In particular, most [function names have changed](https://h3geo.org/docs/library/migration-3.x/functions). The library uses ES6 modules. Bundles for Node and the browser are built to the `dist` folder. @@ -1092,7 +1092,7 @@ Coordinates as an `{i, j}` pair ### h3.H3Error Custom JS Error instance with an attached error code. Error codes come from the -core H3 library and can be found [in the H3 docs](https://h3geo.org/docs/next/library/errors#table-of-error-codes). +core H3 library and can be found [in the H3 docs](https://h3geo.org/docs/library/errors#table-of-error-codes). **Properties** diff --git a/doc-files/README.tmpl.md b/doc-files/README.tmpl.md index 40ee631..dc808bb 100644 --- a/doc-files/README.tmpl.md +++ b/doc-files/README.tmpl.md @@ -26,7 +26,7 @@ For more information on H3 and for the full API documentation, please see the [H > :tada: **Note:** The following usage docs apply to **H3 v4**, which was released on August 23, 2022. > > - For v3 docs, [see the latest v3.x.x release](https://github.com/uber/h3-js/blob/v3.7.2/README.md). -> - For breaking changes in v4, [see the CHANGELOG](./CHANGELOG.md). In particular, most [function names have changed](https://h3geo.org/docs/next/library/migration-3.x/functions). +> - For breaking changes in v4, [see the CHANGELOG](./CHANGELOG.md). In particular, most [function names have changed](https://h3geo.org/docs/library/migration-3.x/functions). The library uses ES6 modules. Bundles for Node and the browser are built to the `dist` folder. diff --git a/lib/errors.js b/lib/errors.js index 8a013f0..e8e0131 100644 --- a/lib/errors.js +++ b/lib/errors.js @@ -34,7 +34,7 @@ export const E_OPTION_INVALID = 15; /** * Error messages corresponding to the core library error codes. See - * https://h3geo.org/docs/next/library/errors#table-of-error-codes + * https://h3geo.org/docs/library/errors#table-of-error-codes * @private */ const H3_ERROR_MSGS = { diff --git a/lib/h3core.js b/lib/h3core.js index 451f773..b637a41 100644 --- a/lib/h3core.js +++ b/lib/h3core.js @@ -89,7 +89,7 @@ const SZ_COORDIJ = H3.sizeOfCoordIJ(); /** * Custom JS Error instance with an attached error code. Error codes come from the - * core H3 library and can be found [in the H3 docs](https://h3geo.org/docs/next/library/errors#table-of-error-codes). + * core H3 library and can be found [in the H3 docs](https://h3geo.org/docs/library/errors#table-of-error-codes). * @static * @typedef H3Error * @property {string} message