@basemaps/lambda-tiler 6.39.0 → 6.41.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 (140) hide show
  1. package/CHANGELOG.md +51 -0
  2. package/build/__tests__/config.data.d.ts.map +1 -1
  3. package/build/__tests__/config.data.js +142 -1
  4. package/build/__tests__/config.data.js.map +1 -1
  5. package/build/__tests__/wmts.capability.test.js +105 -79
  6. package/build/__tests__/wmts.capability.test.js.map +1 -1
  7. package/build/__tests__/xyz.util.d.ts.map +1 -1
  8. package/build/__tests__/xyz.util.js +6 -2
  9. package/build/__tests__/xyz.util.js.map +1 -1
  10. package/build/cli/render.tile.d.ts +2 -0
  11. package/build/cli/render.tile.d.ts.map +1 -0
  12. package/build/cli/render.tile.js +36 -0
  13. package/build/cli/render.tile.js.map +1 -0
  14. package/build/routes/__tests__/attribution.test.js +62 -2
  15. package/build/routes/__tests__/attribution.test.js.map +1 -1
  16. package/build/routes/__tests__/wmts.test.js +50 -8
  17. package/build/routes/__tests__/wmts.test.js.map +1 -1
  18. package/build/routes/attribution.d.ts +11 -0
  19. package/build/routes/attribution.d.ts.map +1 -1
  20. package/build/routes/attribution.js +32 -28
  21. package/build/routes/attribution.js.map +1 -1
  22. package/build/routes/tile.json.d.ts.map +1 -1
  23. package/build/routes/tile.json.js +2 -1
  24. package/build/routes/tile.json.js.map +1 -1
  25. package/build/routes/tile.style.json.d.ts.map +1 -1
  26. package/build/routes/tile.style.json.js +2 -1
  27. package/build/routes/tile.style.json.js.map +1 -1
  28. package/build/routes/tile.wmts.d.ts.map +1 -1
  29. package/build/routes/tile.wmts.js +12 -7
  30. package/build/routes/tile.wmts.js.map +1 -1
  31. package/build/routes/tile.xyz.raster.d.ts.map +1 -1
  32. package/build/routes/tile.xyz.raster.js +5 -1
  33. package/build/routes/tile.xyz.raster.js.map +1 -1
  34. package/build/util/__test__/filter.test.d.ts +2 -0
  35. package/build/util/__test__/filter.test.d.ts.map +1 -0
  36. package/build/util/__test__/filter.test.js +64 -0
  37. package/build/util/__test__/filter.test.js.map +1 -0
  38. package/build/util/config.loader.d.ts.map +1 -1
  39. package/build/util/config.loader.js +2 -3
  40. package/build/util/config.loader.js.map +1 -1
  41. package/build/util/filter.d.ts +15 -0
  42. package/build/util/filter.d.ts.map +1 -0
  43. package/build/util/filter.js +59 -0
  44. package/build/util/filter.js.map +1 -0
  45. package/build/util/validate.d.ts.map +1 -1
  46. package/build/util/validate.js +4 -3
  47. package/build/util/validate.js.map +1 -1
  48. package/build/wmts.capability.d.ts +61 -28
  49. package/build/wmts.capability.d.ts.map +1 -1
  50. package/build/wmts.capability.js +175 -99
  51. package/build/wmts.capability.js.map +1 -1
  52. package/dist/index.js +110 -82
  53. package/dist/node_modules/.package-lock.json +17 -17
  54. package/dist/node_modules/detect-libc/README.md +4 -1
  55. package/dist/node_modules/detect-libc/index.d.ts +3 -0
  56. package/dist/node_modules/detect-libc/lib/detect-libc.js +105 -4
  57. package/dist/node_modules/detect-libc/lib/filesystem.js +41 -0
  58. package/dist/node_modules/detect-libc/lib/process.js +3 -0
  59. package/dist/node_modules/detect-libc/package.json +7 -3
  60. package/dist/node_modules/minimist/.eslintrc +25 -50
  61. package/dist/node_modules/minimist/CHANGELOG.md +87 -1
  62. package/dist/node_modules/minimist/README.md +14 -10
  63. package/dist/node_modules/minimist/example/parse.js +2 -0
  64. package/dist/node_modules/minimist/index.js +256 -242
  65. package/dist/node_modules/minimist/package.json +73 -73
  66. package/dist/node_modules/minimist/test/all_bool.js +26 -24
  67. package/dist/node_modules/minimist/test/bool.js +146 -147
  68. package/dist/node_modules/minimist/test/dash.js +33 -21
  69. package/dist/node_modules/minimist/test/default_bool.js +26 -24
  70. package/dist/node_modules/minimist/test/dotted.js +13 -11
  71. package/dist/node_modules/minimist/test/kv_short.js +26 -10
  72. package/dist/node_modules/minimist/test/long.js +28 -26
  73. package/dist/node_modules/minimist/test/num.js +30 -28
  74. package/dist/node_modules/minimist/test/parse.js +169 -157
  75. package/dist/node_modules/minimist/test/parse_modified.js +7 -5
  76. package/dist/node_modules/minimist/test/proto.js +41 -37
  77. package/dist/node_modules/minimist/test/short.js +57 -55
  78. package/dist/node_modules/minimist/test/stop_early.js +10 -8
  79. package/dist/node_modules/minimist/test/unknown.js +83 -81
  80. package/dist/node_modules/minimist/test/whitespace.js +6 -4
  81. package/dist/node_modules/node-abi/.circleci/config.yml +2 -2
  82. package/dist/node_modules/node-abi/.github/CODEOWNERS +1 -0
  83. package/dist/node_modules/node-abi/.github/workflows/semantic.yml +26 -0
  84. package/dist/node_modules/node-abi/.github/workflows/update-abi.yml +5 -4
  85. package/dist/node_modules/node-abi/README.md +5 -3
  86. package/dist/node_modules/node-abi/abi_registry.json +32 -1
  87. package/dist/node_modules/node-abi/package.json +4 -4
  88. package/dist/node_modules/node-abi/scripts/update-abi-registry.js +2 -2
  89. package/dist/node_modules/readable-stream/README.md +1 -1
  90. package/dist/node_modules/readable-stream/lib/_stream_duplex.js +12 -25
  91. package/dist/node_modules/readable-stream/lib/_stream_passthrough.js +2 -4
  92. package/dist/node_modules/readable-stream/lib/_stream_readable.js +176 -273
  93. package/dist/node_modules/readable-stream/lib/_stream_transform.js +26 -37
  94. package/dist/node_modules/readable-stream/lib/_stream_writable.js +118 -174
  95. package/dist/node_modules/readable-stream/lib/internal/streams/async_iterator.js +10 -37
  96. package/dist/node_modules/readable-stream/lib/internal/streams/buffer_list.js +20 -47
  97. package/dist/node_modules/readable-stream/lib/internal/streams/destroy.js +8 -17
  98. package/dist/node_modules/readable-stream/lib/internal/streams/end-of-stream.js +1 -19
  99. package/dist/node_modules/readable-stream/lib/internal/streams/from.js +12 -24
  100. package/dist/node_modules/readable-stream/lib/internal/streams/pipeline.js +5 -16
  101. package/dist/node_modules/readable-stream/lib/internal/streams/state.js +2 -7
  102. package/dist/node_modules/readable-stream/package.json +1 -1
  103. package/dist/node_modules/semver/README.md +70 -1
  104. package/dist/node_modules/semver/bin/semver.js +16 -2
  105. package/dist/node_modules/semver/classes/comparator.js +39 -34
  106. package/dist/node_modules/semver/classes/range.js +45 -28
  107. package/dist/node_modules/semver/classes/semver.js +32 -17
  108. package/dist/node_modules/semver/functions/coerce.js +1 -1
  109. package/dist/node_modules/semver/functions/diff.js +58 -16
  110. package/dist/node_modules/semver/functions/inc.js +3 -2
  111. package/dist/node_modules/semver/functions/parse.js +5 -22
  112. package/dist/node_modules/semver/index.js +1 -0
  113. package/dist/node_modules/semver/internal/constants.js +20 -2
  114. package/dist/node_modules/semver/internal/parse-options.js +14 -10
  115. package/dist/node_modules/semver/internal/re.js +34 -4
  116. package/dist/node_modules/semver/package.json +8 -7
  117. package/dist/node_modules/semver/ranges/intersects.js +1 -1
  118. package/dist/node_modules/semver/ranges/subset.js +6 -3
  119. package/dist/package-lock.json +18 -349
  120. package/dist/package.json +1 -2
  121. package/package.json +9 -10
  122. package/src/__tests__/config.data.ts +142 -1
  123. package/src/__tests__/wmts.capability.test.ts +117 -79
  124. package/src/__tests__/xyz.util.ts +6 -2
  125. package/src/cli/render.tile.ts +41 -0
  126. package/src/routes/__tests__/attribution.test.ts +64 -2
  127. package/src/routes/__tests__/wmts.test.ts +70 -9
  128. package/src/routes/attribution.ts +28 -28
  129. package/src/routes/tile.json.ts +2 -1
  130. package/src/routes/tile.style.json.ts +2 -1
  131. package/src/routes/tile.wmts.ts +13 -6
  132. package/src/routes/tile.xyz.raster.ts +4 -1
  133. package/src/util/__test__/filter.test.ts +80 -0
  134. package/src/util/config.loader.ts +1 -2
  135. package/src/util/filter.ts +60 -0
  136. package/src/util/validate.ts +4 -3
  137. package/src/wmts.capability.ts +216 -123
  138. package/tsconfig.tsbuildinfo +1 -1
  139. package/test-dump.js +0 -6
  140. package/test-imagery.js +0 -3
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@basemaps/lambda-tiler",
3
- "version": "6.39.0",
4
- "lockfileVersion": 2,
3
+ "version": "6.41.0",
4
+ "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "node_modules/base64-js": {
@@ -121,9 +121,9 @@
121
121
  }
