@elastic/ems-client 8.6.3 → 8.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.backportrc.json CHANGED
@@ -2,12 +2,10 @@
2
2
  "repoOwner": "elastic",
3
3
  "repoName": "ems-client",
4
4
  "targetBranchChoices": [
5
- "master",
6
- "7.17"
5
+ "master"
7
6
  ],
8
7
  "branchLabelMapping": {
9
- "^v8.\\d+.\\d+$": "master",
10
- "^v7.\\d+.\\d+$": "7.17"
8
+ "^v8.\\d+.\\d+$": "master"
11
9
  },
12
10
  "targetPRLabels": ["backport"],
13
11
  "commitConflicts": true,
@@ -1,5 +1,5 @@
1
1
  agents:
2
- image: "docker.elastic.co/ci-agent-images/ems/buildkite-agent-node22:0.5@sha256:b14dcc6455b0678a5f76108ddabbb5c9f1455c8fc4445b03e31e7dc0f12a025d"
2
+ image: "docker.elastic.co/ci-agent-images/ems/buildkite-agent-node22:1771594567@sha256:88bf3be943d134a6d67615808dfa2f1d1dd2c4ab05b80da3cda54d3562d2618b"
3
3
  cpu: "2"
4
4
  memory: "2G"
5
5
 
@@ -11,7 +11,7 @@ jobs:
11
11
  runs-on: ubuntu-latest
12
12
  steps:
13
13
  - name: Backport Action
14
- uses: sorenlouv/backport-github-action@ad888e978060bc1b2798690dd9d03c4036560947 # v9.5.1
14
+ uses: sorenlouv/backport-github-action@9460b7102fea25466026ce806c9ebf873ac48721 # v11.0.0
15
15
  with:
16
16
  github_token: ${{ secrets.GITHUB_TOKEN }}
17
17
 
@@ -0,0 +1,26 @@
1
+ name: Publish to npm
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v*"
7
+
8
+ jobs:
9
+ publish:
10
+ runs-on: ubuntu-latest
11
+ permissions:
12
+ contents: read
13
+ id-token: write
14
+ steps:
15
+ - uses: actions/checkout@v4
16
+
17
+ - uses: actions/setup-node@v4
18
+ with:
19
+ node-version: "24"
20
+ registry-url: "https://registry.npmjs.org"
21
+
22
+ - run: yarn install --frozen-lockfile
23
+
24
+ - run: yarn build
25
+
26
+ - run: npm publish --provenance --access public
package/CHANGELOG.md CHANGED
@@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file.
3
3
 
4
4
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
5
5
 
6
+ ## [8.7.1] - TBD
7
+
8
+
9
+ ## [8.7.0] - 2026-04-09
10
+ ### Changed
11
+ - Upgraded maplibre-gl from v3 to v5 #650 #693
12
+ - Upgraded lru-cache from v4 to v11 #663
13
+ - Added Node.js 24 support #1012
14
+ - Update dependencies (search PRs for `is:pr label:v8.6.4 label:dependencies `)
15
+
6
16
  ## [8.6.3] - 2025-01-15
7
17
  ### Changed
8
18
  - Upgrade to Node 22 #552
package/CONTRIBUTING.md CHANGED
@@ -9,16 +9,14 @@
9
9
 
10
10
  If you have access to make releases, the process is as follows:
11
11
 
12
- 1. Be sure you have checked out the `master` or released branch and have pulled latest changes
12
+ 1. Be sure you have checked out the `master` branch and have pulled latest changes
13
13
  1. Update the version in `package.json` accordingly.
14
14
  1. Update the CHANGELOG.md
15
15
  1. Commit changes with message "bump to x.y.z" where x.y.z is the version in package.json
16
- 1. Tag the commit with `git tag vx.y.x`, for example `git tag v7.2.1`
16
+ 1. Tag the commit with `git tag vx.y.z`, for example `git tag v7.2.1`
17
17
  1. Push commits and tags upstream with `git push upstream master && git push upstream --tags` (and optionally to your own fork as well)
