diff --git a/node_modules/onetime/index.d.ts b/node_modules/onetime/index.d.ts
index ea84caba32..3c80803f99 100644
--- a/node_modules/onetime/index.d.ts
+++ b/node_modules/onetime/index.d.ts
@@ -1,12 +1,10 @@
-declare namespace onetime {
- interface Options {
- /**
- Throw an error when called more than once.
+export interface Options {
+ /**
+ Throw an error when called more than once.
- @default false
- */
- throw?: boolean;
- }
+ @default false
+ */
+ readonly throw?: boolean;
}
declare const onetime: {
@@ -18,11 +16,11 @@ declare const onetime: {
@example
```
- import onetime = require('onetime');
+ import onetime from 'onetime';
- let i = 0;
+ let index = 0;
- const foo = onetime(() => ++i);
+ const foo = onetime(() => ++index);
foo(); //=> 1
foo(); //=> 1
@@ -33,7 +31,7 @@ declare const onetime: {
*/
(
fn: (...arguments: ArgumentsType) => ReturnType,
- options?: onetime.Options
+ options?: Options
): (...arguments: ArgumentsType) => ReturnType;
/**
@@ -44,7 +42,7 @@ declare const onetime: {
@example
```
- import onetime = require('onetime');
+ import onetime from 'onetime';
const foo = onetime(() => {});
foo();
@@ -56,9 +54,6 @@ declare const onetime: {
```
*/
callCount(fn: (...arguments: any[]) => unknown): number;
-
- // TODO: Remove this for the next major release
- default: typeof onetime;
};
-export = onetime;
+export default onetime;
diff --git a/node_modules/onetime/index.js b/node_modules/onetime/index.js
index 99c5fc1cb4..eae4f33e4c 100644
--- a/node_modules/onetime/index.js
+++ b/node_modules/onetime/index.js
@@ -1,5 +1,4 @@
-'use strict';
-const mimicFn = require('mimic-fn');
+import mimicFunction from 'mimic-fn';
const calledFunctions = new WeakMap();
@@ -25,20 +24,18 @@ const onetime = (function_, options = {}) => {
return returnValue;
};
- mimicFn(onetime, function_);
+ mimicFunction(onetime, function_);
calledFunctions.set(onetime, callCount);
return onetime;
};
-module.exports = onetime;
-// TODO: Remove this for the next major release
-module.exports.default = onetime;
-
-module.exports.callCount = function_ => {
+onetime.callCount = function_ => {
if (!calledFunctions.has(function_)) {
throw new Error(`The given function \`${function_.name}\` is not wrapped by the \`onetime\` package`);
}
return calledFunctions.get(function_);
};
+
+export default onetime;
diff --git a/node_modules/onetime/package.json b/node_modules/onetime/package.json
index c4fe4e245d..367a963495 100644
--- a/node_modules/onetime/package.json
+++ b/node_modules/onetime/package.json
@@ -1,6 +1,6 @@
{
"name": "onetime",
- "version": "5.1.2",
+ "version": "6.0.0",
"description": "Ensure a function is only called once",
"license": "MIT",
"repository": "sindresorhus/onetime",
@@ -10,8 +10,10 @@
"email": "sindresorhus@gmail.com",
"url": "https://sindresorhus.com"
},
+ "type": "module",
+ "exports": "./index.js",
"engines": {
- "node": ">=6"
+ "node": ">=12"
},
"scripts": {
"test": "xo && ava && tsd"
@@ -33,11 +35,11 @@
"prevent"
],
"dependencies": {
- "mimic-fn": "^2.1.0"
+ "mimic-fn": "^4.0.0"
},
"devDependencies": {
- "ava": "^1.4.1",
- "tsd": "^0.7.1",
- "xo": "^0.24.0"
+ "ava": "^3.15.0",
+ "tsd": "^0.14.0",
+ "xo": "^0.38.2"
}
}
diff --git a/node_modules/onetime/readme.md b/node_modules/onetime/readme.md
index 2d133d3a09..e2b26fb3d3 100644
--- a/node_modules/onetime/readme.md
+++ b/node_modules/onetime/readme.md
@@ -1,4 +1,4 @@
-# onetime [![Build Status](https://travis-ci.com/sindresorhus/onetime.svg?branch=master)](https://travis-ci.com/github/sindresorhus/onetime)
+# onetime
> Ensure a function is only called once
@@ -15,11 +15,11 @@ $ npm install onetime
## Usage
```js
-const onetime = require('onetime');
+import onetime from 'onetime';
-let i = 0;
+let index = 0;
-const foo = onetime(() => ++i);
+const foo = onetime(() => ++index);
foo(); //=> 1
foo(); //=> 1
@@ -29,7 +29,7 @@ onetime.callCount(foo); //=> 3
```
```js
-const onetime = require('onetime');
+import onetime from 'onetime';
const foo = onetime(() => {}, {throw: true});
@@ -69,7 +69,7 @@ Returns a number representing how many times `fn` has been called.
Note: It throws an error if you pass in a function that is not wrapped by `onetime`.
```js
-const onetime = require('onetime');
+import onetime from 'onetime';
const foo = onetime(() => {});
diff --git a/node_modules/strip-final-newline/index.js b/node_modules/strip-final-newline/index.js
index 78fc0c5939..034b56f865 100644
--- a/node_modules/strip-final-newline/index.js
+++ b/node_modules/strip-final-newline/index.js
@@ -1,16 +1,14 @@
-'use strict';
-
-module.exports = input => {
+export default function stripFinalNewline(input) {
const LF = typeof input === 'string' ? '\n' : '\n'.charCodeAt();
const CR = typeof input === 'string' ? '\r' : '\r'.charCodeAt();
if (input[input.length - 1] === LF) {
- input = input.slice(0, input.length - 1);
+ input = input.slice(0, -1);
}
if (input[input.length - 1] === CR) {
- input = input.slice(0, input.length - 1);
+ input = input.slice(0, -1);
}
return input;
-};
+}
diff --git a/node_modules/strip-final-newline/license b/node_modules/strip-final-newline/license
index e7af2f7710..fa7ceba3eb 100644
--- a/node_modules/strip-final-newline/license
+++ b/node_modules/strip-final-newline/license
@@ -1,6 +1,6 @@
MIT License
-Copyright (c) Sindre Sorhus (sindresorhus.com)
+Copyright (c) Sindre Sorhus (https://sindresorhus.com)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
diff --git a/node_modules/strip-final-newline/package.json b/node_modules/strip-final-newline/package.json
index 40b7e802c9..23ac8622e4 100644
--- a/node_modules/strip-final-newline/package.json
+++ b/node_modules/strip-final-newline/package.json
@@ -1,16 +1,19 @@
{
"name": "strip-final-newline",
- "version": "2.0.0",
+ "version": "3.0.0",
"description": "Strip the final newline character from a string/buffer",
"license": "MIT",
"repository": "sindresorhus/strip-final-newline",
+ "funding": "https://github.com/sponsors/sindresorhus",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
- "url": "sindresorhus.com"
+ "url": "https://sindresorhus.com"
},
+ "type": "module",
+ "exports": "./index.js",
"engines": {
- "node": ">=6"
+ "node": ">=12"
},
"scripts": {
"test": "xo && ava"
@@ -34,7 +37,7 @@
"buffer"
],
"devDependencies": {
- "ava": "^0.25.0",
- "xo": "^0.23.0"
+ "ava": "^3.15.0",
+ "xo": "^0.39.1"
}
}
diff --git a/node_modules/strip-final-newline/readme.md b/node_modules/strip-final-newline/readme.md
index 32dfd50904..8d9090b64f 100644
--- a/node_modules/strip-final-newline/readme.md
+++ b/node_modules/strip-final-newline/readme.md
@@ -1,21 +1,19 @@
-# strip-final-newline [![Build Status](https://travis-ci.com/sindresorhus/strip-final-newline.svg?branch=master)](https://travis-ci.com/sindresorhus/strip-final-newline)
+# strip-final-newline
> Strip the final [newline character](https://en.wikipedia.org/wiki/Newline) from a string/buffer
Can be useful when parsing the output of, for example, `ChildProcess#execFile`, as [binaries usually output a newline at the end](https://stackoverflow.com/questions/729692/why-should-text-files-end-with-a-newline). Normally, you would use `stdout.trim()`, but that would also remove newlines at the start and whitespace.
-
## Install
```
$ npm install strip-final-newline
```
-
## Usage
```js
-const stripFinalNewline = require('strip-final-newline');
+import stripFinalNewline from 'strip-final-newline';
stripFinalNewline('foo\nbar\n\n');
//=> 'foo\nbar\n'
@@ -24,7 +22,14 @@ stripFinalNewline(Buffer.from('foo\nbar\n\n')).toString();
//=> 'foo\nbar\n'
```
-
-## License
-
-MIT © [Sindre Sorhus](https://sindresorhus.com)
+---
+
+
diff --git a/package-lock.json b/package-lock.json
index 3c8ef940bc..155ccffb64 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -40,7 +40,7 @@
"zlib": "^1.0.5"
},
"devDependencies": {
- "@ava/typescript": "3.0.1",
+ "@ava/typescript": "4.0.0",
"@types/adm-zip": "^0.5.0",
"@types/get-folder-size": "^2.0.0",
"@types/js-yaml": "^4.0.5",
@@ -201,16 +201,16 @@
}
},
"node_modules/@ava/typescript": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/@ava/typescript/-/typescript-3.0.1.tgz",
- "integrity": "sha512-/JXIUuKsvkaneaiA9ckk3ksFTqvu0mDNlChASrTe2BnDsvMbhQdPWyqQjJ9WRJWVhhs5TWn1/0Pp1G6Rv8Syrw==",
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/@ava/typescript/-/typescript-4.0.0.tgz",
+ "integrity": "sha512-QFIPeqkEbdvn7Pob0wVeYpeZD0eXd8nDYdCl+knJVaIJrHdF2fXa58vFaig26cmYwnsEN0KRNTYJKbqW1B0lfg==",
"dev": true,
"dependencies": {
"escape-string-regexp": "^5.0.0",
- "execa": "^5.1.1"
+ "execa": "^7.1.0"
},
"engines": {
- "node": ">=12.22 <13 || >=14.17 <15 || >=16.4 <17 || >=17"
+ "node": ">=14.19 <15 || >=16.15 <17 || >=18"
}
},
"node_modules/@ava/typescript/node_modules/escape-string-regexp": {
@@ -3102,40 +3102,28 @@
}
},
"node_modules/execa": {
- "version": "5.1.1",
- "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz",
- "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==",
+ "version": "7.1.0",
+ "resolved": "https://registry.npmjs.org/execa/-/execa-7.1.0.tgz",
+ "integrity": "sha512-T6nIJO3LHxUZ6ahVRaxXz9WLEruXLqdcluA+UuTptXmLM7nDAn9lx9IfkxPyzEL21583qSt4RmL44pO71EHaJQ==",
"dev": true,
"dependencies": {
"cross-spawn": "^7.0.3",
- "get-stream": "^6.0.0",
- "human-signals": "^2.1.0",
- "is-stream": "^2.0.0",
+ "get-stream": "^6.0.1",
+ "human-signals": "^4.3.0",
+ "is-stream": "^3.0.0",
"merge-stream": "^2.0.0",
- "npm-run-path": "^4.0.1",
- "onetime": "^5.1.2",
- "signal-exit": "^3.0.3",
- "strip-final-newline": "^2.0.0"
+ "npm-run-path": "^5.1.0",
+ "onetime": "^6.0.0",
+ "signal-exit": "^3.0.7",
+ "strip-final-newline": "^3.0.0"
},
"engines": {
- "node": ">=10"
+ "node": "^14.18.0 || ^16.14.0 || >=18.0.0"
},
"funding": {
"url": "https://github.com/sindresorhus/execa?sponsor=1"
}
},
- "node_modules/execa/node_modules/get-stream": {
- "version": "6.0.1",
- "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz",
- "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==",
- "dev": true,
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
"node_modules/fast-deep-equal": {
"version": "3.1.3",
"integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q=="
@@ -3387,6 +3375,18 @@
"url": "https://github.com/sponsors/ljharb"
}
},
+ "node_modules/get-stream": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz",
+ "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==",
+ "dev": true,
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
"node_modules/get-symbol-description": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz",
@@ -3619,12 +3619,12 @@
}
},
"node_modules/human-signals": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz",
- "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==",
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-4.3.0.tgz",
+ "integrity": "sha512-zyzVyMjpGBX2+6cDVZeFPCdtOtdsxOeseRhB9tkQ6xXmGUNrcnBzdEKPy3VPNYz+4gy1oukVOXcrJCunSyc6QQ==",
"dev": true,
"engines": {
- "node": ">=10.17.0"
+ "node": ">=14.18.0"
}
},
"node_modules/ignore": {
@@ -3998,12 +3998,12 @@
}
},
"node_modules/is-stream": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz",
- "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==",
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz",
+ "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==",
"dev": true,
"engines": {
- "node": ">=8"
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
@@ -4400,18 +4400,6 @@
"url": "https://github.com/sindresorhus/mem?sponsor=1"
}
},
- "node_modules/mem/node_modules/mimic-fn": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz",
- "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==",
- "dev": true,
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
"node_modules/merge-stream": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz",
@@ -4458,11 +4446,15 @@
}
},
"node_modules/mimic-fn": {
- "version": "2.1.0",
- "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==",
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz",
+ "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==",
"dev": true,
"engines": {
- "node": ">=6"
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/minimatch": {
@@ -4599,15 +4591,30 @@
}
},
"node_modules/npm-run-path": {
- "version": "4.0.1",
- "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz",
- "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==",
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.1.0.tgz",
+ "integrity": "sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q==",
"dev": true,
"dependencies": {
- "path-key": "^3.0.0"
+ "path-key": "^4.0.0"
},
"engines": {
- "node": ">=8"
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/npm-run-path/node_modules/path-key": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz",
+ "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/object-inspect": {
@@ -4718,15 +4725,15 @@
}
},
"node_modules/onetime": {
- "version": "5.1.2",
- "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz",
- "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==",
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz",
+ "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==",
"dev": true,
"dependencies": {
- "mimic-fn": "^2.1.0"
+ "mimic-fn": "^4.0.0"
},
"engines": {
- "node": ">=6"
+ "node": ">=12"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
@@ -5563,12 +5570,15 @@
}
},
"node_modules/strip-final-newline": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz",
- "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==",
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz",
+ "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==",
"dev": true,
"engines": {
- "node": ">=6"
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/strip-json-comments": {
diff --git a/package.json b/package.json
index 3c57d73568..7465804922 100644
--- a/package.json
+++ b/package.json
@@ -55,7 +55,7 @@
"micromatch is an unspecified dependency of ava"
],
"devDependencies": {
- "@ava/typescript": "3.0.1",
+ "@ava/typescript": "4.0.0",
"@types/adm-zip": "^0.5.0",
"@types/get-folder-size": "^2.0.0",
"@types/js-yaml": "^4.0.5",