@basemaps/lambda-tiler 8.0.0 → 8.1.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.
Files changed (63) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/build/__tests__/index.test.js +24 -2
  3. package/build/__tests__/index.test.js.map +1 -1
  4. package/build/routes/version.d.ts +2 -2
  5. package/build/routes/version.js +17 -1
  6. package/build/routes/version.js.map +1 -1
  7. package/dist/index.js +31 -7
  8. package/dist/node_modules/.package-lock.json +4 -4
  9. package/dist/node_modules/semver/bin/semver.js +2 -0
  10. package/dist/node_modules/semver/classes/comparator.js +2 -0
  11. package/dist/node_modules/semver/classes/index.js +2 -0
  12. package/dist/node_modules/semver/classes/range.js +2 -0
  13. package/dist/node_modules/semver/classes/semver.js +4 -3
  14. package/dist/node_modules/semver/functions/clean.js +2 -0
  15. package/dist/node_modules/semver/functions/cmp.js +2 -0
  16. package/dist/node_modules/semver/functions/coerce.js +2 -0
  17. package/dist/node_modules/semver/functions/compare-build.js +2 -0
  18. package/dist/node_modules/semver/functions/compare-loose.js +2 -0
  19. package/dist/node_modules/semver/functions/compare.js +2 -0
  20. package/dist/node_modules/semver/functions/diff.js +2 -0
  21. package/dist/node_modules/semver/functions/eq.js +2 -0
  22. package/dist/node_modules/semver/functions/gt.js +2 -0
  23. package/dist/node_modules/semver/functions/gte.js +2 -0
  24. package/dist/node_modules/semver/functions/inc.js +2 -0
  25. package/dist/node_modules/semver/functions/lt.js +2 -0
  26. package/dist/node_modules/semver/functions/lte.js +2 -0
  27. package/dist/node_modules/semver/functions/major.js +2 -0
  28. package/dist/node_modules/semver/functions/minor.js +2 -0
  29. package/dist/node_modules/semver/functions/neq.js +2 -0
  30. package/dist/node_modules/semver/functions/parse.js +2 -0
  31. package/dist/node_modules/semver/functions/patch.js +2 -0
  32. package/dist/node_modules/semver/functions/prerelease.js +2 -0
  33. package/dist/node_modules/semver/functions/rcompare.js +2 -0
  34. package/dist/node_modules/semver/functions/rsort.js +2 -0
  35. package/dist/node_modules/semver/functions/satisfies.js +2 -0
  36. package/dist/node_modules/semver/functions/sort.js +2 -0
  37. package/dist/node_modules/semver/functions/valid.js +2 -0
  38. package/dist/node_modules/semver/index.js +2 -0
  39. package/dist/node_modules/semver/internal/constants.js +2 -0
  40. package/dist/node_modules/semver/internal/debug.js +2 -0
  41. package/dist/node_modules/semver/internal/identifiers.js +2 -0
  42. package/dist/node_modules/semver/internal/lrucache.js +2 -0
  43. package/dist/node_modules/semver/internal/parse-options.js +2 -0
  44. package/dist/node_modules/semver/internal/re.js +8 -4
  45. package/dist/node_modules/semver/package.json +3 -3
  46. package/dist/node_modules/semver/preload.js +2 -0
  47. package/dist/node_modules/semver/ranges/gtr.js +2 -0
  48. package/dist/node_modules/semver/ranges/intersects.js +2 -0
  49. package/dist/node_modules/semver/ranges/ltr.js +2 -0
  50. package/dist/node_modules/semver/ranges/max-satisfying.js +2 -0
  51. package/dist/node_modules/semver/ranges/min-satisfying.js +2 -0
  52. package/dist/node_modules/semver/ranges/min-version.js +2 -0
  53. package/dist/node_modules/semver/ranges/outside.js +2 -0
  54. package/dist/node_modules/semver/ranges/simplify.js +2 -0
  55. package/dist/node_modules/semver/ranges/subset.js +2 -0
  56. package/dist/node_modules/semver/ranges/to-comparators.js +2 -0
  57. package/dist/node_modules/semver/ranges/valid.js +2 -0
  58. package/dist/package-lock.json +5 -5
  59. package/dist/package.json +1 -1
  60. package/package.json +6 -6
  61. package/src/__tests__/index.test.ts +30 -2
  62. package/src/routes/version.ts +22 -2
  63. package/tsconfig.tsbuildinfo +1 -1
