cdk-common 2.0.642 → 2.0.644

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 (27) hide show
  1. package/.jsii +2 -2
  2. package/lib/main.js +1 -1
  3. package/node_modules/@types/concat-stream/node_modules/@types/node/README.md +1 -1
  4. package/node_modules/@types/concat-stream/node_modules/@types/node/buffer.d.ts +1 -1
  5. package/node_modules/@types/concat-stream/node_modules/@types/node/module.d.ts +9 -5
  6. package/node_modules/@types/concat-stream/node_modules/@types/node/package.json +2 -2
  7. package/node_modules/@types/concat-stream/node_modules/@types/node/ts4.8/buffer.d.ts +1 -1
  8. package/node_modules/@types/concat-stream/node_modules/@types/node/ts4.8/module.d.ts +9 -5
  9. package/node_modules/@types/form-data/node_modules/@types/node/README.md +1 -1
  10. package/node_modules/@types/form-data/node_modules/@types/node/buffer.d.ts +1 -1
  11. package/node_modules/@types/form-data/node_modules/@types/node/module.d.ts +9 -5
  12. package/node_modules/@types/form-data/node_modules/@types/node/package.json +2 -2
  13. package/node_modules/@types/form-data/node_modules/@types/node/ts4.8/buffer.d.ts +1 -1
  14. package/node_modules/@types/form-data/node_modules/@types/node/ts4.8/module.d.ts +9 -5
  15. package/node_modules/function-bind/.eslintrc +11 -5
  16. package/node_modules/function-bind/.github/FUNDING.yml +12 -0
  17. package/node_modules/function-bind/.github/SECURITY.md +3 -0
  18. package/node_modules/function-bind/.nycrc +13 -0
  19. package/node_modules/function-bind/CHANGELOG.md +136 -0
  20. package/node_modules/function-bind/README.md +25 -27
  21. package/node_modules/function-bind/implementation.js +44 -12
  22. package/node_modules/function-bind/package.json +38 -14
  23. package/package.json +2 -2
  24. package/node_modules/function-bind/.editorconfig +0 -20
  25. package/node_modules/function-bind/.jscs.json +0 -176
  26. package/node_modules/function-bind/.npmignore +0 -22
  27. package/node_modules/function-bind/.travis.yml +0 -168
package/.jsii CHANGED
@@ -9847,6 +9847,6 @@
9847
9847
  "symbolId": "src/main:LambdaArmFunctionProps"
9848
9848
  }
9849
9849
  },
9850
- "version": "2.0.642",
9851
- "fingerprint": "ZdsyVrszpm+ELAY1zWm6oJ3cBb5rQbeH+WeBZhQkbGc="
9850
+ "version": "2.0.644",
9851
+ "fingerprint": "ricvwvrMtRfQVg6ZIKle8o5OsoVBV/Z8d1ACoBx2gzY="
9852
9852
  }
package/lib/main.js CHANGED
@@ -41,5 +41,5 @@ class LambdaArmFunction extends constructs_1.Construct {
41
41
  }
42
42
  exports.LambdaArmFunction = LambdaArmFunction;
43
43
  _a = JSII_RTTI_SYMBOL_1;
