aurelia-path
Advanced tools
Comparing version 1.1.7 to 1.1.8
@@ -1,2 +0,2 @@ | ||
define(['exports'], function (exports) { 'use strict'; | ||
define(['exports'], (function (exports) { 'use strict'; | ||
@@ -93,3 +93,4 @@ function trimDots(ary) { | ||
var encode = encodeURIComponent; | ||
var encodeKey = function (k) { return encode(k).replace('%24', '$'); }; | ||
var dollarSignRegex = /%24/g; | ||
var encodeKey = function (k) { return encode(k).replace(dollarSignRegex, '$'); }; | ||
function buildParam(key, value, traditional) { | ||
@@ -103,3 +104,3 @@ var result = []; | ||
if (traditional) { | ||
result.push(encodeKey(key) + "=" + encode(value[i])); | ||
result.push("".concat(encodeKey(key), "=").concat(encode(value[i]))); | ||
} | ||
@@ -118,3 +119,3 @@ else { | ||
else { | ||
result.push(encodeKey(key) + "=" + encode(value)); | ||
result.push("".concat(encodeKey(key), "=").concat(encode(value))); | ||
} | ||
@@ -215,3 +216,3 @@ return result; | ||
}); | ||
})); | ||
//# sourceMappingURL=aurelia-path.js.map |
@@ -95,3 +95,4 @@ 'use strict'; | ||
var encode = encodeURIComponent; | ||
var encodeKey = function (k) { return encode(k).replace('%24', '$'); }; | ||
var dollarSignRegex = /%24/g; | ||
var encodeKey = function (k) { return encode(k).replace(dollarSignRegex, '$'); }; | ||
function buildParam(key, value, traditional) { | ||
@@ -105,3 +106,3 @@ var result = []; | ||
if (traditional) { | ||
result.push(encodeKey(key) + "=" + encode(value[i])); | ||
result.push("".concat(encodeKey(key), "=").concat(encode(value[i]))); | ||
} | ||
@@ -120,3 +121,3 @@ else { | ||
else { | ||
result.push(encodeKey(key) + "=" + encode(value)); | ||
result.push("".concat(encodeKey(key), "=").concat(encode(value))); | ||
} | ||
@@ -123,0 +124,0 @@ return result; |
@@ -91,3 +91,4 @@ function trimDots(ary) { | ||
let encode = encodeURIComponent; | ||
let encodeKey = k => encode(k).replace('%24', '$'); | ||
const dollarSignRegex = /%24/g; | ||
let encodeKey = k => encode(k).replace(dollarSignRegex, '$'); | ||
function buildParam(key, value, traditional) { | ||
@@ -94,0 +95,0 @@ let result = []; |
@@ -91,3 +91,4 @@ function trimDots(ary) { | ||
var encode = encodeURIComponent; | ||
var encodeKey = function (k) { return encode(k).replace('%24', '$'); }; | ||
var dollarSignRegex = /%24/g; | ||
var encodeKey = function (k) { return encode(k).replace(dollarSignRegex, '$'); }; | ||
function buildParam(key, value, traditional) { | ||
@@ -101,3 +102,3 @@ var result = []; | ||
if (traditional) { | ||
result.push(encodeKey(key) + "=" + encode(value[i])); | ||
result.push("".concat(encodeKey(key), "=").concat(encode(value[i]))); | ||
} | ||
@@ -116,3 +117,3 @@ else { | ||
else { | ||
result.push(encodeKey(key) + "=" + encode(value)); | ||
result.push("".concat(encodeKey(key), "=").concat(encode(value))); | ||
} | ||
@@ -119,0 +120,0 @@ return result; |
@@ -1,5 +0,5 @@ | ||
System.register([], function (exports) { | ||
System.register([], (function (exports) { | ||
'use strict'; | ||
return { | ||
execute: function () { | ||
execute: (function () { | ||
@@ -103,3 +103,4 @@ exports({ | ||
var encode = encodeURIComponent; | ||
var encodeKey = function (k) { return encode(k).replace('%24', '$'); }; | ||
var dollarSignRegex = /%24/g; | ||
var encodeKey = function (k) { return encode(k).replace(dollarSignRegex, '$'); }; | ||
function buildParam(key, value, traditional) { | ||
@@ -113,3 +114,3 @@ var result = []; | ||
if (traditional) { | ||
result.push(encodeKey(key) + "=" + encode(value[i])); | ||
result.push("".concat(encodeKey(key), "=").concat(encode(value[i]))); | ||
} | ||
@@ -128,3 +129,3 @@ else { | ||
else { | ||
result.push(encodeKey(key) + "=" + encode(value)); | ||
result.push("".concat(encodeKey(key), "=").concat(encode(value))); | ||
} | ||
@@ -218,5 +219,5 @@ return result; | ||
} | ||
}) | ||
}; | ||
}); | ||
})); | ||
//# sourceMappingURL=aurelia-path.js.map |
@@ -0,4 +1,31 @@ | ||
/** | ||
* Calculates a path relative to a file. | ||
* | ||
* @param name The relative path. | ||
* @param file The file path. | ||
* @return The calculated path. | ||
*/ | ||
export declare function relativeToFile(name: string, file: string): string; | ||
/** | ||
* Joins two paths. | ||
* | ||
* @param path1 The first path. | ||
* @param path2 The second path. | ||
* @return The joined path. | ||
*/ | ||
export declare function join(path1: string, path2: string): string; | ||
/** | ||
* Generate a query string from an object. | ||
* | ||
* @param params Object containing the keys and values to be used. | ||
* @param traditional Boolean Use the old URI template standard (RFC6570) | ||
* @returns The generated query string, excluding leading '?'. | ||
*/ | ||
export declare function buildQueryString(params?: Object, traditional?: boolean): string; | ||
/** | ||
* Parse a query string. | ||
* | ||
* @param queryString The query string to parse. | ||
* @returns Object with keys and values mapped from the query string. | ||
*/ | ||
export declare function parseQueryString(queryString: string): Object; |
@@ -1,1 +0,1 @@ | ||
{"id":0,"name":"aurelia-path","kind":0,"kindString":"Project","flags":{},"originalName":"","children":[{"id":9,"name":"buildQueryString","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"index.ts","line":161,"character":32}],"signatures":[{"id":10,"name":"buildQueryString","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Generate a query string from an object.","returns":"The generated query string, excluding leading '?'.\n"},"parameters":[{"id":11,"name":"params","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"text":"Object containing the keys and values to be used."},"type":{"type":"reference","name":"Object"}},{"id":12,"name":"traditional","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"text":"Boolean Use the old URI template standard (RFC6570)"},"type":{"type":"intrinsic","name":"boolean"}}],"type":{"type":"intrinsic","name":"string"}}]},{"id":5,"name":"join","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"index.ts","line":56,"character":20}],"signatures":[{"id":6,"name":"join","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Joins two paths.","returns":"The joined path.\n"},"parameters":[{"id":7,"name":"path1","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The first path."},"type":{"type":"intrinsic","name":"string"}},{"id":8,"name":"path2","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The second path."},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"intrinsic","name":"string"}}]},{"id":13,"name":"parseQueryString","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"index.ts","line":230,"character":32}],"signatures":[{"id":14,"name":"parseQueryString","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Parse a query string.","returns":"Object with keys and values mapped from the query string.\n"},"parameters":[{"id":15,"name":"queryString","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The query string to parse."},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","name":"Object"}}]},{"id":1,"name":"relativeToFile","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"index.ts","line":30,"character":30}],"signatures":[{"id":2,"name":"relativeToFile","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Calculates a path relative to a file.","returns":"The calculated path.\n"},"parameters":[{"id":3,"name":"name","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The relative path."},"type":{"type":"intrinsic","name":"string"}},{"id":4,"name":"file","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The file path."},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"intrinsic","name":"string"}}]}],"groups":[{"title":"Functions","kind":64,"children":[9,5,13,1]}],"sources":[{"fileName":"index.ts","line":1,"character":0}]} | ||
{"id":0,"name":"aurelia-path","variant":"project","kind":1,"flags":{},"children":[{"id":9,"name":"buildQueryString","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"index.ts","line":162,"character":16,"url":"https://github.com/aurelia/path/blob/919e13412722f6fb05e4d26254651495e41fa8e1/src/index.ts#L162"}],"signatures":[{"id":10,"name":"buildQueryString","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Generate a query string from an object."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"The generated query string, excluding leading '?'."}]}]},"sources":[{"fileName":"index.ts","line":162,"character":16,"url":"https://github.com/aurelia/path/blob/919e13412722f6fb05e4d26254651495e41fa8e1/src/index.ts#L162"}],"parameters":[{"id":11,"name":"params","variant":"param","kind":32768,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Object containing the keys and values to be used."}]},"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Object"},"name":"Object","package":"typescript"}},{"id":12,"name":"traditional","variant":"param","kind":32768,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Boolean Use the old URI template standard (RFC6570)"}]},"type":{"type":"intrinsic","name":"boolean"}}],"type":{"type":"intrinsic","name":"string"}}]},{"id":5,"name":"join","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"index.ts","line":56,"character":16,"url":"https://github.com/aurelia/path/blob/919e13412722f6fb05e4d26254651495e41fa8e1/src/index.ts#L56"}],"signatures":[{"id":6,"name":"join","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Joins two paths."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"The joined path."}]}]},"sources":[{"fileName":"index.ts","line":56,"character":16,"url":"https://github.com/aurelia/path/blob/919e13412722f6fb05e4d26254651495e41fa8e1/src/index.ts#L56"}],"parameters":[{"id":7,"name":"path1","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The first path."}]},"type":{"type":"intrinsic","name":"string"}},{"id":8,"name":"path2","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The second path."}]},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"intrinsic","name":"string"}}]},{"id":13,"name":"parseQueryString","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"index.ts","line":231,"character":16,"url":"https://github.com/aurelia/path/blob/919e13412722f6fb05e4d26254651495e41fa8e1/src/index.ts#L231"}],"signatures":[{"id":14,"name":"parseQueryString","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Parse a query string."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"Object with keys and values mapped from the query string."}]}]},"sources":[{"fileName":"index.ts","line":231,"character":16,"url":"https://github.com/aurelia/path/blob/919e13412722f6fb05e4d26254651495e41fa8e1/src/index.ts#L231"}],"parameters":[{"id":15,"name":"queryString","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The query string to parse."}]},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Object"},"name":"Object","package":"typescript"}}]},{"id":1,"name":"relativeToFile","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"index.ts","line":30,"character":16,"url":"https://github.com/aurelia/path/blob/919e13412722f6fb05e4d26254651495e41fa8e1/src/index.ts#L30"}],"signatures":[{"id":2,"name":"relativeToFile","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Calculates a path relative to a file."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"The calculated path."}]}]},"sources":[{"fileName":"index.ts","line":30,"character":16,"url":"https://github.com/aurelia/path/blob/919e13412722f6fb05e4d26254651495e41fa8e1/src/index.ts#L30"}],"parameters":[{"id":3,"name":"name","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The relative path."}]},"type":{"type":"intrinsic","name":"string"}},{"id":4,"name":"file","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The file path."}]},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"intrinsic","name":"string"}}]}],"groups":[{"title":"Functions","children":[9,5,13,1]}],"packageName":"aurelia-path","readme":[{"kind":"text","text":"# aurelia-path\n\n[![npm Version](https://img.shields.io/npm/v/aurelia-path.svg)](https://www.npmjs.com/package/aurelia-path)\n[![Discord Chat](https://img.shields.io/discord/448698263508615178.svg)](https://discord.gg/RBtyM6u)\n[![Open in Visual Studio Code](https://open.vscode.dev/badges/open-in-vscode.svg)](https://open.vscode.dev/aurelia/path)\n\nThis library is part of the [Aurelia](http://www.aurelia.io/) platform and contains utilities for path manipulation.\n\n> To keep up to date on [Aurelia](http://www.aurelia.io/), please visit and subscribe to [the official blog](http://blog.aurelia.io/) and [our email list](http://eepurl.com/ces50j). We also invite you to [follow us on twitter](https://twitter.com/aureliaeffect). If you have questions, please [join our community on Discord](https://discord.gg/RBtyM6u) or use [stack overflow](http://stackoverflow.com/search?q=aurelia). Documentation can be found [in our developer hub](http://aurelia.io/hub.html).\n\n## Platform Support\n\nThis library can be used in the **browser** as well as on the **server**.\n\n## Building The Code\n\nTo build the code, follow these steps.\n\n1. Ensure that [NodeJS](http://nodejs.org/) is installed. This provides the platform on which the build tooling runs.\n2. From the project folder, execute the following command:\n\n "},{"kind":"code","text":"```shell\n npm ci\n ```"},{"kind":"text","text":"\n3. To build the code, you can now run:\n\n "},{"kind":"code","text":"```shell\n npm run build\n ```"},{"kind":"text","text":"\n5. You will find the compiled code in the "},{"kind":"code","text":"`dist`"},{"kind":"text","text":" folder, available in three module formats: AMD, CommonJS and ES6.\n\n## Running The Tests\n\nTo run the unit tests, first ensure that you have followed the steps above in order to install all dependencies and successfully build the library. Once you have done that, proceed with these additional steps:\n\n1. You can now run the tests with this command:\n\n "},{"kind":"code","text":"```shell\n npm test\n ```"}],"symbolIdMap":{"0":{"sourceFileName":"src/index.ts","qualifiedName":""},"1":{"sourceFileName":"src/index.ts","qualifiedName":"relativeToFile"},"2":{"sourceFileName":"src/index.ts","qualifiedName":"relativeToFile"},"3":{"sourceFileName":"src/index.ts","qualifiedName":"name"},"4":{"sourceFileName":"src/index.ts","qualifiedName":"file"},"5":{"sourceFileName":"src/index.ts","qualifiedName":"join"},"6":{"sourceFileName":"src/index.ts","qualifiedName":"join"},"7":{"sourceFileName":"src/index.ts","qualifiedName":"path1"},"8":{"sourceFileName":"src/index.ts","qualifiedName":"path2"},"9":{"sourceFileName":"src/index.ts","qualifiedName":"buildQueryString"},"10":{"sourceFileName":"src/index.ts","qualifiedName":"buildQueryString"},"11":{"sourceFileName":"src/index.ts","qualifiedName":"params"},"12":{"sourceFileName":"src/index.ts","qualifiedName":"traditional"},"13":{"sourceFileName":"src/index.ts","qualifiedName":"parseQueryString"},"14":{"sourceFileName":"src/index.ts","qualifiedName":"parseQueryString"},"15":{"sourceFileName":"src/index.ts","qualifiedName":"queryString"}},"files":{"entries":{"1":"src/index.ts"},"reflections":{"1":0}}} |
@@ -1,3 +0,17 @@ | ||
## <small>1.1.7 (2021-09-26)</small> | ||
# Changelog | ||
All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines. | ||
## [1.1.8](https://github.com/aurelia/path/compare/1.1.7...1.1.8) (2024-08-11) | ||
### Bug Fixes | ||
* update $ replace with global regexp ([#54](https://github.com/aurelia/path/issues/54)) ([919e134](https://github.com/aurelia/path/commit/919e13412722f6fb05e4d26254651495e41fa8e1)) | ||
## [1.1.7](https://github.com/aurelia/path/compare/1.1.6...1.1.7) (2021-09-26) | ||
### Bug Fixes | ||
* fix: security issue gh closes #44 ([7c4e235](https://github.com/aurelia/path/commit/7c4e235)), closes [#44](https://github.com/aurelia/path/issues/44) | ||
@@ -10,4 +24,2 @@ * fix(security): prevent proto pollution in simple assignment ([d3bb6fa](https://github.com/aurelia/path/commit/d3bb6fa)) | ||
<a name="1.1.6"></a> | ||
@@ -14,0 +26,0 @@ ## [1.1.6](https://github.com/aurelia/path/compare/1.1.2...1.1.6) (2019-10-15) |
{ | ||
"name": "aurelia-path", | ||
"version": "1.1.7", | ||
"version": "1.1.8", | ||
"description": "Utilities for path manipulation.", | ||
@@ -23,10 +23,13 @@ "keywords": [ | ||
"scripts": { | ||
"lint": "oxlint", | ||
"clean": "rimraf dist", | ||
"test": "cross-env TS_NODE_PROJECT=\"tsconfig.test.json\" mocha --require ts-node/register test/*.spec.ts", | ||
"build": "npm run clean && npm run rollup && npm run build:types", | ||
"build:types": "tsc --emitDeclarationOnly --declaration --declarationDir dist/types", | ||
"doc": "typedoc --entryPoints src/index.ts --json doc/api.json", | ||
"lint": "eslint ./src ./test --ext .ts,.tsx", | ||
"rollup": "rollup -c", | ||
"cut-release": "gulp prepare-release" | ||
"test": "bun test --coverage", | ||
"test:watch": "npm run test -- --watch", | ||
"build": "npm run clean && npm run rollup && npm run build:dts", | ||
"build:dts": "tsc --emitDeclarationOnly --declaration --declarationDir dist/types", | ||
"doc": "typedoc --entryPoints src/index.ts --json doc/api.json --pretty false", | ||
"rollup": "rollup -c --esModule", | ||
"precut-release": "npm run test && npm run lint && npm run build", | ||
"cut-release": "commit-and-tag-version -t \"\" -i doc/CHANGELOG.md --skip.commit --skip.tag", | ||
"postcut-release": "npm run doc" | ||
}, | ||
@@ -41,34 +44,15 @@ "files": [ | ||
], | ||
"jspm": { | ||
"registry": "npm", | ||
"main": "aurelia-path", | ||
"format": "amd", | ||
"directories": { | ||
"dist": "dist/amd" | ||
} | ||
}, | ||
"devDependencies": { | ||
"@rollup/plugin-typescript": "^8.2.1", | ||
"@types/mocha": "^8.2.2", | ||
"@typescript-eslint/eslint-plugin": "^4.26.1", | ||
"@typescript-eslint/parser": "^4.26.1", | ||
"cross-env": "^7.0.3", | ||
"eslint": "^7.28.0", | ||
"gulp": "^4.0.2", | ||
"gulp-bump": "^3.2.0", | ||
"gulp-conventional-changelog": "^2.0.35", | ||
"gulp-util": "^3.0.8", | ||
"mocha": "^9.0.0", | ||
"require-dir": "^0.3.0", | ||
"rimraf": "^3.0.2", | ||
"rollup": "^2.51.1", | ||
"run-sequence": "^1.2.2", | ||
"through2": "^2.0.1", | ||
"ts-node": "^10.0.0", | ||
"typedoc": "^0.20.36", | ||
"typescript": "^4.2.4", | ||
"vinyl": "^2.2.1", | ||
"vinyl-paths": "^3.0.1", | ||
"yargs": "^4.8.1" | ||
"@rollup/plugin-typescript": "11.1.6", | ||
"@types/bun": "1.1.6", | ||
"bun": "1.1.22", | ||
"commit-and-tag-version": "12.4.1", | ||
"cross-env": "7.0.3", | ||
"oxlint": "0.7.0", | ||
"rimraf": "6.0.1", | ||
"rollup": "4.20.0", | ||
"typedoc": "0.26.5", | ||
"typescript": "5.5.4", | ||
"tslib": "2.6.3" | ||
} | ||
} |
# aurelia-path | ||
[![npm Version](https://img.shields.io/npm/v/aurelia-path.svg)](https://www.npmjs.com/package/aurelia-path) | ||
[![Join the chat at https://gitter.im/aurelia/discuss](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/aurelia/discuss?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) | ||
[![CircleCI](https://circleci.com/gh/aurelia/path.svg?style=shield)](https://circleci.com/gh/aurelia/path) | ||
[![Discord Chat](https://img.shields.io/discord/448698263508615178.svg)](https://discord.gg/RBtyM6u) | ||
[![Open in Visual Studio Code](https://open.vscode.dev/badges/open-in-vscode.svg)](https://open.vscode.dev/aurelia/path) | ||
@@ -7,0 +7,0 @@ This library is part of the [Aurelia](http://www.aurelia.io/) platform and contains utilities for path manipulation. |
@@ -121,3 +121,4 @@ function trimDots(ary: string[]): void { | ||
let encode = encodeURIComponent; | ||
let encodeKey = k => encode(k).replace('%24', '$'); | ||
const dollarSignRegex: RegExp = /%24/g; | ||
let encodeKey = k => encode(k).replace(dollarSignRegex, '$'); | ||
/** | ||
@@ -124,0 +125,0 @@ * Recursively builds part of query string for parameter. |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
108636
11
1367
0