18
- 1. Update the latest major branch on upstream with `git push upstream <major_branch>`
19
- 1. Build the targets with `yarn build`
20
- 1. Publish to npm with `npm publish --access public`
21
- 1. If necessary, push the new branch upstream and create/archive Snyk targets
18
+ 1. The [publish workflow](.github/workflows/publish.yml) will automatically build and publish to npm via [npm Trusted Publishers](https://docs.npmjs.com/trusted-publishers) when the tag is pushed
19
+ 1. Monitor the publish run in the repository's [Actions tab](https://github.com/elastic/ems-client/actions/workflows/publish.yml)
22
20
 
23
21
  ## Continuous Integration
24
22
 
package/eslint.config.mjs CHANGED
@@ -1,10 +1,8 @@
1
- // @ts-check
2
-
3
1
  import eslint from '@eslint/js';
4
2
  import tseslint from 'typescript-eslint';
5
3
  import globals from 'globals';
6
4
 
7
- export default tseslint.config(
5
+ export default [
8
6
  eslint.configs.recommended,
9
7
  ...tseslint.configs.recommended,
10
8
  {
@@ -22,4 +20,4 @@ export default tseslint.config(
22
20
  }
23
21
  }
24
22
  },
25
- );
23
+ ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elastic/ems-client",
3
- "version": "8.6.3",
3
+ "version": "8.7.0",
4
4
  "description": "JavaScript client library for the Elastic Maps Service",
5
5
  "main": "target/node/index.js",
6
6
  "browser": "target/web/index.js",
@@ -31,46 +31,50 @@
31
31
  },
32
32
  "homepage": "https://github.com/elastic/ems-client#readme",
33
33
  "dependencies": {
34
- "@types/geojson": "7946.0.15",
34
+ "@types/geojson": "7946.0.16",
35
35
  "@types/topojson-client": "3.1.5",
36
36
  "chroma-js": "2.4.2",
37
- "lodash": "^4.17.21",
38
- "lru-cache": "^4.1.5",
39
- "maplibre-gl": "3.1.0",
40
- "semver": "^7.6.3",
37
+ "lodash": "^4.17.23",
38
+ "lru-cache": "11.2.6",
39
+ "maplibre-gl": "5.3.0",
40
+ "semver": "7.7.4",
41
41
  "topojson-client": "^3.1.0"
42
42
  },
43
43
  "devDependencies": {
44
- "@babel/cli": "7.26.4",
45
- "@babel/core": "7.26.0",
44
+ "@babel/cli": "7.28.6",
45
+ "@babel/core": "7.29.0",
46
46
  "@babel/plugin-proposal-class-properties": "7.18.6",
47
- "@babel/preset-env": "7.26.0",
48
- "@babel/preset-typescript": "7.26.0",
49
- "@eslint/core": "0.10.0",
50
- "@eslint/js": "9.18.0",
47
+ "@babel/preset-env": "7.29.2",
48
+ "@babel/preset-typescript": "7.28.5",
49
+ "@eslint/core": "1.1.1",
50
+ "@eslint/js": "10.0.1",
51
51
  "@types/chroma-js": "2.4.5",
52
- "@types/eslint__js": "8.42.3",
53
- "@types/jest": "29.5.14",
54
- "@types/lodash": "4.17.14",
55
- "@types/lru-cache": "5.1.1",
56
- "@types/node": "22.10.6",
57
- "@types/semver": "7.5.8",
52
+ "@types/jest": "30.0.0",
53
+ "@types/lodash": "4.17.24",
54
+ "@types/lru-cache": "7.10.10",
55
+ "@types/node": "24.12.0",
56
+ "@types/semver": "7.7.1",
58
57
  "@types/topojson-specification": "1.0.5",
59
- "@typescript-eslint/eslint-plugin": "8.20.0",
60
- "@typescript-eslint/parser": "8.20.0",
61
- "babel-jest": "29.7.0",
62
- "eslint": "9.18.0",
63
- "eslint-config-prettier": "10.0.1",
64
- "eslint-plugin-prettier": "5.2.2",
65
- "globals": "15.14.0",
58
+ "@typescript-eslint/eslint-plugin": "8.57.2",
59
+ "@typescript-eslint/parser": "8.57.2",
60
+ "babel-jest": "30.3.0",
61
+ "eslint": "10.1.0",
62
+ "eslint-config-prettier": "10.1.8",
63
+ "eslint-plugin-prettier": "5.5.5",
64
+ "globals": "17.4.0",
66
65
  "husky": "9.1.7",
67
- "jest": "29.7.0",
68
- "prettier": "3.4.2",
69
- "ts-jest": "29.2.5",
70
- "typescript": "5.7.3",
71
- "typescript-eslint": "8.20.0"
66
+ "jest": "30.3.0",
67
+ "prettier": "3.8.1",
68
+ "ts-jest": "29.4.6",
69
+ "typescript": "5.9.3",
70
+ "typescript-eslint": "8.57.2"
71
+ },
72
+ "resolutions": {
73
+ "**/glob": "^13.0.0",
74
+ "**/minimatch": "^10.2.4",
75
+ "@babel/helper-compilation-targets/lru-cache": "11.2.6"
72
76
  },