122
122
  },
123
123
  "node_modules/detect-libc": {
124
- "version": "2.0.1",
125
- "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.1.tgz",
126
- "integrity": "sha512-463v3ZeIrcWtdgIg6vI6XUncguvr2TnGl4SzDXinkt9mSLpBJKXT3mW6xT3VQdDN11+WVs29pgvivTc4Lp8v+w==",
124
+ "version": "2.0.2",
125
+ "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.2.tgz",
126
+ "integrity": "sha512-UX6sGumvvqSaXgdKGUsgZWqcUyIXZ/vZTrlRT/iobiKhGL0zL4d3osHj3uqllWJK+i+sixDS/3COVEOFbupFyw==",
127
127
  "engines": {
128
128
  "node": ">=8"
129
129
  }
@@ -211,9 +211,9 @@
211
211
  }
212
212
  },
213
213
  "node_modules/minimist": {
214
- "version": "1.2.7",
215
- "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.7.tgz",
216
- "integrity": "sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==",
214
+ "version": "1.2.8",
215
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz",
216
+ "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==",
217
217
  "funding": {
218
218
  "url": "https://github.com/sponsors/ljharb"
219
219
  }
@@ -229,9 +229,9 @@
229
229
  "integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg=="
230
230
  },
231
231
  "node_modules/node-abi": {
232
- "version": "3.31.0",
233
- "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.31.0.tgz",
234
- "integrity": "sha512-eSKV6s+APenqVh8ubJyiu/YhZgxQpGP66ntzUb3lY1xB9ukSRaGnx0AIxI+IM+1+IVYC1oWobgG5L3Lt9ARykQ==",
232
+ "version": "3.45.0",
233
+ "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.45.0.tgz",
234
+ "integrity": "sha512-iwXuFrMAcFVi/ZoZiqq8BzAdsLw9kxDfTC0HMyjXfSL/6CSDAGD5UmR7azrAgWV1zKYq7dUUMj4owusBWKLsiQ==",
235
235
  "dependencies": {
236
236
  "semver": "^7.3.5"
237
237
  },
@@ -301,9 +301,9 @@
301
301
  }
