Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ui-router/core
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 6.0.6
Choose a base ref
...
head repository: ui-router/core
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 6.0.7
Choose a head ref
Loading
Showing with 270 additions and 233 deletions.
  1. +2 −0 .github/workflows/ci.yml
  2. +10 −0 CHANGELOG.md
  3. +0 −12 docgen.json
  4. +29 −8 package.json
  5. +1 −1 src/transition/interface.ts
  6. +6 −2 src/url/urlMatcher.ts
  7. +6 −0 test/urlMatcherFactorySpec.ts
  8. +7 −0 tsconfig.docgen.json
  9. +209 −210 yarn.lock
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -23,6 +23,8 @@ jobs:
- uses: actions/checkout@v2
- name: Install Dependencies
run: yarn install --pure-lockfile
- name: Check Peer Dependencies
run: npx check-peer-dependencies
- name: Run Tests
run: yarn ${{ matrix.yarncmd }}

10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
## 6.0.7 (2020-12-21)
[Compare `@uirouter/core` versions 6.0.6 and 6.0.7](https://github.com/ui-router/core/compare/6.0.6...6.0.7)

### Bug Fixes

* **array:** Fix decoding of array-type query parameters ([44ebfae](https://github.com/ui-router/core/commit/44ebfae))




## 6.0.6 (2020-07-17)
[Compare `@uirouter/core` versions 6.0.5 and 6.0.6](https://github.com/ui-router/core/compare/6.0.5...6.0.6)

12 changes: 0 additions & 12 deletions docgen.json

This file was deleted.

37 changes: 29 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@uirouter/core",
"description": "UI-Router Core: Framework agnostic, State-based routing for JavaScript Single Page Apps",
"version": "6.0.6",
"version": "6.0.7",
"scripts": {
"clean": "shx rm -rf lib lib-esm _bundles .cache _doc",
"compile": "npm run clean && tsc && tsc -m es6 --outDir lib-esm && shx cp src/*.json lib",
@@ -68,30 +68,30 @@
"devDependencies": {
"@types/jasmine": "^3.3.13",
"@types/jquery": "^3.3.36",
"@uirouter/publish-scripts": "^2.4.2",
"@uirouter/publish-scripts": "^2.5.3",
"bufferutil": "4.0.1",
"dts-downlevel": "^0.4.0",
"fork-ts-checker-webpack-plugin": "^4.1.3",
"husky": "^4.2.5",
"jasmine-core": "^3.3.0",
"karma": "^5.0.4",
"karma-chrome-launcher": "^3.1.0",
"karma-firefox-launcher": "^1.1.0",
"karma-jasmine": "^3.1.1",
"karma-jasmine": "^4.0.1",
"karma-script-launcher": "^1.0.0",
"karma-sourcemap-loader": "^0.3.7",
"karma-webpack": "^4.0.2",
"prettier": "^2.0.5",
"pretty-quick": "^2.0.1",
"rollup": "^2.7.6",
"pretty-quick": "^3.1.0",
"rollup": "1.32.1",
"rollup-plugin-node-resolve": "^5.0.2",
"rollup-plugin-sourcemaps": "^0.6.1",
"rollup-plugin-uglify": "^6.0.0",
"ts-loader": "^7.0.2",
"tslint": "^6.1.2",
"tslint": "5.20.1",
"tslint-eslint-rules": "^5.3.1",
"typedoc": "~0.17.7",
"typedoc-plugin-ui-router": "^3.0.1",
"typescript": "~3.9",
"utf-8-validate": "5.0.2",
"webpack": "^4.34.0"
},
"resolutions": {
@@ -101,5 +101,26 @@
"hooks": {
"pre-commit": "pretty-quick --staged"
}
},
"docgen": {
"publishDir": "_core_docs",
"include": [],
"navigation": {
"": [
"UIRouter"
],
"Services": [
"StateService",
"StateRegistry",
"TransitionService",
"UrlService",
"UrlConfig",
"UrlRules"
],
"Other": [
"Transition",
"Trace"
]
}
}
}
2 changes: 1 addition & 1 deletion src/transition/interface.ts
Original file line number Diff line number Diff line change
@@ -38,7 +38,7 @@ export interface TransitionOptions {
* - If `true`, it will inherit parameter values from the current parameter values.
* - If `false`, only the parameters which are provided to `transitionTo` will be used.
*
* @default `false`
* @default `true`
*/
inherit?: boolean;

8 changes: 6 additions & 2 deletions src/url/urlMatcher.ts
Original file line number Diff line number Diff line change
@@ -341,8 +341,12 @@ export class UrlMatcher {

private _getDecodedParamValue(value: any, param: Param): any {
if (isDefined(value)) {
if (this.config.decodeParams && !param.type.raw && !isArray(value)) {
value = decodeURIComponent(value);
if (this.config.decodeParams && !param.type.raw) {
if (isArray(value)) {
value = value.map((paramValue) => decodeURIComponent(paramValue));
} else {
value = decodeURIComponent(value);
}
}

value = param.type.decode(value);
6 changes: 6 additions & 0 deletions test/urlMatcherFactorySpec.ts
Original file line number Diff line number Diff line change
@@ -449,6 +449,12 @@ describe('UrlMatcher', function () {
expect(m.exec($location.path(), $location.search())).toEqual({ param1: 'bar,baz' }); // coerced to string
expect(m.format({ param1: ['bar', 'baz'] })).toBe('/foo?param1=bar%2Cbaz'); // coerced to string
});

it('should decode query parameter values', function () {
const m = $umf.compile('/foo?param1', { state: {} });
$location.url('/foo?param1=%25&param1=%2F');
expect(m.exec($location.path(), $location.search())).toEqual({ param1: ['%', '/'] });
});
});

describe('multivalue-path-parameters', function () {
7 changes: 7 additions & 0 deletions tsconfig.docgen.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"rootDir": ".",
"baseDir": "."
}
}
Loading