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 6.2.0 to 6.3.0

4

dist/cjs/index.js

@@ -5,3 +5,3 @@ "use strict";

var node_1 = require("./platform-adapters/node");
var default_ = OSPaths_1.OSPathsAdaptionBuilder_(node_1.adapter);
var default_ = OSPaths_1.Adapt(node_1.adapter).OSPaths;
exports["default"] = default_;

@@ -12,2 +12,2 @@ var haveModuleExports_ = typeof module === 'object' && module.exports;

}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFDQSx5Q0FBd0Q7QUFDeEQsaURBQW1EO0FBRW5ELElBQU0sUUFBUSxHQUFHLGlDQUF1QixDQUFDLGNBQU8sQ0FBQyxDQUFDO0FBQ2xELHFCQUFlLFFBQVEsQ0FBQztBQUV4QixJQUFNLGtCQUFrQixHQUFHLE9BQU8sTUFBTSxLQUFLLFFBQVEsSUFBSSxNQUFNLENBQUMsT0FBTyxDQUFDO0FBR3hFLElBQUksa0JBQWtCLEVBQUU7SUFLdkIsTUFBTSxDQUFDLE9BQU8sR0FBRyxRQUFRLENBQUM7Q0FDMUIifQ==
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFDQSx5Q0FBK0M7QUFDL0MsaURBQW1EO0FBRW5ELElBQU0sUUFBUSxHQUFZLGVBQUssQ0FBQyxjQUFPLENBQUMsQ0FBQyxPQUFPLENBQUM7QUFHakQscUJBQWUsUUFBUSxDQUFDO0FBRXhCLElBQU0sa0JBQWtCLEdBQUcsT0FBTyxNQUFNLEtBQUssUUFBUSxJQUFJLE1BQU0sQ0FBQyxPQUFPLENBQUM7QUFHeEUsSUFBSSxrQkFBa0IsRUFBRTtJQUt2QixNQUFNLENBQUMsT0FBTyxHQUFHLFFBQVEsQ0FBQztDQUMxQiJ9

@@ -10,18 +10,13 @@ "use strict";

