mirror of
https://github.com/hashicorp/vault.git
synced 2026-02-18 18:38:08 -05:00
[Chore] - Remove unneeded string extensions (#29834)
* remove usage of string includes polyfill * remove deps as well * add changelog entry * add .gitkeep
This commit is contained in:
parent
4cbdadffe2
commit
2c94c0034b
6 changed files with 3 additions and 43 deletions
3
changelog/29834.txt
Normal file
3
changelog/29834.txt
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
```release-note:change
|
||||
UI: remove outdated and unneeded js string extensions
|
||||
```
|
||||
|
|
@ -80,10 +80,6 @@ const appConfig = {
|
|||
module.exports = function (defaults) {
|
||||
const app = new EmberApp(defaults, appConfig);
|
||||
|
||||
app.import('vendor/string-includes.js');
|
||||
app.import('node_modules/string.prototype.endswith/endswith.js');
|
||||
app.import('node_modules/string.prototype.startswith/startswith.js');
|
||||
|
||||
app.import('node_modules/jsonlint/lib/jsonlint.js');
|
||||
app.import('node_modules/codemirror/addon/lint/lint.css');
|
||||
app.import('node_modules/codemirror/lib/codemirror.css');
|
||||
|
|
|
|||
|
|
@ -158,8 +158,6 @@
|
|||
"sass": "^1.66.3",
|
||||
"shell-quote": "^1.8.1",
|
||||
"sinon": "^17.0.1",
|
||||
"string.prototype.endswith": "^0.2.0",
|
||||
"string.prototype.startswith": "^0.2.0",
|
||||
"stylelint": "^15.11.0",
|
||||
"stylelint-config-standard": "^34.0.0",
|
||||
"stylelint-prettier": "^4.0.2",
|
||||
|
|
|
|||
0
ui/vendor/.gitkeep
vendored
Normal file
0
ui/vendor/.gitkeep
vendored
Normal file
21
ui/vendor/string-includes.js
vendored
21
ui/vendor/string-includes.js
vendored
|
|
@ -1,21 +0,0 @@
|
|||
/**
|
||||
* Copyright (c) HashiCorp, Inc.
|
||||
* SPDX-License-Identifier: BUSL-1.1
|
||||
*/
|
||||
|
||||
// By Mozilla Contributors licensed under CC-BY-SA 2.5 (http://creativecommons.org/licenses/by-sa/2.5/)
|
||||
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes#Polyfill
|
||||
if (!String.prototype.includes) {
|
||||
String.prototype.includes = function (search, start) {
|
||||
'use strict';
|
||||
if (typeof start !== 'number') {
|
||||
start = 0;
|
||||
}
|
||||
|
||||
if (start + search.length > this.length) {
|
||||
return false;
|
||||
} else {
|
||||
return this.indexOf(search, start) !== -1;
|
||||
}
|
||||
};
|
||||
}
|
||||
16
ui/yarn.lock
16
ui/yarn.lock
|
|
@ -17312,13 +17312,6 @@ __metadata:
|
|||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"string.prototype.endswith@npm:^0.2.0":
|
||||
version: 0.2.0
|
||||
resolution: "string.prototype.endswith@npm:0.2.0"
|
||||
checksum: ee0d1619878a7525a6613da16b3a1d7f6d84a8d4414f78a8a1d24aef9789d4bd774d9e93eeb922a78e7f67d804e60f4cba314beb8f55327bff6e83ba39b91f24
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"string.prototype.matchall@npm:^4.0.5, string.prototype.matchall@npm:^4.0.6":
|
||||
version: 4.0.12
|
||||
resolution: "string.prototype.matchall@npm:4.0.12"
|
||||
|
|
@ -17340,13 +17333,6 @@ __metadata:
|
|||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"string.prototype.startswith@npm:^0.2.0":
|
||||
version: 0.2.0
|
||||
resolution: "string.prototype.startswith@npm:0.2.0"
|
||||
checksum: b4224e2454c276baf0609c76f5db0ee6355a89a649041df9a2e49b4cdf4b424dbebbe2c070a3b5f6f00594f8f8fa98415799c7211e873e13f6ee007daae73516
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"string.prototype.trim@npm:^1.2.10":
|
||||
version: 1.2.10
|
||||
resolution: "string.prototype.trim@npm:1.2.10"
|
||||
|
|
@ -18946,8 +18932,6 @@ __metadata:
|
|||
sass: ^1.66.3
|
||||
shell-quote: ^1.8.1
|
||||
sinon: ^17.0.1
|
||||
string.prototype.endswith: ^0.2.0
|
||||
string.prototype.startswith: ^0.2.0
|
||||
stylelint: ^15.11.0
|
||||
stylelint-config-standard: ^34.0.0
|
||||
stylelint-prettier: ^4.0.2
|
||||
|
|
|
|||
Loading…
Reference in a new issue