Comparing version 7.3.0 to 7.4.0
{ | ||
"name": "os-paths", | ||
"version": "7.3.0", | ||
"version": "7.4.0", | ||
"description": "Determine common OS/platform paths (home, temp, ...)", | ||
@@ -14,2 +14,3 @@ "license": "MIT", | ||
}, | ||
"packageManager": "yarn@1.22.19", | ||
"files": [ | ||
@@ -70,11 +71,11 @@ "cjs", | ||
"# clean # remove build artifacts": "", | ||
"clean": "rimraf build dist", | ||
"clean": "shx rm -fr build dist", | ||
"# coverage # calculate and display (or send) code coverage [alias: 'cov']": "", | ||
"coverage": "run-s --silent +:max-node-8 && shx echo \"[coverage] WARN Code coverage skipped [for NodeJS < v10]\" 1>&2 || run-s \"+:coverage\"", | ||
"cov": "run-s coverage", | ||
"cov:html": "nyc report --reporter=html", | ||
"cov:html": "nyc report --reporter=html --report-dir=.coverage", | ||
"#* cov:send # use `--cov-send=...` to pass options to coverage uploader": "", | ||
"cov:send": "shx mkdir -p coverage && nyc report --reporter=text-lcov > \"coverage/@coverage.lcov\" && cross-env-shell codecov --disable=gcov --file=\"coverage/@coverage.lcov\" $npm_config_cov_send", | ||
"cov:send": "shx mkdir -p .coverage && nyc report --reporter=text-lcov > \".coverage/@coverage.lcov\" && cross-env-shell codecov --disable=gcov --file=\".coverage/@coverage.lcov\" $npm_config_cov_send", | ||
"cov:text": "nyc report", | ||
"cov:view": "run-s cov:html && cd coverage && open-cli index.html", | ||
"cov:view": "run-s cov:html && cd .coverage && open-cli index.html", | ||
"dist": "run-s update", | ||
@@ -91,2 +92,4 @@ "# fix # fix package issues (automated/non-interactive)": "", | ||
"lint": "run-s --silent +:max-node-8 && shx echo \"[lint] WARN Lint checks skipped [for NodeJS < v10]\" 1>&2 || run-p --print-name \"lint:*\"", | ||
"# lint:audit # check for `npm audit` violations in project code": "", | ||
"lint:audit": "run-s --silent -- npm audit --omit dev", | ||
"# lint:commits # check for commit flaws (using `commitlint` and `cspell`)": "", | ||
@@ -107,3 +110,3 @@ "lint:commits": "run-p --silent \"_:lint:commits:new:*\"", | ||
"# realclean # remove all generated files": "", | ||
"realclean": "run-s clean && rimraf coverage .nyc_output", | ||
"realclean": "run-s clean && shx rm -fr .coverage .nyc_output", | ||
"# rebuild # clean and (re-)build project": "", | ||
@@ -142,3 +145,3 @@ "rebuild": "run-s clean build", | ||
"## +:... == sub-scripts (may run 'visibly', but not user-facing)": "", | ||
"+:coverage": "run-s build test:code && is-ci && run-s cov:send || run-s cov:view", | ||
"+:coverage": "run-s build test:code && ( is-ci && run-s cov:send ) || ( run-s --silent _:is-not-ci && run-s cov:view )", | ||
"+:max-node-8": "is-node-not-modern 10", | ||
@@ -150,3 +153,4 @@ "+:min-node-10": "is-node-modern 10", | ||
"* _:help # print usage/TARGETs by matching lines containing leading double-quoted text like `# TARGET_NAME # HELP_TEXT`": "", | ||
"_:help": "< package.json node -e \"s = {p:'',e:'npm'}; if (new String(process.env.npm_execpath).match(/yarn.js$/)) { s = {p:'\\n',e:'yarn'}; }; console.log('%susage: \\`%s run TARGET\\` or \\`npx run-s TARGET [TARGET..]\\`\\n\\nTARGETs:\\n', s.p, s.e); re = /^.*?\\x22(?:#\\s*)(\\w[^#\\x22]*)\\s+#+\\s+([^\\x22]+?)(\\s+#+)?\\x22.*$/; require('readline').createInterface({ input: process.stdin, output: process.stdout, terminal: false }).on('line', function(line){ if (match = re.exec(line)) { console.log('%s %s', match[1].padEnd(19), match[2]); } });\"", | ||
"_:help": "< package.json node -e \"s = {p:'',e:'npm'}; if (new String(process.env.npm_execpath).match(/yarn.js$/)) { s = {p:'\\n',e:'yarn'}; }; console.log('%sUsage: \\`\\x1b[2m%s run TARGET\\x1b[m\\` or \\`\\x1b[2mnpx run-s TARGET [TARGET..]\\x1b[m\\`\\n\\nTARGETs:\\n', s.p, s.e); re = /^.*?\\x22(?:#\\s*)(\\w[^#\\x22]*)\\s+#+\\s+([^\\x22]+?)(\\s+#+)?\\x22.*$/; require('readline').createInterface({ input: process.stdin, output: process.stdout, terminal: false }).on('line', function(line){ if (match = re.exec(line)) { console.log('\\x1b[0;32m%s\\x1b[m %s', match[1].padEnd(19), match[2]); } }).on('close', () => { /^win/i.test(process.platform) || console.log(); });\"", | ||
"_:is-not-ci": "is-ci && exit 1 || exit 0", | ||
"_:lint:commits:all:spell": "node -e \"result=require('child_process').spawnSync('git log --color=never | cspell stdin --no-summary --config \".vscode/cspell.json\"',{shell:true,encoding:'utf-8'}); if (result.status != 0) {console.error('[cspell] ERR! Unknown words in commit(s)\\n'+result.stdout+'\\n'+result.stderr); process.exit(1);} else {console.log(result.stdout);};\"", | ||
@@ -165,7 +169,7 @@ "* _:lint:commits:new:... * note: review from 'origin/last' or tag just prior to version-sorted latest, with fallback to first commit": "", | ||
"_:update:dist.normalizeEOL": "eolConverter lf dist/**/*.{cjs,js,mjs,ts,json}", | ||
"_:update:dist.pack": "node -e \"delete process.env.npm_config_dry_run; name=require('./package.json').name; result=require('child_process').spawnSync('npm pack && shx mkdir -p dist && shx mv '+name+'-*.tgz dist/'+name+'.tgz',{shell:true,encoding:'utf-8'}); if (result.status != 0) {console.error('[update] ERR! Unable to package (into *.tgz) for distribution\\n'+result.stdout+'\\n'+result.stderr); process.exit(1);} else {console.log(result.stdout);};\"", | ||
"_:update:dist.pack": "node -e \"delete process.env.npm_config_dry_run; name=require('./package.json').name; name=name.replace(/^@/,'').replace('/','-'); result=require('child_process').spawnSync('npm pack && shx mkdir -p dist && shx mv '+name+'-*.tgz dist/'+name+'.tgz',{shell:true,encoding:'utf-8'}); if (result.status != 0) {console.error('[update] ERR! Unable to package (into *.tgz) for distribution\\n'+result.stdout+'\\n'+result.stderr); process.exit(1);} else {console.log(result.stdout);};\"", | ||
"_:update:dist.types": "shx mkdir -p dist && shx rm -fr dist/types && rollup --config .rollup.config.types.js && replace-in-file \"export { _default as default }\" \"export = _default\" dist/types/mod.cjs.d.ts --quiet && shx mkdir -p dist/cjs && shx cp dist/types/*.cjs.d.ts dist/cjs", | ||
"_:update:dist:rebuild": "shx rm -fr dist && run-s --silent _:update:dist.build _:update:dist.types _:update:dist.normalizeEOL _:update:dist.pack && shx mkdir -p dist/.targets && shx touch build/.targets/update-dist.succeeded", | ||
"_:version:spell:changelog_update": "run-s --silent _:exists:git-changelog && git changelog -u | cspell stdin --config \".vscode/cspell.json\" || shx echo \"[lint] WARN CHANGELOG update `cspell` exception\" 1>&2", | ||
"_:version:update:changelog": "run-s --silent _:exists:git-changelog && node -e \"v=require('./package.json').version; result=require('child_process').spawnSync('git changelog --next-tag-now --next-tag v'+v,{shell:true,encoding:'utf-8'}); if (result.status != 0) {console.error('ERR! '+result.stderr); process.exit(1);} else {require('fs').writeFileSync('CHANGELOG.mkd',result.stdout);};\" || shx echo \"[version] WARN CHANGELOG not updated\" 1>&2", | ||
"_:version:update:changelog": "run-s --silent _:exists:git-changelog && node -e \"v=require('./package.json').version; result=require('child_process').spawnSync('git changelog --next-tag-now --next-tag v'+v,{shell:true,encoding:'utf-8'}); if (result.status != 0) {console.error('ERR! '+result.stderr); process.exit(1);} else {m='fs';require(m).writeFileSync('CHANGELOG.mkd',result.stdout);};\" || shx echo \"[version] WARN CHANGELOG not updated\" 1>&2", | ||
"## npm lifecycle scripts ##": "", | ||
@@ -185,4 +189,4 @@ "prepublishOnly": "run-s clean update && cross-env npm_config_test_dist=true npm run test && run-s --silent update _:vcs-strictly-clean-err", | ||
"@types/node": "^14.14.20", | ||
"@typescript-eslint/eslint-plugin": "^4.12.0", | ||
"@typescript-eslint/parser": "^4.12.0", | ||
"@typescript-eslint/eslint-plugin": "^4", | ||
"@typescript-eslint/parser": "^4", | ||
"ava": "^3.15.0", | ||
@@ -196,9 +200,9 @@ "codecov": "^3.5.0", | ||
"eol-converter-cli": "^1.0.8", | ||
"eslint": "^7.17.0", | ||
"eslint-config-prettier": "^7.1.0", | ||
"eslint-plugin-eslint-comments": "^3.2.0", | ||
"eslint-plugin-functional": "^3.2.1", | ||
"eslint-plugin-import": "^2.22.0", | ||
"eslint-plugin-security": "^1.4.0", | ||
"eslint-plugin-security-node": "^1.0.14", | ||
"eslint": "^7", | ||
"eslint-config-prettier": "^7", | ||
"eslint-plugin-eslint-comments": "^3", | ||
"eslint-plugin-functional": "^3", | ||
"eslint-plugin-import": "^2", | ||
"eslint-plugin-security": "^1", | ||
"eslint-plugin-security-node": "^1", | ||
"exec-if-updated": "https://cdn.jsdelivr.net/gh/rivy/js-cli.exec-if-updated@2.2.0/dist/pkg/exec-if-updated.tgz", | ||
@@ -223,3 +227,2 @@ "is-ci": "^2.0.0", | ||
"retext-syntax-urls": "^2.0.0", | ||
"rimraf": "^3.0.2", | ||
"rollup": "^2.36.1", | ||
@@ -226,0 +229,0 @@ "rollup-plugin-dts": "^2.0.1", |
@@ -11,3 +11,3 @@ <!-- dprint-ignore-file --> | ||
<!-- markdownlint-disable heading-increment no-duplicate-heading --> | ||
<!-- spell-checker:ignore (abbrev/names) CICD CJS Codacy Deno Dprint ESM ESMs JSDelivr npmJS --> | ||
<!-- spell-checker:ignore (abbrev/names) CICD CJS Codacy Deno Dprint ESM ESMs JSDelivr npmJS uutils --> | ||
<!-- spell-checker:ignore (targets) realclean --> | ||
@@ -21,3 +21,2 @@ <!-- spell-checker:ignore (people) Roy Ivy III * rivy --> | ||
[![Build status (GHA)][gha-image]][gha-url] | ||
[![Build status (Travis-CI)][travis-image]][travis-url] | ||
[![Build status (AppVeyor)][appveyor-image]][appveyor-url] | ||
@@ -37,7 +36,10 @@ [![Coverage status][coverage-image]][coverage-url] | ||
<!-- ref: [JSDelivr ~ GitHub](https://www.jsdelivr.com/documentation#id-github) @@ <https://archive.is/c8s9Y> --> | ||
```shell | ||
npm install os-paths | ||
# or... `npm install "git:github.com/rivy/js.os-paths"` | ||
# or... `npm install "git:github.com/rivy/js.os-paths#v7.0.0"` | ||
# or... `npm install "https://cdn.jsdelivr.net/gh/rivy/js.os-paths/dist/os-paths.tgz"` | ||
# or... `npm install "git:github.com/rivy/js.os-paths#v7.4.0"` | ||
# or... `npm install "https://cdn.jsdelivr.net/gh/rivy/js.os-paths@v7.4.0/dist/os-paths.tgz"` | ||
# or... `npm install "https://cdn.jsdelivr.net/gh/rivy/js.os-paths@COMMIT_SHA/dist/os-paths.tgz"` | ||
``` | ||
@@ -65,12 +67,9 @@ | ||
<!-- ref: [JSDelivr ~ GitHub](https://www.jsdelivr.com/documentation#id-github) @@ <https://archive.is/c8s9Y> --> | ||
```ts | ||
import osPaths from 'https://deno.land/x/os_paths/src/mod.deno.ts'; | ||
//or... | ||
//import osPaths from 'https://deno.land/x/os_paths@v7.0.0/src/mod.deno.ts'; | ||
//or (via CDN, with optional version/version-range/latest/commit support)... | ||
//import osPaths from 'https://cdn.jsdelivr.net/gh/rivy/js.os-paths@7.0.0/src/mod.deno.ts'; // v7.0.0 | ||
//import osPaths from 'https://cdn.jsdelivr.net/gh/rivy/js.os-paths@7/src/mod.deno.ts'; // v7.x.y | ||
//import osPaths from 'https://cdn.jsdelivr.net/gh/rivy/js.os-paths/src/mod.deno.ts'; // latest | ||
//import osPaths from 'https://cdn.jsdelivr.net/gh/rivy/js.os-paths@latest/src/mod.deno.ts'; // latest | ||
//import osPaths from 'https://cdn.jsdelivr.net/gh/rivy/js.os-paths@COMMIT/src/mod.deno.ts'; // commit | ||
import osPaths from 'https://deno.land/x/os_paths@v7.4.0/src/mod.deno.ts'; | ||
//or (via CDN, [ie, JSDelivr with GitHub version/version-range, commit, 'latest' support])... | ||
//import osPaths from 'https://cdn.jsdelivr.net/gh/rivy/js.os-paths@v7.4.0/src/mod.deno.ts'; | ||
//import osPaths from 'https://cdn.jsdelivr.net/gh/rivy/js.os-paths@COMMIT_SHA/src/mod.deno.ts'; | ||
const home = osPaths.home(); | ||
@@ -201,3 +200,2 @@ const temp = osPaths.temp(); | ||
[![Build status (GHA)][gha-image]][gha-url] | ||
[![Build status (Travis-CI)][travis-image]][travis-url] | ||
[![Build status (AppVeyor)][appveyor-image]][appveyor-url] | ||
@@ -218,4 +216,4 @@ [![Coverage status][coverage-image]][coverage-url] | ||
> | ||
> - [`bmp`](https://deno.land/x/bmp@v0.0.6) (v0.0.6+) ... synchronizes version strings within the project | ||
> - [`git-changelog`](https://github.com/rivy-go/git-changelog) (v1.1+) ... enables changelog automation | ||
> - [`perl`](https://www.perl.org) ... enables automated version updates to **`package.json`** during packaging | ||
@@ -235,3 +233,3 @@ ### Quick build/test | ||
cd js.os-paths | ||
# * note: for WinOS, replace `cp` with `copy` | ||
# * note: for WinOS, replace `cp` with `copy` (or use [uutils](https://github.com/uutils/coreutils)) | ||
# npm | ||
@@ -262,2 +260,3 @@ cp .deps-lock/package-lock.json . | ||
lint check for package code 'lint' | ||
lint:audit check for `npm audit` violations in project code | ||
lint:commits check for commit flaws (using `commitlint` and `cspell`) | ||
@@ -292,16 +291,16 @@ lint:editorconfig check for EditorConfig format flaws (using `editorconfig-checker`) | ||
#=== * POSIX | ||
# next VERSION in M.m.r (semver) format | ||
VERSION=... | ||
# update to VERSION in package.json | ||
perl -i -E 'use open IO => q/:raw:utf8/} while(<>) { s/^(\s*\x22version\x22\s*:\s*)\x22(?:\d+(?:[.]\d+)*)?\x22/$1\x22$ENV{VERSION}\x22/ims; print }' package.json | ||
# update project VERSION strings (package.json,...) | ||
# * `bmp --[major|minor|patch]`; next VERSION in M.m.r (semver) format | ||
bmp --minor | ||
VERSION=$(cat VERSION) | ||
git-changelog --next-tag "v${VERSION}" > CHANGELOG.mkd | ||
# create/commit updates and distribution | ||
git add package.json CHANGELOG.mkd | ||
git add package.json CHANGELOG.mkd README.md VERSION .bmp.yml | ||
git commit -m "${VERSION}" | ||
npm run clean && npm run update:dist | ||
git add dist | ||
git commit --amend --no-edit | ||
@rem ::# (optional) update/save dependency locks | ||
npm run clean && npm run update:dist && git add dist && git commit --amend --no-edit | ||
# (optional) update/save dependency locks | ||
# * note: `yarn import` of 'package-lock.json' (when available) is faster but may not work for later versions of 'package-lock.json' | ||
rm -f package-lock.json yarn.lock | ||
npm install --package-lock | ||
rm yarn.lock && yarn import | ||
yarn install | ||
mkdir .deps-lock 2> /dev/null | ||
@@ -317,24 +316,24 @@ cp package-lock.json .deps-lock/ | ||
#=== * WinOS | ||
@rem ::# next VERSION in M.m.r (semver) format | ||
set VERSION=... | ||
@rem ::# update to VERSION in package.json | ||
perl -i -E "use open IO => q/:raw:utf8/; while(<>) { s/^(\s*\x22version\x22\s*:\s*)\x22(?:\d+(?:[.]\d+)*)?\x22/$1\x22$ENV{VERSION}\x22/ims; print }" package.json | ||
@rem # update project VERSION strings (package.json,...) | ||
@rem # * `bmp --[major|minor|patch]`; next VERSION in M.m.r (semver) format | ||
bmp --minor | ||
for /f %G in (VERSION) do @set "VERSION=%G" | ||
git-changelog --next-tag "v%VERSION%" > CHANGELOG.mkd | ||
@rem ::# create/commit updates and distribution | ||
git add package.json CHANGELOG.mkd | ||
@rem # create/commit updates and distribution | ||
git add package.json CHANGELOG.mkd README.md VERSION .bmp.yml | ||
git commit -m "%VERSION%" | ||
npm run clean && npm run update:dist | ||
git add dist | ||
git commit --amend --no-edit | ||
@rem ::# (optional) update/save dependency locks | ||
npm run clean && npm run update:dist && git add dist && git commit --amend --no-edit | ||
@rem # (optional) update/save dependency locks | ||
@rem # * note: `yarn import` of 'package-lock.json' (when available) is faster but may not work for later versions of 'package-lock.json' | ||
del package-lock.json yarn.lock 2>NUL | ||
npm install --package-lock | ||
del yarn.lock 2>NUL && yarn import | ||
yarn install | ||
mkdir .deps-lock 2>NUL | ||
copy /y package-lock.json .deps-lock | ||
copy /y yarn.lock .deps-lock | ||
copy /y package-lock.json .deps-lock >NUL | ||
copy /y yarn.lock .deps-lock >NUL | ||
git add .deps-lock | ||
git commit --amend --no-edit | ||
@rem ::# tag VERSION commit | ||
@rem # tag VERSION commit | ||
git tag -f "v%VERSION%" | ||
@rem ::# (optional) prerelease checkup | ||
@rem # (optional) prerelease checkup | ||
npm run prerelease | ||
@@ -390,6 +389,4 @@ ``` | ||
[appveyor-url]: https://ci.appveyor.com/project/rivy/js-os-paths | ||
[gha-image]: https://img.shields.io/github/workflow/status/rivy/js.os-paths/CI?label=CI&logo=github | ||
[gha-image]: https://img.shields.io/github/actions/workflow/status/rivy/js.os-paths/CI.yml?label=CI&logo=github | ||
[gha-url]: https://github.com/rivy/js.os-paths/actions?query=workflow%3ACI | ||
[travis-image]: https://img.shields.io/travis/rivy/js.os-paths/master.svg?style=flat&logo=travis | ||
[travis-url]: https://travis-ci.org/rivy/js.os-paths | ||
@@ -437,1 +434,3 @@ <!-- Code quality --> | ||
<!-- [travis-image]: https://travis-ci.org/rivy/js.os-paths.svg?branch=master --> | ||
<!-- [travis-image]: https://img.shields.io/travis/rivy/js.os-paths/master.svg?style=flat&logo=travis --> | ||
<!-- [travis-url]: https://travis-ci.org/rivy/js.os-paths --> |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
131419
50
425