Skip to content

Commit

Permalink
Release node v6.0.1-pre.0 (#2833)
Browse files Browse the repository at this point in the history
  • Loading branch information
acalcutt committed Sep 16, 2024
1 parent 196bd4e commit 246f67d
Show file tree
Hide file tree
Showing 6 changed files with 88 additions and 82 deletions.
4 changes: 4 additions & 0 deletions platform/node/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@

## main

## 6.0.1-pre.0
* Add `textFitWidth` and `textFitHeight` properties to sprites ([#2780](https://github.com/maplibre/maplibre-native/pull/2780)).
More information can be found in the [MapLibre Style Spec](https://maplibre.org/maplibre-style-spec/sprite/#text-fit-properties).

## 6.0.0
* [Note] This is the first release that is back on the main branch.
* This is the first release that uses Metal for rendering for macOS. This is a graphics API from Apple that replaces OpenGL (ES) on Apple platforms.
Expand Down
40 changes: 13 additions & 27 deletions platform/node/DEVELOPING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ This document explains how to build the [Node.js](https://nodejs.org/) bindings
## Building

To develop these bindings, you’ll need to build them from source. Building requires the prerequisites listed in either
the [macOS](../macos/INSTALL.md#requirements) or [Linux](../linux/README.md#prerequisites) install documentation, depending
the [macOS](../macos/INSTALL.md#requirements), [Linux](../linux/README.md#prerequisites), or [Windows](../windows/README.md#prerequisites) install documentation, depending
on the target platform.

First you'll need to install dependencies:
Expand All @@ -27,17 +27,20 @@ brew install \

```bash
sudo apt-get install -y \
ccache \
build-essential \
clang \
cmake \
ccache \
ninja-build \
pkg-config \
xvfb \
libcurl4-openssl-dev \
libglfw3-dev \
libuv1-dev \
g++-10 \
libc++-9-dev \
libc++abi-9-dev
libpng-dev \
libicu-dev \
libjpeg-turbo8-dev \
libwebp-dev \
xvfb
/usr/sbin/update-ccache-symlinks
```

Expand All @@ -48,20 +51,20 @@ To compile the Node.js bindings and install module dependencies, from the reposi
#### MacOS

```bash
cmake . -B build -G Ninja -DMLN_WITH_NODE=ON -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_BUILD_TYPE=Debug -DMLN_WITH_COVERAGE=ON
cmake . -B build -G Ninja -DMLN_WITH_NODE=ON -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_BUILD_TYPE=Release -DMLN_WITH_OPENGL=OFF -DMLN_WITH_METAL=ON -DMLN_LEGACY_RENDERER=OFF -DMLN_DRAWABLE_RENDERER=ON -DMLN_WITH_WERROR=OFF
```

#### Linux

```bash
cmake . -B build -G Ninja -DMLN_WITH_NODE=ON -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER=gcc-10 -DCMAKE_CXX_COMPILER=g++-10
cmake . -B build -G Ninja -DMLN_WITH_NODE=ON -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=gcc-12 -DCMAKE_CXX_COMPILER=g++-12
```

### Building

Finally, build:
```bash
cmake --build build -j $(nproc 2>/dev/null || sysctl -n hw.ncpu 2>/dev/null)
cmake --build build -j "$(nproc 2>/dev/null || sysctl -n hw.ncpu 2>/dev/null)"
```

## Testing
Expand All @@ -77,21 +80,4 @@ npm test
To clean up your pull request and prepare it for merging, update your local `main` branch, then run `git rebase -i main` from your pull request branch to squash/fixup commits as needed. When your work is ready to be merged, you can run `git merge --ff-only YOUR_BRANCH` from `main` or click the green merge button in the GitHub UI, which will automatically squash your branch down into a single commit before merging it.

## Publishing

To publish a new version of the package:
- [ ] make a commit in the release branch which includes:
- [ ] an updated version number in [`package.json`](../../package.json#L3)
- [ ] an entry in [`platform/node/CHANGELOG.md`](CHANGELOG.md) describing the changes in the release
- [ ] run `git tag node-v{VERSION}` where `{VERSION}` matches the version in `package.json`, e.g. `git tag node-v3.3.2`
- [ ] run `git push && git push --tags`

The CI builds for tag pushes will check if the tag matches the version listed in `package.json`, and if so, will run with `BUILDTYPE=Release` and publish a binary with `node-pre-gyp`.

Once binaries have been published for Linux and macOS (which can be verified with `./node_modules/.bin/node-pre-gyp info`), you can run a quick final check to ensure they're being fetched properly by simply running `rm -rf lib && npm install`.

If everything looks good:
- [ ] run `mbx npm publish`

### Preleases

Publishing a prerelease binary can be useful for testing downstream integrations - the workflow is pretty much the same except that you'll be making your version number commit and `git tag node-v{VERSION}` (like `git tag node-v3.3.2-pre.1`) on a pull request branch before merging it rather than on `main`.
See [`RELEASE.md`](RELEASE.md) for instructions on publishing a node release.
2 changes: 1 addition & 1 deletion platform/node/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -243,4 +243,4 @@ mbgl.on('message', function(msg) {

## Contributing

See [DEVELOPING.md](DEVELOPING.md) for instructions on building this module for development.
See [DEVELOPING.md](https://github.com/maplibre/maplibre-native/blob/main/platform/node/DEVELOPING.md) for instructions on building this module for development.
6 changes: 3 additions & 3 deletions platform/node/RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ cd platform/node

npm version <update_type> --preid pre --no-git-tag-version

3. Update the changelog, which can be found in `platform/node/CHANGELOG.md`. The heading must match `## <VERSION>` exactly, or it will not be picked up. For example, for version 5.2.0:
3. Update the changelog, which can be found in `platform/node/CHANGELOG.md`. The heading must match `## <VERSION>` exactly, or it will not be picked up. For example, for version 6.0.0:

```
## 5.2.0
## 6.0.0
```

4. Commit and push the changes. On push the 'node-release' workflow will automaticlly check if the release has been published on npm. If the release has not yet been published, the workflow will build the node binaries and upload them to a new github release, then publish a new npm release.
4. Create a PR to merge your changes into the main branch. Once merged the 'node-release' workflow will automaticlly check if the release has been published on npm. If the release has not yet been published, the workflow will build the node binaries and upload them to a new github release, then publish a new npm release.
116 changes: 66 additions & 50 deletions platform/node/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion platform/node/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@maplibre/maplibre-gl-native",
"version": "6.0.0",
"version": "6.0.1-pre.0",
"description": "Renders map tiles with MapLibre Native",
"keywords": [
"maplibre",
Expand Down

0 comments on commit 246f67d

Please sign in to comment.