You've already forked hugo-extended
mirror of
https://github.com/jakejarvis/hugo-extended.git
synced 2025-10-16 06:04:27 -04:00
Switch to ESM
This commit is contained in:
@@ -5,7 +5,8 @@
|
|||||||
"node": true
|
"node": true
|
||||||
},
|
},
|
||||||
"parserOptions": {
|
"parserOptions": {
|
||||||
"ecmaVersion": 2019
|
"ecmaVersion": 2020,
|
||||||
|
"sourceType": "module"
|
||||||
},
|
},
|
||||||
"extends": "eslint:recommended",
|
"extends": "eslint:recommended",
|
||||||
"rules": {
|
"rules": {
|
||||||
@@ -15,7 +16,6 @@
|
|||||||
"object": true,
|
"object": true,
|
||||||
"array": false
|
"array": false
|
||||||
}
|
}
|
||||||
],
|
]
|
||||||
"strict": "error"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
7
cli.js
7
cli.js
@@ -1,9 +1,8 @@
|
|||||||
#!/usr/bin/env node
|
#!/usr/bin/env node
|
||||||
|
|
||||||
'use strict';
|
import { spawn } from 'node:child_process';
|
||||||
|
import process from 'node:process';
|
||||||
const { spawn } = require('child_process');
|
import hugo from './index.js';
|
||||||
const hugo = require('.');
|
|
||||||
|
|
||||||
const input = process.argv.slice(2);
|
const input = process.argv.slice(2);
|
||||||
|
|
||||||
|
5
index.js
5
index.js
@@ -1,3 +1,4 @@
|
|||||||
'use strict';
|
import process from 'node:process';
|
||||||
|
import lib from './lib/index.js';
|
||||||
|
|
||||||
module.exports = require('./lib')(process.cwd()).path();
|
export default lib(process.cwd()).path();
|
||||||
|
23
lib/index.js
23
lib/index.js
@@ -1,12 +1,14 @@
|
|||||||
'use strict';
|
import fs from 'node:fs';
|
||||||
|
import path from 'node:path';
|
||||||
|
import process from 'node:process';
|
||||||
|
import { fileURLToPath } from 'node:url';
|
||||||
|
import BinWrapper from 'bin-wrapper';
|
||||||
|
import { packageConfigSync } from 'pkg-conf';
|
||||||
|
|
||||||
const path = require('path');
|
const { hugoVersion } = JSON.parse(fs.readFileSync(new URL('../package.json', import.meta.url)));
|
||||||
const BinWrapper = require('bin-wrapper');
|
|
||||||
const pkgConf = require('pkg-conf');
|
|
||||||
const { hugoVersion } = require('../package.json');
|
|
||||||
|
|
||||||
const baseUrl = `https://github.com/gohugoio/hugo/releases/download/v${hugoVersion}/`;
|
const baseUrl = `https://github.com/gohugoio/hugo/releases/download/v${hugoVersion}/`;
|
||||||
const destDir = path.join(__dirname, '../vendor/');
|
const destDir = path.join(fileURLToPath(new URL('../vendor', import.meta.url)));
|
||||||
const binName = process.platform === 'win32' ? 'hugo.exe' : 'hugo';
|
const binName = process.platform === 'win32' ? 'hugo.exe' : 'hugo';
|
||||||
|
|
||||||
const extendedBin = new BinWrapper()
|
const extendedBin = new BinWrapper()
|
||||||
@@ -44,8 +46,11 @@ const normalBin = new BinWrapper()
|
|||||||
.dest(destDir)
|
.dest(destDir)
|
||||||
.use(binName);
|
.use(binName);
|
||||||
|
|
||||||
module.exports = projectRoot => {
|
function main(projectRoot) {
|
||||||
const config = pkgConf.sync('hugo-bin', { cwd: projectRoot });
|
const config = packageConfigSync('hugo-bin', { cwd: projectRoot });
|
||||||
const extended = (process.env.HUGO_BIN_BUILD_TAGS || process.env.npm_config_hugo_bin_build_tags || config.buildTags) === 'extended';
|
const extended = (process.env.HUGO_BIN_BUILD_TAGS || process.env.npm_config_hugo_bin_build_tags || config.buildTags) === 'extended';
|
||||||
|
|
||||||
return extended ? extendedBin : normalBin;
|
return extended ? extendedBin : normalBin;
|
||||||
};
|
}
|
||||||
|
|
||||||
|
export default main;
|
||||||
|
@@ -1,7 +1,6 @@
|
|||||||
'use strict';
|
import path from 'node:path';
|
||||||
|
import process from 'node:process';
|
||||||
const path = require('path');
|
import bin from './index.js';
|
||||||
const bin = require('.');
|
|
||||||
|
|
||||||
function getProjectRoot() {
|
function getProjectRoot() {
|
||||||
// `projectRoot` on postinstall could be INIT_CWD introduced in npm >= 5.4
|
// `projectRoot` on postinstall could be INIT_CWD introduced in npm >= 5.4
|
||||||
|
273
package-lock.json
generated
273
package-lock.json
generated
@@ -11,7 +11,7 @@
|
|||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"bin-wrapper": "^4.1.0",
|
"bin-wrapper": "^4.1.0",
|
||||||
"pkg-conf": "^3.1.0",
|
"pkg-conf": "^4.0.0",
|
||||||
"rimraf": "^3.0.2"
|
"rimraf": "^3.0.2"
|
||||||
},
|
},
|
||||||
"bin": {
|
"bin": {
|
||||||
@@ -23,7 +23,7 @@
|
|||||||
"uvu": "^0.5.2"
|
"uvu": "^0.5.2"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=12"
|
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@eslint/eslintrc": {
|
"node_modules/@eslint/eslintrc": {
|
||||||
@@ -810,14 +810,6 @@
|
|||||||
"node": ">=8.6"
|
"node": ">=8.6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/error-ex": {
|
|
||||||
"version": "1.3.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz",
|
|
||||||
"integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==",
|
|
||||||
"dependencies": {
|
|
||||||
"is-arrayish": "^0.2.1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/escape-string-regexp": {
|
"node_modules/escape-string-regexp": {
|
||||||
"version": "4.0.0",
|
"version": "4.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",
|
||||||
@@ -1186,14 +1178,18 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/find-up": {
|
"node_modules/find-up": {
|
||||||
"version": "3.0.0",
|
"version": "6.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/find-up/-/find-up-6.2.0.tgz",
|
||||||
"integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==",
|
"integrity": "sha512-yWHzMzXCaFoABSnFTCPKNFlYoq4mSga9QLRRKOCLSJ33hSkzROB14ITbAWW0QDQDyuzsPQ33S1DsOWQb/oW1yA==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"locate-path": "^3.0.0"
|
"locate-path": "^7.0.0",
|
||||||
|
"path-exists": "^5.0.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6"
|
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/sindresorhus"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/find-versions": {
|
"node_modules/find-versions": {
|
||||||
@@ -1481,11 +1477,6 @@
|
|||||||
"node": ">=4"
|
"node": ">=4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/is-arrayish": {
|
|
||||||
"version": "0.2.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz",
|
|
||||||
"integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0="
|
|
||||||
},
|
|
||||||
"node_modules/is-extglob": {
|
"node_modules/is-extglob": {
|
||||||
"version": "2.1.1",
|
"version": "2.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
|
||||||
@@ -1583,11 +1574,6 @@
|
|||||||
"resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz",
|
||||||
"integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg="
|
"integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg="
|
||||||
},
|
},
|
||||||
"node_modules/json-parse-better-errors": {
|
|
||||||
"version": "1.0.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz",
|
|
||||||
"integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw=="
|
|
||||||
},
|
|
||||||
"node_modules/json-schema-traverse": {
|
"node_modules/json-schema-traverse": {
|
||||||
"version": "0.4.1",
|
"version": "0.4.1",
|
||||||
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
|
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
|
||||||
@@ -1631,38 +1617,28 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/load-json-file": {
|
"node_modules/load-json-file": {
|
||||||
"version": "5.3.0",
|
"version": "7.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-5.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-7.0.1.tgz",
|
||||||
"integrity": "sha512-cJGP40Jc/VXUsp8/OrnyKyTZ1y6v/dphm3bioS+RrKXjK2BB6wHUd6JptZEFDGgGahMT+InnZO5i1Ei9mpC8Bw==",
|
"integrity": "sha512-Gnxj3ev3mB5TkVBGad0JM6dmLiQL+o0t23JPBZ9sd+yvSLk05mFoqKBw5N8gbbkU4TNXyqCgIrl/VM17OgUIgQ==",
|
||||||
"dependencies": {
|
"engines": {
|
||||||
"graceful-fs": "^4.1.15",
|
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
|
||||||
"parse-json": "^4.0.0",
|
|
||||||
"pify": "^4.0.1",
|
|
||||||
"strip-bom": "^3.0.0",
|
|
||||||
"type-fest": "^0.3.0"
|
|
||||||
},
|
},
|
||||||
"engines": {
|
"funding": {
|
||||||
"node": ">=6"
|
"url": "https://github.com/sponsors/sindresorhus"
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/load-json-file/node_modules/type-fest": {
|
|
||||||
"version": "0.3.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.3.1.tgz",
|
|
||||||
"integrity": "sha512-cUGJnCdr4STbePCgqNFbpVNCepa+kAVohJs1sLhxzdH+gnEoOd8VhbYa7pD3zZYGiURWM2xzEII3fQcRizDkYQ==",
|
|
||||||
"engines": {
|
|
||||||
"node": ">=6"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/locate-path": {
|
"node_modules/locate-path": {
|
||||||
"version": "3.0.0",
|
"version": "7.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-7.0.0.tgz",
|
||||||
"integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==",
|
"integrity": "sha512-+cg2yXqDUKfo4hsFxwa3G1cBJeA+gs1vD8FyV9/odWoUlQe/4syxHQ5DPtKjtfm6gnKbZzjCqzX03kXosvZB1w==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"p-locate": "^3.0.0",
|
"p-locate": "^6.0.0"
|
||||||
"path-exists": "^3.0.0"
|
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6"
|
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/sindresorhus"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/lodash.merge": {
|
"node_modules/lodash.merge": {
|
||||||
@@ -1895,28 +1871,31 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/p-limit": {
|
"node_modules/p-limit": {
|
||||||
"version": "2.3.0",
|
"version": "4.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-4.0.0.tgz",
|
||||||
"integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==",
|
"integrity": "sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"p-try": "^2.0.0"
|
"yocto-queue": "^1.0.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6"
|
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
|
||||||
},
|
},
|
||||||
"funding": {
|
"funding": {
|
||||||
"url": "https://github.com/sponsors/sindresorhus"
|
"url": "https://github.com/sponsors/sindresorhus"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/p-locate": {
|
"node_modules/p-locate": {
|
||||||
"version": "3.0.0",
|
"version": "6.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/p-locate/-/p-locate-6.0.0.tgz",
|
||||||
"integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==",
|
"integrity": "sha512-wPrq66Llhl7/4AGC6I+cqxT07LhXvWL08LNXz1fENOw0Ap4sRZZ/gZpTTJ5jpurzzzfS2W/Ge9BY3LgLjCShcw==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"p-limit": "^2.0.0"
|
"p-limit": "^4.0.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6"
|
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/sindresorhus"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/p-timeout": {
|
"node_modules/p-timeout": {
|
||||||
@@ -1930,14 +1909,6 @@
|
|||||||
"node": ">=4"
|
"node": ">=4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/p-try": {
|
|
||||||
"version": "2.2.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",
|
|
||||||
"integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==",
|
|
||||||
"engines": {
|
|
||||||
"node": ">=6"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/parent-module": {
|
"node_modules/parent-module": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz",
|
||||||
@@ -1950,24 +1921,12 @@
|
|||||||
"node": ">=6"
|
"node": ">=6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/parse-json": {
|
|
||||||
"version": "4.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz",
|
|
||||||
"integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=",
|
|
||||||
"dependencies": {
|
|
||||||
"error-ex": "^1.3.1",
|
|
||||||
"json-parse-better-errors": "^1.0.1"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=4"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/path-exists": {
|
"node_modules/path-exists": {
|
||||||
"version": "3.0.0",
|
"version": "5.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-5.0.0.tgz",
|
||||||
"integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=",
|
"integrity": "sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ==",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=4"
|
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/path-is-absolute": {
|
"node_modules/path-is-absolute": {
|
||||||
@@ -2020,15 +1979,18 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/pkg-conf": {
|
"node_modules/pkg-conf": {
|
||||||
"version": "3.1.0",
|
"version": "4.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/pkg-conf/-/pkg-conf-3.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/pkg-conf/-/pkg-conf-4.0.0.tgz",
|
||||||
"integrity": "sha512-m0OTbR/5VPNPqO1ph6Fqbj7Hv6QU7gR/tQW40ZqrL1rjgCU85W6C1bJn0BItuJqnR98PWzw7Z8hHeChD1WrgdQ==",
|
"integrity": "sha512-7dmgi4UY4qk+4mj5Cd8v/GExPo0K+SlY+hulOSdfZ/T6jVH6//y7NtzZo5WrfhDBxuQ0jCa7fLZmNaNh7EWL/w==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"find-up": "^3.0.0",
|
"find-up": "^6.0.0",
|
||||||
"load-json-file": "^5.2.0"
|
"load-json-file": "^7.0.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6"
|
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/sindresorhus"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/prelude-ls": {
|
"node_modules/prelude-ls": {
|
||||||
@@ -2303,14 +2265,6 @@
|
|||||||
"node": ">=8"
|
"node": ">=8"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/strip-bom": {
|
|
||||||
"version": "3.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz",
|
|
||||||
"integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=",
|
|
||||||
"engines": {
|
|
||||||
"node": ">=4"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/strip-dirs": {
|
"node_modules/strip-dirs": {
|
||||||
"version": "2.1.0",
|
"version": "2.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/strip-dirs/-/strip-dirs-2.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/strip-dirs/-/strip-dirs-2.1.0.tgz",
|
||||||
@@ -2592,6 +2546,17 @@
|
|||||||
"buffer-crc32": "~0.2.3",
|
"buffer-crc32": "~0.2.3",
|
||||||
"fd-slicer": "~1.1.0"
|
"fd-slicer": "~1.1.0"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"node_modules/yocto-queue": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.0.0.tgz",
|
||||||
|
"integrity": "sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12.20"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/sindresorhus"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@@ -3188,14 +3153,6 @@
|
|||||||
"ansi-colors": "^4.1.1"
|
"ansi-colors": "^4.1.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"error-ex": {
|
|
||||||
"version": "1.3.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz",
|
|
||||||
"integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==",
|
|
||||||
"requires": {
|
|
||||||
"is-arrayish": "^0.2.1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"escape-string-regexp": {
|
"escape-string-regexp": {
|
||||||
"version": "4.0.0",
|
"version": "4.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",
|
||||||
@@ -3482,11 +3439,12 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"find-up": {
|
"find-up": {
|
||||||
"version": "3.0.0",
|
"version": "6.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/find-up/-/find-up-6.2.0.tgz",
|
||||||
"integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==",
|
"integrity": "sha512-yWHzMzXCaFoABSnFTCPKNFlYoq4mSga9QLRRKOCLSJ33hSkzROB14ITbAWW0QDQDyuzsPQ33S1DsOWQb/oW1yA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"locate-path": "^3.0.0"
|
"locate-path": "^7.0.0",
|
||||||
|
"path-exists": "^5.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"find-versions": {
|
"find-versions": {
|
||||||
@@ -3702,11 +3660,6 @@
|
|||||||
"p-is-promise": "^1.1.0"
|
"p-is-promise": "^1.1.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"is-arrayish": {
|
|
||||||
"version": "0.2.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz",
|
|
||||||
"integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0="
|
|
||||||
},
|
|
||||||
"is-extglob": {
|
"is-extglob": {
|
||||||
"version": "2.1.1",
|
"version": "2.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
|
||||||
@@ -3780,11 +3733,6 @@
|
|||||||
"resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz",
|
||||||
"integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg="
|
"integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg="
|
||||||
},
|
},
|
||||||
"json-parse-better-errors": {
|
|
||||||
"version": "1.0.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz",
|
|
||||||
"integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw=="
|
|
||||||
},
|
|
||||||
"json-schema-traverse": {
|
"json-schema-traverse": {
|
||||||
"version": "0.4.1",
|
"version": "0.4.1",
|
||||||
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
|
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
|
||||||
@@ -3822,31 +3770,16 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"load-json-file": {
|
"load-json-file": {
|
||||||
"version": "5.3.0",
|
"version": "7.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-5.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-7.0.1.tgz",
|
||||||
"integrity": "sha512-cJGP40Jc/VXUsp8/OrnyKyTZ1y6v/dphm3bioS+RrKXjK2BB6wHUd6JptZEFDGgGahMT+InnZO5i1Ei9mpC8Bw==",
|
"integrity": "sha512-Gnxj3ev3mB5TkVBGad0JM6dmLiQL+o0t23JPBZ9sd+yvSLk05mFoqKBw5N8gbbkU4TNXyqCgIrl/VM17OgUIgQ=="
|
||||||
"requires": {
|
|
||||||
"graceful-fs": "^4.1.15",
|
|
||||||
"parse-json": "^4.0.0",
|
|
||||||
"pify": "^4.0.1",
|
|
||||||
"strip-bom": "^3.0.0",
|
|
||||||
"type-fest": "^0.3.0"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"type-fest": {
|
|
||||||
"version": "0.3.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.3.1.tgz",
|
|
||||||
"integrity": "sha512-cUGJnCdr4STbePCgqNFbpVNCepa+kAVohJs1sLhxzdH+gnEoOd8VhbYa7pD3zZYGiURWM2xzEII3fQcRizDkYQ=="
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"locate-path": {
|
"locate-path": {
|
||||||
"version": "3.0.0",
|
"version": "7.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-7.0.0.tgz",
|
||||||
"integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==",
|
"integrity": "sha512-+cg2yXqDUKfo4hsFxwa3G1cBJeA+gs1vD8FyV9/odWoUlQe/4syxHQ5DPtKjtfm6gnKbZzjCqzX03kXosvZB1w==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"p-locate": "^3.0.0",
|
"p-locate": "^6.0.0"
|
||||||
"path-exists": "^3.0.0"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"lodash.merge": {
|
"lodash.merge": {
|
||||||
@@ -4025,19 +3958,19 @@
|
|||||||
"integrity": "sha1-nJRWmJ6fZYgBewQ01WCXZ1w9oF4="
|
"integrity": "sha1-nJRWmJ6fZYgBewQ01WCXZ1w9oF4="
|
||||||
},
|
},
|
||||||
"p-limit": {
|
"p-limit": {
|
||||||
"version": "2.3.0",
|
"version": "4.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-4.0.0.tgz",
|
||||||
"integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==",
|
"integrity": "sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"p-try": "^2.0.0"
|
"yocto-queue": "^1.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"p-locate": {
|
"p-locate": {
|
||||||
"version": "3.0.0",
|
"version": "6.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/p-locate/-/p-locate-6.0.0.tgz",
|
||||||
"integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==",
|
"integrity": "sha512-wPrq66Llhl7/4AGC6I+cqxT07LhXvWL08LNXz1fENOw0Ap4sRZZ/gZpTTJ5jpurzzzfS2W/Ge9BY3LgLjCShcw==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"p-limit": "^2.0.0"
|
"p-limit": "^4.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"p-timeout": {
|
"p-timeout": {
|
||||||
@@ -4048,11 +3981,6 @@
|
|||||||
"p-finally": "^1.0.0"
|
"p-finally": "^1.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"p-try": {
|
|
||||||
"version": "2.2.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",
|
|
||||||
"integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ=="
|
|
||||||
},
|
|
||||||
"parent-module": {
|
"parent-module": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz",
|
||||||
@@ -4062,19 +3990,10 @@
|
|||||||
"callsites": "^3.0.0"
|
"callsites": "^3.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"parse-json": {
|
|
||||||
"version": "4.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz",
|
|
||||||
"integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=",
|
|
||||||
"requires": {
|
|
||||||
"error-ex": "^1.3.1",
|
|
||||||
"json-parse-better-errors": "^1.0.1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"path-exists": {
|
"path-exists": {
|
||||||
"version": "3.0.0",
|
"version": "5.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-5.0.0.tgz",
|
||||||
"integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU="
|
"integrity": "sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ=="
|
||||||
},
|
},
|
||||||
"path-is-absolute": {
|
"path-is-absolute": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
@@ -4111,12 +4030,12 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"pkg-conf": {
|
"pkg-conf": {
|
||||||
"version": "3.1.0",
|
"version": "4.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/pkg-conf/-/pkg-conf-3.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/pkg-conf/-/pkg-conf-4.0.0.tgz",
|
||||||
"integrity": "sha512-m0OTbR/5VPNPqO1ph6Fqbj7Hv6QU7gR/tQW40ZqrL1rjgCU85W6C1bJn0BItuJqnR98PWzw7Z8hHeChD1WrgdQ==",
|
"integrity": "sha512-7dmgi4UY4qk+4mj5Cd8v/GExPo0K+SlY+hulOSdfZ/T6jVH6//y7NtzZo5WrfhDBxuQ0jCa7fLZmNaNh7EWL/w==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"find-up": "^3.0.0",
|
"find-up": "^6.0.0",
|
||||||
"load-json-file": "^5.2.0"
|
"load-json-file": "^7.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"prelude-ls": {
|
"prelude-ls": {
|
||||||
@@ -4326,11 +4245,6 @@
|
|||||||
"ansi-regex": "^5.0.1"
|
"ansi-regex": "^5.0.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"strip-bom": {
|
|
||||||
"version": "3.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz",
|
|
||||||
"integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM="
|
|
||||||
},
|
|
||||||
"strip-dirs": {
|
"strip-dirs": {
|
||||||
"version": "2.1.0",
|
"version": "2.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/strip-dirs/-/strip-dirs-2.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/strip-dirs/-/strip-dirs-2.1.0.tgz",
|
||||||
@@ -4547,6 +4461,11 @@
|
|||||||
"buffer-crc32": "~0.2.3",
|
"buffer-crc32": "~0.2.3",
|
||||||
"fd-slicer": "~1.1.0"
|
"fd-slicer": "~1.1.0"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"yocto-queue": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.0.0.tgz",
|
||||||
|
"integrity": "sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g=="
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -13,13 +13,14 @@
|
|||||||
"homepage": "https://github.com/fenneclab/hugo-bin#readme",
|
"homepage": "https://github.com/fenneclab/hugo-bin#readme",
|
||||||
"author": "satoshun00 <shun.sato@fenneclab.com>",
|
"author": "satoshun00 <shun.sato@fenneclab.com>",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"main": "index.js",
|
"type": "module",
|
||||||
|
"exports": "./index.js",
|
||||||
"bin": {
|
"bin": {
|
||||||
"hugo": "cli.js"
|
"hugo": "cli.js"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"bin-wrapper": "^4.1.0",
|
"bin-wrapper": "^4.1.0",
|
||||||
"pkg-conf": "^3.1.0",
|
"pkg-conf": "^4.0.0",
|
||||||
"rimraf": "^3.0.2"
|
"rimraf": "^3.0.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
@@ -31,7 +32,7 @@
|
|||||||
"lint": "eslint .",
|
"lint": "eslint .",
|
||||||
"uvu": "uvu test",
|
"uvu": "uvu test",
|
||||||
"test": "npm run lint && npm run uvu",
|
"test": "npm run lint && npm run uvu",
|
||||||
"postinstall": "rimraf vendor && node lib/install"
|
"postinstall": "rimraf vendor && node lib/install.js"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"lib/*.js",
|
"lib/*.js",
|
||||||
@@ -39,6 +40,6 @@
|
|||||||
"index.js"
|
"index.js"
|
||||||
],
|
],
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=12"
|
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,9 +1,7 @@
|
|||||||
'use strict';
|
import { strict as assert } from 'node:assert';
|
||||||
|
import binCheck from 'bin-check';
|
||||||
const assert = require('assert').strict;
|
import { test } from 'uvu';
|
||||||
const binCheck = require('bin-check');
|
import hugoBin from '../index.js';
|
||||||
const hugoBin = require('..');
|
|
||||||
const { test } = require('uvu');
|
|
||||||
|
|
||||||
test('should return path to binary and work', () => {
|
test('should return path to binary and work', () => {
|
||||||
return binCheck(hugoBin, ['version']).then(works => {
|
return binCheck(hugoBin, ['version']).then(works => {
|
||||||
|
Reference in New Issue
Block a user