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.3.0 to 6.4.0

cjs/package.json

81

package.json
{
"name": "os-paths",
"version": "6.3.0",
"version": "6.4.0",
"description": "Determine common OS/platform paths (home, temp, ...)",

@@ -15,2 +15,3 @@ "license": "MIT",

"files": [
"cjs",
"dist/cjs",

@@ -24,16 +25,21 @@ "dist/types",

"type": "commonjs",
"main": "./dist/cjs/index.js",
"module": "./dist/cjs/esm-wrapper/index.js",
"types": "./dist/types/index.d.ts",
"main": "./dist/cjs/mod.cjs.js",
"module": "./dist/cjs/esm-wrapper/mod.esm.js",
"types": "./dist/types/mod.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"
"import": "./dist/cjs/esm-wrapper/mod.esm.js",
"require": "./dist/cjs/mod.cjs.js",
"types": "./dist/types/mod.d.ts",
"default": "./dist/cjs/mod.cjs.js"
},
"./dist/cjs/index.js"
]
"./dist/cjs/mod.cjs.js"
],
"./package.json": "./package.json",
"./cjs": {
"require": "./dist/cjs/mod.cjs.js",
"types": "./dist/cjs/mod.cjs.d.ts"
}
},

@@ -60,7 +66,7 @@ "keywords": [

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

@@ -99,8 +105,7 @@ "clean": "rimraf build dist",

"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",
"rebuild:cjs": "shx rm -fr build/cjs && tsc -p tsconfig/tsconfig.cjs.json && shx cp -r src/esm-wrapper build/cjs && shx mkdir -p build/.targets && shx touch build/.targets/build-cjs.succeeded",
"rebuild:esm": "shx rm -fr build/esm && tsc -p tsconfig/tsconfig.esm.json && shx cp src/esm-wrapper/package.json build/esm && shx mkdir -p build/.targets && shx touch build/.targets/build-esm.succeeded",
"rebuild:umd": "shx rm -fr build/umd && tsc -p tsconfig/tsconfig.umd.json && shx mkdir -p build/.targets && shx touch build/.targets/build-umd.succeeded",
"rebuild:tests": "shx rm -fr build/cjs+tests && tsc -p tsconfig/tsconfig.tests.json && shx mkdir -p build/.targets && shx touch build/.targets/build-cjs+tests.succeeded",
"rebuild:types": "shx rm -fr build/types && tsc -p tsconfig/tsconfig.types.json && shx mkdir -p build/.targets && shx touch build/.targets/build-types.succeeded",
"# retest # clean and (re-)test project": "",

@@ -123,3 +128,3 @@ "retest": "run-s clean test",

"# update:dist # update distribution content": "",
"update:dist": "run-s build && exec-if-updated --source \"build/**\" --target \"dist/**\" --target \"dist\" \"run-s --silent \"_:update:dist:rebuild\"\"",
"update:dist": "run-s --silent build && exec-if-updated --source \"build/**\" --target \"dist/**\" --target dist/.targets/update-dist.succeeded \"run-s --silent _:update:dist:rebuild\"",
"## +:... == sub-scripts (may run 'visibly', but not user-facing)": "",

@@ -132,3 +137,2 @@ "+:coverage": "run-s build test:code && is-ci && run-s cov:send || run-s cov:view",

"_: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);};\"",

@@ -148,9 +152,9 @@ "_: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": "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",
"_: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.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 && 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 dist/.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 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",
"## 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",
"prepublishOnly": "npm run clean && npm run test --test-for-dist && run-s --silent update _:vcs-strictly-clean-err",
"preversion": "run-s --silent _:version:spell:changelog_update && npm run test --test-for-dist",

@@ -166,2 +170,3 @@ "version": "run-s --silent _:version:update:changelog && run-s lint:spell && run-s --silent update:dist && git add CHANGELOG.mkd dist"

"@istanbuljs/nyc-config-typescript": "^1.0.1",
"@rollup/plugin-replace": "^2.3.4",
"@types/node": "^14.14.20",

@@ -217,3 +222,3 @@ "@typescript-eslint/eslint-plugin": "^4.12.0",

],
"timeout": "30s",
"timeout": "60s",
"typescript": {

@@ -243,22 +248,2 @@ "rewritePaths": {

},
"prettier # overrides/[*.markdown]/tabWidth": "// set to 4 when https://github.com/prettier/prettier/issues/5019 is fixed",
"prettier": {
"printWidth": 100,
"singleQuote": true,
"useTabs": true,
"tabWidth": 2,
"overrides": [
{
"files": [
"*.md",
"*.mkd",
"*.markdown"
],
"options": {
"tabWidth": 2,
"useTabs": false
}
}
]
},
"tsd": {

@@ -265,0 +250,0 @@ "directory": "test"

@@ -34,4 +34,5 @@ <!DOCTYPE markdown><!-- markdownlint-disable no-inline-html -->

npm install os-paths
# or... `npm install github:rivy/js.os-paths`
# or... `npm install "https://cdn.jsdelivr.net/gh/rivy/js.os-paths@latest/dist/os-paths.tgz"`
# or... `npm install "git:github.com/rivy/js.os-paths"`
# or... `npm install "git:github.com/rivy/js.os-paths#v6.3.0"`
# or... `npm install "https://cdn.jsdelivr.net/gh/rivy/js.os-paths/dist/os-paths.tgz"`
```

@@ -44,3 +45,3 @@

```js
const osPaths = require('os-paths');
const osPaths = require('os-paths/cjs');
const home = osPaths.home();

@@ -61,8 +62,11 @@ const temp = osPaths.temp();

```ts
import osPaths from 'https://deno.land/x/os_paths@v6.1.0/src/mod.deno.ts';
import osPaths from 'https://deno.land/x/os_paths/src/mod.deno.ts';
//or...
//import osPaths from 'https://deno.land/x/os_paths@v6.3.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@6.1.0/src/mod.deno.ts'; // v6.1.0
//import osPaths from 'https://cdn.jsdelivr.net/gh/rivy/js.os-paths@6.3.0/src/mod.deno.ts'; // v6.3.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
//import osPaths from 'https://cdn.jsdelivr.net/gh/rivy/js.os-paths@COMMIT/src/mod.deno.ts'; // commit
const home = osPaths.home();

@@ -79,6 +83,6 @@ const temp = osPaths.temp();

```js
const osPaths = require('os-paths'); // CJS
const osPaths = require('os-paths/cjs'); // CJS
//or...
//import osPaths from 'os-paths'; // ESM/TypeScript
//import osPaths from 'https://deno.land/x/os_paths@v6.1.0/src/mod.deno.ts'; // Deno
//import osPaths from 'https://deno.land/x/os_paths/src/mod.deno.ts'; // Deno
```

@@ -135,4 +139,3 @@

```js
const osPaths = require('os-paths');
const osPaths = require('os-paths/cjs');
console.log(osPaths.home());

@@ -142,2 +145,6 @@ console.log(osPaths.temp());

> Note: for CJS, `require('os-paths')` is supported for backward-compatibility and will execute correctly at run-time. However, this require construction links to the default package type declarations which, though _correct_ for Deno/ESM/TypeScript, are _incorrect_ for CJS. This, then, leads to incorrect analysis of CJS files by static analysis tools such as TypeScript and Intellisense.
>
> Using `require('os-paths/cjs')` is preferred as it associates the proper CJS type declarations and provides correct information to static analysis tools.
#### ECMAScript modules (ESM; `*.mjs`)

@@ -151,3 +158,2 @@

import osPaths from 'os-paths';
console.log(osPaths.home());

@@ -171,6 +177,3 @@ console.log(osPaths.temp());

```js deno
import osPaths from 'https://cdn.jsdelivr.net/gh/rivy/js.os-paths@latest/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';
import osPaths from 'https://deno.land/x/os_paths/src/mod.deno.ts';
console.log(osPaths.home());

@@ -177,0 +180,0 @@ console.log(osPaths.temp());

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