73
77
  "engines": {
74
- "node": ">=18 <=22"
78
+ "node": ">=22"
75
79
  }
76
80
  }
package/renovate.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "$schema": "https://docs.renovatebot.com/renovate-schema.json",
3
+ "enabled": true,
4
+ "minimumReleaseAge": "14 days",
3
5
  "extends": [
4
- "local>elastic/renovate-config"
6
+ "github>elastic/renovate-config"
5
7
  ],
8
+ "baseBranches": ["master"],
6
9
  "labels": [
7
- "dependencies",
8
- "v7.17.6",
9
- "v8.6.3"
10
+ "dependencies"
10
11
  ],
11
12
  "packageRules": [
12
13
  {
@@ -16,6 +17,11 @@
16
17
  {
17
18
  "matchDepTypes": ["devDependencies"],
18
19
  "automerge": true
20
+ },
21
+ {
22
+ "description": "Master branch specific rules",
23
+ "matchBaseBranches": ["master"],
24
+ "labels": ["dependencies", "v8.6.4"]
19
25
  }
20
26
  ]
21
27
  }
package/src/ems_client.ts CHANGED
@@ -17,7 +17,7 @@ import semverMinor from 'semver/functions/minor';
17
17
  import { format as formatUrl, parse as parseUrl, UrlObject } from 'url';
18
18
  import { toAbsoluteUrl } from './utils';
19
19
  import { ParsedUrlQueryInput } from 'querystring';
20
- import LRUCache from 'lru-cache';
20
+ import { LRUCache } from 'lru-cache';
21
21
 
22
22
  const REST_API_REGEX = /\d{4}-\d{2}-\d{2}/;
23
23
  export const LATEST_API_URL_PATH = 'latest';
@@ -298,7 +298,7 @@ export class EMSClient {
298
298
  if (e instanceof Error) {
299
299
  throw e;
300
300
  } else {
301
- throw new Error('Unknown error');
301
+ throw new Error('Unknown error', { cause: e });
302
302
  }
303
303
  }
304
304
  }
@@ -429,7 +429,7 @@ export class EMSClient {
429
429
  }
430
430
 
431
431
  private _invalidateSettings(): void {
432
- this._cache.reset();
432
+ this._cache.clear();
433
433
  this._getMainCatalog = _.once(async (): Promise<EmsCatalogManifest> => {
434
434
  const services = [];
435
435
  if (this._tileApiUrl) {
@@ -13,7 +13,7 @@ var _major = _interopRequireDefault(require("semver/functions/major"));
13
13
  var _minor = _interopRequireDefault(require("semver/functions/minor"));
14
14
  var _url = require("url");
15
15
  var _utils = require("./utils");
16
- var _lruCache = _interopRequireDefault(require("lru-cache"));
16
+ var _lruCache = require("lru-cache");
17
17
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
18
18
  function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
19
19
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
@@ -124,7 +124,7 @@ class EMSClient {
124
124
  this._language = config.language || DEFAULT_LANGUAGE;
125
125
  this._fetchFunction = config.fetchFunction;
126
126
  this._proxyPath = config.proxyPath || '';
127
- this._cache = new _lruCache.default({
127
+ this._cache = new _lruCache.LRUCache({
128
128
  max: config.cacheSize || 10
129
129
  });
130
130
  this._invalidateSettings();
@@ -163,7 +163,9 @@ class EMSClient {
163
163
  if (e instanceof Error) {
164
164
  throw e;
165
165
  } else {
166
- throw new Error('Unknown error');
166
+ throw new Error('Unknown error', {
167
+ cause: e
168
+ });
167
169
  }
168
170
  }
169
171
  }
@@ -267,7 +269,7 @@ class EMSClient {
267
269
  });
268
270
  }
269
271
  _invalidateSettings() {
270
- this._cache.reset();
272
+ this._cache.clear();
271
273
  this._getMainCatalog = _lodash.default.once(async () => {
272
274
  const services = [];
273
275
  if (this._tileApiUrl) {
@@ -7,8 +7,7 @@ exports.FileLayer = exports.EMSFormatType = void 0;
7
7
  var _url = _interopRequireDefault(require("url"));
8
8
  var _ems_service = require("./ems_service");
9
9
  var topojson = _interopRequireWildcard(require("topojson-client"));
10
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
11
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
10
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
12
11
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
13
12
  function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
14
13
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }