Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

os-paths

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

os-paths - npm Package Compare versions

Comparing version 5.1.0 to 6.0.0

dist/cjs/platform-adapters/_base.js

2

dist/cjs/esm-wrapper/index.js

@@ -5,6 +5,4 @@ /* eslint-env node */

import _ from '../index.js';
// note: not usable by `deno`;
// ...`deno` is unable to load (the CJS module) '../index.js' via import => `'../index.js' does not provide an export named 'default'`
const default_ = _;
export default default_;
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var OSPaths_1 = __importDefault(require("./lib/OSPaths"));
__exportStar(require("./lib/OSPaths"), exports);
exports.default = OSPaths_1.default;
exports.__esModule = true;
var OSPaths_1 = require("./lib/OSPaths");
var node_1 = require("./platform-adapters/node");
var default_ = OSPaths_1.OSPathsAdaptionBuilder_(node_1.adapter);
exports["default"] = default_;
var haveModuleExports_ = typeof module === 'object' && module.exports;
if (haveModuleExports_) {
module.exports = OSPaths_1.default;
module.exports = default_;
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7O0FBQ0EsMERBQW9EO0FBRXBELGdEQUE4QjtBQUU5QixrQkFBZSxpQkFBUSxDQUFDO0FBRXhCLElBQU0sa0JBQWtCLEdBQUcsT0FBTyxNQUFNLEtBQUssUUFBUSxJQUFJLE1BQU0sQ0FBQyxPQUFPLENBQUM7QUFHeEUsSUFBSSxrQkFBa0IsRUFBRTtJQUd2QixNQUFNLENBQUMsT0FBTyxHQUFHLGlCQUFRLENBQUM7Q0FDMUIifQ==
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFDQSx5Q0FBd0Q7QUFDeEQsaURBQW1EO0FBRW5ELElBQU0sUUFBUSxHQUFHLGlDQUF1QixDQUFDLGNBQU8sQ0FBQyxDQUFDO0FBQ2xELHFCQUFlLFFBQVEsQ0FBQztBQUV4QixJQUFNLGtCQUFrQixHQUFHLE9BQU8sTUFBTSxLQUFLLFFBQVEsSUFBSSxNQUFNLENBQUMsT0FBTyxDQUFDO0FBR3hFLElBQUksa0JBQWtCLEVBQUU7SUFLdkIsTUFBTSxDQUFDLE9BQU8sR0FBRyxRQUFRLENBQUM7Q0FDMUIifQ==
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
var __spreadArrays = (this && this.__spreadArrays) || function () {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
};
Object.defineProperty(exports, "__esModule", { value: true });
var os = __importStar(require("os"));
var path = __importStar(require("path"));
var env = process.env;
var isWinOS = /^win/i.test(process.platform);
exports.__esModule = true;
exports.OSPathsAdaptionBuilder_ = void 0;
function isEmpty(s) {
return !s;
}
function normalizePath(path_) {
return path_ ? path.normalize(path.join(path_, '.')) : void 0;
}
var posix = function () {
var home = function () {
return normalizePath((typeof os.homedir === 'function' ? os.homedir() : void 0) || env.HOME);
function OSPathsAdaptionBuilder_(adapter_) {
var env = adapter_.env, os = adapter_.os, path = adapter_.path, process = adapter_.process;
var isWinOS = /^win/i.test(process.platform);
function normalizePath(path_) {
return path_ ? path.normalize(path.join(path_, '.')) : void 0;
}
var posix = function () {
var home = function () {
return normalizePath((typeof os.homedir === 'function' ? os.homedir() : void 0) || env.get('HOME'));
};
var temp = function () {
var fallback = '/tmp';
var priorityList = [
typeof os.tmpdir === 'function' ? os.tmpdir() : void 0,
env.get('TMPDIR'),
env.get('TEMP'),
env.get('TMP'),
];
return normalizePath(priorityList.find(function (v) { return !isEmpty(v); })) || fallback;
};
return { home: home, temp: temp };
};
var temp = function () {
var fallback = '/tmp';
var priorityList = [
typeof os.tmpdir === 'function' ? os.tmpdir() : void 0,
env.TMPDIR,
env.TEMP,
env.TMP,
];
return normalizePath(priorityList.find(function (v) { return !isEmpty(v); })) || fallback;
var windows = function () {
var home = function () {
var priorityList = [
typeof os.homedir === 'function' ? os.homedir() : void 0,
env.get('USERPROFILE'),
env.get('HOME'),
env.get('HOMEDRIVE') || env.get('HOMEPATH')
? path.join(env.get('HOMEDRIVE') || '', env.get('HOMEPATH') || '')
: void 0,
];
return normalizePath(priorityList.find(function (v) { return !isEmpty(v); }));
};
function joinPathToBase(base, segments) {
return base ? path.join.apply(path, __spreadArrays([base], segments)) : void 0;
}
var temp = function () {
var fallback = 'C:\\Temp';
var priorityListLazy = [
os.tmpdir,
function () { return env.get('TEMP'); },
function () { return env.get('TMP'); },
function () { return joinPathToBase(env.get('LOCALAPPDATA'), ['Temp']); },
function () { return joinPathToBase(home(), ['AppData', 'Local', 'Temp']); },
function () { return joinPathToBase(env.get('ALLUSERSPROFILE'), ['Temp']); },
function () { return joinPathToBase(env.get('SystemRoot'), ['Temp']); },
function () { return joinPathToBase(env.get('windir'), ['Temp']); },
function () { return joinPathToBase(env.get('SystemDrive'), ['\\', 'Temp']); },
];
var v = priorityListLazy.find(function (v) { return v && !isEmpty(v()); });
return (v && normalizePath(v())) || fallback;
};
return { home: home, temp: temp };
};
return { home: home, temp: temp };
};
var windows = function () {
var home = function () {
var priorityList = [
typeof os.homedir === 'function' ? os.homedir() : void 0,
env.USERPROFILE,
env.HOME,
env.HOMEDRIVE || env.HOMEPATH ? path.join(env.HOMEDRIVE || '', env.HOMEPATH || '') : void 0,
];
return normalizePath(priorityList.find(function (v) { return !isEmpty(v); }));
};
var temp = function () {
var fallback = 'C:\\Temp';
var priorityList = [
typeof os.tmpdir === 'function' ? os.tmpdir() : void 0,
env.TEMP,
env.TMP,
env.LOCALAPPDATA ? path.join(env.LOCALAPPDATA, 'Temp') : void 0,
(function (s) {
return s ? path.join(s, 'AppData', 'Local', 'Temp') : void 0;
})(home()),
env.ALLUSERSPROFILE ? path.join(env.ALLUSERSPROFILE, 'Temp') : void 0,
env.SystemRoot ? path.join(env.SystemRoot, 'Temp') : void 0,
env.windir ? path.join(env.windir, 'Temp') : void 0,
env.SystemDrive ? path.join(env.SystemDrive + '\\', 'Temp') : void 0,
];
return normalizePath(priorityList.find(function (v) { return !isEmpty(v); })) || fallback;
};
return { home: home, temp: temp };
};
var _OSPaths = (function () {
function _OSPaths() {
var OSPaths = function () {
return new _OSPaths();
};
var extension = isWinOS ? windows() : posix();
OSPaths.home = extension.home;
OSPaths.temp = extension.temp;
return OSPaths;
}
return _OSPaths;
}());
var default_ = new _OSPaths();
exports.default = default_;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiT1NQYXRocy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9saWIvT1NQYXRocy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFHQSxxQ0FBeUI7QUFDekIseUNBQTZCO0FBU3JCLElBQUEsR0FBRyxHQUFLLE9BQU8sSUFBWixDQUFhO0FBRXhCLElBQU0sT0FBTyxHQUFHLE9BQU8sQ0FBQyxJQUFJLENBQUMsT0FBTyxDQUFDLFFBQVEsQ0FBQyxDQUFDO0FBRS9DLFNBQVMsT0FBTyxDQUFDLENBQTRCO0lBQzVDLE9BQU8sQ0FBQyxDQUFDLENBQUM7QUFDWCxDQUFDO0FBRUQsU0FBUyxhQUFhLENBQUMsS0FBeUI7SUFDL0MsT0FBTyxLQUFLLENBQUMsQ0FBQyxDQUFDLElBQUksQ0FBQyxTQUFTLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxLQUFLLEVBQUUsR0FBRyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsS0FBSyxDQUFDLENBQUM7QUFDL0QsQ0FBQztBQUVELElBQU0sS0FBSyxHQUFHO0lBQ2IsSUFBTSxJQUFJLEdBQUc7UUFDWixPQUFBLGFBQWEsQ0FBQyxDQUFDLE9BQU8sRUFBRSxDQUFDLE9BQU8sS0FBSyxVQUFVLENBQUMsQ0FBQyxDQUFDLEVBQUUsQ0FBQyxPQUFPLEVBQUUsQ0FBQyxDQUFDLENBQUMsS0FBSyxDQUFDLENBQUMsSUFBSSxHQUFHLENBQUMsSUFBSSx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csU0FBUyxDQUFDLElBQUksQ0FBQztRQUU5QixPQUFPLE9BQU8sQ0FBQztJQUNoQixDQUFDO0lBQ0YsZUFBQztBQUFELENBQUMsQUFiRCxJQWFDO0FBRUQsSUFBTSxRQUFRLEdBQUcsSUFBSSxRQUFRLEVBQWEsQ0FBQztBQUMzQyxrQkFBZSxRQUFRLENBQUMifQ==
var OSPaths_ = (function () {
function OSPaths_() {
var OSPaths = function () {
return new OSPaths_();
};
var platformOS = isWinOS ? windows() : posix();
OSPaths.home = platformOS.home;
OSPaths.temp = platformOS.temp;
return OSPaths;
}
return OSPaths_;
}());
return new OSPaths_();
}
exports.OSPathsAdaptionBuilder_ = OSPathsAdaptionBuilder_;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiT1NQYXRocy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9saWIvT1NQYXRocy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7O0FBV0EsU0FBUyxPQUFPLENBQUMsQ0FBNEI7SUFDNUMsT0FBTyxDQUFDLENBQUMsQ0FBQztBQUNYLENBQUM7QUFFRCxTQUFnQix1QkFBdUIsQ0FBQyxRQUEwQjtJQUN6RCxJQUFBLEdBQUcsR0FBd0IsUUFBUSxJQUFoQyxFQUFFLEVBQUUsR0FBb0IsUUFBUSxHQUE1QixFQUFFLElBQUksR0FBYyxRQUFRLEtBQXRCLEVBQUUsT0FBTyxHQUFLLFFBQVEsUUFBYixDQUFjO0lBRTVDLElBQU0sT0FBTyxHQUFHLE9BQU8sQ0FBQyxJQUFJLENBQUMsT0FBTyxDQUFDLFFBQVEsQ0FBQyxDQUFDO0lBRS9DLFNBQVMsYUFBYSxDQUFDLEtBQXlCO1FBQy9DLE9BQU8sS0FBSyxDQUFDLENBQUMsQ0FBQyxJQUFJLENBQUMsU0FBUyxDQUFDLElBQUksQ0FBQyxJQUF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0FBRyxnQkFBZ0IsQ0FBQyxJQUFJLENBQUMsVUFBQyxDQUFDLElBQUssT0FBQSxDQUFDLElBQUksQ0FBQyxPQUFPLENBQUMsQ0FBQyxFQUFFLENBQUMsRUFBbEIsQ0FBa0IsQ0FBQyxDQUFDO1lBQzNELE9BQU8sQ0FBQyxDQUFDLElBQUksYUFBYSxDQUFDLENBQUMsRUFBRSxDQUFDLENBQUMsSUFBSSxRQUFRLENBQUM7UUFDOUMsQ0FBQyxDQUFDO1FBRUYsT0FBTyxFQUFFLElBQUksTUFBQSxFQUFFLElBQUksTUFBQSxFQUFFLENBQUM7SUFDdkIsQ0FBQyxDQUFDO0lBR0Y7UUFDQztZQUNDLElBQU0sT0FBTyxHQUFHO2dCQUNmLE9BQU8sSUFBSSxRQUFRLEVBQWEsQ0FBQztZQUNsQyxDQUFDLENBQUM7WUFHRixJQUFNLFVBQVUsR0FBRyxPQUFPLENBQUMsQ0FBQyxDQUFDLE9BQU8sRUFBRSxDQUFDLENBQUMsQ0FBQyxLQUFLLEVBQUUsQ0FBQztZQUNqRCxPQUFPLENBQUMsSUFBSSxHQUFHLFVBQVUsQ0FBQyxJQUFJLENBQUM7WUFDL0IsT0FBTyxDQUFDLElBQUksR0FBRyxVQUFVLENBQUMsSUFBSSxDQUFDO1lBRS9CLE9BQU8sT0FBTyxDQUFDO1FBQ2hCLENBQUM7UUFDRixlQUFDO0lBQUQsQ0FBQyxBQWJELElBYUM7SUFFRCxPQUFPLElBQUksUUFBUSxFQUFhLENBQUM7QUFDbEMsQ0FBQztBQWpGRCwwREFpRkMifQ==

@@ -1,3 +0,2 @@

import { default as default_ } from './lib/OSPaths';
export * from './lib/OSPaths';
declare const default_: import("./lib/OSPaths").OSPaths;
export default default_;

@@ -0,1 +1,2 @@

import { Platform } from '../platform-adapters/_base';
export declare type OSPaths = {

@@ -7,3 +8,2 @@ new (): OSPaths;

};
declare const default_: OSPaths;
export default default_;
export declare function OSPathsAdaptionBuilder_(adapter_: Platform.Adapter): OSPaths;
{
"name": "os-paths",
"version": "5.1.0",
"version": "6.0.0",
"description": "Generate portable common OS paths (home, temp, ...)",

@@ -12,3 +12,3 @@ "license": "MIT",

"engines": {
"node": ">= 6.0"
"node": ">= 4.0"
},

@@ -27,2 +27,14 @@ "files": [

"types": "dist/types/index.d.ts",
"exports": {
"./package.json": "./package.json",
".": [
{
"deno": "./src/mod.deno.ts",
"import": "./dist/cjs/esm-wrapper/index.js",
"require": "./dist/cjs/index.js",
"types": "./dist/types/index.d.ts"
},
"./dist/cjs/index.js"
]
},
"keywords": [

@@ -47,12 +59,14 @@ "common",

"# build # build/compile package": "",
"build": "run-s _:regen:build",
"build:cjs": "tsc -p tsconfig/tsconfig.cjs.json",
"build": "run-s \"+:regen:build\"",
"build:cjs": "shx rm -fr build/cjs && tsc -p tsconfig/tsconfig.cjs.json",
"build:cjs/esm": "shx rm -fr build/cjs/esm-wrapper && shx mkdir -p build/cjs && shx cp -r src/esm-wrapper build/cjs",
"## build:esm * [2020-12-22; rivy] TS compiles to ESMs are broken due to extension mishandling (use `rollup`)": "tsc -p tsconfig/tsconfig.esm.json",
"build:umd": "tsc -p tsconfig/tsconfig.umd.json",
"build:tests": "tsc -p tsconfig/tsconfig.tests.json",
"build:types": "tsc -p tsconfig/tsconfig.types.json && run-s _:update:dist.types",
"build:esm": "shx rm -fr build/esm && rollup -c .rollup.config.js",
"build:umd": "shx rm -fr build/umd && tsc -p tsconfig/tsconfig.umd.json",
"build:tests": "shx rm -fr build/cjs+tests && tsc -p tsconfig/tsconfig.tests.json",
"build:types": "shx rm -fr build/types && tsc -p tsconfig/tsconfig.types.json && run-s --silent _:update:dist.types",
"# clean # remove build artifacts": "",
"clean": "rimraf 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",
"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",

@@ -70,5 +84,7 @@ "cov:html": "nyc report --reporter=html",

"# help # display help": "",
"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(?:\\W+\\s*)([^#\\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": "run-s --silent _:help",
"# lint # check for package code 'lint'": "",
"lint": "run-s --silent _:max-node-8 && shx echo \"[lint] WARN Lint checks skipped [for NodeJS < v10]\" 1>&2 || run-p lint:*",
"lint": "run-s --silent +:max-node-8 && shx echo \"[lint] WARN Lint checks skipped [for NodeJS < v10]\" 1>&2 || run-p \"lint:*\"",
"# lint:commits # check for commit flaws (using `commitlint` and `cspell`)": "",
"lint:commits": "run-s --silent _:v_tag:missing || run-p --silent \"_:lint:commits.new:*\"",
"# lint:lint # check for code 'lint' (using `eslint`)": "",

@@ -79,3 +95,3 @@ "lint:lint": "eslint .",

"# lint:spell # check for spelling errors (using `cspell`)": "",
"lint:spell": "cspell {eg,examples,src,test}/**/* CHANGELOG{,.md,.mkd} README{,.md,.mkd} --no-summary",
"lint:spell": "cspell {eg,examples,src,test}/**/* CHANGELOG{,.md,.mkd} README{,.md,.mkd} --no-summary --config \".vscode/cspell.json\"",
"# lint:style # check for format imperfections (using `prettier`)": "",

@@ -92,38 +108,49 @@ "lint:style": "prettier . --list-different",

"# show:deps # show package dependencies": "",
"show:deps": "run-s --silent show:deps:prod show:deps:dev || shx true",
"show:deps:dev": "npm --silent ls --only development || shx true",
"show:deps:prod": "npm --silent ls --only production || shx true",
"show:deps": "run-s --silent _:show:deps:prod _:show:deps:dev || shx true",
"# test # test package": "",
"test": "run-s _:regen:lint/build && run-p test:*",
"test": "run-s \"+:regen:lint/build\" && run-p test:*",
"# test:code # test package code": "",
"test:code": "run-s --silent _:max-node-8 && (ava || exit 1) || nyc --silent ava",
"test:code": "run-s --silent +:max-node-8 && ava || ( run-s --silent +:min-node-10 && nyc --silent ava )",
"# test:types # test for type declaration errors (using `tsd`)": "",
"test:types": "run-s --silent _:max-node-8 && shx echo \"[test:types] WARN Type testing skipped [for NodeJS < v10]\" 1>&2 || tsd",
"test:types": "run-s --silent +:max-node-8 && shx echo \"[test:types] WARN Type testing skipped [for NodeJS < v10]\" 1>&2 || tsd",
"# update # update/prepare for distribution": "",
"update": "run-s update:changelog update:dist",
"# update:changelog # update CHANGELOG (using `git changelog ...`)": "",
"update:changelog": "run-s --silent _:update:changelog && (git diff --quiet --exit-code CHANGELOG.mkd || shx echo \"[update] info CHANGELOG updated\")",
"update:changelog": "run-s --silent _:update:changelog && git diff --quiet --exit-code CHANGELOG.mkd || shx echo \"[update] info CHANGELOG updated\"",
"# update:dist # update distribution content": "",
"update:dist": "run-s _:regen:build _:update:dist",
"_:coverage": "run-s _:regen:build+test:code && is-ci && run-s cov:send || run-s cov:view",
"_:exists:git-changelog": "node -e \"if (!require('command-exists').sync('git-changelog')){process.exit(1);};\" || (shx echo \"WARN `git-changelog` missing (try `go get -u github.com/rivy-go/git-changelog/cmd/git-changelog`)\" & exit 1)",
"_:max-node-8": "is-node-not-modern 10",
"_:min-node-10": "is-node-modern 10",
"_:regen:build": "run-p \"build:*\"",
"_:regen:build+test:code": "run-p \"build:*\" && run-s test:code",
"_:regen:lint/build": "run-s lint \"_:regen:build\"",
"update:dist": "run-s \"+:regen:build\" \"+:update:dist\"",
"## +:... == sub-scripts (may run 'visibly', but not user-facing)": "",
"+:coverage": "run-s \"+:regen:build+test:code\" && is-ci && run-s cov:send || run-s cov:view",
"+:max-node-8": "is-node-not-modern 10",
"+:min-node-10": "is-node-modern 10",
"+:regen:build": "exec-if-updated --source package.json --source tsconfig.json --source \"tsconfig/**\" --source rollup.config.js --source \"src/**\" --target \"build/**\" run-p \"build:*\"",
"+:regen:build+test:code": "exec-if-updated --source package.json --source tsconfig.json --source \"tsconfig/**\" --source rollup.config.js --source \"src/**\" --target \"build/**\" run-p \"build:*\" && run-s test:code",
"+:regen:update": "exec-if-updated --source \"build/**\" --target \"dist/**\" run-s --silent _:update:dist.build _:update:dist.types _:update:dist.build _:update:dist.normalizeEOF _:update:dist.pack",
"+:regen:lint/build": "exec-if-updated --source package.json --source tsconfig.json --source \"tsconfig/**\" --source rollup.config.js --source \"src/**\" --target \"build/**\" run-s lint \"+:regen:build\"",
"+:update:dist": "run-s --silent _:update:dist.build _:update:dist.types _:update:dist.normalizeEOL _:update:dist.pack",
"## _:... == sub-scripts ('hidden'; generally should be run 'silently' using `run-s/run-p --silent ...`": "",
"_:exists:git-changelog": "node -e \"if (!require('command-exists').sync('git-changelog')){process.exit(1);};\" || ( shx echo \"WARN `git-changelog` missing (try `go get -u github.com/rivy-go/git-changelog/cmd/git-changelog`)\" & exit 1 )",
"_: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(?:\\W+\\s*)([^#\\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]); } });\"",
"_: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); process.exit(1);} else {console.log(result.stdout);};\"",
"_:lint:commits.new:commitlint": "node -e \"v=require('./package.json').version; result=require('child_process').spawnSync('commitlint --config .commitlint.config.js --from v'+v,{shell:true,encoding:'utf-8'}); if (result.status != 0) {console.error('[commitlint] ERR! Flawed commit(s) found\\n'+result.stdout+'\\n'+result.stderr); process.exit(1);} else {console.log(result.stdout);};\"",
"_:lint:commits.new:spell": "node -e \"v=require('./package.json').version; result=require('child_process').spawnSync('git log v'+v+'.. --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); process.exit(1);} else {console.log(result.stdout);};\"",
"_:show:deps:dev": "npm --silent ls --only development || shx true",
"_:show:deps:prod": "npm --silent ls --only production || shx true",
"_:vcs-clean": "git diff --quiet",
"_:vcs-clean-err": "run-s --silent _:vcs-clean || (shx echo \"[vcs] ERR! Uncommitted changes\" 1>&2 & exit 1)",
"_:vcs-clean-err": "run-s --silent _:vcs-clean || ( shx echo \"[vcs] ERR! Uncommitted changes\" 1>&2 & exit 1 )",
"_:vcs-strictly-clean": "git status --porcelain | node -e \"process.stdin.on('data',function(_){process.exit(1);});\"",
"_:vcs-strictly-clean-err": "run-s --silent _:vcs-strictly-clean || (shx echo \"[vcs] ERR! Uncommitted changes and/or untracked files\" 1>&2 & exit 1)",
"_:vcs-strictly-clean-err": "run-s --silent _:vcs-strictly-clean || ( shx echo \"[vcs] ERR! Uncommitted changes and/or untracked files\" 1>&2 & exit 1 )",
"_:v_tag:exists": "node -e \"v=require('./package.json').version; result=require('child_process').spawnSync('git rev-list refs/tags/v'+v,{shell:true,encoding:'utf-8'}); if (result.status != 0) {console.error('[lint] WARN Missing commit tag v'+v); process.exit(1);}\"",
"_:v_tag:missing": "run-s --silent _:v_tag:exists && exit 1 || exit 0",
"_:update:changelog": "run-s --silent _:exists:git-changelog && git changelog > CHANGELOG.mkd || shx echo \"[update] WARN CHANGELOG not updated\" 1>&2",
"_:update:dist": "run-s _:update:dist.build _:update:dist.types _:update:dist.pack",
"_:update:dist.build": "shx mkdir -p dist && shx cp -r build/cjs dist",
"_:update:dist.pack": "npm pack && shx mv os-paths-*.tgz dist/os-paths.tgz",
"_:update:dist.types": "shx mkdir -p dist && shx cp -r build/types dist",
"_:version:spell:changelog_update": "run-s --silent _:exists:git-changelog && git changelog -u | cspell stdin || shx echo \"[lint] WARN CHANGELOG update `cspell` exception\" 1>&2",
"_:update:dist.build": "shx mkdir -p dist && shx rm -fr dist/cjs dist/esm && shx cp -r build/cjs build/esm dist",
"_:update:dist.normalizeEOL": "eolConverter lf dist/**/*.{cjs,js,mjs,ts,json}",
"_:update:dist.pack": "npm pack && shx mkdir -p dist && shx mv os-paths-*.tgz dist/os-paths.tgz",
"_:update:dist.types": "shx mkdir -p dist && shx rm -fr dist/types && shx cp -r build/types dist",
"_: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 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",
"prepublishOnly": "run-s test _:update:changelog _:update:dist.build _:vcs-strictly-clean-err",
"preversion": "run-s test _:vcs-strictly-clean-err _:version:spell:changelog_update",
"version": "run-s _:version:update:changelog lint:spell _:update:dist && git add CHANGELOG.mkd dist"
"## lifecycle scripts ##": "",
"prepublishOnly": "npm run test --test-for-dist && run-s --silent _:update:changelog _:update:dist.build _:update:dist.normalizeEOL && run-s --silent _:vcs-strictly-clean-err",
"preversion": "npm run test --test-for-dist && run-s --silent _:version:spell:changelog_update && run-s --silent _:vcs-strictly-clean-err",
"version": "run-s --silent _:version:update:changelog && run-s lint:spell \"+:update:dist\" && git add CHANGELOG.mkd dist"
},

@@ -134,19 +161,23 @@ "dependencies": {},

"@ava/typescript": "^1.1.1",
"@commitlint/cli": "^11.0.0",
"@commitlint/config-conventional": "^11.0.0",
"@istanbuljs/nyc-config-typescript": "^1.0.1",
"@types/node": "^14.14.14",
"@typescript-eslint/eslint-plugin": "^4.0.1",
"@typescript-eslint/parser": "^4.0.1",
"ava": "^1.4.1",
"@types/node": "^14.14.20",
"@typescript-eslint/eslint-plugin": "^4.12.0",
"@typescript-eslint/parser": "^4.12.0",
"ava": "^3.15.0",
"codecov": "^3.5.0",
"command-exists": "^1.2.9",
"coveralls": "^3.0.5",
"cross-spawn": "^6.0.5",
"cspell": "^4.1.2",
"eslint": "^7.11.0",
"eslint-config-prettier": "^6.11.0",
"cross-spawn": "^7.0.3",
"cspell": "^4.2.7",
"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.0.2 <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",
"exec-if-updated": "^1.1.1",
"is-ci": "^2.0.0",

@@ -162,5 +193,7 @@ "is-node-modern": "^1.0.0",

"rimraf": "^3.0.2",
"rollup": "^2.36.1",
"rollup-plugin-typescript2": "^0.29.0",
"shx": "^0.3.3",
"ts-node": "^9.0.0",
"tsd": "^0.13.1",
"tsd": "^0.14.0",
"typescript": "^4.1.3"

@@ -170,2 +203,5 @@ },

"ava": {
"files": [
"!**/*.test-d.ts"
],
"typescript": {

@@ -172,0 +208,0 @@ "rewritePaths": {

@@ -36,10 +36,2 @@ <!DOCTYPE markdown><!-- markdownlint-disable no-inline-html -->

> #### Requirements
>
> NodeJS >= 6.0[^*]
<!--{blockquote: .--info style="font-size:75%;"}-->
[^*]: With the conversion to a TypeScript-based project, due to tooling constraints, testing is more difficult and more limited on Node platforms earlier than Node-v10+. However, the generated CommonJS/UMD project code is still fully compatible with Node-v6+.
## Usage

@@ -97,2 +89,52 @@

## Supported Platforms
### NodeJS
> #### Requirements
>
> NodeJS >= 4.0[^*]
<!--{blockquote: .--info style="font-size:75%;"}-->
[^*]: With the conversion to a TypeScript-based project, due to tooling constraints, building and testing are more difficult and more limited on Node platforms earlier than NodeJS-v10. However, the generated CommonJS/UMD project code is fully tested (for NodeJS-v10+) and continues to be compatible with NodeJS-v4+.
#### CommonJS modules (CJS; `*.js` and `*.cjs`)
CJS is the basic supported output (back to versions as early as NodeJS-v4).
```js
const osPaths = require('os-paths');
console.log(osPaths.home());
console.log(osPaths.temp());
```
#### ECMAScript modules (ESM; `*.mjs`)
`OSPaths` fully supports ESM imports.
```js
import osPaths from 'os-paths';
console.log(osPaths.home());
console.log(osPaths.temp());
```
#### TypeScript (`*.ts`)
With `v5.0`+, `OSPaths` has been converted to a TypeScript-based module.
As a consequence, TypeScript type definitions are automatically generated, bundled, and exported by the module.
### Deno
`OSPaths` also fully supports use by Deno.
```js deno
import osPaths from 'https://cdn.jsdelivr.net/gh/rivy/js.os-paths@latest/src/mod.deno.ts';
console.log(osPaths.home());
console.log(osPaths.temp());
```
## Building and Contributing

@@ -113,3 +155,3 @@

- NodeJS >= 6.0
- NodeJS >= 10.14
- a JavaScript package/project manager ([`npm`](https://www.npmjs.com/get-npm) or [`yarn`](https://yarnpkg.com))

@@ -144,2 +186,3 @@

lint check for package code 'lint'
lint:commits check for commit flaws (using `commitlint` and `cspell`)
lint:lint check for code 'lint' (using `eslint`)

@@ -177,3 +220,3 @@ lint:markdown check for markdown errors (using `remark`)

[MIT](./LICENSE) © [Roy Ivy III](https://github.com/rivy), [Sindre Sorhus](https://sindresorhus.com)
[MIT](./LICENSE) © [Roy Ivy III](https://github.com/rivy)

@@ -227,4 +270,3 @@ <!-- badge references -->

<!-- [coverage-url]: https://coveralls.io/github/rivy/os-paths -->
<!-- [node-image]: https://img.shields.io/node/v/os-paths.svg?style=flat&color=darkcyan -->
<!-- [node-url]: https://npmjs.org/package/os-paths -->
<!-- [nodejsv-image]: https://img.shields.io/node/v/os-paths.svg?style=flat&color=darkcyan -->
<!-- [npm-image]: https://img.shields.io/npm/v/os-paths.svg?style=flat -->

@@ -231,0 +273,0 @@ <!-- [npm-image]: https://img.shields.io/npm/v/os-paths.svg?style=flat&label=npm&logo=NPM&logoColor=linen -->

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc