Skip to content

Commit 9e5adee

Browse files
author
Rafael Fernandez Serra
committed
fix polluted array prototype
1 parent 77b549c commit 9e5adee

File tree

5 files changed

+1343
-2099
lines changed

5 files changed

+1343
-2099
lines changed

package.json

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@uirouter/core",
33
"description": "UI-Router Core: Framework agnostic, State-based routing for JavaScript Single Page Apps",
4-
"version": "6.1.0",
4+
"version": "6.1.1",
55
"scripts": {
66
"clean": "shx rm -rf lib lib-esm _bundles .cache _doc",
77
"compile": "npm run clean && tsc && tsc -m es6 --outDir lib-esm",
@@ -66,33 +66,34 @@
6666
"module": "lib-esm/index.js",
6767
"license": "MIT",
6868
"devDependencies": {
69-
"@types/jasmine": "^3.3.13",
69+
"@types/jasmine": "^5.1.4",
7070
"@types/jquery": "^3.3.36",
71-
"@uirouter/publish-scripts": "^2.6.0",
71+
"@uirouter/publish-scripts": "^2.6.3",
7272
"bufferutil": "4.0.2",
7373
"dts-downlevel": "^0.4.0",
74-
"fork-ts-checker-webpack-plugin": "^6.0.8",
74+
"fork-ts-checker-webpack-plugin": "^9.0.2",
7575
"husky": "^4.2.5",
7676
"jasmine-core": "^3.3.0",
7777
"karma": "^5.0.4",
7878
"karma-chrome-launcher": "^3.1.0",
7979
"karma-firefox-launcher": "^2.1.0",
8080
"karma-jasmine": "^4.0.1",
8181
"karma-script-launcher": "^1.0.0",
82-
"karma-sourcemap-loader": "^0.3.7",
83-
"karma-webpack": "^4.0.2",
82+
"karma-sourcemap-loader": "^0.4.0",
83+
"karma-webpack": "^5.0.1",
84+
"eslint": "^8.57.0",
85+
"@typescript-eslint/parser": "^7.16.0",
86+
"@typescript-eslint/eslint-plugin": "^7.16.0",
8487
"prettier": "^2.0.5",
8588
"pretty-quick": "^3.1.0",
8689
"rollup": "1.32.1",
8790
"rollup-plugin-node-resolve": "^5.0.2",
8891
"rollup-plugin-sourcemaps": "^0.6.1",
8992
"rollup-plugin-uglify": "^6.0.0",
9093
"ts-loader": "^8.0.12",
91-
"tslint": "5.20.1",
92-
"tslint-eslint-rules": "^5.3.1",
93-
"typescript": "~3.9",
94+
"typescript": "~5.4.5",
9495
"utf-8-validate": "5.0.3",
95-
"webpack": "^4.34.0"
96+
"webpack": "^5.92.1"
9697
},
9798
"resolutions": {
9899
"chokidar": "3.3.1"
@@ -122,5 +123,6 @@
122123
"Trace"
123124
]
124125
}
125-
}
126+
},
127+
"packageManager": "yarn@1.22.22+sha1.ac34549e6aa8e7ead463a7407e1c7390f61a6610"
126128
}

src/common/coreservices.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const noImpl = (fnname: string) => () => {
1313
};
1414

1515
export const makeStub = <T>(service: string, methods: (keyof T)[]): T =>
16-
methods.reduce((acc, key) => ((acc[key] = noImpl(`${service}.${key}()`) as any), acc), {} as T);
16+
methods.reduce((acc, key) => ((acc[key] = noImpl(`${service}.${String(key)}()`) as any), acc), {} as T);
1717

1818
const services: CoreServices = {
1919
$q: undefined,

src/params/stateParams.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,11 @@ export class StateParams {
2929
if (!parentParamsKeys.length) continue;
3030

3131
for (const j in parentParamsKeys) {
32-
if (parentParams[parentParamsKeys[j]].inherit == false || inheritList.indexOf(parentParamsKeys[j]) >= 0)
32+
if (
33+
!parentParamsKeys.hasOwnProperty(j) ||
34+
parentParams[parentParamsKeys[j]].inherit == false ||
35+
inheritList.indexOf(parentParamsKeys[j]) >= 0
36+
)
3337
continue;
3438
inheritList.push(parentParamsKeys[j]);
3539
inherited[parentParamsKeys[j]] = this[parentParamsKeys[j]];

0 commit comments

Comments
 (0)