Skip to content

Commit

Permalink
Merge pull request #156 from nrabinowitz/bump-4.0.0
Browse files Browse the repository at this point in the history
Prepare for release 4.0.0
  • Loading branch information
nrabinowitz authored Aug 23, 2022
2 parents f75ead2 + cfeb7ee commit 1219408
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 14 deletions.
21 changes: 18 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,20 @@ All notable changes to this project will be documented in this file. This librar

## [Unreleased]

## [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/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
- Add Typescript typechecking, generate types with tsc (#153)

### Fixed
- Fail package publish if there are library changes (#148)

### Added
- Added legacy API wrapper with Typescript types (#146)

## [4.0.0-rc4] - 2022-08-22
### Breaking changes
- Updated the core library to `v4.0.0-rc5`. (#151)
Expand All @@ -19,13 +33,14 @@ All notable changes to this project will be documented in this file. This librar
- Added legacy API wrapper with Typescript types (#146)

## [4.0.0-rc1] - 2022-07-28
### Added
- Added vertex mode functions (#138)
### 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
- Added vertex mode functions (#138)

## [3.7.2] - 2021-04-29
### Fixed
- Accept integer input to `h3GetResolution` (#113)
Expand Down
2 changes: 1 addition & 1 deletion H3_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.0.0-rc5
4.0.0
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -23,10 +23,10 @@ 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).
> - 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.

Expand Down Expand Up @@ -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**

Expand Down
6 changes: 3 additions & 3 deletions doc-files/README.tmpl.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -23,10 +23,10 @@ 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).
> - 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.

Expand Down
2 changes: 1 addition & 1 deletion lib/errors.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
2 changes: 1 addition & 1 deletion lib/h3core.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>",
"contributors": [
Expand Down

0 comments on commit 1219408

Please sign in to comment.