From 48510e6af052074178b02e54741022d779e02087 Mon Sep 17 00:00:00 2001 From: Michael Bell Date: Sun, 2 Oct 2022 20:15:30 +0100 Subject: [PATCH] Prepare scoped Node package In case we're not able to get access to the unscoped credentials. Scoped packages are also the recommended approach for projects managed by a team of developers. --- CHANGELOG.md | 1 + README.md | 13 ++++++++++++- package.json | 5 ++++- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 95563748f2c..0a4fe5fd66a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -54,6 +54,7 @@ - CHANGED: Docker build, enabled arm64 build layer [#6172](https://github.com/Project-OSRM/osrm-backend/pull/6172) - CHANGED: Docker build, enabled apt-get update/install caching in separate layer for build phase [#6175](https://github.com/Project-OSRM/osrm-backend/pull/6175) - FIXED: Bump CI complete meta job to ubuntu-20.04 [#6323](https://github.com/Project-OSRM/osrm-backend/pull/6323) + - CHANGED: Node packages are now scoped by @project-osrm [#6386](https://github.com/Project-OSRM/osrm-backend/issues/6386) - Routing: - CHANGED: Lazily generate optional route path data [#6045](https://github.com/Project-OSRM/osrm-backend/pull/6045) - FIXED: Completed support for no_entry and no_exit turn restrictions. [#5988](https://github.com/Project-OSRM/osrm-backend/pull/5988) diff --git a/README.md b/README.md index 5f2fb297d20..cdbf2292d9e 100644 --- a/README.md +++ b/README.md @@ -141,7 +141,7 @@ sudo apt-get update -y sudo apt-get install -y libstdc++-9-dev ``` -You can install the Node.js bindings via `npm install osrm` or from this repository either via +You can install the Node.js bindings via `npm install @project-osrm/osrm` or from this repository either via npm install @@ -151,6 +151,17 @@ which will check and use pre-built binaries if they're available for this releas to always force building the Node.js bindings from source. +#### Unscoped packages + +Prior to v5.27.0, the `osrm` Node package was unscoped. If you are upgrading from an old package, you will need to do the following: + +``` +npm uninstall osrm --save +npm install @project-osrm/osrm --save +``` + +#### Package docs + For usage details have a look [these API docs](docs/nodejs/api.md). An exemplary implementation by a 3rd party with Docker and Node.js can be found [here](https://github.com/door2door-io/osrm-express-server-demo). diff --git a/package.json b/package.json index 7d3a741b14a..f4b8aef3dc5 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "osrm", + "name": "@project-osrm/osrm", "version": "5.27.0-unreleased", "private": false, "description": "The Open Source Routing Machine is a high performance routing engine written in C++14 designed to run on OpenStreetMap data.", @@ -81,5 +81,8 @@ "host": "https://github.com", "remote_path": "./Project-OSRM/osrm-backend/releases/download/v{version}/", "package_name": "{module_name}-v{version}-{node_abi}-{platform}-{arch}-{configuration}.tar.gz" + }, + "publishConfig": { + "access": "public" } }