package/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [8.1.0](https://github.com/linz/basemaps/compare/v8.0.0...v8.1.0) (2025-05-18)
7
+
8
+
9
+ ### Features
10
+
11
+ * **lambda-tiler:** expose configuration id and hash if present ([#3446](https://github.com/linz/basemaps/issues/3446)) ([43803b4](https://github.com/linz/basemaps/commit/43803b48a404591417453331ac9e3aa16c85248f))
12
+
13
+
14
+
15
+
16
+
6
17
  # [8.0.0](https://github.com/linz/basemaps/compare/v7.17.0...v8.0.0) (2025-05-11)
7
18
 
8
19
  **Note:** Version bump only for package @basemaps/lambda-tiler
@@ -1,6 +1,8 @@
1
1
  import assert from 'node:assert';
2
2
  import { afterEach, describe, it } from 'node:test';
3
+ import { ConfigProviderMemory } from '@basemaps/config';
3
4
  import { handler } from '../index.js';
5
+ import { ConfigLoader } from '../util/config.loader.js';
4
6
  import { mockRequest } from './xyz.util.js';
5
7
  describe('LambdaXyz index', () => {
6
8
  it('should export handler', async () => {
@@ -13,7 +15,9 @@ describe('LambdaXyz index', () => {
13
15
  delete process.env['GIT_HASH'];
14
16
  delete process.env['BUILD_ID'];
15
17
  });
16
- it('should return version', async () => {
18
+ it('should return version', async (t) => {
19
+ const config = new ConfigProviderMemory();
20
+ t.mock.method(ConfigLoader, 'getDefaultConfig', () => config);
17
21
  process.env['GIT_VERSION'] = '1.2.3';
18
22
  process.env['GIT_HASH'] = 'abc456';
19
23
  const response = await handler.router.handle(mockRequest('/v1/version'));
@@ -25,7 +29,9 @@ describe('LambdaXyz index', () => {
25
29
  hash: 'abc456',
26
30
  });
27
31
  });
28
- it('should include buildId if exists', async () => {
32
+ it('should include buildId if exists', async (t) => {
33
+ const config = new ConfigProviderMemory();
34
+ t.mock.method(ConfigLoader, 'getDefaultConfig', () => config);
29
35
  process.env['GIT_VERSION'] = '1.2.3';
30
36
  process.env['BUILD_ID'] = '1658821493-3';
31
37
  const response = await handler.router.handle(mockRequest('/v1/version'));
@@ -37,6 +43,22 @@ describe('LambdaXyz index', () => {
37
43
  buildId: '1658821493-3',
38
44
  });
39
45
  });
46
+ it('should return config information if present', async (t) => {
47
+ const config = new ConfigProviderMemory();
48
+ t.mock.method(ConfigLoader, 'getDefaultConfig', () => config);
49
+ config.id = 'config-id';
50
+ const response = await handler.router.handle(mockRequest('/v1/version'));
51
+ assert.deepEqual(JSON.parse(response.body), {
52
+ version: 'dev',
53
+ config: { id: 'config-id' },
54
+ });
55
+ config.hash = 'config-hash';
56
+ const responseHash = await handler.router.handle(mockRequest('/v1/version'));
57
+ assert.deepEqual(JSON.parse(responseHash.body), {
58
+ version: 'dev',
59
+ config: { id: 'config-id', hash: 'config-hash' },
60
+ });
61
+ });
40
62
  });
41
63
  it('should respond to /ping', async () => {
42
64
  const res = await handler.router.handle(mockRequest('/v1/ping'));
@@ -1 +1 @@
1
- {"version":3,"file":"index.test.js","sourceRoot":"","sources":["../../src/__tests__/index.test.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,WAAW,CAAC;AAEpD,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,QAAQ,CAAC,iBAAiB,EAAE,GAAG,EAAE;IAC/B,EAAE,CAAC,uBAAuB,EAAE,KAAK,IAAI,EAAE;QACrC,MAAM,GAAG,GAAG,MAAM,MAAM,CAAC,aAAa,CAAC,CAAC;QACxC,MAAM,CAAC,KAAK,CAAC,OAAO,GAAG,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;IAC/C,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,SAAS,EAAE,GAAG,EAAE;QACvB,SAAS,CAAC,GAAG,EAAE;YACb,OAAO,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;YAClC,OAAO,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;YAC/B,OAAO,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;QACjC,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,uBAAuB,EAAE,KAAK,IAAI,EAAE;YACrC,OAAO,CAAC,GA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,EAAE,EAAE,EAAE,WAAW,EAAE;aAC5B,CAAC,CAAC;YAEH,MAAM,CAAC,IAAI,GAAG,aAAa,CAAC;YAC5B,MAAM,YAAY,GAAG,MAAM,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC,CAAC;YAC7E,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE;gBAC9C,OAAO,EAAE,KAAK;gBACd,MAAM,EAAE,EAAE,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,aAAa,EAAE;aACjD,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,yBAAyB,EAAE,KAAK,IAAI,EAAE;QACvC,MAAM,GAAG,GAAG,MAAM,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC,CAAC;QACjE,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QAC9B,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,iBAAiB,EAAE,IAAI,CAAC,CAAC;QAC1C,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,eAAe,CAAC,EAAE,UAAU,CAAC,CAAC;IACxD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -1,2 +1,2 @@
1
- import { LambdaHttpResponse } from '@linzjs/lambda';
2
- export declare function versionGet(): Promise<LambdaHttpResponse>;
1
+ import { LambdaHttpRequest, LambdaHttpResponse } from '@linzjs/lambda';
2
+ export declare function versionGet(req: LambdaHttpRequest): Promise<LambdaHttpResponse>;
@@ -1,5 +1,15 @@
1
+ import { ConfigProviderMemory } from '@basemaps/config';
1
2
  import { HttpHeader, LambdaHttpResponse } from '@linzjs/lambda';
2
- export function versionGet() {
3
+ import { ConfigLoader } from '../util/config.loader.js';
4
+ function getConfigHash(cfg) {
5
+ if (!ConfigProviderMemory.is(cfg))
6
+ return undefined;
7
+ if (cfg.id == null)
8
+ return undefined;
9
+ return { id: cfg.id, hash: cfg.hash };
10
+ }
11
+ export async function versionGet(req) {
12
+ const config = await ConfigLoader.load(req);
3
13
  const response = new LambdaHttpResponse(200, 'ok');
4
14
  response.header(HttpHeader.CacheControl, 'no-store');
5
15
  response.json({
@@ -14,10 +24,16 @@ export function versionGet() {
14
24
  */
15
25
  hash: process.env['GIT_HASH'],
16
26
  /**
27
+ *
17
28
  * The exact build that this release was run from
18
29
  * @example "1658821493-3"
19
30
  */
20
31
  buildId: process.env['BUILD_ID'],
32
+ /**
33
+ * Configuration id that was used to power this config
34
+ * @example { "id": "cb_01JTQ7ZK49F8EY4N5DRJ3XFT73", hash: "HcByZ8WS2zpaTxFJp6wSKg2eUpwahLqAGEQdcDxKxqp6" }
35
+ */
36
+ config: getConfigHash(config),
21
37
  });
22
38
  return Promise.resolve(response);
23
39
  }
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/routes/version.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAEhE,MAAM,UAAU,UAAU;IACxB,MAAM,QAAQ,GAAG,IAAI,kBAAkB,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;IACnD,QAAQ,CAAC,MAAM,CAAC,UAAU,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC;IACrD,QAAQ,CAAC,IAAI,CAAC;QACZ;;;WAGG;QACH,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,IAAI,KAAK;QAC5C;;;WAGG;QACH,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC;QAC7B;;;WAGG;QACH,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC;KACjC,CAAC,CAAC;IACH,OAAO,OAAO,CAAC,OAAO,CAAC,QA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HANGED
@@ -80032,6 +80032,12 @@ var ConfigProviderMemory = class _ConfigProviderMemory extends BasemapsConfigPro
80032
80032
  writable: true,
80033
80033
  value: void 0
80034
80034
  });
80035
+ Object.defineProperty(this, "hash", {
80036
+ enumerable: true,
80037
+ configurable: true,
80038
+ writable: true,
80039
+ value: void 0
80040
+ });
80035
80041
  Object.defineProperty(this, "Imagery", {
80036
80042
  enumerable: true,
80037
80043
  configurable: true,
@@ -80075,6 +80081,9 @@ var ConfigProviderMemory = class _ConfigProviderMemory extends BasemapsConfigPro
80075
80081
  value: []
80076
80082
  });
80077
80083
  }
80084
+ static is(cfg) {
80085
+ return cfg.type === "memory";
80086
+ }
80078
80087
  put(obj) {
80079
80088
  this.objects.set(obj.id, obj);
80080
80089
  }
@@ -80219,6 +80228,7 @@ var ConfigProviderMemory = class _ConfigProviderMemory extends BasemapsConfigPro
80219
80228
  obj.updatedAt = updatedAt;
80220
80229
  mem.assets = cfg.assets;
80221
80230
  mem.id = cfg.id;
80231
+ mem.hash = cfg.hash;
80222
80232
  return mem;
80223
80233
  }
80224
80234
  };
@@ -86983,9 +86993,9 @@ var Router = class {
86983
86993
  };
86984
86994
 
86985
86995
  // ../../node_modules/@linzjs/lambda/build/src/function.js
86986
- var version2 = "v7.17.0-10-g852c7c8b";
86987
- var hash = "852c7c8bcbe06d065de732f23a6ebc2dd6a19cfc";
86988
- var buildId = "14960309050-1";
86996
+ var version2 = "v8.0.0-4-g14a4364d";
86997
+ var hash = "14a4364d39e226b7ed0396fee9c3adc534d1142b";
86998
+ var buildId = "15100600846-1";
86989
86999
  var versionInfo = { version: version2, hash, buildId };
86990
87000
  async function runFunction(req, fn) {
86991
87001
  if (!req.timer.timers.has("lambda"))
@@ -91308,7 +91318,15 @@ async function tileXyzGet(req) {
91308
91318
  }
91309
91319
 
91310
91320
  // src/routes/version.ts
91311
- function versionGet() {
91321
+ function getConfigHash(cfg) {
91322
+ if (!ConfigProviderMemory.is(cfg))
91323
+ return void 0;
91324
+ if (cfg.id == null)
91325
+ return void 0;
91326
+ return { id: cfg.id, hash: cfg.hash };
91327
+ }
91328
+ async function versionGet(req) {
91329
+ const config = await ConfigLoader.load(req);
91312
91330
  const response = new LambdaHttpResponse(200, "ok");
91313
91331
  response.header(HttpHeader.CacheControl, "no-store");
91314
91332
  response.json({
@@ -91316,17 +91334,23 @@ function versionGet() {
91316
91334
  * last git version tag
91317
91335
  * @example "v6.42.1"
91318
91336
  */
91319
- version: "v7.17.0-10-g852c7c8b",
91337
+ version: "v8.0.0-4-g14a4364d",
91320
91338
  /**
91321
91339
  * Full git commit hash
91322
91340
  * @example "e4231b1ee62c276c8657c56677ced02681dfe5d6"
91323
91341
  */
91324
- hash: "852c7c8bcbe06d065de732f23a6ebc2dd6a19cfc",
91342
+ hash: "14a4364d39e226b7ed0396fee9c3adc534d1142b",
91325
91343
  /**
91344
+ *
91326
91345
  * The exact build that this release was run from
91327
91346
  * @example "1658821493-3"
91328
91347
  */
91329
- buildId: "14960309050-1"
91348
+ buildId: "15100600846-1",
91349
+ /**
91350
+ * Configuration id that was used to power this config
91351
+ * @example { "id": "cb_01JTQ7ZK49F8EY4N5DRJ3XFT73", hash: "HcByZ8WS2zpaTxFJp6wSKg2eUpwahLqAGEQdcDxKxqp6" }
91352
+ */
91353
+ config: getConfigHash(config)
91330
91354
  });
91331
91355
  return Promise.resolve(response);
91332
91356
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@basemaps/lambda-tiler",
3
- "version": "8.0.0",
3
+ "version": "8.1.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
@@ -115,9 +115,9 @@
115
115
  "license": "Apache-2.0"
116
116
  },
117
117
  "node_modules/semver": {
118
- "version": "7.7.1",
119
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz",
120
- "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==",
118
+ "version": "7.7.2",
119
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz",
120
+ "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==",
121
121
  "license": "ISC",
122
122
  "bin": {
123
123
  "semver": "bin/semver.js"
@@ -3,6 +3,8 @@
3
3
  // Exits successfully and prints matching version(s) if
4
4
  // any supplied version is valid and passes all tests.
5
5
 
6
+ 'use strict'
7
+
6
8
  const argv = process.argv.slice(2)
7
9
 
8
10
  let versions = []
@@ -1,3 +1,5 @@
1
+ 'use strict'
2
+
1
3
  const ANY = Symbol('SemVer ANY')
2
4
  // hoisted class for cyclic dependency
3
5
  class Comparator {
@@ -1,3 +1,5 @@
1
+ 'use strict'
2
+
1
3
  module.exports = {
2
4
  SemVer: require('./semver.js'),
3
5
  Range: require('./range.js'),
@@ -1,3 +1,5 @@
1
+ 'use strict'
2
+
1
3
  const SPACE_CHARACTERS = /\s+/g
2
4
 
3
5
  // hoisted class for cyclic dependency
@@ -1,6 +1,8 @@
1
+ 'use strict'
2
+
1
3
  const debug = require('../internal/debug')
2
4
  const { MAX_LENGTH, MAX_SAFE_INTEGER } = require('../internal/constants')
3
- const { safeRe: re, safeSrc: src, t } = require('../internal/re')
5
+ const { safeRe: re, t } = require('../internal/re')
4
6
 
5
7
  const parseOptions = require('../internal/parse-options')
6
8
  const { compareIdentifiers } = require('../internal/identifiers')
@@ -182,8 +184,7 @@ class SemVer {
182
184
  }
183
185
  // Avoid an invalid semver results
184
186
  if (identifier) {
185
- const r = new RegExp(`^${this.options.loose ? src[t.PRERELEASELOOSE] : src[t.PRERELEASE]}$`)
186
- const match = `-${identifier}`.match(r)
187
+ const match = `-${identifier}`.match(this.options.loose ? re[t.PRERELEASELOOSE] : re[t.PRERELEASE])
187
188
  if (!match || match[1] !== identifier) {
188
189
  throw new Error(`invalid identifier: ${identifier}`)
189
190
  }
@@ -1,3 +1,5 @@
1
+ 'use strict'
2
+
1
3
  const parse = require('./parse')
2
4
  const clean = (version, options) => {
3
5
  const s = parse(version.trim().replace(/^[=v]+/, ''), options)
@@ -1,3 +1,5 @@
1
+ 'use strict'
2
+
1
3
  const eq = require('./eq')
2
4
  const neq = require('./neq')
3
5
  const gt = require('./gt')
@@ -1,3 +1,5 @@
1
+ 'use strict'
2
+
1
3
  const SemVer = require('../classes/semver')
2
4
  const parse = require('./parse')
3
5
  const { safeRe: re, t } = require('../internal/re')
@@ -1,3 +1,5 @@
1
+ 'use strict'
2
+
1
3
  const SemVer = require('../classes/semver')
2
4
  const compareBuild = (a, b, loose) => {
3
5
  const versionA = new SemVer(a, loose)
@@ -1,3 +1,5 @@
1
+ 'use strict'
2
+
1
3
  const compare = require('./compare')
2
4
  const compareLoose = (a, b) => compare(a, b, true)
3
5
  module.exports = compareLoose
@@ -1,3 +1,5 @@
1
+ 'use strict'
2
+
1
3
  const SemVer = require('../classes/semver')
2
4
  const compare = (a, b, loose) =>
3
5
  new SemVer(a, loose).compare(new SemVer(b, loose))
@@ -1,3 +1,5 @@
1
+ 'use strict'
2
+
1
3
  const parse = require('./parse.js')
2
4
 
3
5
  const diff = (version1, version2) => {
@@ -1,3 +1,5 @@
1
+ 'use strict'
2
+
1
3
  const compare = require('./compare')
2
4
  const eq = (a, b, loose) => compare(a, b, loose) === 0
3
5
  module.exports = eq
@@ -1,3 +1,5 @@
1
+ 'use strict'
2
+
1
3
  const compare = require('./compare')
2
4
  const gt = (a, b, loose) => compare(a, b, loose) > 0
3
5
  module.exports = gt
@@ -1,3 +1,5 @@
1
+ 'use strict'
2
+
1
3
  const compare = require('./compare')
2
4
  const gte = (a, b, loose) => compare(a, b, loose) >= 0
3
5
  module.exports = gte
@@ -1,3 +1,5 @@
1
+ 'use strict'
2
+
1
3
  const SemVer = require('../classes/semver')
2
4
 
3
5
  const inc = (version, release, options, identifier, identifierBase) => {
@@ -1,3 +1,5 @@
1
+ 'use strict'
2
+
1
3
  const compare = require('./compare')
2
4
  const lt = (a, b, loose) => compare(a, b, loose) < 0
3
5
  module.exports = lt
@@ -1,3 +1,5 @@
1
+ 'use strict'
2
+
1
3
  const compare = require('./compare')
2
4
  const lte = (a, b, loose) => compare(a, b, loose) <= 0
3
5
  module.exports = lte
@@ -1,3 +1,5 @@
1
+ 'use strict'
2
+
1
3
  const SemVer = require('../classes/semver')
2
4
  const major = (a, loose) => new SemVer(a, loose).major
3
5
  module.exports = major
@@ -1,3 +1,5 @@
1
+ 'use strict'
2
+
1
3
  const SemVer = require('../classes/semver')
2
4
  const minor = (a, loose) => new SemVer(a, loose).minor
3
5
  module.exports = minor
@@ -1,3 +1,5 @@
1
+ 'use strict'
2
+
1
3
  const compare = require('./compare')
2
4
  const neq = (a, b, loose) => compare(a, b, loose) !== 0
3
5
  module.exports = neq
@@ -1,3 +1,5 @@
1
+ 'use strict'
2
+
1
3
  const SemVer = require('../classes/semver')
2
4
  const parse = (version, options, throwErrors = false) => {
3
5
  if (version instanceof SemVer) {
@@ -1,3 +1,5 @@
1
+ 'use strict'
2
+
1
3
  const SemVer = require('../classes/semver')
2
4
  const patch = (a, loose) => new SemVer(a, loose).patch
3
5
  module.exports = patch
@@ -1,3 +1,5 @@
1
+ 'use strict'
2
+
1
3
  const parse = require('./parse')
2
4
  const prerelease = (version, options) => {
3
5
  const parsed = parse(version, options)
@@ -1,3 +1,5 @@
1
+ 'use strict'
2
+
1
3
  const compare = require('./compare')
2
4
  const rcompare = (a, b, loose) => compare(b, a, loose)
3
5
  module.exports = rcompare
@@ -1,3 +1,5 @@
1
+ 'use strict'
2
+
1
3
  const compareBuild = require('./compare-build')
2
4
  const rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose))
3
5
  module.exports = rsort
@@ -1,3 +1,5 @@
1
+ 'use strict'
2
+
1
3
  const Range = require('../classes/range')
2
4
  const satisfies = (version, range, options) => {
3
5
  try {
@@ -1,3 +1,5 @@
1
+ 'use strict'
2
+
1
3
  const compareBuild = require('./compare-build')
2
4
  const sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose))
3
5
  module.exports = sort
@@ -1,3 +1,5 @@
1
+ 'use strict'
2
+
1
3
  const parse = require('./parse')
2
4
  const valid = (version, options) => {
3
5
  const v = parse(version, options)
@@ -1,3 +1,5 @@
1
+ 'use strict'
2
+
1
3
  // just pre-load all the stuff that index.js lazily exports
2
4
  const internalRe = require('./internal/re')
3
5
  const constants = require('./internal/constants')
@@ -1,3 +1,5 @@
1
+ 'use strict'
2
+
1
3
  // Note: this is the semver.org version of the spec that it implements
2
4
  // Not necessarily the package version of this code.
3
5
  const SEMVER_SPEC_VERSION = '2.0.0'
@@ -1,3 +1,5 @@
1
+ 'use strict'
2
+
1
3
  const debug = (
2
4
  typeof process === 'object' &&
3
5
  process.env &&
@@ -1,3 +1,5 @@
1
+ 'use strict'
2
+
1
3
  const numeric = /^[0-9]+$/
2
4
  const compareIdentifiers = (a, b) => {
3
5
  const anum = numeric.test(a)
@@ -1,3 +1,5 @@
1
+ 'use strict'
2
+
1
3
  class LRUCache {
2
4
  constructor () {
3
5
  this.max = 1000
@@ -1,3 +1,5 @@
1
+ 'use strict'
2
+
1
3
  // parse out just the options we care about
2
4
  const looseOption = Object.freeze({ loose: true })
3
5
  const emptyOpts = Object.freeze({ })
@@ -1,3 +1,5 @@
1
+ 'use strict'
2
+
1
3
  const {
2
4
  MAX_SAFE_COMPONENT_LENGTH,
3
5
  MAX_SAFE_BUILD_LENGTH,
@@ -76,12 +78,14 @@ createToken('MAINVERSIONLOOSE', `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` +
76
78
 
77
79
  // ## Pre-release Version Identifier
78
80
  // A numeric identifier, or a non-numeric identifier.
81
+ // Non-numberic identifiers include numberic identifiers but can be longer.
82
+ // Therefore non-numberic identifiers must go first.
79
83
 
80
- createToken('PRERELEASEIDENTIFIER', `(?:${src[t.NUMERICIDENTIFIER]
81
- }|${src[t.NONNUMERICIDENTIFIER]})`)
84
+ createToken('PRERELEASEIDENTIFIER', `(?:${src[t.NONNUMERICIDENTIFIER]
85
+ }|${src[t.NUMERICIDENTIFIER]})`)
82
86
 
83
- createToken('PRERELEASEIDENTIFIERLOOSE', `(?:${src[t.NUMERICIDENTIFIERLOOSE]
84
- }|${src[t.NONNUMERICIDENTIFIER]})`)
87
+ createToken('PRERELEASEIDENTIFIERLOOSE', `(?:${src[t.NONNUMERICIDENTIFIER]
88
+ }|${src[t.NUMERICIDENTIFIERLOOSE]})`)
85
89
 
86
90
  // ## Pre-release Version
87
91
  // Hyphen, followed by one or more dot-separated pre-release version
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "semver",
3
- "version": "7.7.1",
3
+ "version": "7.7.2",
4
4
  "description": "The semantic version parser used by npm.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -15,7 +15,7 @@
15
15
  },
16
16
  "devDependencies": {
17
17
  "@npmcli/eslint-config": "^5.0.0",
18
- "@npmcli/template-oss": "4.23.4",
18
+ "@npmcli/template-oss": "4.24.3",
19
19
  "benchmark": "^2.1.4",
20
20
  "tap": "^16.0.0"
21
21
  },
@@ -52,7 +52,7 @@
52
52
  "author": "GitHub Inc.",
53
53
  "templateOSS": {
54
54
  "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
55
- "version": "4.23.4",
55
+ "version": "4.24.3",
56
56
  "engines": ">=10",
57
57
  "distPaths": [
58
58
  "classes/",
@@ -1,2 +1,4 @@
1
+ 'use strict'
2
+
1
3
  // XXX remove in v8 or beyond
2
4
  module.exports = require('./index.js')
@@ -1,3 +1,5 @@
1
+ 'use strict'
2
+
1
3
  // Determine if version is greater than all the versions possible in the range.
2
4
  const outside = require('./outside')
3
5
  const gtr = (version, range, options) => outside(version, range, '>', options)
@@ -1,3 +1,5 @@
1
+ 'use strict'
2
+
1
3
  const Range = require('../classes/range')
2
4
  const intersects = (r1, r2, options) => {
3
5
  r1 = new Range(r1, options)
@@ -1,3 +1,5 @@
1
+ 'use strict'
2
+
1
3
  const outside = require('./outside')
2
4
  // Determine if version is less than all the versions possible in the range
3
5
  const ltr = (version, range, options) => outside(version, range, '<', options)
@@ -1,3 +1,5 @@
1
+ 'use strict'
2
+
1
3
  const SemVer = require('../classes/semver')
2
4
  const Range = require('../classes/range')
3
5
 
@@ -1,3 +1,5 @@
1
+ 'use strict'
2
+
1
3
  const SemVer = require('../classes/semver')
2
4
  const Range = require('../classes/range')
3
5
  const minSatisfying = (versions, range, options) => {
@@ -1,3 +1,5 @@
1
+ 'use strict'
2
+
1
3
  const SemVer = require('../classes/semver')
2
4
  const Range = require('../classes/range')
3
5
  const gt = require('../functions/gt')
@@ -1,3 +1,5 @@
1
+ 'use strict'
2
+
1
3
  const SemVer = require('../classes/semver')
2
4
  const Comparator = require('../classes/comparator')
3
5
  const { ANY } = Comparator
@@ -1,3 +1,5 @@
1
+ 'use strict'
2
+
1
3
  // given a set of versions and a range, create a "simplified" range
2
4
  // that includes the same versions that the original range does
3
5
  // If the original range is shorter than the simplified one, return that.
@@ -1,3 +1,5 @@
1
+ 'use strict'
2
+
1
3
  const Range = require('../classes/range.js')
2
4
  const Comparator = require('../classes/comparator.js')
3
5
  const { ANY } = Comparator