302
302
  },
303
303
  "node_modules/readable-stream": {
304
- "version": "3.6.0",
305
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz",
306
- "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==",
304
+ "version": "3.6.2",
305
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz",
306
+ "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==",
307
307
  "dependencies": {
308
308
  "inherits": "^2.0.3",
309
309
  "string_decoder": "^1.1.1",
@@ -333,9 +333,9 @@
333
333
  ]
334
334
  },
335
335
  "node_modules/semver": {
336
- "version": "7.3.8",
337
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz",
338
- "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==",
336
+ "version": "7.5.4",
337
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz",
338
+ "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==",
339
339
  "dependencies": {
340
340
  "lru-cache": "^6.0.0"
341
341
  },
@@ -8,6 +8,9 @@ Currently supports detection of GNU glibc and MUSL libc.
8
8
  Provides asychronous and synchronous functions for the
9
9
  family (e.g. `glibc`, `musl`) and version (e.g. `1.23`, `1.2.3`).
10
10
 
11
+ The version numbers of libc implementations
12
+ are not guaranteed to be semver-compliant.
13
+
11
14
  For previous v1.x releases, please see the
12
15
  [v1](https://github.com/lovell/detect-libc/tree/v1) branch.
13
16
 
@@ -147,7 +150,7 @@ if (isNonGlibcLinuxSync()) { ... }
147
150
 
148
151
  ## Licensing
149
152
 
150
- Copyright 2017, 2022 Lovell Fuller
153
+ Copyright 2017 Lovell Fuller and others.
151
154
 
152
155
  Licensed under the Apache License, Version 2.0 (the "License");
153
156
  you may not use this file except in compliance with the License.
@@ -1,3 +1,6 @@
1
+ // Copyright 2017 Lovell Fuller and others.
2
+ // SPDX-License-Identifier: Apache-2.0
3
+
1
4
  export const GLIBC: 'glibc';
2
5
  export const MUSL: 'musl';
3
6
 
@@ -1,7 +1,14 @@
1
+ // Copyright 2017 Lovell Fuller and others.
2
+ // SPDX-License-Identifier: Apache-2.0
3
+
1
4
  'use strict';
2
5
 
3
6
  const childProcess = require('child_process');
4
7
  const { isLinux, getReport } = require('./process');
8
+ const { LDD_PATH, readFile, readFileSync } = require('./filesystem');
9
+
10
+ let cachedFamilyFilesystem;
11
+ let cachedVersionFilesystem;
5
12
 
6
13
  const command = 'getconf GNU_LIBC_VERSION 2>&1 || true; ldd --version 2>&1 || true';
7
14
  let commandOut = '';
@@ -36,6 +43,12 @@ const safeCommandSync = () => {
36
43
  */
37
44
  const GLIBC = 'glibc';
38
45
 
46
+ /**
47
+ * A Regexp constant to get the GLIBC Version.
48
+ * @type {string}
49
+ */
50
+ const RE_GLIBC_VERSION = /GLIBC\s(\d+\.\d+)/;
51
+
39
52
  /**
40
53
  * A String constant containing the value `musl`.
41
54
  * @type {string}
@@ -43,6 +56,18 @@ const GLIBC = 'glibc';
43
56
  */
44
57
  const MUSL = 'musl';
45
58
 
59
+ /**
60
+ * This string is used to find if the {@link LDD_PATH} is GLIBC
61
+ * @type {string}
62
+ */
63
+ const GLIBC_ON_LDD = GLIBC.toUpperCase();
64
+
65
+ /**
66
+ * This string is used to find if the {@link LDD_PATH} is musl
67
+ * @type {string}
68
+ */
69
+ const MUSL_ON_LDD = MUSL.toLowerCase();
70
+
46
71
  const isFileMusl = (f) => f.includes('libc.musl-') || f.includes('ld-musl-');
47
72
 
48
73
  const familyFromReport = () => {
@@ -69,6 +94,40 @@ const familyFromCommand = (out) => {
69
94
  return null;
70
95
  };
71
96
 
97
+ const getFamilyFromLddContent = (content) => {
98
+ if (content.includes(MUSL_ON_LDD)) {
99
+ return MUSL;
100
+ }
101
+ if (content.includes(GLIBC_ON_LDD)) {
102
+ return GLIBC;
103
+ }
104
+ return null;
105
+ };
106
+
107
+ const familyFromFilesystem = async () => {
108
+ if (cachedFamilyFilesystem !== undefined) {
109
+ return cachedFamilyFilesystem;
110
+ }
111
+ cachedFamilyFilesystem = null;
112
+ try {
113
+ const lddContent = await readFile(LDD_PATH);
114
+ cachedFamilyFilesystem = getFamilyFromLddContent(lddContent);
115
+ } catch (e) {}
116
+ return cachedFamilyFilesystem;
117
+ };
118
+
119
+ const familyFromFilesystemSync = () => {
120
+ if (cachedFamilyFilesystem !== undefined) {
121
+ return cachedFamilyFilesystem;
122
+ }
123
+ cachedFamilyFilesystem = null;
124
+ try {
125
+ const lddContent = readFileSync(LDD_PATH);
126
+ cachedFamilyFilesystem = getFamilyFromLddContent(lddContent);
127
+ } catch (e) {}
128
+ return cachedFamilyFilesystem;
129
+ };
130
+
72
131
  /**
73
132
  * Resolves with the libc family when it can be determined, `null` otherwise.
74
133
  * @returns {Promise<?string>}
@@ -76,7 +135,10 @@ const familyFromCommand = (out) => {
76
135
  const family = async () => {
77
136
  let family = null;
78
137
  if (isLinux()) {
79
- family = familyFromReport();
138
+ family = await familyFromFilesystem();
139
+ if (!family) {
140
+ family = familyFromReport();
141
+ }
80
142
  if (!family) {
81
143
  const out = await safeCommand();
82
144
  family = familyFromCommand(out);
@@ -92,7 +154,10 @@ const family = async () => {
92
154
  const familySync = () => {
93
155
  let family = null;
94
156
  if (isLinux()) {
95
- family = familyFromReport();
157
+ family = familyFromFilesystemSync();
158
+ if (!family) {
159
+ family = familyFromReport();
160
+ }
96
161
  if (!family) {
97
162
  const out = safeCommandSync();
98
163
  family = familyFromCommand(out);
@@ -113,6 +178,36 @@ const isNonGlibcLinux = async () => isLinux() && await family() !== GLIBC;
113
178
  */
114
179
  const isNonGlibcLinuxSync = () => isLinux() && familySync() !== GLIBC;
115
180
 
181
+ const versionFromFilesystem = async () => {
182
+ if (cachedVersionFilesystem !== undefined) {
183
+ return cachedVersionFilesystem;
184
+ }
185
+ cachedVersionFilesystem = null;
186
+ try {
187
+ const lddContent = await readFile(LDD_PATH);
188
+ const versionMatch = lddContent.match(RE_GLIBC_VERSION);
189
+ if (versionMatch) {
190
+ cachedVersionFilesystem = versionMatch[1];
191
+ }
192
+ } catch (e) {}
193
+ return cachedVersionFilesystem;
194
+ };
195
+
196
+ const versionFromFilesystemSync = () => {
197
+ if (cachedVersionFilesystem !== undefined) {
198
+ return cachedVersionFilesystem;
199
+ }
200
+ cachedVersionFilesystem = null;
201
+ try {
202
+ const lddContent = readFileSync(LDD_PATH);
203
+ const versionMatch = lddContent.match(RE_GLIBC_VERSION);
204
+ if (versionMatch) {
205
+ cachedVersionFilesystem = versionMatch[1];
206
+ }
207
+ } catch (e) {}
208
+ return cachedVersionFilesystem;
209
+ };
210
+
116
211
  const versionFromReport = () => {
117
212
  const report = getReport();
118
213
  if (report.header && report.header.glibcVersionRuntime) {
@@ -141,7 +236,10 @@ const versionFromCommand = (out) => {
141
236
  const version = async () => {
142
237
  let version = null;
143
238
  if (isLinux()) {
144
- version = versionFromReport();
239
+ version = await versionFromFilesystem();
240
+ if (!version) {
241
+ version = versionFromReport();
242
+ }
145
243
  if (!version) {
146
244
  const out = await safeCommand();
147
245
  version = versionFromCommand(out);
@@ -157,7 +255,10 @@ const version = async () => {
157
255
  const versionSync = () => {
158
256
  let version = null;
159
257
  if (isLinux()) {
160
- version = versionFromReport();
258
+ version = versionFromFilesystemSync();
259
+ if (!version) {
260
+ version = versionFromReport();
261
+ }
161
262
  if (!version) {
162
263
  const out = safeCommandSync();
163
264
  version = versionFromCommand(out);
@@ -0,0 +1,41 @@
1
+ // Copyright 2017 Lovell Fuller and others.
2
+ // SPDX-License-Identifier: Apache-2.0
3
+
4
+ 'use strict';
5
+
6
+ const fs = require('fs');
7
+
8
+ /**
9
+ * The path where we can find the ldd
10
+ */
11
+ const LDD_PATH = '/usr/bin/ldd';
12
+
13
+ /**
14
+ * Read the content of a file synchronous
15
+ *
16
+ * @param {string} path
17
+ * @returns {string}
18
+ */
19
+ const readFileSync = (path) => fs.readFileSync(path, 'utf-8');
20
+
21
+ /**
22
+ * Read the content of a file
23
+ *
24
+ * @param {string} path
25
+ * @returns {Promise<string>}
26
+ */
27
+ const readFile = (path) => new Promise((resolve, reject) => {
28
+ fs.readFile(path, 'utf-8', (err, data) => {
29
+ if (err) {
30
+ reject(err);
31
+ } else {
32
+ resolve(data);
33
+ }
34
+ });
35
+ });
36
+
37
+ module.exports = {
38
+ LDD_PATH,
39
+ readFileSync,
40
+ readFile
41
+ };
@@ -1,3 +1,6 @@
1
+ // Copyright 2017 Lovell Fuller and others.
2
+ // SPDX-License-Identifier: Apache-2.0
3
+
1
4
  'use strict';
2
5
 
3
6
  const isLinux = () => process.platform === 'linux';
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "detect-libc",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
4
4
  "description": "Node.js module to detect the C standard library (libc) implementation family and version",
5
5
  "main": "lib/detect-libc.js",
6
6
  "files": [
@@ -8,7 +8,9 @@
8
8
  "index.d.ts"
9
9
  ],
10
10
  "scripts": {
11
- "test": "semistandard && nyc --reporter=lcov --check-coverage --branches=100 ava test/unit.js"
11
+ "test": "semistandard && nyc --reporter=lcov --check-coverage --branches=100 ava test/unit.js",
12
+ "bench": "node benchmark/detect-libc",
13
+ "bench:calls": "node benchmark/call-familySync.js && sleep 1 && node benchmark/call-isNonGlibcLinuxSync.js && sleep 1 && node benchmark/call-versionSync.js"
12
14
  },
13
15
  "repository": {
14
16
  "type": "git",
@@ -21,11 +23,13 @@
21
23
  ],
22
24
  "author": "Lovell Fuller <npm@lovell.info>",
23
25
  "contributors": [
24
- "Niklas Salmoukas <niklas@salmoukas.com>"
26
+ "Niklas Salmoukas <niklas@salmoukas.com>",
27
+ "Vinícius Lourenço <vinyygamerlol@gmail.com>"
25
28
  ],
26
29
  "license": "Apache-2.0",
27
30
  "devDependencies": {
28
31
  "ava": "^2.4.0",
32
+ "benchmark": "^2.1.4",
29
33
  "nyc": "^15.1.0",
30
34
  "proxyquire": "^2.1.3",
31
35
  "semistandard": "^14.2.3"
@@ -1,54 +1,29 @@
1
1
  {
2
- "root": true,
2
+ "root": true,
3
3
 
4
- "extends": "@ljharb/eslint-config/node/0.4",
4
+ "extends": "@ljharb/eslint-config/node/0.4",
5
5
 
6
- "rules": {
7
- "array-bracket-spacing": 0,
8
- "array-element-newline": 0,
9
- "brace-style": 1,
10
- "camelcase": 1,
11
- "comma-dangle": 1,
12
- "comma-spacing": 1,
13
- "complexity": 0,
14
- "curly": 1,
15
- "dot-notation": 1,
16
- "eol-last": 1,
17
- "func-style": 1,
18
- "function-paren-newline": 1,
19
- "indent": [1, 4],
20
- "key-spacing": 1,
21
- "max-lines-per-function": 0,
22
- "max-nested-callbacks": 1,
23
- "max-statements": 0,
24
- "multiline-comment-style": 1,
25
- "no-array-constructor": 1,
26
- "no-continue": 1,
27
- "no-div-regex": 1,
28
- "no-extra-parens": 1,
29
- "no-mixed-operators": 1,
30
- "no-multi-spaces": 1,
31
- "no-multiple-empty-lines": 1,
32
- "no-param-reassign": 1,
33
- "no-plusplus": 1,
34
- "no-proto": 1,
35
- "no-redeclare": 1,
36
- "no-restricted-syntax": 1,
37
- "no-shadow": 1,
38
- "no-trailing-spaces": 1,
39
- "no-unused-vars": 1,
40
- "no-use-before-define": 1,
41
- "object-curly-newline": 1,
42
- "object-curly-spacing": 1,
43
- "operator-linebreak": 1,
44
- "quote-props": 1,
45
- "quotes": 1,
46
- "semi-style": 1,
47
- "semi": 1,
48
- "space-before-blocks": 1,
49
- "space-before-function-paren": 1,
50
- "space-infix-ops": 1,
51
- "strict": 1,
52
- "wrap-regex": 1,
53
- },
6
+ "rules": {
7
+ "array-element-newline": 0,
8
+ "complexity": 0,
9
+ "func-style": [2, "declaration"],
10
+ "max-lines-per-function": 0,
11
+ "max-nested-callbacks": 1,
12
+ "max-statements-per-line": 1,
13
+ "max-statements": 0,
14
+ "multiline-comment-style": 0,
15
+ "no-continue": 1,
16
+ "no-param-reassign": 1,
17
+ "no-restricted-syntax": 1,
18
+ "object-curly-newline": 0,
19
+ },
20
+
21
+ "overrides": [
22
+ {
23
+ "files": "test/**",
24
+ "rules": {
25
+ "camelcase": 0,
26
+ },
27
+ },
28
+ ]
54
29
  }
@@ -5,6 +5,52 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [v1.2.8](https://github.com/minimistjs/minimist/compare/v1.2.7...v1.2.8) - 2023-02-09
9
+
10
+ ### Merged
11
+
12
+ - [Fix] Fix long option followed by single dash [`#17`](https://github.com/minimistjs/minimist/pull/17)
13
+ - [Tests] Remove duplicate test [`#12`](https://github.com/minimistjs/minimist/pull/12)
14
+ - [Fix] opt.string works with multiple aliases [`#10`](https://github.com/minimistjs/minimist/pull/10)
15
+
16
+ ### Fixed
17
+
18
+ - [Fix] Fix long option followed by single dash (#17) [`#15`](https://github.com/minimistjs/minimist/issues/15)
19
+ - [Tests] Remove duplicate test (#12) [`#8`](https://github.com/minimistjs/minimist/issues/8)
20
+ - [Fix] Fix long option followed by single dash [`#15`](https://github.com/minimistjs/minimist/issues/15)
21
+ - [Fix] opt.string works with multiple aliases (#10) [`#9`](https://github.com/minimistjs/minimist/issues/9)
22
+ - [Fix] Fix handling of short option with non-trivial equals [`#5`](https://github.com/minimistjs/minimist/issues/5)
23
+ - [Tests] Remove duplicate test [`#8`](https://github.com/minimistjs/minimist/issues/8)
24
+ - [Fix] opt.string works with multiple aliases [`#9`](https://github.com/minimistjs/minimist/issues/9)
25
+
26
+ ### Commits
27
+
28
+ - Merge tag 'v0.2.3' [`a026794`](https://github.com/minimistjs/minimist/commit/a0267947c7870fc5847cf2d437fbe33f392767da)
29
+ - [eslint] fix indentation and whitespace [`5368ca4`](https://github.com/minimistjs/minimist/commit/5368ca4147e974138a54cc0dc4cea8f756546b70)
30
+ - [eslint] fix indentation and whitespace [`e5f5067`](https://github.com/minimistjs/minimist/commit/e5f5067259ceeaf0b098d14bec910f87e58708c7)
31
+ - [eslint] more cleanup [`62fde7d`](https://github.com/minimistjs/minimist/commit/62fde7d935f83417fb046741531a9e2346a36976)
32
+ - [eslint] more cleanup [`36ac5d0`](https://github.com/minimistjs/minimist/commit/36ac5d0d95e4947d074e5737d94814034ca335d1)
33
+ - [meta] add `auto-changelog` [`73923d2`](https://github.com/minimistjs/minimist/commit/73923d223553fca08b1ba77e3fbc2a492862ae4c)
34
+ - [actions] add reusable workflows [`d80727d`](https://github.com/minimistjs/minimist/commit/d80727df77bfa9e631044d7f16368d8f09242c91)
35
+ - [eslint] add eslint; rules to enable later are warnings [`48bc06a`](https://github.com/minimistjs/minimist/commit/48bc06a1b41f00e9cdf183db34f7a51ba70e98d4)
36
+ - [eslint] fix indentation [`34b0f1c`](https://github.com/minimistjs/minimist/commit/34b0f1ccaa45183c3c4f06a91f9b405180a6f982)
37
+ - [readme] rename and add badges [`5df0fe4`](https://github.com/minimistjs/minimist/commit/5df0fe49211bd09a3636f8686a7cb3012c3e98f0)
38
+ - [Dev Deps] switch from `covert` to `nyc` [`a48b128`](https://github.com/minimistjs/minimist/commit/a48b128fdb8d427dfb20a15273f83e38d97bef07)
39
+ - [Dev Deps] update `covert`, `tape`; remove unnecessary `tap` [`f0fb958`](https://github.com/minimistjs/minimist/commit/f0fb958e9a1fe980cdffc436a211b0bda58f621b)
40
+ - [meta] create FUNDING.yml; add `funding` in package.json [`3639e0c`](https://github.com/minimistjs/minimist/commit/3639e0c819359a366387e425ab6eabf4c78d3caa)
41
+ - [meta] use `npmignore` to autogenerate an npmignore file [`be2e038`](https://github.com/minimistjs/minimist/commit/be2e038c342d8333b32f0fde67a0026b79c8150e)
42
+ - Only apps should have lockfiles [`282b570`](https://github.com/minimistjs/minimist/commit/282b570e7489d01b03f2d6d3dabf79cd3e5f84cf)
43
+ - isConstructorOrProto adapted from PR [`ef9153f`](https://github.com/minimistjs/minimist/commit/ef9153fc52b6cea0744b2239921c5dcae4697f11)
44
+ - [Dev Deps] update `@ljharb/eslint-config`, `aud` [`098873c`](https://github.com/minimistjs/minimist/commit/098873c213cdb7c92e55ae1ef5aa1af3a8192a79)
45
+ - [Dev Deps] update `@ljharb/eslint-config`, `aud` [`3124ed3`](https://github.com/minimistjs/minimist/commit/3124ed3e46306301ebb3c834874ce0241555c2c4)
46
+ - [meta] add `safe-publish-latest` [`4b927de`](https://github.com/minimistjs/minimist/commit/4b927de696d561c636b4f43bf49d4597cb36d6d6)
47
+ - [Tests] add `aud` in `posttest` [`b32d9bd`](https://github.com/minimistjs/minimist/commit/b32d9bd0ab340f4e9f8c3a97ff2a4424f25fab8c)
48
+ - [meta] update repo URLs [`f9fdfc0`](https://github.com/minimistjs/minimist/commit/f9fdfc032c54884d9a9996a390c63cd0719bbe1a)
49
+ - [actions] Avoid 0.6 tests due to build failures [`ba92fe6`](https://github.com/minimistjs/minimist/commit/ba92fe6ebbdc0431cca9a2ea8f27beb492f5e4ec)
50
+ - [Dev Deps] update `tape` [`950eaa7`](https://github.com/minimistjs/minimist/commit/950eaa74f112e04d23e9c606c67472c46739b473)
51
+ - [Dev Deps] add missing `npmignore` dev dep [`3226afa`](https://github.com/minimistjs/minimist/commit/3226afaf09e9d127ca369742437fe6e88f752d6b)
52
+ - Merge tag 'v0.2.2' [`980d7ac`](https://github.com/minimistjs/minimist/commit/980d7ac61a0b4bd552711251ac107d506b23e41f)
53
+
8
54
  ## [v1.2.7](https://github.com/minimistjs/minimist/compare/v1.2.6...v1.2.7) - 2022-10-10
9
55
 
10
56
  ### Commits
@@ -109,13 +155,53 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
109
155
  - coverage script [`e5531ba`](https://github.com/minimistjs/minimist/commit/e5531ba0479da3b8138d3d8cac545d84ccb1c8df)
110
156
  - extra fn to get 100% coverage again [`a6972da`](https://github.com/minimistjs/minimist/commit/a6972da89e56bf77642f8ec05a13b6558db93498)
111
157
 
112
- ## [v1.0.0](https://github.com/minimistjs/minimist/compare/v0.2.1...v1.0.0) - 2014-08-10
158
+ ## [v1.0.0](https://github.com/minimistjs/minimist/compare/v0.2.3...v1.0.0) - 2014-08-10
113
159
 
114
160
  ### Commits
115
161
 
116
162
  - added stopEarly option [`471c7e4`](https://github.com/minimistjs/minimist/commit/471c7e4a7e910fc7ad8f9df850a186daf32c64e9)
117
163
  - fix list [`fef6ae7`](https://github.com/minimistjs/minimist/commit/fef6ae79c38b9dc1c49569abb7cd04eb965eac5e)
118
164
 
165
+ ## [v0.2.3](https://github.com/minimistjs/minimist/compare/v0.2.2...v0.2.3) - 2023-02-09
166
+
167
+ ### Merged
168
+
169
+ - [Fix] Fix long option followed by single dash [`#17`](https://github.com/minimistjs/minimist/pull/17)
170
+ - [Tests] Remove duplicate test [`#12`](https://github.com/minimistjs/minimist/pull/12)
171
+ - [Fix] opt.string works with multiple aliases [`#10`](https://github.com/minimistjs/minimist/pull/10)
172
+
173
+ ### Fixed
174
+
175
+ - [Fix] Fix long option followed by single dash (#17) [`#15`](https://github.com/minimistjs/minimist/issues/15)
176
+ - [Tests] Remove duplicate test (#12) [`#8`](https://github.com/minimistjs/minimist/issues/8)
177
+ - [Fix] opt.string works with multiple aliases (#10) [`#9`](https://github.com/minimistjs/minimist/issues/9)
178
+
179
+ ### Commits
180
+
181
+ - [eslint] fix indentation and whitespace [`e5f5067`](https://github.com/minimistjs/minimist/commit/e5f5067259ceeaf0b098d14bec910f87e58708c7)
182
+ - [eslint] more cleanup [`36ac5d0`](https://github.com/minimistjs/minimist/commit/36ac5d0d95e4947d074e5737d94814034ca335d1)
183
+ - [eslint] fix indentation [`34b0f1c`](https://github.com/minimistjs/minimist/commit/34b0f1ccaa45183c3c4f06a91f9b405180a6f982)
184
+ - isConstructorOrProto adapted from PR [`ef9153f`](https://github.com/minimistjs/minimist/commit/ef9153fc52b6cea0744b2239921c5dcae4697f11)
185
+ - [Dev Deps] update `@ljharb/eslint-config`, `aud` [`098873c`](https://github.com/minimistjs/minimist/commit/098873c213cdb7c92e55ae1ef5aa1af3a8192a79)
186
+ - [Dev Deps] add missing `npmignore` dev dep [`3226afa`](https://github.com/minimistjs/minimist/commit/3226afaf09e9d127ca369742437fe6e88f752d6b)
187
+
188
+ ## [v0.2.2](https://github.com/minimistjs/minimist/compare/v0.2.1...v0.2.2) - 2022-10-10
189
+
190
+ ### Commits
191
+
192
+ - [meta] add `auto-changelog` [`73923d2`](https://github.com/minimistjs/minimist/commit/73923d223553fca08b1ba77e3fbc2a492862ae4c)
193
+ - [actions] add reusable workflows [`d80727d`](https://github.com/minimistjs/minimist/commit/d80727df77bfa9e631044d7f16368d8f09242c91)
194
+ - [eslint] add eslint; rules to enable later are warnings [`48bc06a`](https://github.com/minimistjs/minimist/commit/48bc06a1b41f00e9cdf183db34f7a51ba70e98d4)
195
+ - [readme] rename and add badges [`5df0fe4`](https://github.com/minimistjs/minimist/commit/5df0fe49211bd09a3636f8686a7cb3012c3e98f0)
196
+ - [Dev Deps] switch from `covert` to `nyc` [`a48b128`](https://github.com/minimistjs/minimist/commit/a48b128fdb8d427dfb20a15273f83e38d97bef07)
197
+ - [Dev Deps] update `covert`, `tape`; remove unnecessary `tap` [`f0fb958`](https://github.com/minimistjs/minimist/commit/f0fb958e9a1fe980cdffc436a211b0bda58f621b)
198
+ - [meta] create FUNDING.yml; add `funding` in package.json [`3639e0c`](https://github.com/minimistjs/minimist/commit/3639e0c819359a366387e425ab6eabf4c78d3caa)
199
+ - [meta] use `npmignore` to autogenerate an npmignore file [`be2e038`](https://github.com/minimistjs/minimist/commit/be2e038c342d8333b32f0fde67a0026b79c8150e)
200
+ - Only apps should have lockfiles [`282b570`](https://github.com/minimistjs/minimist/commit/282b570e7489d01b03f2d6d3dabf79cd3e5f84cf)
201
+ - [meta] add `safe-publish-latest` [`4b927de`](https://github.com/minimistjs/minimist/commit/4b927de696d561c636b4f43bf49d4597cb36d6d6)
202
+ - [Tests] add `aud` in `posttest` [`b32d9bd`](https://github.com/minimistjs/minimist/commit/b32d9bd0ab340f4e9f8c3a97ff2a4424f25fab8c)
203
+ - [meta] update repo URLs [`f9fdfc0`](https://github.com/minimistjs/minimist/commit/f9fdfc032c54884d9a9996a390c63cd0719bbe1a)
204
+
119
205
  ## [v0.2.1](https://github.com/minimistjs/minimist/compare/v0.2.0...v0.2.1) - 2020-03-12
120
206
 
121
207
  ## [v0.2.0](https://github.com/minimistjs/minimist/compare/v0.1.0...v0.2.0) - 2014-06-19
@@ -26,14 +26,16 @@ $ node example/parse.js -a beep -b boop
26
26
 
27
27
  ```
28
28
  $ node example/parse.js -x 3 -y 4 -n5 -abc --beep=boop foo bar baz
29
- { _: [ 'foo', 'bar', 'baz' ],
30
- x: 3,
31
- y: 4,
32
- n: 5,
33
- a: true,
34
- b: true,
35
- c: true,
36
- beep: 'boop' }
29
+ {
30
+ _: ['foo', 'bar', 'baz'],
31
+ x: 3,
32
+ y: 4,
33
+ n: 5,
34
+ a: true,
35
+ b: true,
36
+ c: true,
37
+ beep: 'boop'
38
+ }
37
39
  ```
38
40
 
39
41
  # security
@@ -81,8 +83,10 @@ and `argv['--']` with everything after the `--`. Here's an example:
81
83
 
82
84
  ```
83
85
  > require('./')('one two three -- four five --six'.split(' '), { '--': true })
84
- { _: [ 'one', 'two', 'three' ],
85
- '--': [ 'four', 'five', '--six' ] }
86
+ {
87
+ _: ['one', 'two', 'three'],
88
+ '--': ['four', 'five', '--six']
89
+ }
86
90
  ```
87
91
 
88
92
  Note that with `opts['--']` set, parsing for arguments still stops after the
@@ -1,2 +1,4 @@
1
+ 'use strict';
2
+
1
3
  var argv = require('../')(process.argv.slice(2));
2
4
  console.log(argv);