Update node_modules

This commit is contained in:
crazy-max
2020-04-03 08:12:31 +00:00
parent c5091ccc7b
commit 4bcd932c28
129 changed files with 5485 additions and 3646 deletions

30
node_modules/filenamify/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,30 @@
export interface Options {
/**
* String to use as replacement for reserved filename characters.
*
* Cannot contain: `<` `>` `:` `"` `/` `\` `|` `?` `*`
*
* @default '!'
*/
readonly replacement?: string;
}
/**
* Accepts a filename and returns a valid filename.
*
* @param input - A string to convert to a valid filename.
*/
export interface Filenamify {
(input: string, options?: Options): string;
/**
* Accepts a path and returns the path with a valid filename.
*
* @param input - A string to convert to a valid path with a filename.
*/
path(input: string, options?: Options): string;
}
declare const filenamify: Filenamify;
export default filenamify;

13
node_modules/filenamify/index.js generated vendored
View File

@@ -10,13 +10,11 @@ const MAX_FILENAME_LENGTH = 100;
const reControlChars = /[\u0000-\u001f\u0080-\u009f]/g; // eslint-disable-line no-control-regex
const reRelativePath = /^\.+/;
const fn = (string, options) => {
const filenamify = (string, options = {}) => {
if (typeof string !== 'string') {
throw new TypeError('Expected a string');
}
options = options || {};
const replacement = options.replacement === undefined ? '!' : options.replacement;
if (filenameReservedRegex().test(replacement) && reControlChars.test(replacement)) {
@@ -38,9 +36,10 @@ const fn = (string, options) => {
return string;
};
fn.path = (pth, options) => {
pth = path.resolve(pth);
return path.join(path.dirname(pth), fn(path.basename(pth), options));
filenamify.path = (filePath, options) => {
filePath = path.resolve(filePath);
return path.join(path.dirname(filePath), filenamify(path.basename(filePath), options));
};
module.exports = fn;
module.exports = filenamify;
module.exports.default = filenamify;

32
node_modules/filenamify/package.json generated vendored
View File

@@ -1,31 +1,31 @@
{
"_args": [
[
"filenamify@2.1.0",
"filenamify@3.0.0",
"/home/runner/work/ghaction-upx/ghaction-upx"
]
],
"_from": "filenamify@2.1.0",
"_id": "filenamify@2.1.0",
"_from": "filenamify@3.0.0",
"_id": "filenamify@3.0.0",
"_inBundle": false,
"_integrity": "sha512-ICw7NTT6RsDp2rnYKVd8Fu4cr6ITzGy3+u4vUujPkabyaz+03F24NWEX7fs5fp+kBonlaqPH8fAO2NM+SXt/JA==",
"_integrity": "sha512-5EFZ//MsvJgXjBAFJ+Bh2YaCTRF/VP1YOmGrgt+KJ4SFRLjI87EIdwLLuT6wQX0I4F9W41xutobzczjsOKlI/g==",
"_location": "/filenamify",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "filenamify@2.1.0",
"raw": "filenamify@3.0.0",
"name": "filenamify",
"escapedName": "filenamify",
"rawSpec": "2.1.0",
"rawSpec": "3.0.0",
"saveSpec": null,
"fetchSpec": "2.1.0"
"fetchSpec": "3.0.0"
},
"_requiredBy": [
"/download"
],
"_resolved": "https://registry.npmjs.org/filenamify/-/filenamify-2.1.0.tgz",
"_spec": "2.1.0",
"_resolved": "https://registry.npmjs.org/filenamify/-/filenamify-3.0.0.tgz",
"_spec": "3.0.0",
"_where": "/home/runner/work/ghaction-upx/ghaction-upx",
"author": {
"name": "Sindre Sorhus",
@@ -42,14 +42,16 @@
},
"description": "Convert a string to a valid safe filename",
"devDependencies": {
"ava": "*",
"xo": "*"
"ava": "^1.3.1",
"tsd-check": "^0.3.0",
"xo": "^0.24.0"
},
"engines": {
"node": ">=4"
"node": ">=6"
},
"files": [
"index.js"
"index.js",
"index.d.ts"
],
"homepage": "https://github.com/sindresorhus/filenamify#readme",
"keywords": [
@@ -72,7 +74,7 @@
"url": "git+https://github.com/sindresorhus/filenamify.git"
},
"scripts": {
"test": "xo && ava"
"test": "xo && ava && tsd-check"
},
"version": "2.1.0"
"version": "3.0.0"
}

5
node_modules/filenamify/readme.md generated vendored
View File

@@ -39,8 +39,12 @@ Accepts a path and returns the path with a valid filename.
Type: `string`
A string to convert to a valid filename.
#### options
Type: `Object`
##### replacement
Type: `string`<br>
@@ -53,6 +57,7 @@ Cannot contain: `<` `>` `:` `"` `/` `\` `|` `?` `*`
## Related
- [filenamify-cli](https://github.com/sindresorhus/filenamify-cli) - CLI for this module
- [filenamify-url](https://github.com/sindresorhus/filenamify-url) - Convert a URL to a valid filename
- [valid-filename](https://github.com/sindresorhus/valid-filename) - Check if a string is a valid filename
- [unused-filename](https://github.com/sindresorhus/unused-filename) - Get a unused filename by appending a number if it exists