Prepare updates for dynamicProto to es5 / v2.x (#70)

- Use ts-utils for minification
This commit is contained in:
Nev 2023-03-27 09:33:20 -07:00 коммит произвёл GitHub
Родитель d60dc5e3bc
Коммит bfe4b5e2b2
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
22 изменённых файлов: 306 добавлений и 186 удалений

4
.github/workflows/codeql-analysis.yml поставляемый
Просмотреть файл

@ -13,10 +13,10 @@ name: "CodeQL"
on:
push:
branches: [ master ]
branches: [ main, master ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
branches: [ main, master ]
schedule:
- cron: '39 23 * * 6'

Просмотреть файл

@ -17,5 +17,7 @@
!/LICENSE
!/LICENSE.TXT
!/lib/dist/**/*
!/lib/dist-es5/**/*
!/lib/types/**/*
!/tools/rollup/**/*
!/tools/rollup/dist-es5/**/*
!/tools/rollup/package.json

Просмотреть файл

@ -462,7 +462,7 @@ It should be as simple as :-
## Version 2.x
The version 2.x is maintained on the default [main branch](https://github.com/microsoft/DynamicProto-JS/tree/main)
Version 2.x is maintained on the default [main branch](https://github.com/microsoft/DynamicProto-JS/tree/main)
> Breaking Changes from Version 1.x
>
@ -482,7 +482,7 @@ Latest ✔ | Latest ✔ | 9+ Full ✔ | Latest ✔ | Latest ✔ | Latest ✔ |
<summary>Version 1.x</summary>
The version 1.x is maintained on the [master branch](https://github.com/microsoft/DynamicProto-JS/tree/master)
Version 1.x is maintained on the [master branch](https://github.com/microsoft/DynamicProto-JS/tree/master)
### Browser Support (1.x)

244
common/config/rush/npm-shrinkwrap.json сгенерированный
Просмотреть файл

@ -11,6 +11,7 @@
"@microsoft/applicationinsights-rollup-es3": "^1.0.1",
"@nevware21/grunt-eslint-ts": "^0.1.0",
"@nevware21/grunt-ts-plugin": "^0.3.0",
"@nevware21/ts-utils": ">= 0.9.4 < 2.x",
"@rollup/plugin-node-resolve": "^9.0.0",
"@rollup/plugin-replace": "^2.3.3",
"@rush-temp/dynamicproto-js": "file:./projects/dynamicproto-js.tgz",
@ -209,6 +210,14 @@
"typescript": ">=1"
}
},
"node_modules/@nevware21/ts-utils": {
"version": "0.9.4",
"resolved": "https://registry.npmjs.org/@nevware21/ts-utils/-/ts-utils-0.9.4.tgz",
"integrity": "sha512-dvU51sDoIdU3k0EBnODmdGya4xpU4vkK97OYIy+nviB613g3+GcErx8ceTGTjBJXjS7PUI1FR5mUOK40cyeqxg==",
"peerDependencies": {
"typescript": ">=1"
}
},
"node_modules/@nodelib/fs.scandir": {
"version": "2.1.5",
"resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
@ -291,11 +300,12 @@
"node_modules/@rush-temp/dynamicproto-js": {
"version": "0.0.0",
"resolved": "file:projects/dynamicproto-js.tgz",
"integrity": "sha512-mx1Gw12dv5ygDuhIlJ97RaEOXG7RvINKHPORZ2ejR2PFQfZrundO0rxQlAjpuNe8R2d9xCiov4YCRAnJ5K536g==",
"integrity": "sha512-dqV8MQiRV484RJvZmLM3xsmnAelxhfv9WNd97XNVJz+RiNEtYrEesNQ2S9qBb9ck8YIgMUJNOX4hTstEjDMeIQ==",
"dependencies": {
"@microsoft/applicationinsights-rollup-es3": "^1.0.1",
"@nevware21/grunt-eslint-ts": "^0.1.0",
"@nevware21/grunt-ts-plugin": "^0.3.0",
"@nevware21/ts-utils": ">= 0.9.4 < 2.x",
"@rollup/plugin-node-resolve": "^9.0.0",
"@rollup/plugin-replace": "^2.3.3",
"@typescript-eslint/eslint-plugin": "^4.28.0",
@ -323,9 +333,10 @@
"node_modules/@rush-temp/dynamicproto-rollup": {
"version": "0.0.0",
"resolved": "file:projects/dynamicproto-rollup.tgz",
"integrity": "sha512-9aX1HxYoGvxxvVl7ej2XLTsTI1Tj4vF8q1FzpQg+uxLwCjtzzpuolnTCsvE3i3t+ZXcyFYecd8ChsaMJoM7p7w==",
"integrity": "sha512-RqkeFQGFm8F6677x5BdbXf0WvnVzXbqGEKfJmxGTxoed9d735C689XeSFU8RuAPz4G+T0AZxQv6Acf0SRKa1Vg==",
"dependencies": {
"@nevware21/grunt-ts-plugin": "^0.3.0",
"@nevware21/ts-utils": ">= 0.9.4 < 2.x",
"@rollup/plugin-node-resolve": "^9.0.0",
"@rollup/plugin-replace": "^2.3.3",
"grunt": "^1.5.3",
@ -380,9 +391,9 @@
"integrity": "sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA=="
},
"node_modules/@types/node": {
"version": "18.14.1",
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.14.1.tgz",
"integrity": "sha512-QH+37Qds3E0eDlReeboBxfHbX9omAcBCXEzswCu6jySP642jiM3cYSIkU/REqwhCUqXdonHFuBfJDiAJxMNhaQ=="
"version": "18.15.10",
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.10.tgz",
"integrity": "sha512-9avDaQJczATcXgfmMAW3MIWArOO7A+m90vuCFLr8AotWf8igO/mRoYukrk2cqZVtv38tHs33retzHEilM7FpeQ=="
},
"node_modules/@types/resolve": {
"version": "1.17.1",
@ -641,6 +652,18 @@
"sprintf-js": "~1.0.2"
}
},
"node_modules/array-buffer-byte-length": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz",
"integrity": "sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==",
"dependencies": {
"call-bind": "^1.0.2",
"is-array-buffer": "^3.0.1"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/array-each": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/array-each/-/array-each-1.0.1.tgz",
@ -959,9 +982,9 @@
"integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ=="
},
"node_modules/deepmerge": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.0.tgz",
"integrity": "sha512-z2wJZXrmeHdvYJp/Ux55wIjqo81G5Bp4c+oELTW+7ar6SogWHajt5a9gO3s3IDaGSAXjDk0vlQKN3rms8ab3og==",
"version": "4.3.1",
"resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz",
"integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==",
"engines": {
"node": ">=0.10.0"
}
@ -1041,17 +1064,17 @@
}
},
"node_modules/es-abstract": {
"version": "1.21.1",
"resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.21.1.tgz",
"integrity": "sha512-QudMsPOz86xYz/1dG1OuGBKOELjCh99IIWHLzy5znUB6j8xG2yMA7bfTV86VSqKF+Y/H08vQPR+9jyXpuC6hfg==",
"version": "1.21.2",
"resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.21.2.tgz",
"integrity": "sha512-y/B5POM2iBnIxCiernH1G7rC9qQoM77lLIMQLuob0zhp8C56Po81+2Nj0WFKnd0pNReDTnkYryc+zhOzpEIROg==",
"dependencies": {
"array-buffer-byte-length": "^1.0.0",
"available-typed-arrays": "^1.0.5",
"call-bind": "^1.0.2",
"es-set-tostringtag": "^2.0.1",
"es-to-primitive": "^1.2.1",
"function-bind": "^1.1.1",
"function.prototype.name": "^1.1.5",
"get-intrinsic": "^1.1.3",
"get-intrinsic": "^1.2.0",
"get-symbol-description": "^1.0.0",
"globalthis": "^1.0.3",
"gopd": "^1.0.1",
@ -1059,8 +1082,8 @@
"has-property-descriptors": "^1.0.0",
"has-proto": "^1.0.1",
"has-symbols": "^1.0.3",
"internal-slot": "^1.0.4",
"is-array-buffer": "^3.0.1",
"internal-slot": "^1.0.5",
"is-array-buffer": "^3.0.2",
"is-callable": "^1.2.7",
"is-negative-zero": "^2.0.2",
"is-regex": "^1.1.4",
@ -1068,11 +1091,12 @@
"is-string": "^1.0.7",
"is-typed-array": "^1.1.10",
"is-weakref": "^1.0.2",
"object-inspect": "^1.12.2",
"object-inspect": "^1.12.3",
"object-keys": "^1.1.1",
"object.assign": "^4.1.4",
"regexp.prototype.flags": "^1.4.3",
"safe-regex-test": "^1.0.0",
"string.prototype.trim": "^1.2.7",
"string.prototype.trimend": "^1.0.6",
"string.prototype.trimstart": "^1.0.6",
"typed-array-length": "^1.0.4",
@ -1521,9 +1545,9 @@
}
},
"node_modules/esquery": {
"version": "1.4.2",
"resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.2.tgz",
"integrity": "sha512-JVSoLdTlTDkmjFmab7H/9SL9qGSyjElT3myyKp7krqjVFQCDLmj1QFaCLRFBszBKI0XVZaiiXvuPIX3ZwHe1Ng==",
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz",
"integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==",
"dependencies": {
"estraverse": "^5.1.0"
},
@ -2047,9 +2071,9 @@
}
},
"node_modules/graceful-fs": {
"version": "4.2.10",
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz",
"integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA=="
"version": "4.2.11",
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz",
"integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ=="
},
"node_modules/grunt": {
"version": "1.6.1",
@ -2462,12 +2486,12 @@
}
},
"node_modules/is-array-buffer": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.1.tgz",
"integrity": "sha512-ASfLknmY8Xa2XtB4wmbz13Wu202baeA18cJBCeCy0wXUHZF0IPyVEXqKEcd+t2fNSLLL1vC6k7lxZEojNbISXQ==",
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz",
"integrity": "sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==",
"dependencies": {
"call-bind": "^1.0.2",
"get-intrinsic": "^1.1.3",
"get-intrinsic": "^1.2.0",
"is-typed-array": "^1.1.10"
},
"funding": {
@ -2913,9 +2937,9 @@
}
},
"node_modules/marked": {
"version": "4.2.12",
"resolved": "https://registry.npmjs.org/marked/-/marked-4.2.12.tgz",
"integrity": "sha512-yr8hSKa3Fv4D3jdZmtMMPghgVt6TWbk86WQaWhDloQjRSQhMMYCAro7jP7VDJrjjdV8pxVxMssXS8B8Y5DZ5aw==",
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/marked/-/marked-4.3.0.tgz",
"integrity": "sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A==",
"bin": {
"marked": "bin/marked.js"
},
@ -3332,7 +3356,7 @@
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-4.0.1.tgz",
"integrity": "sha512-LIiSWTRqpTnnm3R2yAoMBx1inSeKwVZy66RFSkgSTDINzheJZPd5z5mMbPM0FkvwWAZ27a+69j5nZf+Fpyhn3Q==",
"deprecated": "< 19.2.0 is no longer supported",
"deprecated": "< 19.4.0 is no longer supported",
"hasInstallScript": true,
"dependencies": {
"debug": "^4.1.0",
@ -3371,9 +3395,9 @@
]
},
"node_modules/readable-stream": {
"version": "3.6.1",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.1.tgz",
"integrity": "sha512-+rQmrWMYGA90yenhTYsLWAsLsqVC8osOw6PKE1HDYiO0gdPeKe/xDHNzIAIn4C91YQ6oenEhfYqqc1883qHbjQ==",
"version": "3.6.2",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz",
"integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==",
"dependencies": {
"inherits": "^2.0.3",
"string_decoder": "^1.1.1",
@ -3783,6 +3807,22 @@
"node": ">=8"
}
},
"node_modules/string.prototype.trim": {
"version": "1.2.7",
"resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.7.tgz",
"integrity": "sha512-p6TmeT1T3411M8Cgg9wBTMRtY2q9+PNy9EV1i2lIXUN/btt763oIfxwN3RR8VU6wHX8j/1CFy0L+YuThm6bgOg==",
"dependencies": {
"call-bind": "^1.0.2",
"define-properties": "^1.1.4",
"es-abstract": "^1.20.4"
},
"engines": {
"node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/string.prototype.trimend": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.6.tgz",
@ -3944,12 +3984,12 @@
}
},
"node_modules/tsconfig-paths": {
"version": "3.14.1",
"resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.1.tgz",
"integrity": "sha512-fxDhWnFSLt3VuTwtvJt5fpwxBHg5AdKWMsgcPOOIilyjymcYVZoCQF8fvFRezCNfblEXmi+PcM1eYHeOAgXCOQ==",
"version": "3.14.2",
"resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.2.tgz",
"integrity": "sha512-o/9iXgCYc5L/JxCHPe3Hvh8Q/2xm5Z+p18PESBU6Ff33695QnCHBEjcytY2q19ua7Mbl/DavtBOLq+oG0RCL+g==",
"dependencies": {
"@types/json5": "^0.0.29",
"json5": "^1.0.1",
"json5": "^1.0.2",
"minimist": "^1.2.6",
"strip-bom": "^3.0.0"
}
@ -4009,13 +4049,13 @@
}
},
"node_modules/typedoc": {
"version": "0.23.25",
"resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.23.25.tgz",
"integrity": "sha512-O1he153qVyoCgJYSvIyY3bPP1wAJTegZfa6tL3APinSZhJOf8CSd8F/21M6ex8pUY/fuY6n0jAsT4fIuMGA6sA==",
"version": "0.23.28",
"resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.23.28.tgz",
"integrity": "sha512-9x1+hZWTHEQcGoP7qFmlo4unUoVJLB0H/8vfO/7wqTnZxg4kPuji9y3uRzEu0ZKez63OJAUmiGhUrtukC6Uj3w==",
"dependencies": {
"lunr": "^2.3.9",
"marked": "^4.2.12",
"minimatch": "^6.1.6",
"minimatch": "^7.1.3",
"shiki": "^0.14.1"
},
"bin": {
@ -4025,7 +4065,7 @@
"node": ">= 14.14"
},
"peerDependencies": {
"typescript": "4.6.x || 4.7.x || 4.8.x || 4.9.x"
"typescript": "4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x"
}
},
"node_modules/typedoc/node_modules/brace-expansion": {
@ -4037,9 +4077,9 @@
}
},
"node_modules/typedoc/node_modules/minimatch": {
"version": "6.2.0",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-6.2.0.tgz",
"integrity": "sha512-sauLxniAmvnhhRjFwPNnJKaPFYyddAgbYdeUpHULtCT/GhzdCx/MDNy+Y40lBxTQUrMzDE8e0S43Z5uqfO0REg==",
"version": "7.4.3",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-7.4.3.tgz",
"integrity": "sha512-5UB4yYusDtkRPbRiy1cqZ1IpGNcJCGlEMG17RKzPddpyiPKoCdwohbED8g4QXT0ewCt8LTkQXuljsUfQ3FKM4A==",
"dependencies": {
"brace-expansion": "^2.0.1"
},
@ -4418,6 +4458,12 @@
"integrity": "sha512-o2yy7ixn6faG2+C22uIbnk4I5KXvsPF6ETE6igHFv8GW2K7jBCfHdyBUD3Iy7bLhkYVUIfVueDf4NmPTgai9EA==",
"requires": {}
},
"@nevware21/ts-utils": {
"version": "0.9.4",
"resolved": "https://registry.npmjs.org/@nevware21/ts-utils/-/ts-utils-0.9.4.tgz",
"integrity": "sha512-dvU51sDoIdU3k0EBnODmdGya4xpU4vkK97OYIy+nviB613g3+GcErx8ceTGTjBJXjS7PUI1FR5mUOK40cyeqxg==",
"requires": {}
},
"@nodelib/fs.scandir": {
"version": "2.1.5",
"resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
@ -4475,11 +4521,12 @@
},
"@rush-temp/dynamicproto-js": {
"version": "file:projects\\dynamicproto-js.tgz",
"integrity": "sha512-mx1Gw12dv5ygDuhIlJ97RaEOXG7RvINKHPORZ2ejR2PFQfZrundO0rxQlAjpuNe8R2d9xCiov4YCRAnJ5K536g==",
"integrity": "sha512-dqV8MQiRV484RJvZmLM3xsmnAelxhfv9WNd97XNVJz+RiNEtYrEesNQ2S9qBb9ck8YIgMUJNOX4hTstEjDMeIQ==",
"requires": {
"@microsoft/applicationinsights-rollup-es3": "^1.0.1",
"@nevware21/grunt-eslint-ts": "^0.1.0",
"@nevware21/grunt-ts-plugin": "^0.3.0",
"@nevware21/ts-utils": ">= 0.9.4 < 2.x",
"@rollup/plugin-node-resolve": "^9.0.0",
"@rollup/plugin-replace": "^2.3.3",
"@typescript-eslint/eslint-plugin": "^4.28.0",
@ -4506,9 +4553,10 @@
},
"@rush-temp/dynamicproto-rollup": {
"version": "file:projects\\dynamicproto-rollup.tgz",
"integrity": "sha512-9aX1HxYoGvxxvVl7ej2XLTsTI1Tj4vF8q1FzpQg+uxLwCjtzzpuolnTCsvE3i3t+ZXcyFYecd8ChsaMJoM7p7w==",
"integrity": "sha512-RqkeFQGFm8F6677x5BdbXf0WvnVzXbqGEKfJmxGTxoed9d735C689XeSFU8RuAPz4G+T0AZxQv6Acf0SRKa1Vg==",
"requires": {
"@nevware21/grunt-ts-plugin": "^0.3.0",
"@nevware21/ts-utils": ">= 0.9.4 < 2.x",
"@rollup/plugin-node-resolve": "^9.0.0",
"@rollup/plugin-replace": "^2.3.3",
"grunt": "^1.5.3",
@ -4563,9 +4611,9 @@
"integrity": "sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA=="
},
"@types/node": {
"version": "18.14.1",
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.14.1.tgz",
"integrity": "sha512-QH+37Qds3E0eDlReeboBxfHbX9omAcBCXEzswCu6jySP642jiM3cYSIkU/REqwhCUqXdonHFuBfJDiAJxMNhaQ=="
"version": "18.15.10",
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.10.tgz",
"integrity": "sha512-9avDaQJczATcXgfmMAW3MIWArOO7A+m90vuCFLr8AotWf8igO/mRoYukrk2cqZVtv38tHs33retzHEilM7FpeQ=="
},
"@types/resolve": {
"version": "1.17.1",
@ -4723,6 +4771,15 @@
"sprintf-js": "~1.0.2"
}
},
"array-buffer-byte-length": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz",
"integrity": "sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==",
"requires": {
"call-bind": "^1.0.2",
"is-array-buffer": "^3.0.1"
}
},
"array-each": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/array-each/-/array-each-1.0.1.tgz",
@ -4933,9 +4990,9 @@
"integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ=="
},
"deepmerge": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.0.tgz",
"integrity": "sha512-z2wJZXrmeHdvYJp/Ux55wIjqo81G5Bp4c+oELTW+7ar6SogWHajt5a9gO3s3IDaGSAXjDk0vlQKN3rms8ab3og=="
"version": "4.3.1",
"resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz",
"integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A=="
},
"define-properties": {
"version": "1.2.0",
@ -4994,17 +5051,17 @@
}
},
"es-abstract": {
"version": "1.21.1",
"resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.21.1.tgz",
"integrity": "sha512-QudMsPOz86xYz/1dG1OuGBKOELjCh99IIWHLzy5znUB6j8xG2yMA7bfTV86VSqKF+Y/H08vQPR+9jyXpuC6hfg==",
"version": "1.21.2",
"resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.21.2.tgz",
"integrity": "sha512-y/B5POM2iBnIxCiernH1G7rC9qQoM77lLIMQLuob0zhp8C56Po81+2Nj0WFKnd0pNReDTnkYryc+zhOzpEIROg==",
"requires": {
"array-buffer-byte-length": "^1.0.0",
"available-typed-arrays": "^1.0.5",
"call-bind": "^1.0.2",
"es-set-tostringtag": "^2.0.1",
"es-to-primitive": "^1.2.1",
"function-bind": "^1.1.1",
"function.prototype.name": "^1.1.5",
"get-intrinsic": "^1.1.3",
"get-intrinsic": "^1.2.0",
"get-symbol-description": "^1.0.0",
"globalthis": "^1.0.3",
"gopd": "^1.0.1",
@ -5012,8 +5069,8 @@
"has-property-descriptors": "^1.0.0",
"has-proto": "^1.0.1",
"has-symbols": "^1.0.3",
"internal-slot": "^1.0.4",
"is-array-buffer": "^3.0.1",
"internal-slot": "^1.0.5",
"is-array-buffer": "^3.0.2",
"is-callable": "^1.2.7",
"is-negative-zero": "^2.0.2",
"is-regex": "^1.1.4",
@ -5021,11 +5078,12 @@
"is-string": "^1.0.7",
"is-typed-array": "^1.1.10",
"is-weakref": "^1.0.2",
"object-inspect": "^1.12.2",
"object-inspect": "^1.12.3",
"object-keys": "^1.1.1",
"object.assign": "^4.1.4",
"regexp.prototype.flags": "^1.4.3",
"safe-regex-test": "^1.0.0",
"string.prototype.trim": "^1.2.7",
"string.prototype.trimend": "^1.0.6",
"string.prototype.trimstart": "^1.0.6",
"typed-array-length": "^1.0.4",
@ -5340,9 +5398,9 @@
"integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A=="
},
"esquery": {
"version": "1.4.2",
"resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.2.tgz",
"integrity": "sha512-JVSoLdTlTDkmjFmab7H/9SL9qGSyjElT3myyKp7krqjVFQCDLmj1QFaCLRFBszBKI0XVZaiiXvuPIX3ZwHe1Ng==",
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz",
"integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==",
"requires": {
"estraverse": "^5.1.0"
},
@ -5730,9 +5788,9 @@
}
},
"graceful-fs": {
"version": "4.2.10",
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz",
"integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA=="
"version": "4.2.11",
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz",
"integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ=="
},
"grunt": {
"version": "1.6.1",
@ -6028,12 +6086,12 @@
}
},
"is-array-buffer": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.1.tgz",
"integrity": "sha512-ASfLknmY8Xa2XtB4wmbz13Wu202baeA18cJBCeCy0wXUHZF0IPyVEXqKEcd+t2fNSLLL1vC6k7lxZEojNbISXQ==",
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz",
"integrity": "sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==",
"requires": {
"call-bind": "^1.0.2",
"get-intrinsic": "^1.1.3",
"get-intrinsic": "^1.2.0",
"is-typed-array": "^1.1.10"
}
},
@ -6355,9 +6413,9 @@
"integrity": "sha512-8y/eV9QQZCiyn1SprXSrCmqJN0yNRATe+PO8ztwqrvrbdRLA3eYJF0yaR0YayLWkMbsQSKWS9N2gPcGEc4UsZg=="
},
"marked": {
"version": "4.2.12",
"resolved": "https://registry.npmjs.org/marked/-/marked-4.2.12.tgz",
"integrity": "sha512-yr8hSKa3Fv4D3jdZmtMMPghgVt6TWbk86WQaWhDloQjRSQhMMYCAro7jP7VDJrjjdV8pxVxMssXS8B8Y5DZ5aw=="
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/marked/-/marked-4.3.0.tgz",
"integrity": "sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A=="
},
"maxmin": {
"version": "3.0.0",
@ -6668,9 +6726,9 @@
"integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A=="
},
"readable-stream": {
"version": "3.6.1",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.1.tgz",
"integrity": "sha512-+rQmrWMYGA90yenhTYsLWAsLsqVC8osOw6PKE1HDYiO0gdPeKe/xDHNzIAIn4C91YQ6oenEhfYqqc1883qHbjQ==",
"version": "3.6.2",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz",
"integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==",
"requires": {
"inherits": "^2.0.3",
"string_decoder": "^1.1.1",
@ -6952,6 +7010,16 @@
"strip-ansi": "^6.0.1"
}
},
"string.prototype.trim": {
"version": "1.2.7",
"resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.7.tgz",
"integrity": "sha512-p6TmeT1T3411M8Cgg9wBTMRtY2q9+PNy9EV1i2lIXUN/btt763oIfxwN3RR8VU6wHX8j/1CFy0L+YuThm6bgOg==",
"requires": {
"call-bind": "^1.0.2",
"define-properties": "^1.1.4",
"es-abstract": "^1.20.4"
}
},
"string.prototype.trimend": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.6.tgz",
@ -7075,12 +7143,12 @@
}
},
"tsconfig-paths": {
"version": "3.14.1",
"resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.1.tgz",
"integrity": "sha512-fxDhWnFSLt3VuTwtvJt5fpwxBHg5AdKWMsgcPOOIilyjymcYVZoCQF8fvFRezCNfblEXmi+PcM1eYHeOAgXCOQ==",
"version": "3.14.2",
"resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.2.tgz",
"integrity": "sha512-o/9iXgCYc5L/JxCHPe3Hvh8Q/2xm5Z+p18PESBU6Ff33695QnCHBEjcytY2q19ua7Mbl/DavtBOLq+oG0RCL+g==",
"requires": {
"@types/json5": "^0.0.29",
"json5": "^1.0.1",
"json5": "^1.0.2",
"minimist": "^1.2.6",
"strip-bom": "^3.0.0"
}
@ -7122,13 +7190,13 @@
}
},
"typedoc": {
"version": "0.23.25",
"resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.23.25.tgz",
"integrity": "sha512-O1he153qVyoCgJYSvIyY3bPP1wAJTegZfa6tL3APinSZhJOf8CSd8F/21M6ex8pUY/fuY6n0jAsT4fIuMGA6sA==",
"version": "0.23.28",
"resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.23.28.tgz",
"integrity": "sha512-9x1+hZWTHEQcGoP7qFmlo4unUoVJLB0H/8vfO/7wqTnZxg4kPuji9y3uRzEu0ZKez63OJAUmiGhUrtukC6Uj3w==",
"requires": {
"lunr": "^2.3.9",
"marked": "^4.2.12",
"minimatch": "^6.1.6",
"minimatch": "^7.1.3",
"shiki": "^0.14.1"
},
"dependencies": {
@ -7141,9 +7209,9 @@
}
},
"minimatch": {
"version": "6.2.0",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-6.2.0.tgz",
"integrity": "sha512-sauLxniAmvnhhRjFwPNnJKaPFYyddAgbYdeUpHULtCT/GhzdCx/MDNy+Y40lBxTQUrMzDE8e0S43Z5uqfO0REg==",
"version": "7.4.3",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-7.4.3.tgz",
"integrity": "sha512-5UB4yYusDtkRPbRiy1cqZ1IpGNcJCGlEMG17RKzPddpyiPKoCdwohbED8g4QXT0ewCt8LTkQXuljsUfQ3FKM4A==",
"requires": {
"brace-expansion": "^2.0.1"
}

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Просмотреть файл

@ -483,10 +483,9 @@ blockquote {
.has-menu .col-menu {
visibility: visible;
transform: translate(0, 0);
display: grid;
align-items: center;
grid-template-rows: auto 1fr;
grid-gap: 1.5rem;
display: flex;
flex-direction: column;
gap: 1.5rem;
max-height: 100vh;
padding: 1rem 2rem;
}
@ -911,7 +910,7 @@ a.tsd-index-link {
margin-right: 0.8rem;
}
@media (min-width: 1024px) {
@media (min-width: 1025px) {
.col-content {
margin: 2rem auto;
}

Просмотреть файл

@ -69,7 +69,7 @@ defined in the constructor or some other function (rather than declared as compl
</div></li></ul></div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/microsoft/DynamicProto-JS/blob/master/lib/src/DynamicProto.ts#L611">lib/src/DynamicProto.ts:611</a></li></ul></aside></li></ul></section></div>
<li>Defined in <a href="https://github.com/microsoft/DynamicProto-JS/blob/master/lib/src/DynamicProto.ts#L579">lib/src/DynamicProto.ts:579</a></li></ul></aside></li></ul></section></div>
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
<div class="tsd-navigation settings">
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">

Просмотреть файл

@ -19,6 +19,11 @@
<p>Generates dynamic prototype methods for JavaScript objects (classes) by supporting method definition within their &quot;class&quot; constructor (like an instance version), this removes the need to expose internal properties on the instance (this) and the usage of <code>ClassName.prototype.funcName()</code> both of which result in better code minfication (smaller output) and therefore improved load times for your users.</p>
<p>The dynamically generated prototype methods support class inheritance of any type, which means you can extend from base classes that use instance or prototype defined methods, you also don&#39;t need to add the normal boiler plate code to handle detecting, saving and calling any previous instance methods that you are overriding as support for this is provided automatically. </p>
<p>So whether creating a new class or extending some other class/code, your resulting code, can be successfully extended via TypeScript or JavaScript.</p>
<blockquote>
<p>ES3 / IE8 support has been removed from Version 2.x.</p>
<p>if you need to retain ES3 / IE8 support then you will need to use one of the 1.x versions which is now maintained on the old <a href="https://github.com/microsoft/DynamicProto-JS/tree/master">master branch</a></p>
</blockquote>
<p>The version 2.x is maintained on the default <a href="https://github.com/microsoft/DynamicProto-JS/tree/main">main branch</a></p>
<a href="#documentation" id="documentation" style="color: inherit; text-decoration: none;">
<h2>Documentation</h2>
@ -227,9 +232,59 @@ script type=module&gt; tag in modern browsers</li>
<li>Do the final check for any &quot;remaining&quot; tags, which represents a failed matching</li>
</ul>
<a href="#browser-support" id="browser-support" style="color: inherit; text-decoration: none;">
<h2>Browser Support</h2>
<a href="#version-2x" id="version-2x" style="color: inherit; text-decoration: none;">
<h2>Version 2.x</h2>
</a>
<p>Version 2.x is maintained on the default <a href="https://github.com/microsoft/DynamicProto-JS/tree/main">main branch</a></p>
<blockquote>
<p>Breaking Changes from Version 1.x</p>
<ul>
<li>Removed ES3 / IE8 support</li>
</ul>
</blockquote>
<a href="#browser-support" id="browser-support" style="color: inherit; text-decoration: none;">
<h3>Browser Support</h3>
</a>
<ul>
<li>ES5 Compliant browsers</li>
</ul>
<table>
<thead>
<tr>
<th><img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome"></th>
<th><img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox"></th>
<th><img src="https://raw.githubusercontent.com/hotoo/browser-logos/master/ie9-10/ie9-10_48x48.png" alt="IE9"></th>
<th><img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt="Edge"></th>
<th><img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/opera/opera_48x48.png" alt="Opera"></th>
<th><img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari"></th>
</tr>
</thead>
<tbody><tr>
<td>Latest ✔</td>
<td>Latest ✔</td>
<td>9+ Full ✔</td>
<td>Latest ✔</td>
<td>Latest ✔</td>
<td>Latest ✔</td>
</tr>
</tbody></table>
<a href="#previous-versions" id="previous-versions" style="color: inherit; text-decoration: none;">
<h3>Previous Versions</h3>
</a>
<details>
<summary>Version 1.x</summary>
<p>Version 1.x is maintained on the <a href="https://github.com/microsoft/DynamicProto-JS/tree/master">master branch</a></p>
<a href="#browser-support-1x" id="browser-support-1x" style="color: inherit; text-decoration: none;">
<h3>Browser Support (1.x)</h3>
</a>
<ul>
<li>ES3 Compliant browsers</li>
</ul>
<table>
<thead>
<tr>
@ -254,6 +309,7 @@ script type=module&gt; tag in modern browsers</li>
<a href="#es3ie8-compatibility" id="es3ie8-compatibility" style="color: inherit; text-decoration: none;">
<h2>ES3/IE8 Compatibility</h2>
</a>
<p>Version 1.x ONLY, 2.x DOES NOT support ES3/IE8</p>
<p>As a library there are numerous users which cannot control the browsers that their customers use. As such we need to ensure that this library continues to &quot;work&quot; and does not break the JS execution when loaded by an older browser. While it would be ideal to just not support IE8 and older generation (ES3) browsers there are numerous large customers/users that continue to require pages to &quot;work&quot; and as noted they may or cannot control which browser that their end users choose to use.</p>
<p>As part of enabling ES3/IE8 support we have set the <code>tsconfig.json</code> to ES3 and <code>uglify</code> settings in <code>rollup.config.js</code> transformations to support ie8. This provides a first level of support which blocks anyone from adding unsupported ES3 features to the code and enables the generated javascript to be validily parsed in an ES3+ environment.</p>
<p>Ensuring that the generated code is compatible with ES3 is only the first step, JS parsers will still parse the code when an unsupport core function is used, it will just fail or throw an exception at runtime. Therefore, we also need to require/use polyfil implementations or helper functions to handle those scenarios.</p>
@ -336,6 +392,8 @@ script type=module&gt; tag in modern browsers</li>
<td>N/A</td>
</tr>
</tbody></table>
</details>
<a href="#contributing" id="contributing" style="color: inherit; text-decoration: none;">
<h2>Contributing</h2>

Просмотреть файл

@ -23,7 +23,7 @@
<ul class="tsd-hierarchy">
<li><span class="target">IDynamicProtoOpts</span></li></ul></section><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/microsoft/DynamicProto-JS/blob/master/lib/src/DynamicProto.ts#L534">lib/src/DynamicProto.ts:534</a></li></ul></aside>
<li>Defined in <a href="https://github.com/microsoft/DynamicProto-JS/blob/master/lib/src/DynamicProto.ts#L502">lib/src/DynamicProto.ts:502</a></li></ul></aside>
<section class="tsd-panel-group tsd-index-group">
<section class="tsd-panel tsd-index-panel">
<details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
@ -43,7 +43,7 @@
function of the same name or have been extended by a class with a (non-dynamic proto) prototype function.</p>
</div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/microsoft/DynamicProto-JS/blob/master/lib/src/DynamicProto.ts#L540">lib/src/DynamicProto.ts:540</a></li></ul></aside></section>
<li>Defined in <a href="https://github.com/microsoft/DynamicProto-JS/blob/master/lib/src/DynamicProto.ts#L508">lib/src/DynamicProto.ts:508</a></li></ul></aside></section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="useBaseInst" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <span>use<wbr/>Base<wbr/>Inst</span><a href="#useBaseInst" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<div class="tsd-signature">use<wbr/>Base<wbr/>Inst<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span></div>
@ -51,7 +51,7 @@ function of the same name or have been extended by a class with a (non-dynamic p
and bypass the prototype lookups. Defaults to true.</p>
</div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/microsoft/DynamicProto-JS/blob/master/lib/src/DynamicProto.ts#L546">lib/src/DynamicProto.ts:546</a></li></ul></aside></section></section></div>
<li>Defined in <a href="https://github.com/microsoft/DynamicProto-JS/blob/master/lib/src/DynamicProto.ts#L514">lib/src/DynamicProto.ts:514</a></li></ul></aside></section></section></div>
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
<div class="tsd-navigation settings">
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">

Просмотреть файл

@ -16,8 +16,8 @@
<li><a href="default.html">default</a></li></ul>
<h1>Namespace default</h1></div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/microsoft/DynamicProto-JS/blob/master/lib/src/DynamicProto.ts#L611">lib/src/DynamicProto.ts:611</a></li>
<li>Defined in <a href="https://github.com/microsoft/DynamicProto-JS/blob/master/lib/src/DynamicProto.ts#L667">lib/src/DynamicProto.ts:667</a></li></ul></aside>
<li>Defined in <a href="https://github.com/microsoft/DynamicProto-JS/blob/master/lib/src/DynamicProto.ts#L579">lib/src/DynamicProto.ts:579</a></li>
<li>Defined in <a href="https://github.com/microsoft/DynamicProto-JS/blob/master/lib/src/DynamicProto.ts#L635">lib/src/DynamicProto.ts:635</a></li></ul></aside>
<section class="tsd-panel-group tsd-index-group">
<section class="tsd-panel tsd-index-panel">
<h3 class="tsd-index-heading uppercase">Index</h3>

Просмотреть файл

@ -18,7 +18,7 @@
<h1>Variable _dfOpts</h1></div>
<div class="tsd-signature">_df<wbr/>Opts<span class="tsd-signature-symbol">:</span> <a href="../interfaces/IDynamicProtoOpts.html" class="tsd-signature-type" data-tsd-kind="Interface">IDynamicProtoOpts</a></div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/microsoft/DynamicProto-JS/blob/master/lib/src/DynamicProto.ts#L667">lib/src/DynamicProto.ts:667</a></li></ul></aside></div>
<li>Defined in <a href="https://github.com/microsoft/DynamicProto-JS/blob/master/lib/src/DynamicProto.ts#L635">lib/src/DynamicProto.ts:635</a></li></ul></aside></div>
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
<div class="tsd-navigation settings">
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">

Просмотреть файл

@ -13,9 +13,9 @@
"application insights",
"rollup"
],
"main": "./dist/node/dynamicproto-js.js",
"module": "./dist/esm/dynamicproto-js.js",
"types": "./types/dynamicproto-js.d.ts",
"main": "./dist/es5/node/dynamicproto-js.js",
"module": "./dist-es5/DynamicProto.js",
"types": "./types/DynamicProto.d.ts",
"directories": {
"doc": "./docs"
},
@ -39,6 +39,7 @@
"license": "MIT",
"sideEffects": false,
"dependencies": {
"@nevware21/ts-utils": ">= 0.9.4 < 2.x"
},
"devDependencies": {
"@microsoft/applicationinsights-rollup-es3" : "^1.0.1",

Просмотреть файл

@ -2,13 +2,14 @@ import nodeResolve from "@rollup/plugin-node-resolve";
import copy from "rollup-plugin-copy";
import replace from "@rollup/plugin-replace";
import minify from 'rollup-plugin-minify-es';
import dynamicRemove from "../tools/rollup/esm/removedynamic";
import cleanup from "rollup-plugin-cleanup";
import dynamicRemove from "../rollup/dist-es5/removeDynamic";
import { es3Check, es3Poly } from "@microsoft/applicationinsights-rollup-es3";
const UglifyJs = require('uglify-js');
const version = require("./package.json").version;
const inputName = "./out/lib/src/DynamicProto";
const inputName = "./dist-es5/DynamicProto";
const outputName = "dynamicproto-js";
const banner = [
"/*!",
@ -75,12 +76,13 @@ const nodeUmdRollupConfigFactory = (isProduction) => {
const nodeRollupConfig = {
input: `${inputName}.js`,
output: {
file: `./dist/node/${outputName}.js`,
file: `./dist/es5/node/${outputName}.js`,
banner: banner,
format: "umd",
name: "Microsoft.DynamicProto-JS",
extend: true,
sourcemap: true
sourcemap: true,
exports: "auto"
},
plugins: [
dynamicRemove(),
@ -93,13 +95,14 @@ const nodeUmdRollupConfigFactory = (isProduction) => {
preventAssignment: true
}),
nodeResolve(),
cleanup(),
es3Poly(),
es3Check()
]
};
if (isProduction) {
nodeRollupConfig.output.file = `./dist/node/${outputName}.min.js`;
nodeRollupConfig.output.file = `./dist/es5/node/${outputName}.min.js`;
nodeRollupConfig.plugins.push(
uglify({
ie8: true,
@ -131,12 +134,13 @@ const moduleRollupConfigFactory = (format, isProduction) => {
const moduleRollupConfig = {
input: `${inputName}.js`,
output: {
file: `./dist/${format}/${outputName}.js`,
file: `./dist/es5/${format}/${outputName}.js`,
banner: banner,
format: format,
name: "Microsoft.DynamicProto-JS",
extend: true,
sourcemap: true
sourcemap: true,
exports: "auto"
},
plugins: [
dynamicRemove(),
@ -149,13 +153,14 @@ const moduleRollupConfigFactory = (format, isProduction) => {
preventAssignment: true
}),
nodeResolve(),
cleanup(),
es3Poly(),
es3Check()
]
};
if (isProduction) {
moduleRollupConfig.output.file = `./dist/${format}/${outputName}.min.js`;
moduleRollupConfig.output.file = `./dist/es5/${format}/${outputName}.min.js`;
if (format != "esm") {
moduleRollupConfig.plugins.push(
uglify({

Просмотреть файл

@ -1,6 +1,8 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
import { getGlobal, objHasOwnProperty, throwTypeError } from "@nevware21/ts-utils";
interface DynamicGlobalSettings {
/**
* Stores the global options which will also be exposed on the runtime global
@ -127,35 +129,9 @@ let _objGetPrototypeOf = Obj["getPrototypeOf"];
*/
let _objGetOwnProps = Obj["getOwnPropertyNames"];
/**
* Gets the runtime global reference
* @returns
*/
function _getGlobal(): Window {
let result: any;
if (typeof globalThis !== UNDEFINED) {
result = globalThis;
}
if (!result && typeof self !== UNDEFINED) {
result = self;
}
if (!result && typeof window !== UNDEFINED) {
result = window;
}
if (!result && typeof global !== UNDEFINED) {
result = global;
}
return result || {};
}
// Since 1.1.7 moving these to the runtime global to work around mixed version and module issues
// See Issue https://github.com/microsoft/DynamicProto-JS/issues/57 for details
let _gbl = _getGlobal();
let _gbl = getGlobal();
let _gblInst: DynamicGlobalSettings = _gbl[DynProtoGlobalSettings] || (_gbl[DynProtoGlobalSettings] = {
o: {
[strSetInstFuncs]: true,
@ -164,14 +140,6 @@ let _gblInst: DynamicGlobalSettings = _gbl[DynProtoGlobalSettings] || (_gbl[DynP
n: 1000 // Start new global index @ 1000 so we "fix" some cases when mixed with 1.1.6 or earlier
});
/**
* Helper to check if the object contains a property of the name
* @ignore
*/
function _hasOwnProperty(obj:any, prop:string) {
return obj && Obj[Prototype].hasOwnProperty.call(obj, prop);
}
/**
* Helper used to check whether the target is an Object prototype or Array prototype
* @ignore
@ -206,7 +174,7 @@ function _getObjProto(target:any) {
// Using the pre-calculated value as IE8 doesn't support looking up the prototype of a prototype and thus fails for more than 1 base class
newProto = target[DynProtoBaseProto] || curProto;
if (!_hasOwnProperty(target, DynProtoBaseProto)) {
if (!objHasOwnProperty(target, DynProtoBaseProto)) {
// As this prototype doesn't have this property then this is from an inherited class so newProto is the base to return so save it
// so we can look it up value (which for a multiple hierarchy dynamicProto will be the base class)
delete target[DynProtoCurrent]; // Delete any current value allocated to this instance so we pick up the value from prototype hierarchy
@ -229,7 +197,7 @@ function _forEachProp(target: any, func: (name: string) => void) {
props = _objGetOwnProps(target);
} else {
for (let name in target) {
if (typeof name === "string" && _hasOwnProperty(target, name)) {
if (typeof name === "string" && objHasOwnProperty(target, name)) {
props.push(name);
}
}
@ -251,7 +219,7 @@ function _forEachProp(target: any, func: (name: string) => void) {
* @ignore
*/
function _isDynamicCandidate(target:any, funcName:string, skipOwn:boolean) {
return (funcName !== Constructor && typeof target[funcName] === strFunction && (skipOwn || _hasOwnProperty(target, funcName)));
return (funcName !== Constructor && typeof target[funcName] === strFunction && (skipOwn || objHasOwnProperty(target, funcName)));
}
/**
@ -260,7 +228,7 @@ function _isDynamicCandidate(target:any, funcName:string, skipOwn:boolean) {
* @ignore
*/
function _throwTypeError(message:string) {
throw new TypeError("DynamicProto: " + message);
throwTypeError("DynamicProto: " + message);
}
/**
@ -363,7 +331,7 @@ function _getInstFunc(target: any, funcName: string, proto: any, currentDynProto
// We need to check whether the class name is defined directly on this prototype otherwise
// it will walk the proto chain and return any parent proto classname.
if (target && _hasOwnProperty(proto, DynClassName)) {
if (target && objHasOwnProperty(proto, DynClassName)) {
let instFuncTable = target[DynInstFuncTable] || {};
instFunc = (instFuncTable[proto[DynClassName]] || {})[funcName];
@ -377,7 +345,7 @@ function _getInstFunc(target: any, funcName: string, proto: any, currentDynProto
// by adding the instance function back directly on the instance (avoiding the dynamic func lookup)
if (!instFunc[DynInstChkTag] && instFuncTable[DynAllowInstChkTag] !== false) {
// If the instance already has an instance function we can't replace it
let canAddInst = !_hasOwnProperty(target, funcName);
let canAddInst = !objHasOwnProperty(target, funcName);
// Get current prototype
let objProto = _getObjProto(target);
@ -474,7 +442,7 @@ function _populatePrototype(proto:any, className:string, target:any, baseInstFun
delete target[name];
// Add a dynamic proto if one doesn't exist or if a prototype function exists and it's not a dynamic one
if (!_hasOwnProperty(proto, name) || (proto[name] && !proto[name][DynProxyTag])) {
if (!objHasOwnProperty(proto, name) || (proto[name] && !proto[name][DynProxyTag])) {
proto[name] = _createDynamicPrototype(proto, name);
}
}
@ -520,7 +488,7 @@ function _checkPrototype(classProto:any, thisTarget:any) {
* @ignore
*/
function _getObjName(target:any, unknownValue?:string) {
if (_hasOwnProperty(target, Prototype)) {
if (objHasOwnProperty(target, Prototype)) {
// Look like a prototype
return target.name || unknownValue || UnknownValue
}
@ -610,7 +578,7 @@ export type DynamicProtoDelegate<DPType> = (theTarget:DPType, baseFuncProxy?:DPT
*/
export default function dynamicProto<DPType, DPCls>(theClass:DPCls, target:DPType, delegateFunc: DynamicProtoDelegate<DPType>, options?:IDynamicProtoOpts): void {
// Make sure that the passed theClass argument looks correct
if (!_hasOwnProperty(theClass, Prototype)) {
if (!objHasOwnProperty(theClass, Prototype)) {
_throwTypeError("theClass is an invalid class definition.");
}
@ -621,7 +589,7 @@ export default function dynamicProto<DPType, DPCls>(theClass:DPCls, target:DPTyp
}
let className = null;
if (_hasOwnProperty(classProto, DynClassName)) {
if (objHasOwnProperty(classProto, DynClassName)) {
// Only grab the class name if it's defined on this prototype (i.e. don't walk the prototype chain)
className = classProto[DynClassName];
} else {

Просмотреть файл

@ -14,14 +14,16 @@
require.config({
baseUrl: '../',
paths: {
qunit: "./External/qunit-1.23.1"
qunit: "./External/qunit-1.23.1",
"@nevware21/ts-utils": "../node_modules/@nevware21/ts-utils/dist/es5/umd/ts-utils"
}
});
// Load core & common before channel tests
require([
'qunit' // Load qunit here instead of with tests, otherwise will not work
], function (QUnit, aicore) {
"qunit", // Load qunit here instead of with tests, otherwise will not work
"@nevware21/ts-utils"
], function (QUnit, tsUtils, aicore) {
require.config({
baseUrl: './'
});

Просмотреть файл

@ -5,15 +5,18 @@
"noImplicitAny": true,
"module": "es6",
"moduleResolution": "node",
"target": "es3",
"target": "es5",
"forceConsistentCasingInFileNames": true,
"importHelpers": false,
"noEmitHelpers": false,
"alwaysStrict": true,
"declaration": true,
"outDir": "./out/lib/src",
"declarationDir": "./types",
"outDir": "./dist-es5",
"rootDir": "./src",
"suppressImplicitAnyIndexErrors": true,
"allowSyntheticDefaultImports": true
"allowSyntheticDefaultImports": true,
"removeComments": false
},
"include": [
"./src/**/*.ts"

Просмотреть файл

@ -11,9 +11,9 @@
"minification",
"application insights"
],
"main": "./lib/dist/node/dynamicproto-js.js",
"module": "./lib/dist/esm/dynamicproto-js.js",
"types": "./lib/types/dynamicproto-js.d.ts",
"main": "./lib/dist/es5/node/dynamicproto-js.js",
"module": "./lib/dist-es5/DynamicProto.js",
"types": "./lib/types/DynamicProto.d.ts",
"directories": {
"doc": "lib/docs"
},
@ -38,7 +38,9 @@
"url": "https://github.com/microsoft/DynamicProto-JS/issues"
},
"homepage": "https://github.com/microsoft/DynamicProto-JS#readme",
"dependencies": {},
"dependencies": {
"@nevware21/ts-utils": ">= 0.9.4 < 2.x"
},
"devDependencies": {
"@microsoft/rush": "5.82.1",
"@nevware21/grunt-ts-plugin": "^0.3.0",

Просмотреть файл

@ -11,8 +11,9 @@
"minification",
"application insights"
],
"main": "./tools/rollup/node/removedynamic.js",
"module": "./tools/rollup/esm/removedynamic.js",
"main": "dist-es5/removedynamic.js",
"module": "dist-es5/removedynamic.js",
"types": "types/removeDynamic.d.ts",
"directories": {
},
"scripts": {
@ -32,6 +33,9 @@
"url": "https://github.com/microsoft/DynamicProto-JS/issues"
},
"homepage": "https://github.com/microsoft/DynamicProto-JS#readme",
"dependencies": {
"@nevware21/ts-utils": ">= 0.9.4 < 2.x"
},
"devDependencies": {
"grunt": "^1.5.3",
"grunt-cli": "^1.4.3",

Просмотреть файл

@ -1,9 +1,10 @@
import nodeResolve from "@rollup/plugin-node-resolve";
import copy from "rollup-plugin-copy";
import replace from "@rollup/plugin-replace";
import cleanup from "rollup-plugin-cleanup";
const version = require("./package.json").version;
const inputName = "./out/rollup/src/removeDynamic";
const inputName = "./dist-es5/removeDynamic";
const outputName = "removedynamic";
const distPath = "../tools/rollup/";
const banner = [
@ -22,7 +23,8 @@ const nodeUmdRollupConfigFactory = (isProduction) => {
format: "umd",
name: "Microsoft.DynamicProto-Rollup",
extend: true,
sourcemap: false
sourcemap: false,
exports: "auto"
},
plugins: [
replace({
@ -33,7 +35,8 @@ const nodeUmdRollupConfigFactory = (isProduction) => {
},
preventAssignment: true
}),
nodeResolve()
nodeResolve(),
cleanup()
]
};
@ -59,7 +62,8 @@ const moduleRollupConfigFactory = (format, isProduction) => {
format: format,
name: "Microsoft.DynamicProto-JS",
extend: true,
sourcemap: false
sourcemap: false,
exports: "auto"
},
plugins: [
replace({
@ -70,7 +74,8 @@ const moduleRollupConfigFactory = (format, isProduction) => {
},
preventAssignment: true
}),
nodeResolve()
nodeResolve(),
cleanup()
]
};

Просмотреть файл

@ -5,15 +5,18 @@
"noImplicitAny": true,
"module": "es6",
"moduleResolution": "node",
"target": "es3",
"target": "es5",
"forceConsistentCasingInFileNames": true,
"importHelpers": false,
"noEmitHelpers": false,
"alwaysStrict": true,
"declaration": true,
"outDir": "./out/rollup/src",
"declarationDir": "./types",
"rootDir": "./src",
"outDir": "./dist-es5",
"suppressImplicitAnyIndexErrors": true,
"allowSyntheticDefaultImports": true
"allowSyntheticDefaultImports": true,
"removeComments": false
},
"include": [
"./src/**/*.ts"

Просмотреть файл

@ -4,7 +4,7 @@
"inlineSources": true,
"noImplicitAny": true,
"module": "es6",
"target": "es3",
"target": "es5",
"alwaysStrict": true,
"declaration": true
},

Просмотреть файл

@ -4,7 +4,7 @@
"inlineSources": true,
"noImplicitAny": true,
"module": "es6",
"target": "es3",
"target": "es5",
"alwaysStrict": true
},
"files": []