exports.__esModule = true;
exports.OSPathsAdaptionBuilder_ = void 0;
exports.Adapt = void 0;
function isEmpty(s) {
return !s;
}
var Adapt;
(function (Adapt) {
Adapt.isWinOS = function (adapter_) { return /^win/i.test(adapter_.process.platform); };
Adapt.normalizePath = function (adapter_) {
return function (path_) {
return path_ ? adapter_.path.normalize(adapter_.path.join(path_, '.')) : void 0;
};
};
Adapt.home = function (adapter_) {
var env = adapter_.env, os = adapter_.os, path = adapter_.path;
var isWinOS = Adapt.isWinOS(adapter_);
var normalizePath = Adapt.normalizePath(adapter_);
function Adapt(adapter_) {
var env = adapter_.env, os = adapter_.os, path = adapter_.path;
var isWinOS = /^win/i.test(adapter_.process.platform);
function normalizePath(path_) {
return path_ ? adapter_.path.normalize(adapter_.path.join(path_, '.')) : void 0;
}
function home() {
var posix = function () {

@@ -41,12 +36,9 @@ return normalizePath((typeof os.homedir === 'function' ? os.homedir() : void 0) || env.get('HOME'));

};
return isWinOS ? windows : posix;
};
Adapt.temp = function (adapter_) {
var env = adapter_.env, os = adapter_.os, path = adapter_.path;
var isWinOS = Adapt.isWinOS(adapter_);
var normalizePath = Adapt.normalizePath(adapter_);
return isWinOS ? windows() : posix();
}
function temp() {
function joinPathToBase(base, segments) {
return base ? path.join.apply(path, __spreadArrays([base], segments)) : void 0;
}
var posix = function () {
function posix() {
var fallback = '/tmp';

@@ -60,4 +52,4 @@ var priorityList = [

return normalizePath(priorityList.find(function (v) { return !isEmpty(v); })) || fallback;
};
var windows = function () {
}
function windows() {
var fallback = 'C:\\Temp';

@@ -69,3 +61,3 @@ var priorityListLazy = [

function () { return joinPathToBase(env.get('LOCALAPPDATA'), ['Temp']); },
function () { return joinPathToBase(Adapt.home(adapter_)(), ['AppData', 'Local', 'Temp']); },
function () { return joinPathToBase(home(), ['AppData', 'Local', 'Temp']); },
function () { return joinPathToBase(env.get('ALLUSERSPROFILE'), ['Temp']); },

@@ -78,21 +70,19 @@ function () { return joinPathToBase(env.get('SystemRoot'), ['Temp']); },

return (v && normalizePath(v())) || fallback;
};
return isWinOS ? windows : posix;
};
})(Adapt || (Adapt = {}));
function OSPathsAdaptionBuilder_(adapter_) {
function OSPaths() {
return obj;
}
return isWinOS ? windows() : posix();
}
var home = Adapt.home(adapter_);
var temp = Adapt.temp(adapter_);
Object.defineProperty(home, 'name', { value: 'home' });
Object.defineProperty(temp, 'name', { value: 'temp' });
var obj = Object.assign(OSPaths, {
home: home,
temp: temp
});
return obj;
var OSPaths_ = (function () {
function OSPaths_() {
function OSPaths() {
return new OSPaths_();
}
OSPaths.home = home;
OSPaths.temp = temp;
return OSPaths;
}
return OSPaths_;
}());
return { OSPaths: new OSPaths_() };
}
exports.OSPathsAdaptionBuilder_ = OSPathsAdaptionBuilder_;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiT1NQYXRocy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9saWIvT1NQYXRocy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7O0FBa0JBLFNBQVMsT0FBTyxDQUFDLENBQTRCO0lBQzVDLE9BQU8sQ0FBQyxDQUFDLENBQUM7QUFDWCxDQUFDO0FBR0QsSUFBVSxLQUFLLENBeUVkO0FBekVELFdBQVUsS0FBSztJQUNELGFBQU8sR0FBRyxVQUFDLFFBQTBCLElBQUssT0FBQSxPQUFPLENBQUMsSUFBSSxDQUF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U8sQ0FBQyxJQUFJLEdBQUcsSUFBSSxDQUFDO1lBRXBCLE9BQU8sT0FBTyxDQUFDO1FBQ2hCLENBQUM7UUFDRixlQUFDO0lBQUQsQ0FBQyxBQVhELElBV0M7SUFFRCxPQUFPLEVBQUUsT0FBTyxFQUFFLElBQUksUUFBUSxFQUFhLEVBQUUsQ0FBQztBQUMvQyxDQUFDO0FBR1Esc0JBQUsifQ==

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

declare const default_: import("./lib/OSPaths").OSPaths;
/** Determine common OS/platform paths (home, temp, ...) */
declare type OSPaths = {
/** @constructor Create an `OSPaths` object. */
(): OSPaths;
/** @constructor Create an `OSPaths` object. */
new (): OSPaths;
/** Returns the path string of the user's home directory (or `undefined`if the user's home directory is not resolvable). */
home(): string | undefined;
/** Returns the path string of the system's default directory for temporary files. */
temp(): string;
};
declare const default_: OSPaths;
export default default_;
export { OSPaths };
{
"name": "os-paths",
"version": "6.2.0",
"version": "6.3.0",
"description": "Determine common OS/platform paths (home, temp, ...)",

@@ -57,10 +57,8 @@ "license": "MIT",

"# build # build/compile package": "",
"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: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",
"build": "run-p --silent \"build:*\"",
"build:cjs": "exec-if-updated --source package.json --source tsconfig.json --source \"tsconfig/**\" --source rollup.config.js --source \"src/**\" --target \"build/cjs/**\" \"run-s -n rebuild:cjs\"",
"build:esm": "exec-if-updated --source package.json --source tsconfig.json --source \"tsconfig/**\" --source rollup.config.js --source \"src/**\" --target \"build/esm/**\" \"run-s -n rebuild:esm\"",
"build:umd": "exec-if-updated --source package.json --source tsconfig.json --source \"tsconfig/**\" --source rollup.config.js --source \"src/**\" --target \"build/umd/**\" \"run-s -n rebuild:umd\"",
"build:tests": "exec-if-updated --source package.json --source tsconfig.json --source \"tsconfig/**\" --source rollup.config.js --source \"src/**\" --target \"build/cjs+tests/**\" \"run-s -n rebuild:tests\"",
"build:types": "exec-if-updated --source package.json --source tsconfig.json --source \"tsconfig/**\" --source rollup.config.js --source \"src/**\" --target \"build/types/**\" \"run-s -n rebuild:types\"",
"# clean # remove build artifacts": "",

@@ -84,3 +82,3 @@ "clean": "rimraf build dist",

"# 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 --print-name \"lint:*\"",
"# lint:commits # check for commit flaws (using `commitlint` and `cspell`)": "",

@@ -100,2 +98,8 @@ "lint:commits": "run-s --silent _:v_tag:missing || run-p --silent \"_:lint:commits.new:*\"",

"rebuild": "run-s clean build",
"rebuild:cjs": "shx rm -fr build/cjs && tsc -p tsconfig/tsconfig.cjs.json && shx cp -r src/esm-wrapper build/cjs",
"## rebuild:esm * [2020-12-22; rivy] TS compiles to ESMs are broken due to extension mishandling (use `rollup`)": "tsc -p tsconfig/tsconfig.esm.json",
"rebuild:esm": "shx rm -fr build/esm && rollup -c .rollup.config.js",
"rebuild:umd": "shx rm -fr build/umd && tsc -p tsconfig/tsconfig.umd.json",
"rebuild:tests": "shx rm -fr build/cjs+tests && tsc -p tsconfig/tsconfig.tests.json",
"rebuild:types": "shx rm -fr build/types && tsc -p tsconfig/tsconfig.types.json",
"# retest # clean and (re-)test project": "",

@@ -108,3 +112,3 @@ "retest": "run-s clean test",

"# test # test package": "",
"test": "run-s \"+:regen:lint/build\" && run-p test:*",
"test": "run-s --silent lint update:dist && run-p test:*",
"# test:code # test package code": "",

@@ -119,15 +123,11 @@ "test:code": "run-s --silent +:max-node-8 && ava || ( run-s --silent +:min-node-10 && nyc --silent ava )",

"# update:dist # update distribution content": "",
"update:dist": "run-s \"+:regen:build\" \"+:update:dist\"",
"update:dist": "run-s build && exec-if-updated --source \"build/**\" --target \"dist/**\" --target \"dist\" \"run-s --silent \"_:update:dist:rebuild\"\"",
"## +:... == 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",
"+:coverage": "run-s 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]); } });\"",
"_:if-newer:lint": "exec-if-updated --source package.json --source tsconfig.json --source \"tsconfig/**\" --source rollup.config.js --source \"src/**\" --target \"build/**\" --target build \"run-s --print-name lint\"",
"_: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);};\"",

@@ -147,4 +147,5 @@ "_: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);};\"",

"_: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",
"_:update:dist.pack": "node -e \"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); 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",
"_:update:dist:rebuild": "shx rm -fr dist && run-s --silent _:update:dist.build _:update:dist.types _:update:dist.normalizeEOL _:update:dist.pack",
"_: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",

@@ -154,4 +155,4 @@ "_: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": "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"
"preversion": "run-s --silent _:version:spell:changelog_update && npm run test --test-for-dist",
"version": "run-s --silent _:version:update:changelog && run-s lint:spell && run-s --silent update:dist && git add CHANGELOG.mkd dist"
},

@@ -182,3 +183,3 @@ "dependencies": {},

"eslint-plugin-security-node": "^1.0.14",
"exec-if-updated": "^1.1.1",
"exec-if-updated": "git://github.com/rivy/js-cli.exec-if-updated.git#v2.0.0",
"is-ci": "^2.0.0",

@@ -192,5 +193,14 @@ "is-node-modern": "^1.0.0",

"remark-footnotes": "^3.0.0",
"remark-preset-lint-consistent": "^4.0.0",
"remark-preset-lint-markdown-style-guide": "^4.0.0",
"remark-preset-lint-recommended": "^5.0.0",
"remark-retext": "^4.0.0",
"retext-english": "^3.0.4",
"retext-passive": "^3.0.0",
"retext-repeated-words": "^3.0.0",
"retext-sentence-spacing": "^4.0.0",
"retext-syntax-urls": "^2.0.0",
"rimraf": "^3.0.2",
"rollup": "^2.36.1",
"rollup-plugin-dts": "^2.0.1",
"rollup-plugin-typescript2": "^0.29.0",

@@ -200,3 +210,4 @@ "shx": "^0.3.3",

"tsd": "^0.14.0",
"typescript": "^4.1.3"
"typescript": "^4.1.3",
"unified": "^9.2.0"
},

@@ -203,0 +214,0 @@ "optionalDependencies": {},

@@ -8,3 +8,3 @@ <!DOCTYPE markdown><!-- markdownlint-disable no-inline-html -->

<!-- spell-checker:ignore (abbrev/jargon) CICD CJS ESM ESMs -->
<!-- spell-checker:ignore (names) Codacy Deno -->
<!-- spell-checker:ignore (names) Codacy Deno JSDelivr npmJS -->
<!-- spell-checker:ignore (targets) realclean -->

@@ -25,5 +25,7 @@ <!-- spell-checker:ignore (people) rivy -->

[![Repository][repository-image]][repository-url]
[![Deno version][deno-image]][deno-url]
[![NPM version][npm-image]][npm-url]
[![NodeJS version][nodejsv-image]][repository-url]
[![Downloads][downloads-image]][downloads-url]
[![npmJS Downloads][downloads-image]][downloads-url]
[![JSDelivr Downloads][jsdelivr-image]][jsdelivr-url]

@@ -60,4 +62,7 @@ ## Installation (CJS/ESM/TypeScript)

import osPaths from 'https://deno.land/x/os_paths@v6.1.0/src/mod.deno.ts';
//or (via CDN, with semver support)...
//import osPaths from 'https://cdn.jsdelivr.net/gh/rivy/js.os-paths@6/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@6.1.0/src/mod.deno.ts'; // v6.1.0
//import osPaths from 'https://cdn.jsdelivr.net/gh/rivy/js.os-paths@6/src/mod.deno.ts'; // v6.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
const home = osPaths.home();

@@ -256,5 +261,5 @@ const temp = osPaths.temp();

[repository-url]: https://github.com/rivy/js.os-paths
[license-image]: https://img.shields.io/npm/l/os-paths.svg?color=royalblue&style=flat
[license-image]: https://img.shields.io/npm/l/os-paths.svg?color=tomato&style=flat
[license-url]: license
[nodejsv-image]: https://img.shields.io/node/v/os-paths?color=blue
[nodejsv-image]: https://img.shields.io/node/v/os-paths?color=slateblue
[style-image]: https://img.shields.io/badge/code_style-prettier-mediumvioletred.svg

@@ -285,6 +290,10 @@ [style-url]: https://prettier.io

[deno-image]: https://img.shields.io/github/package-json/v/rivy/js.os-paths/master?label=deno
[deno-url]: https://deno.land/x/os_paths
[downloads-image]: http://img.shields.io/npm/dm/os-paths.svg?style=flat
[downloads-url]: https://npmjs.org/package/os-paths
[jsdelivr-image]: https://img.shields.io/jsdelivr/gh/hm/rivy/js.os-paths?style=flat
[jsdelivr-url]: https://www.jsdelivr.com/package/gh/rivy/js.os-paths
[npm-image]: https://img.shields.io/npm/v/os-paths.svg?style=flat
[npm-url]: https://npmjs.org/package/os-paths
[downloads-image]: http://img.shields.io/npm/dm/os-paths.svg?style=flat
[downloads-url]: https://npmjs.org/package/os-paths

@@ -291,0 +300,0 @@ <!-- Alternate/Old image/URL links -->

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