44
- LambdaArmFunction[_a] = { fqn: "cdk-common.LambdaArmFunction", version: "2.0.642" };
44
+ LambdaArmFunction[_a] = { fqn: "cdk-common.LambdaArmFunction", version: "2.0.644" };
45
45
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFpbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9tYWluLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7O0FBQUEsbUNBQW1DO0FBQ25DLGlEQUFpRDtBQUNqRCwyQ0FBdUM7QUFLdkMsTUFBYSxpQkFBa0IsU0FBUSxzQkFBUztJQUU5QyxZQUFZLEtBQWdCLEVBQUUsRUFBVSxFQUFFLEtBQTRCO1FBQ3BFLEtBQUssQ0FBQyxLQUFLLEVBQUUsRUFBRSxDQUFDLENBQUM7UUFFakIsSUFBSSxLQUFLLENBQUMsT0FBTyxLQUFLLE1BQU0sQ0FBQyxPQUFPLENBQUMsV0FBVyxFQUFFO1lBQ2hELEdBQUcsQ0FBQyxXQUFXLENBQUMsRUFBRSxDQUFDLElBQUksQ0FBQyxDQUFDLFVBQVUsQ0FBQyxtQ0FBbUMsQ0FBQyxDQUFDO1NBQzFFO2FBQU0sSUFBSSxLQUFLLENBQUMsT0FBTyxLQUFLLE1BQU0sQ0FBQyxPQUFPLENBQUMsV0FBVyxF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IChwcm9wcy5ydW50aW1lID09PSBsYW1iZGEuUnVudGltZS5KQVZBXzExKSB7XG4gICAgICBjZGsuQW5ub3RhdGlvbnMub2YodGhpcykuYWRkV2FybmluZygnWW91IGFyZSB1c2luZyBKYXZhIDExIGF0IEFSTScpO1xuICAgIH0gZWxzZSBpZiAocHJvcHMucnVudGltZSA9PT0gbGFtYmRhLlJ1bnRpbWUuRE9UTkVUX0NPUkVfM18xKSB7XG4gICAgICBjZGsuQW5ub3RhdGlvbnMub2YodGhpcykuYWRkV2FybmluZygnWW91IGFyZSB1c2luZyBET1RORVQgQ09SRSAzLjEgYXQgQVJNJyk7XG4gICAgfSBlbHNlIGlmIChwcm9wcy5ydW50aW1lID09PSBsYW1iZGEuUnVudGltZS5SVUJZXzJfNykge1xuICAgICAgY2RrLkFubm90YXRpb25zLm9mKHRoaXMpLmFkZFdhcm5pbmcoJ1lvdSBhcmUgdXNpbmcgUlVCWSAyLjcgYXQgQVJNJyk7XG4gICAgfSBlbHNlIHtcbiAgICAgIHRocm93IG5ldyBFcnJvcihgSW52YWxpZCBSdW50aW1lICR7cHJvcHMucnVudGltZX0gYXQgQVJNLCBTZWUgaHR0cHM6Ly9kb2NzLmF3cy5hbWF6b24uY29tL2xhbWJkYS9sYXRlc3QvZGcvZm91bmRhdGlvbi1hcmNoLmh0bWw/aWNtcGlkPWRvY3NfbGFtYmRhX3Jzc2ApO1xuICAgIH1cblxuICAgIHRoaXMubGFtYmRhRnVuY3Rpb24gPSBuZXcgbGFtYmRhLkZ1bmN0aW9uKHRoaXMsICdMYW1iZGFGdW5jdGlvbicsIHsgYXJjaGl0ZWN0dXJlOiBsYW1iZGEuQXJjaGl0ZWN0dXJlLkFSTV82NCwgLi4ucHJvcHMgfSk7XG4gIH1cbn0iXX0=
@@ -8,7 +8,7 @@ This package contains type definitions for Node.js (https://nodejs.org/).
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Mon, 09 Oct 2023 17:35:36 GMT
11
+ * Last updated: Fri, 13 Oct 2023 22:05:45 GMT
12
12
  * Dependencies: [@types/undici-types](https://npmjs.com/package/@types/undici-types)
13
13
  * Global values: `AbortController`, `AbortSignal`, `FormData`, `Headers`, `Request`, `Response`, `__dirname`, `__filename`, `console`, `exports`, `fetch`, `gc`, `global`, `module`, `process`, `require`, `structuredClone`
14
14
 
@@ -223,7 +223,7 @@ declare module "buffer" {
223
223
  import { Blob as NodeBlob } from "buffer";
224
224
  // This conditional type will be the existing global Blob in a browser, or
225
225
  // the copy below in a Node environment.
226
- type __Blob = typeof globalThis extends { onmessage: any; Blob: infer T } ? T : NodeBlob;
226
+ type __Blob = typeof globalThis extends { onmessage: any; Blob: any } ? {} : NodeBlob;
227
227
  global {
228
228
  namespace NodeJS {
229
229
  export { BufferEncoding };
@@ -267,22 +267,26 @@ declare module "module" {
267
267
  * Provides a module-relative resolution function scoped to each module, returning
268
268
  * the URL string.
269
269
  *
270
- * @param specified The module specifier to resolve relative to the current module.
270
+ * @since v20.6.0
271
+ *
272
+ * @param specifier The module specifier to resolve relative to the current module.
271
273
  * @returns The absolute (`file:`) URL string for the resolved module.
272
274
  */
273
- resolve(specified: string): string;
275
+ resolve(specifier: string): string;
274
276
  /**
275
- * This feature is only available with the `--experimental-import-meta-resolve`
277
+ * This `parent` parameter is only used when the `--experimental-import-meta-resolve`
276
278
  * command flag enabled.
277
279
  *
278
280
  * Provides a module-relative resolution function scoped to each module, returning
279
281
  * the URL string.
280
282
  *
281
- * @param specified The module specifier to resolve relative to `parent`.
283
+ * @since v20.6.0
284
+ *
285
+ * @param specifier The module specifier to resolve relative to `parent`.
282
286
  * @param parent The absolute parent module URL to resolve from.
283
287
  * @returns The absolute (`file:`) URL string for the resolved module.
284
288
  */
285
- resolve(specified: string, parent: string | URL): string;
289
+ resolve(specifier: string, parent: string | URL): string;
286
290
  }
287
291
  }
288
292
  export = Module;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "20.8.4",
3
+ "version": "20.8.6",
4
4
  "description": "TypeScript definitions for Node.js",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
6
6
  "license": "MIT",
@@ -229,6 +229,6 @@
229
229
  "dependencies": {
230
230
  "undici-types": "~5.25.1"
231
231
  },
232
- "typesPublisherContentHash": "2838dc399a85e9b85a3a405ba23ca1871738adf3d0908db1877a2e5c39a9f7a6",
232
+ "typesPublisherContentHash": "a80e2c3721390a74f89db6139948567951eca03453d5936cab55aa8b51134260",
233
233
  "typeScriptVersion": "4.5"
234
234
  }
@@ -223,7 +223,7 @@ declare module "buffer" {
223
223
  import { Blob as NodeBlob } from "buffer";
224
224
  // This conditional type will be the existing global Blob in a browser, or
225
225
  // the copy below in a Node environment.
226
- type __Blob = typeof globalThis extends { onmessage: any; Blob: infer T } ? T : NodeBlob;
226
+ type __Blob = typeof globalThis extends { onmessage: any; Blob: any } ? {} : NodeBlob;
227
227
  global {
228
228
  namespace NodeJS {
229
229
  export { BufferEncoding };
@@ -267,22 +267,26 @@ declare module "module" {
267
267
  * Provides a module-relative resolution function scoped to each module, returning
268
268
  * the URL string.
269
269
  *
270
- * @param specified The module specifier to resolve relative to the current module.
270
+ * @since v20.6.0
271
+ *
272
+ * @param specifier The module specifier to resolve relative to the current module.
271
273
  * @returns The absolute (`file:`) URL string for the resolved module.
272
274
  */
273
- resolve(specified: string): string;
275
+ resolve(specifier: string): string;
274
276
  /**
275
- * This feature is only available with the `--experimental-import-meta-resolve`
277
+ * This `parent` parameter is only used when the `--experimental-import-meta-resolve`
276
278
  * command flag enabled.
277
279
  *
278
280
  * Provides a module-relative resolution function scoped to each module, returning
279
281
  * the URL string.
280
282
  *
281
- * @param specified The module specifier to resolve relative to `parent`.
283
+ * @since v20.6.0
284
+ *
285
+ * @param specifier The module specifier to resolve relative to `parent`.
282
286
  * @param parent The absolute parent module URL to resolve from.
283
287
  * @returns The absolute (`file:`) URL string for the resolved module.
284
288
  */
285
- resolve(specified: string, parent: string | URL): string;
289
+ resolve(specifier: string, parent: string | URL): string;
286
290
  }
287
291
  }
288
292
  export = Module;
@@ -8,7 +8,7 @@ This package contains type definitions for Node.js (https://nodejs.org/).
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Mon, 09 Oct 2023 17:35:36 GMT
11
+ * Last updated: Fri, 13 Oct 2023 22:05:45 GMT
12
12
  * Dependencies: [@types/undici-types](https://npmjs.com/package/@types/undici-types)
13
13
  * Global values: `AbortController`, `AbortSignal`, `FormData`, `Headers`, `Request`, `Response`, `__dirname`, `__filename`, `console`, `exports`, `fetch`, `gc`, `global`, `module`, `process`, `require`, `structuredClone`
14
14
 
@@ -223,7 +223,7 @@ declare module "buffer" {
223
223
  import { Blob as NodeBlob } from "buffer";
224
224
  // This conditional type will be the existing global Blob in a browser, or
225
225
  // the copy below in a Node environment.
226
- type __Blob = typeof globalThis extends { onmessage: any; Blob: infer T } ? T : NodeBlob;
226
+ type __Blob = typeof globalThis extends { onmessage: any; Blob: any } ? {} : NodeBlob;
227
227
  global {
228
228
  namespace NodeJS {
229
229
  export { BufferEncoding };
@@ -267,22 +267,26 @@ declare module "module" {
267
267
  * Provides a module-relative resolution function scoped to each module, returning
268
268
  * the URL string.
269
269
  *
270
- * @param specified The module specifier to resolve relative to the current module.
270
+ * @since v20.6.0
271
+ *
272
+ * @param specifier The module specifier to resolve relative to the current module.
271
273
  * @returns The absolute (`file:`) URL string for the resolved module.
272
274
  */
273
- resolve(specified: string): string;
275
+ resolve(specifier: string): string;
274
276
  /**
275
- * This feature is only available with the `--experimental-import-meta-resolve`
277
+ * This `parent` parameter is only used when the `--experimental-import-meta-resolve`
276
278
  * command flag enabled.
277
279
  *
278
280
  * Provides a module-relative resolution function scoped to each module, returning
279
281
  * the URL string.
280
282
  *
281
- * @param specified The module specifier to resolve relative to `parent`.
283
+ * @since v20.6.0
284
+ *
285
+ * @param specifier The module specifier to resolve relative to `parent`.
282
286
  * @param parent The absolute parent module URL to resolve from.
283
287
  * @returns The absolute (`file:`) URL string for the resolved module.
284
288
  */
285
- resolve(specified: string, parent: string | URL): string;
289
+ resolve(specifier: string, parent: string | URL): string;
286
290
  }
287
291
  }
288
292
  export = Module;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "20.8.4",
3
+ "version": "20.8.6",
4
4
  "description": "TypeScript definitions for Node.js",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
6
6
  "license": "MIT",
@@ -229,6 +229,6 @@
229
229
  "dependencies": {
230
230
  "undici-types": "~5.25.1"
231
231
  },
232
- "typesPublisherContentHash": "2838dc399a85e9b85a3a405ba23ca1871738adf3d0908db1877a2e5c39a9f7a6",
232
+ "typesPublisherContentHash": "a80e2c3721390a74f89db6139948567951eca03453d5936cab55aa8b51134260",
233
233
  "typeScriptVersion": "4.5"
234
234
  }
@@ -223,7 +223,7 @@ declare module "buffer" {
223
223
  import { Blob as NodeBlob } from "buffer";
224
224
  // This conditional type will be the existing global Blob in a browser, or
225
225
  // the copy below in a Node environment.
226
- type __Blob = typeof globalThis extends { onmessage: any; Blob: infer T } ? T : NodeBlob;
226
+ type __Blob = typeof globalThis extends { onmessage: any; Blob: any } ? {} : NodeBlob;
227
227
  global {
228
228
  namespace NodeJS {
229
229
  export { BufferEncoding };
@@ -267,22 +267,26 @@ declare module "module" {
267
267
  * Provides a module-relative resolution function scoped to each module, returning
268
268
  * the URL string.
269
269
  *
270
- * @param specified The module specifier to resolve relative to the current module.
270
+ * @since v20.6.0
271
+ *
272
+ * @param specifier The module specifier to resolve relative to the current module.
271
273
  * @returns The absolute (`file:`) URL string for the resolved module.
272
274
  */
273
- resolve(specified: string): string;
275
+ resolve(specifier: string): string;
274
276
  /**
275
- * This feature is only available with the `--experimental-import-meta-resolve`
277
+ * This `parent` parameter is only used when the `--experimental-import-meta-resolve`
276
278
  * command flag enabled.
277
279
  *
278
280
  * Provides a module-relative resolution function scoped to each module, returning
279
281
  * the URL string.
280
282
  *
281
- * @param specified The module specifier to resolve relative to `parent`.
283
+ * @since v20.6.0
284
+ *
285
+ * @param specifier The module specifier to resolve relative to `parent`.
282
286
  * @param parent The absolute parent module URL to resolve from.
283
287
  * @returns The absolute (`file:`) URL string for the resolved module.
284
288
  */
285
- resolve(specified: string, parent: string | URL): string;
289
+ resolve(specifier: string, parent: string | URL): string;
286
290
  }
287
291
  }
288
292
  export = Module;
@@ -6,10 +6,16 @@
6
6
  "rules": {
7
7
  "func-name-matching": 0,
8
8
  "indent": [2, 4],
9
- "max-nested-callbacks": [2, 3],
10
- "max-params": [2, 3],
11
- "max-statements": [2, 20],
12
9
  "no-new-func": [1],
13
- "strict": [0]
14
- }
10
+ },
11
+
12
+ "overrides": [
13
+ {
14
+ "files": "test/**",
15
+ "rules": {
16
+ "max-lines-per-function": 0,
17
+ "strict": [0]
18
+ },
19
+ },
20
+ ],
15
21
  }
@@ -0,0 +1,12 @@
1
+ # These are supported funding model platforms
2
+
3
+ github: [ljharb]
4
+ patreon: # Replace with a single Patreon username
5
+ open_collective: # Replace with a single Open Collective username
6
+ ko_fi: # Replace with a single Ko-fi username
7
+ tidelift: npm/function-bind
8
+ community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9
+ liberapay: # Replace with a single Liberapay username
10
+ issuehunt: # Replace with a single IssueHunt username
11
+ otechie: # Replace with a single Otechie username
12
+ custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
@@ -0,0 +1,3 @@
1
+ # Security
2
+
3
+ Please email [@ljharb](https://github.com/ljharb) or see https://tidelift.com/security if you have a potential security vulnerability to report.
@@ -0,0 +1,13 @@
1
+ {
2
+ "all": true,
3
+ "check-coverage": false,
4
+ "reporter": ["text-summary", "text", "html", "json"],
5
+ "lines": 86,
6
+ "statements": 85.93,
7
+ "functions": 82.43,
8
+ "branches": 76.06,
9
+ "exclude": [
10
+ "coverage",
11
+ "test"
12
+ ]
13
+ }
@@ -0,0 +1,136 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [v1.1.2](https://github.com/ljharb/function-bind/compare/v1.1.1...v1.1.2) - 2023-10-12
9
+
10
+ ### Merged
11
+
12
+ - Point to the correct file [`#16`](https://github.com/ljharb/function-bind/pull/16)
13
+
14
+ ### Commits
15
+
16
+ - [Tests] migrate tests to Github Actions [`4f8b57c`](https://github.com/ljharb/function-bind/commit/4f8b57c02f2011fe9ae353d5e74e8745f0988af8)
17
+ - [Tests] remove `jscs` [`90eb2ed`](https://github.com/ljharb/function-bind/commit/90eb2edbeefd5b76cd6c3a482ea3454db169b31f)
18
+ - [meta] update `.gitignore` [`53fcdc3`](https://github.com/ljharb/function-bind/commit/53fcdc371cd66634d6e9b71c836a50f437e89fed)
19
+ - [Tests] up to `node` `v11.10`, `v10.15`, `v9.11`, `v8.15`, `v6.16`, `v4.9`; use `nvm install-latest-npm`; run audit script in tests [`1fe8f6e`](https://github.com/ljharb/function-bind/commit/1fe8f6e9aed0dfa8d8b3cdbd00c7f5ea0cd2b36e)
20
+ - [meta] add `auto-changelog` [`1921fcb`](https://github.com/ljharb/function-bind/commit/1921fcb5b416b63ffc4acad051b6aad5722f777d)
21
+ - [Robustness] remove runtime dependency on all builtins except `.apply` [`f743e61`](https://github.com/ljharb/function-bind/commit/f743e61aa6bb2360358c04d4884c9db853d118b7)
22
+ - Docs: enable badges; update wording [`503cb12`](https://github.com/ljharb/function-bind/commit/503cb12d998b5f91822776c73332c7adcd6355dd)
23
+ - [readme] update badges [`290c5db`](https://github.com/ljharb/function-bind/commit/290c5dbbbda7264efaeb886552a374b869a4bb48)
24
+ - [Tests] switch to nyc for coverage [`ea360ba`](https://github.com/ljharb/function-bind/commit/ea360ba907fc2601ed18d01a3827fa2d3533cdf8)
25
+ - [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`cae5e9e`](https://github.com/ljharb/function-bind/commit/cae5e9e07a5578dc6df26c03ee22851ce05b943c)
26
+ - [meta] add `funding` field; create FUNDING.yml [`c9f4274`](https://github.com/ljharb/function-bind/commit/c9f4274aa80ea3aae9657a3938fdba41a3b04ca6)
27
+ - [Tests] fix eslint errors from #15 [`f69aaa2`](https://github.com/ljharb/function-bind/commit/f69aaa2beb2fdab4415bfb885760a699d0b9c964)
28
+ - [actions] fix permissions [`99a0cd9`](https://github.com/ljharb/function-bind/commit/99a0cd9f3b5bac223a0d572f081834cd73314be7)
29
+ - [meta] use `npmignore` to autogenerate an npmignore file [`f03b524`](https://github.com/ljharb/function-bind/commit/f03b524ca91f75a109a5d062f029122c86ecd1ae)
30
+ - [Dev Deps] update `@ljharb/eslint‑config`, `eslint`, `tape` [`7af9300`](https://github.com/ljharb/function-bind/commit/7af930023ae2ce7645489532821e4fbbcd7a2280)
31
+ - [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `covert`, `tape` [`64a9127`](https://github.com/ljharb/function-bind/commit/64a9127ab0bd331b93d6572eaf6e9971967fc08c)
32
+ - [Tests] use `aud` instead of `npm audit` [`e75069c`](https://github.com/ljharb/function-bind/commit/e75069c50010a8fcce2a9ce2324934c35fdb4386)
33
+ - [Dev Deps] update `@ljharb/eslint-config`, `aud`, `tape` [`d03555c`](https://github.com/ljharb/function-bind/commit/d03555ca59dea3b71ce710045e4303b9e2619e28)
34
+ - [meta] add `safe-publish-latest` [`9c8f809`](https://github.com/ljharb/function-bind/commit/9c8f8092aed027d7e80c94f517aa892385b64f09)
35
+ - [Dev Deps] update `@ljharb/eslint-config`, `tape` [`baf6893`](https://github.com/ljharb/function-bind/commit/baf6893e27f5b59abe88bc1995e6f6ed1e527397)
36
+ - [meta] create SECURITY.md [`4db1779`](https://github.com/ljharb/function-bind/commit/4db17799f1f28ae294cb95e0081ca2b591c3911b)
37
+ - [Tests] add `npm run audit` [`c8b38ec`](https://github.com/ljharb/function-bind/commit/c8b38ec40ed3f85dabdee40ed4148f1748375bc2)
38
+ - Revert "Point to the correct file" [`05cdf0f`](https://github.com/ljharb/function-bind/commit/05cdf0fa205c6a3c5ba40bbedd1dfa9874f915c9)
39
+
40
+ ## [v1.1.1](https://github.com/ljharb/function-bind/compare/v1.1.0...v1.1.1) - 2017-08-28
41
+
42
+ ### Commits
43
+
44
+ - [Tests] up to `node` `v8`; newer npm breaks on older node; fix scripts [`817f7d2`](https://github.com/ljharb/function-bind/commit/817f7d28470fdbff8ef608d4d565dd4d1430bc5e)
45
+ - [Dev Deps] update `eslint`, `jscs`, `tape`, `@ljharb/eslint-config` [`854288b`](https://github.com/ljharb/function-bind/commit/854288b1b6f5c555f89aceb9eff1152510262084)
46
+ - [Dev Deps] update `tape`, `jscs`, `eslint`, `@ljharb/eslint-config` [`83e639f`](https://github.com/ljharb/function-bind/commit/83e639ff74e6cd6921285bccec22c1bcf72311bd)
47
+ - Only apps should have lockfiles [`5ed97f5`](https://github.com/ljharb/function-bind/commit/5ed97f51235c17774e0832e122abda0f3229c908)
48
+ - Use a SPDX-compliant “license” field. [`5feefea`](https://github.com/ljharb/function-bind/commit/5feefea0dc0193993e83e5df01ded424403a5381)
49
+
50
+ ## [v1.1.0](https://github.com/ljharb/function-bind/compare/v1.0.2...v1.1.0) - 2016-02-14
51
+
52
+ ### Commits
53
+
54
+ - Update `eslint`, `tape`; use my personal shared `eslint` config [`9c9062a`](https://github.com/ljharb/function-bind/commit/9c9062abbe9dd70b59ea2c3a3c3a81f29b457097)
55
+ - Add `npm run eslint` [`dd96c56`](https://github.com/ljharb/function-bind/commit/dd96c56720034a3c1ffee10b8a59a6f7c53e24ad)
56
+ - [New] return the native `bind` when available. [`82186e0`](https://github.com/ljharb/function-bind/commit/82186e03d73e580f95ff167e03f3582bed90ed72)
57
+ - [Dev Deps] update `tape`, `jscs`, `eslint`, `@ljharb/eslint-config` [`a3dd767`](https://github.com/ljharb/function-bind/commit/a3dd76720c795cb7f4586b0544efabf8aa107b8b)
58
+ - Update `eslint` [`3dae2f7`](https://github.com/ljharb/function-bind/commit/3dae2f7423de30a2d20313ddb1edc19660142fe9)
59
+ - Update `tape`, `covert`, `jscs` [`a181eee`](https://github.com/ljharb/function-bind/commit/a181eee0cfa24eb229c6e843a971f36e060a2f6a)
60
+ - [Tests] up to `node` `v5.6`, `v4.3` [`964929a`](https://github.com/ljharb/function-bind/commit/964929a6a4ddb36fb128de2bcc20af5e4f22e1ed)
61
+ - Test up to `io.js` `v2.1` [`2be7310`](https://github.com/ljharb/function-bind/commit/2be7310f2f74886a7124ca925be411117d41d5ea)
62
+ - Update `tape`, `jscs`, `eslint`, `@ljharb/eslint-config` [`45f3d68`](https://github.com/ljharb/function-bind/commit/45f3d6865c6ca93726abcef54febe009087af101)
63
+ - [Dev Deps] update `tape`, `jscs` [`6e1340d`](https://github.com/ljharb/function-bind/commit/6e1340d94642deaecad3e717825db641af4f8b1f)
64
+ - [Tests] up to `io.js` `v3.3`, `node` `v4.1` [`d9bad2b`](https://github.com/ljharb/function-bind/commit/d9bad2b778b1b3a6dd2876087b88b3acf319f8cc)
65
+ - Update `eslint` [`935590c`](https://github.com/ljharb/function-bind/commit/935590caa024ab356102e4858e8fc315b2ccc446)
66
+ - [Dev Deps] update `jscs`, `eslint`, `@ljharb/eslint-config` [`8c9a1ef`](https://github.com/ljharb/function-bind/commit/8c9a1efd848e5167887aa8501857a0940a480c57)
67
+ - Test on `io.js` `v2.2` [`9a3a38c`](https://github.com/ljharb/function-bind/commit/9a3a38c92013aed6e108666e7bd40969b84ac86e)
68
+ - Run `travis-ci` tests on `iojs` and `node` v0.12; speed up builds; allow 0.8 failures. [`69afc26`](https://github.com/ljharb/function-bind/commit/69afc2617405b147dd2a8d8ae73ca9e9283f18b4)
69
+ - [Dev Deps] Update `tape`, `eslint` [`36c1be0`](https://github.com/ljharb/function-bind/commit/36c1be0ab12b45fe5df6b0fdb01a5d5137fd0115)
70
+ - Update `tape`, `jscs` [`98d8303`](https://github.com/ljharb/function-bind/commit/98d8303cd5ca1c6b8f985469f86b0d44d7d45f6e)
71
+ - Update `jscs` [`9633a4e`](https://github.com/ljharb/function-bind/commit/9633a4e9fbf82051c240855166e468ba8ba0846f)
72
+ - Update `tape`, `jscs` [`c80ef0f`](https://github.com/ljharb/function-bind/commit/c80ef0f46efc9791e76fa50de4414092ac147831)
73
+ - Test up to `io.js` `v3.0` [`7e2c853`](https://github.com/ljharb/function-bind/commit/7e2c8537d52ab9cf5a655755561d8917684c0df4)
74
+ - Test on `io.js` `v2.4` [`5a199a2`](https://github.com/ljharb/function-bind/commit/5a199a27ba46795ba5eaf0845d07d4b8232895c9)
75
+ - Test on `io.js` `v2.3` [`a511b88`](https://github.com/ljharb/function-bind/commit/a511b8896de0bddf3b56862daa416c701f4d0453)
76
+ - Fixing a typo from 822b4e1938db02dc9584aa434fd3a45cb20caf43 [`732d6b6`](https://github.com/ljharb/function-bind/commit/732d6b63a9b33b45230e630dbcac7a10855d3266)
77
+ - Update `jscs` [`da52a48`](https://github.com/ljharb/function-bind/commit/da52a4886c06d6490f46ae30b15e4163ba08905d)
78
+ - Lock covert to v1.0.0. [`d6150fd`](https://github.com/ljharb/function-bind/commit/d6150fda1e6f486718ebdeff823333d9e48e7430)
79
+
80
+ ## [v1.0.2](https://github.com/ljharb/function-bind/compare/v1.0.1...v1.0.2) - 2014-10-04
81
+
82
+ ## [v1.0.1](https://github.com/ljharb/function-bind/compare/v1.0.0...v1.0.1) - 2014-10-03
83
+
84
+ ### Merged
85
+
86
+ - make CI build faster [`#3`](https://github.com/ljharb/function-bind/pull/3)
87
+
88
+ ### Commits
89
+
90
+ - Using my standard jscs.json [`d8ee94c`](https://github.com/ljharb/function-bind/commit/d8ee94c993eff0a84cf5744fe6a29627f5cffa1a)
91
+ - Adding `npm run lint` [`7571ab7`](https://github.com/ljharb/function-bind/commit/7571ab7dfdbd99b25a1dbb2d232622bd6f4f9c10)
92
+ - Using consistent indentation [`e91a1b1`](https://github.com/ljharb/function-bind/commit/e91a1b13a61e99ec1e530e299b55508f74218a95)
93
+ - Updating jscs [`7e17892`](https://github.com/ljharb/function-bind/commit/7e1789284bc629bc9c1547a61c9b227bbd8c7a65)
94
+ - Using consistent quotes [`c50b57f`](https://github.com/ljharb/function-bind/commit/c50b57fcd1c5ec38320979c837006069ebe02b77)
95
+ - Adding keywords [`cb94631`](https://github.com/ljharb/function-bind/commit/cb946314eed35f21186a25fb42fc118772f9ee00)
96
+ - Directly export a function expression instead of using a declaration, and relying on hoisting. [`5a33c5f`](https://github.com/ljharb/function-bind/commit/5a33c5f45642de180e0d207110bf7d1843ceb87c)
97
+ - Naming npm URL and badge in README; use SVG [`2aef8fc`](https://github.com/ljharb/function-bind/commit/2aef8fcb79d54e63a58ae557c4e60949e05d5e16)
98
+ - Naming deps URLs in README [`04228d7`](https://github.com/ljharb/function-bind/commit/04228d766670ee45ca24e98345c1f6a7621065b5)
99
+ - Naming travis-ci URLs in README; using SVG [`62c810c`](https://github.com/ljharb/function-bind/commit/62c810c2f54ced956cd4d4ab7b793055addfe36e)
100
+ - Make sure functions are invoked correctly (also passing coverage tests) [`2b289b4`](https://github.com/ljharb/function-bind/commit/2b289b4dfbf037ffcfa4dc95eb540f6165e9e43a)
101
+ - Removing the strict mode pragmas; they make tests fail. [`1aa701d`](https://github.com/ljharb/function-bind/commit/1aa701d199ddc3782476e8f7eef82679be97b845)
102
+ - Adding myself as a contributor [`85fd57b`](https://github.com/ljharb/function-bind/commit/85fd57b0860e5a7af42de9a287f3f265fc6d72fc)
103
+ - Adding strict mode pragmas [`915b08e`](https://github.com/ljharb/function-bind/commit/915b08e084c86a722eafe7245e21db74aa21ca4c)
104
+ - Adding devDeps URLs to README [`4ccc731`](https://github.com/ljharb/function-bind/commit/4ccc73112c1769859e4ca3076caf4086b3cba2cd)
105
+ - Fixing the description. [`a7a472c`](https://github.com/ljharb/function-bind/commit/a7a472cf649af515c635cf560fc478fbe48999c8)
106
+ - Using a function expression instead of a function declaration. [`b5d3e4e`](https://github.com/ljharb/function-bind/commit/b5d3e4ea6aaffc63888953eeb1fbc7ff45f1fa14)
107
+ - Updating tape [`f086be6`](https://github.com/ljharb/function-bind/commit/f086be6029fb56dde61a258c1340600fa174d1e0)
108
+ - Updating jscs [`5f9bdb3`](https://github.com/ljharb/function-bind/commit/5f9bdb375ab13ba48f30852aab94029520c54d71)
109
+ - Updating jscs [`9b409ba`](https://github.com/ljharb/function-bind/commit/9b409ba6118e23395a4e5d83ef39152aab9d3bfc)
110
+ - Run coverage as part of tests. [`8e1b6d4`](https://github.com/ljharb/function-bind/commit/8e1b6d459f047d1bd4fee814e01247c984c80bd0)
111
+ - Run linter as part of tests [`c1ca83f`](https://github.com/ljharb/function-bind/commit/c1ca83f832df94587d09e621beba682fabfaa987)
112
+ - Updating covert [`701e837`](https://github.com/ljharb/function-bind/commit/701e83774b57b4d3ef631e1948143f43a72f4bb9)
113
+
114
+ ## [v1.0.0](https://github.com/ljharb/function-bind/compare/v0.2.0...v1.0.0) - 2014-08-09
115
+
116
+ ### Commits
117
+
118
+ - Make sure old and unstable nodes don't fail Travis [`27adca3`](https://github.com/ljharb/function-bind/commit/27adca34a4ab6ad67b6dfde43942a1b103ce4d75)
119
+ - Fixing an issue when the bound function is called as a constructor in ES3. [`e20122d`](https://github.com/ljharb/function-bind/commit/e20122d267d92ce553859b280cbbea5d27c07731)
120
+ - Adding `npm run coverage` [`a2e29c4`](https://github.com/ljharb/function-bind/commit/a2e29c4ecaef9e2f6cd1603e868c139073375502)
121
+ - Updating tape [`b741168`](https://github.com/ljharb/function-bind/commit/b741168b12b235b1717ff696087645526b69213c)
122
+ - Upgrading tape [`63631a0`](https://github.com/ljharb/function-bind/commit/63631a04c7fbe97cc2fa61829cc27246d6986f74)
123
+ - Updating tape [`363cb46`](https://github.com/ljharb/function-bind/commit/363cb46dafb23cb3e347729a22f9448051d78464)
124
+
125
+ ## v0.2.0 - 2014-03-23
126
+
127
+ ### Commits
128
+
129
+ - Updating test coverage to match es5-shim. [`aa94d44`](https://github.com/ljharb/function-bind/commit/aa94d44b8f9d7f69f10e060db7709aa7a694e5d4)
130
+ - initial [`942ee07`](https://github.com/ljharb/function-bind/commit/942ee07e94e542d91798137bc4b80b926137e066)
131
+ - Setting the bound function's length properly. [`079f46a`](https://github.com/ljharb/function-bind/commit/079f46a2d3515b7c0b308c2c13fceb641f97ca25)
132
+ - Ensuring that some older browsers will throw when given a regex. [`36ac55b`](https://github.com/ljharb/function-bind/commit/36ac55b87f460d4330253c92870aa26fbfe8227f)
133
+ - Removing npm scripts that don't have dependencies [`9d2be60`](https://github.com/ljharb/function-bind/commit/9d2be600002cb8bc8606f8f3585ad3e05868c750)
134
+ - Updating tape [`297a4ac`](https://github.com/ljharb/function-bind/commit/297a4acc5464db381940aafb194d1c88f4e678f3)
135
+ - Skipping length tests for now. [`d9891ea`](https://github.com/ljharb/function-bind/commit/d9891ea4d2aaffa69f408339cdd61ff740f70565)
136
+ - don't take my tea [`dccd930`](https://github.com/ljharb/function-bind/commit/dccd930bfd60ea10cb178d28c97550c3bc8c1e07)
@@ -1,22 +1,19 @@
1
- # function-bind
1
+ # function-bind <sup>[![Version Badge][npm-version-svg]][package-url]</sup>
2
2
 
3
- <!--
4
- [![build status][travis-svg]][travis-url]
5
- [![NPM version][npm-badge-svg]][npm-url]
6
- [![Coverage Status][5]][6]
7
- [![gemnasium Dependency Status][7]][8]
8
- [![Dependency status][deps-svg]][deps-url]
9
- [![Dev Dependency status][dev-deps-svg]][dev-deps-url]
10
- -->
3
+ [![github actions][actions-image]][actions-url]
4
+ <!--[![coverage][codecov-image]][codecov-url]-->
5
+ [![dependency status][deps-svg]][deps-url]
6
+ [![dev dependency status][dev-deps-svg]][dev-deps-url]
7
+ [![License][license-image]][license-url]
8
+ [![Downloads][downloads-image]][downloads-url]
11
9
 
12
- <!-- [![browser support][11]][12] -->
10
+ [![npm badge][npm-badge-png]][package-url]
13
11
 
14
12
  Implementation of function.prototype.bind
15
13
 
16
- ## Example
14
+ Old versions of phantomjs, Internet Explorer < 9, and node < 0.6 don't support `Function.prototype.bind`.
17
15
 
18
- I mainly do this for unit tests I run on phantomjs.
19
- PhantomJS does not have Function.prototype.bind :(
16
+ ## Example
20
17
 
21
18
  ```js
22
19
  Function.prototype.bind = require("function-bind")
@@ -32,17 +29,18 @@ Function.prototype.bind = require("function-bind")
32
29
 
33
30
  ## MIT Licenced
34
31
 
35
- [travis-svg]: https://travis-ci.org/Raynos/function-bind.svg
36
- [travis-url]: https://travis-ci.org/Raynos/function-bind
37
- [npm-badge-svg]: https://badge.fury.io/js/function-bind.svg
38
- [npm-url]: https://npmjs.org/package/function-bind
39
- [5]: https://coveralls.io/repos/Raynos/function-bind/badge.png
40
- [6]: https://coveralls.io/r/Raynos/function-bind
41
- [7]: https://gemnasium.com/Raynos/function-bind.png
42
- [8]: https://gemnasium.com/Raynos/function-bind
43
- [deps-svg]: https://david-dm.org/Raynos/function-bind.svg
44
- [deps-url]: https://david-dm.org/Raynos/function-bind
45
- [dev-deps-svg]: https://david-dm.org/Raynos/function-bind/dev-status.svg
46
- [dev-deps-url]: https://david-dm.org/Raynos/function-bind#info=devDependencies
47
- [11]: https://ci.testling.com/Raynos/function-bind.png
48
- [12]: https://ci.testling.com/Raynos/function-bind
32
+ [package-url]: https://npmjs.org/package/function-bind
33
+ [npm-version-svg]: https://versionbadg.es/Raynos/function-bind.svg
34
+ [deps-svg]: https://david-dm.org/Raynos/function-bind.svg
35
+ [deps-url]: https://david-dm.org/Raynos/function-bind
36
+ [dev-deps-svg]: https://david-dm.org/Raynos/function-bind/dev-status.svg
37
+ [dev-deps-url]: https://david-dm.org/Raynos/function-bind#info=devDependencies
38
+ [npm-badge-png]: https://nodei.co/npm/function-bind.png?downloads=true&stars=true
39
+ [license-image]: https://img.shields.io/npm/l/function-bind.svg
40
+ [license-url]: LICENSE
41
+ [downloads-image]: https://img.shields.io/npm/dm/function-bind.svg
42
+ [downloads-url]: https://npm-stat.com/charts.html?package=function-bind
43
+ [codecov-image]: https://codecov.io/gh/Raynos/function-bind/branch/main/graphs/badge.svg
44
+ [codecov-url]: https://app.codecov.io/gh/Raynos/function-bind/
45
+ [actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/Raynos/function-bind
46
+ [actions-url]: https://github.com/Raynos/function-bind/actions
@@ -3,43 +3,75 @@
3
3
  /* eslint no-invalid-this: 1 */
4
4
 
5
5
  var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';
6
- var slice = Array.prototype.slice;
7
6
  var toStr = Object.prototype.toString;
7
+ var max = Math.max;
8
8
  var funcType = '[object Function]';
9
9
 
10
+ var concatty = function concatty(a, b) {
11
+ var arr = [];
12
+
13
+ for (var i = 0; i < a.length; i += 1) {
14
+ arr[i] = a[i];
15
+ }
16
+ for (var j = 0; j < b.length; j += 1) {
17
+ arr[j + a.length] = b[j];
18
+ }
19
+
20
+ return arr;
21
+ };
22
+
23
+ var slicy = function slicy(arrLike, offset) {
24
+ var arr = [];
25
+ for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) {
26
+ arr[j] = arrLike[i];
27
+ }
28
+ return arr;
29
+ };
30
+
31
+ var joiny = function (arr, joiner) {
32
+ var str = '';
33
+ for (var i = 0; i < arr.length; i += 1) {
34
+ str += arr[i];
35
+ if (i + 1 < arr.length) {
36
+ str += joiner;
37
+ }
38
+ }
39
+ return str;
40
+ };
41
+
10
42
  module.exports = function bind(that) {
11
43
  var target = this;
12
- if (typeof target !== 'function' || toStr.call(target) !== funcType) {
44
+ if (typeof target !== 'function' || toStr.apply(target) !== funcType) {
13
45
  throw new TypeError(ERROR_MESSAGE + target);
14
46
  }
15
- var args = slice.call(arguments, 1);
47
+ var args = slicy(arguments, 1);
16
48
 
17
49
  var bound;
18
50
  var binder = function () {
19
51
  if (this instanceof bound) {
20
52
  var result = target.apply(
21
53
  this,
22
- args.concat(slice.call(arguments))
54
+ concatty(args, arguments)
23
55
  );
24
56
  if (Object(result) === result) {
25
57
  return result;
26
58
  }
27
59
  return this;
28
- } else {
29
- return target.apply(
30
- that,
31
- args.concat(slice.call(arguments))
32
- );
33
60
  }
61
+ return target.apply(
62
+ that,
63
+ concatty(args, arguments)
64
+ );
65
+
34
66
  };
35
67
 
36
- var boundLength = Math.max(0, target.length - args.length);
68
+ var boundLength = max(0, target.length - args.length);
37
69
  var boundArgs = [];
38
70
  for (var i = 0; i < boundLength; i++) {
39
- boundArgs.push('$' + i);
71
+ boundArgs[i] = '$' + i;
40
72
  }
41
73
 
42
- bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);
74
+ bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder);
43
75
 
44
76
  if (target.prototype) {
45
77
  var Empty = function Empty() {};
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "function-bind",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "description": "Implementation of Function.prototype.bind",
5
5
  "keywords": [
6
6
  "function",
@@ -9,7 +9,13 @@
9
9
  "es5"
10
10
  ],
11
11
  "author": "Raynos <raynos2@gmail.com>",
12
- "repository": "git://github.com/Raynos/function-bind.git",
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "https://github.com/Raynos/function-bind.git"
15
+ },
16
+ "funding": {
17
+ "url": "https://github.com/sponsors/ljharb"
18
+ },
13
19
  "main": "index",
14
20
  "homepage": "https://github.com/Raynos/function-bind",
15
21
  "contributors": [
@@ -25,24 +31,29 @@
25
31
  "url": "https://github.com/Raynos/function-bind/issues",
26
32
  "email": "raynos2@gmail.com"
27
33
  },
28
- "dependencies": {},
29
34
  "devDependencies": {
30
- "@ljharb/eslint-config": "^12.2.1",
31
- "covert": "^1.1.0",
32
- "eslint": "^4.5.0",
33
- "jscs": "^3.0.7",
34
- "tape": "^4.8.0"
35
+ "@ljharb/eslint-config": "^21.1.0",
36
+ "aud": "^2.0.3",
37
+ "auto-changelog": "^2.4.0",
38
+ "eslint": "=8.8.0",
39
+ "in-publish": "^2.0.1",
40
+ "npmignore": "^0.3.0",
41
+ "nyc": "^10.3.2",
42
+ "safe-publish-latest": "^2.0.0",
43
+ "tape": "^5.7.1"
35
44
  },
36
45
  "license": "MIT",
37
46
  "scripts": {
47
+ "prepublishOnly": "safe-publish-latest",
48
+ "prepublish": "not-in-publish || npm run prepublishOnly",
49
+ "prepack": "npmignore --auto --commentLines=autogenerated",
38
50
  "pretest": "npm run lint",
39
51
  "test": "npm run tests-only",
40
- "posttest": "npm run coverage -- --quiet",
41
- "tests-only": "node test",
42
- "coverage": "covert test/*.js",
43
- "lint": "npm run jscs && npm run eslint",
44
- "jscs": "jscs *.js */*.js",
45
- "eslint": "eslint *.js */*.js"
52
+ "posttest": "aud --production",
53
+ "tests-only": "nyc tape 'test/**/*.js'",
54
+ "lint": "eslint --ext=js,mjs .",
55
+ "version": "auto-changelog && git add CHANGELOG.md",
56
+ "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
46
57
  },
47
58
  "testling": {
48
59
  "files": "test/index.js",
@@ -59,5 +70,18 @@
59
70
  "iphone/6.0..latest",
60
71
  "android-browser/4.2..latest"
61
72
  ]
73
+ },
74
+ "auto-changelog": {
75
+ "output": "CHANGELOG.md",
76
+ "template": "keepachangelog",
77
+ "unreleased": false,
78
+ "commitLimit": false,
79
+ "backfillLimit": false,
80
+ "hideCredit": true
81
+ },
82
+ "publishConfig": {
83
+ "ignore": [
84
+ ".github/workflows"
85
+ ]
62
86
  }
63
87
  }
package/package.json CHANGED
@@ -55,7 +55,7 @@
55
55
  "jsii-pacmak": "^1.90.0",
56
56
  "jsii-rosetta": "1.x",
57
57
  "npm-check-updates": "^16",
58
- "projen": "0.74.9",
58
+ "projen": "0.74.11",
59
59
  "standard-version": "^9",
60
60
  "ts-jest": "^27",
61
61
  "typescript": "^4.9"
@@ -87,7 +87,7 @@
87
87
  ],
88
88
  "main": "lib/index.js",
89
89
  "license": "Apache-2.0",
90
- "version": "2.0.642",
90
+ "version": "2.0.644",
91
91
  "jest": {
92
92
  "testMatch": [
93
93
  "<rootDir>/src/**/__tests__/**/*.ts?(x)",
@@ -1,20 +0,0 @@
1
- root = true
2
-
3
- [*]
4
- indent_style = tab
5
- indent_size = 4
6
- end_of_line = lf
7
- charset = utf-8
8
- trim_trailing_whitespace = true
9
- insert_final_newline = true
10
- max_line_length = 120
11
-
12
- [CHANGELOG.md]
13
- indent_style = space
14
- indent_size = 2
15
-
16
- [*.json]
17
- max_line_length = off
18
-
19
- [Makefile]
20
- max_line_length = off
@@ -1,176 +0,0 @@
1
- {
2
- "es3": true,
3
-
4
- "additionalRules": [],
5
-
6
- "requireSemicolons": true,
7
-
8
- "disallowMultipleSpaces": true,
9
-
10
- "disallowIdentifierNames": [],
11
-
12
- "requireCurlyBraces": {
13
- "allExcept": [],
14
- "keywords": ["if", "else", "for", "while", "do", "try", "catch"]
15
- },
16
-
17
- "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch", "function"],
18
-
19
- "disallowSpaceAfterKeywords": [],
20
-
21
- "disallowSpaceBeforeComma": true,
22
- "disallowSpaceAfterComma": false,
23
- "disallowSpaceBeforeSemicolon": true,
24
-
25
- "disallowNodeTypes": [
26
- "DebuggerStatement",
27
- "ForInStatement",
28
- "LabeledStatement",
29
- "SwitchCase",
30
- "SwitchStatement",
31
- "WithStatement"
32
- ],
33
-
34
- "requireObjectKeysOnNewLine": { "allExcept": ["sameLine"] },
35
-
36
- "requireSpacesInAnonymousFunctionExpression": { "beforeOpeningRoundBrace": true, "beforeOpeningCurlyBrace": true },
37
- "requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true },
38
- "disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true },
39
- "requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true },
40
- "disallowSpacesInFunctionDeclaration": { "beforeOpeningRoundBrace": true },
41
-
42
- "requireSpaceBetweenArguments": true,
43
-
44
- "disallowSpacesInsideParentheses": true,
45
-
46
- "disallowSpacesInsideArrayBrackets": true,
47
-
48
- "disallowQuotedKeysInObjects": { "allExcept": ["reserved"] },
49
-
50
- "disallowSpaceAfterObjectKeys": true,
51
-
52
- "requireCommaBeforeLineBreak": true,
53
-
54
- "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"],
55
- "requireSpaceAfterPrefixUnaryOperators": [],
56
-
57
- "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"],
58
- "requireSpaceBeforePostfixUnaryOperators": [],
59
-
60
- "disallowSpaceBeforeBinaryOperators": [],
61
- "requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="],
62
-
63
- "requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="],
64
- "disallowSpaceAfterBinaryOperators": [],
65
-
66
- "disallowImplicitTypeConversion": ["binary", "string"],
67
-
68
- "disallowKeywords": ["with", "eval"],
69
-
70
- "requireKeywordsOnNewLine": [],
71
- "disallowKeywordsOnNewLine": ["else"],
72
-
73
- "requireLineFeedAtFileEnd": true,
74
-
75
- "disallowTrailingWhitespace": true,
76
-
77
- "disallowTrailingComma": true,
78
-
79
- "excludeFiles": ["node_modules/**", "vendor/**"],
80
-
81
- "disallowMultipleLineStrings": true,
82
-
83
- "requireDotNotation": { "allExcept": ["keywords"] },
84
-
85
- "requireParenthesesAroundIIFE": true,
86
-
87
- "validateLineBreaks": "LF",
88
-
89
- "validateQuoteMarks": {
90
- "escape": true,
91
- "mark": "'"
92
- },
93
-
94
- "disallowOperatorBeforeLineBreak": [],
95
-
96
- "requireSpaceBeforeKeywords": [
97
- "do",
98
- "for",
99
- "if",
100
- "else",
101
- "switch",
102
- "case",
103
- "try",
104
- "catch",
105
- "finally",
106
- "while",
107
- "with",
108
- "return"
109
- ],
110
-
111
- "validateAlignedFunctionParameters": {
112
- "lineBreakAfterOpeningBraces": true,
113
- "lineBreakBeforeClosingBraces": true
114
- },
115
-
116
- "requirePaddingNewLinesBeforeExport": true,
117
-
118
- "validateNewlineAfterArrayElements": {
119
- "maximum": 8
120
- },
121
-
122
- "requirePaddingNewLinesAfterUseStrict": true,
123
-
124
- "disallowArrowFunctions": true,
125
-
126
- "disallowMultiLineTernary": true,
127
-
128
- "validateOrderInObjectKeys": "asc-insensitive",
129
-
130
- "disallowIdenticalDestructuringNames": true,
131
-
132
- "disallowNestedTernaries": { "maxLevel": 1 },
133
-
134
- "requireSpaceAfterComma": { "allExcept": ["trailing"] },
135
- "requireAlignedMultilineParams": false,
136
-
137
- "requireSpacesInGenerator": {
138
- "afterStar": true
139
- },
140
-
141
- "disallowSpacesInGenerator": {
142
- "beforeStar": true
143
- },
144
-
145
- "disallowVar": false,
146
-
147
- "requireArrayDestructuring": false,
148
-
149
- "requireEnhancedObjectLiterals": false,
150
-
151
- "requireObjectDestructuring": false,
152
-
153
- "requireEarlyReturn": false,
154
-
155
- "requireCapitalizedConstructorsNew": {
156
- "allExcept": ["Function", "String", "Object", "Symbol", "Number", "Date", "RegExp", "Error", "Boolean", "Array"]
157
- },
158
-
159
- "requireImportAlphabetized": false,
160
-
161
- "requireSpaceBeforeObjectValues": true,
162
- "requireSpaceBeforeDestructuredValues": true,
163
-
164
- "disallowSpacesInsideTemplateStringPlaceholders": true,
165
-
166
- "disallowArrayDestructuringReturn": false,
167
-
168
- "requireNewlineBeforeSingleStatementsInIf": false,
169
-
170
- "disallowUnusedVariables": true,
171
-
172
- "requireSpacesInsideImportedObjectBraces": true,
173
-
174
- "requireUseStrict": true
175
- }
176
-
@@ -1,22 +0,0 @@
1
- # gitignore
2
- .DS_Store
3
- .monitor
4
- .*.swp
5
- .nodemonignore
6
- releases
7
- *.log
8
- *.err
9
- fleet.json
10
- public/browserify
11
- bin/*.json
12
- .bin
13
- build
14
- compile
15
- .lock-wscript
16
- coverage
17
- node_modules
18
-
19
- # Only apps should have lockfiles
20
- npm-shrinkwrap.json
21
- package-lock.json
22
- yarn.lock
@@ -1,168 +0,0 @@
1
- language: node_js
2
- os:
3
- - linux
4
- node_js:
5
- - "8.4"
6
- - "7.10"
7
- - "6.11"
8
- - "5.12"
9
- - "4.8"
10
- - "iojs-v3.3"
11
- - "iojs-v2.5"
12
- - "iojs-v1.8"
13
- - "0.12"
14
- - "0.10"
15
- - "0.8"
16
- before_install:
17
- - 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ]; then npm install -g npm@1.3 ; elif [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then case "$(npm --version)" in 1.*) npm install -g npm@1.4.28 ;; 2.*) npm install -g npm@2 ;; esac ; fi'
18
- - 'if [ "${TRAVIS_NODE_VERSION}" != "0.6" ] && [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then if [ "${TRAVIS_NODE_VERSION%${TRAVIS_NODE_VERSION#[0-9]}}" = "0" ] || [ "${TRAVIS_NODE_VERSION:0:4}" = "iojs" ]; then npm install -g npm@4.5 ; else npm install -g npm; fi; fi'
19
- install:
20
- - 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ]; then nvm install 0.8 && npm install -g npm@1.3 && npm install -g npm@1.4.28 && npm install -g npm@2 && npm install && nvm use "${TRAVIS_NODE_VERSION}"; else npm install; fi;'
21
- script:
22
- - 'if [ -n "${PRETEST-}" ]; then npm run pretest ; fi'
23
- - 'if [ -n "${POSTTEST-}" ]; then npm run posttest ; fi'
24
- - 'if [ -n "${COVERAGE-}" ]; then npm run coverage ; fi'
25
- - 'if [ -n "${TEST-}" ]; then npm run tests-only ; fi'
26
- sudo: false
27
- env:
28
- - TEST=true
29
- matrix:
30
- fast_finish: true
31
- include:
32
- - node_js: "node"
33
- env: PRETEST=true
34
- - node_js: "4"
35
- env: COVERAGE=true
36
- - node_js: "8.3"
37
- env: TEST=true ALLOW_FAILURE=true
38
- - node_js: "8.2"
39
- env: TEST=true ALLOW_FAILURE=true
40
- - node_js: "8.1"
41
- env: TEST=true ALLOW_FAILURE=true
42
- - node_js: "8.0"
43
- env: TEST=true ALLOW_FAILURE=true
44
- - node_js: "7.9"
45
- env: TEST=true ALLOW_FAILURE=true
46
- - node_js: "7.8"
47
- env: TEST=true ALLOW_FAILURE=true
48
- - node_js: "7.7"
49
- env: TEST=true ALLOW_FAILURE=true
50
- - node_js: "7.6"
51
- env: TEST=true ALLOW_FAILURE=true
52
- - node_js: "7.5"
53
- env: TEST=true ALLOW_FAILURE=true
54
- - node_js: "7.4"
55
- env: TEST=true ALLOW_FAILURE=true
56
- - node_js: "7.3"
57
- env: TEST=true ALLOW_FAILURE=true
58
- - node_js: "7.2"
59
- env: TEST=true ALLOW_FAILURE=true
60
- - node_js: "7.1"
61
- env: TEST=true ALLOW_FAILURE=true
62
- - node_js: "7.0"
63
- env: TEST=true ALLOW_FAILURE=true
64
- - node_js: "6.10"
65
- env: TEST=true ALLOW_FAILURE=true
66
- - node_js: "6.9"
67
- env: TEST=true ALLOW_FAILURE=true
68
- - node_js: "6.8"
69
- env: TEST=true ALLOW_FAILURE=true
70
- - node_js: "6.7"
71
- env: TEST=true ALLOW_FAILURE=true
72
- - node_js: "6.6"
73
- env: TEST=true ALLOW_FAILURE=true
74
- - node_js: "6.5"
75
- env: TEST=true ALLOW_FAILURE=true
76
- - node_js: "6.4"
77
- env: TEST=true ALLOW_FAILURE=true
78
- - node_js: "6.3"
79
- env: TEST=true ALLOW_FAILURE=true
80
- - node_js: "6.2"
81
- env: TEST=true ALLOW_FAILURE=true
82
- - node_js: "6.1"
83
- env: TEST=true ALLOW_FAILURE=true
84
- - node_js: "6.0"
85
- env: TEST=true ALLOW_FAILURE=true
86
- - node_js: "5.11"
87
- env: TEST=true ALLOW_FAILURE=true
88
- - node_js: "5.10"
89
- env: TEST=true ALLOW_FAILURE=true
90
- - node_js: "5.9"
91
- env: TEST=true ALLOW_FAILURE=true
92
- - node_js: "5.8"
93
- env: TEST=true ALLOW_FAILURE=true
94
- - node_js: "5.7"
95
- env: TEST=true ALLOW_FAILURE=true
96
- - node_js: "5.6"
97
- env: TEST=true ALLOW_FAILURE=true
98
- - node_js: "5.5"
99
- env: TEST=true ALLOW_FAILURE=true
100
- - node_js: "5.4"
101
- env: TEST=true ALLOW_FAILURE=true
102
- - node_js: "5.3"
103
- env: TEST=true ALLOW_FAILURE=true
104
- - node_js: "5.2"
105
- env: TEST=true ALLOW_FAILURE=true
106
- - node_js: "5.1"
107
- env: TEST=true ALLOW_FAILURE=true
108
- - node_js: "5.0"
109
- env: TEST=true ALLOW_FAILURE=true
110
- - node_js: "4.7"
111
- env: TEST=true ALLOW_FAILURE=true
112
- - node_js: "4.6"
113
- env: TEST=true ALLOW_FAILURE=true
114
- - node_js: "4.5"
115
- env: TEST=true ALLOW_FAILURE=true
116
- - node_js: "4.4"
117
- env: TEST=true ALLOW_FAILURE=true
118
- - node_js: "4.3"
119
- env: TEST=true ALLOW_FAILURE=true
120
- - node_js: "4.2"
121
- env: TEST=true ALLOW_FAILURE=true
122
- - node_js: "4.1"
123
- env: TEST=true ALLOW_FAILURE=true
124
- - node_js: "4.0"
125
- env: TEST=true ALLOW_FAILURE=true
126
- - node_js: "iojs-v3.2"
127
- env: TEST=true ALLOW_FAILURE=true
128
- - node_js: "iojs-v3.1"
129
- env: TEST=true ALLOW_FAILURE=true
130
- - node_js: "iojs-v3.0"
131
- env: TEST=true ALLOW_FAILURE=true
132
- - node_js: "iojs-v2.4"
133
- env: TEST=true ALLOW_FAILURE=true
134
- - node_js: "iojs-v2.3"
135
- env: TEST=true ALLOW_FAILURE=true
136
- - node_js: "iojs-v2.2"
137
- env: TEST=true ALLOW_FAILURE=true
138
- - node_js: "iojs-v2.1"
139
- env: TEST=true ALLOW_FAILURE=true
140
- - node_js: "iojs-v2.0"
141
- env: TEST=true ALLOW_FAILURE=true
142
- - node_js: "iojs-v1.7"
143
- env: TEST=true ALLOW_FAILURE=true
144
- - node_js: "iojs-v1.6"
145
- env: TEST=true ALLOW_FAILURE=true
146
- - node_js: "iojs-v1.5"
147
- env: TEST=true ALLOW_FAILURE=true
148
- - node_js: "iojs-v1.4"
149
- env: TEST=true ALLOW_FAILURE=true
150
- - node_js: "iojs-v1.3"
151
- env: TEST=true ALLOW_FAILURE=true
152
- - node_js: "iojs-v1.2"
153
- env: TEST=true ALLOW_FAILURE=true
154
- - node_js: "iojs-v1.1"
155
- env: TEST=true ALLOW_FAILURE=true
156
- - node_js: "iojs-v1.0"
157
- env: TEST=true ALLOW_FAILURE=true
158
- - node_js: "0.11"
159
- env: TEST=true ALLOW_FAILURE=true
160
- - node_js: "0.9"
161
- env: TEST=true ALLOW_FAILURE=true
162
- - node_js: "0.6"
163
- env: TEST=true ALLOW_FAILURE=true
164
- - node_js: "0.4"
165
- env: TEST=true ALLOW_FAILURE=true
166
- allow_failures:
167
- - os: osx
168
- - env: TEST=true ALLOW_FAILURE=true