[7.17] Remove deprecated abab package (#183383) (#183724)

# Backport

This will backport the following commits from `main` to `7.17`:
- [Remove deprecated `abab` package
(#183383)](https://github.com/elastic/kibana/pull/183383)

<!--- Backport version: 8.9.8 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT
[{"author":{"name":"zyoshoka","email":"107108195+zyoshoka@users.noreply.github.com"},"sourceCommit":{"committedDate":"2024-05-16T10:48:26Z","message":"Remove
deprecated `abab` package (#183383)\n\n## Summary\r\n\r\nThis PR removes
deprecated
[`abab`](https://www.npmjs.com/package/abab)\r\npackage.\r\n\r\n### For
maintainers\r\n\r\n- [ ] This was checked for breaking API changes and
was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\nCo-authored-by:
Jeramy Soucy
<jeramy.soucy@elastic.co>","sha":"1ead6b533abbd90e8c022314ee0db1f9e4c84321","branchLabelMapping":{"^v8.15.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["chore","release_note:skip","💝community","backport:all-open","v8.14.0","v8.15.0"],"number":183383,"url":"https://github.com/elastic/kibana/pull/183383","mergeCommit":{"message":"Remove
deprecated `abab` package (#183383)\n\n## Summary\r\n\r\nThis PR removes
deprecated
[`abab`](https://www.npmjs.com/package/abab)\r\npackage.\r\n\r\n### For
maintainers\r\n\r\n- [ ] This was checked for breaking API changes and
was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\nCo-authored-by:
Jeramy Soucy
<jeramy.soucy@elastic.co>","sha":"1ead6b533abbd90e8c022314ee0db1f9e4c84321"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"8.14","label":"v8.14.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/183618","number":183618,"state":"MERGED","mergeCommit":{"sha":"283db5f8465e5d5f93a14d2efc45efd38bb47af1","message":"[8.14]
Remove deprecated &#x60;abab&#x60; package (#183383) (#183618)\n\n#
Backport\n\nThis will backport the following commits from `main` to
`8.14`:\n- [Remove deprecated &#x60;abab&#x60;
package\n(#183383)](https://github.com/elastic/kibana/pull/183383)\n\n<!---
Backport version: 9.4.3 -->\n\n### Questions ?\nPlease refer to the
[Backport
tool\ndocumentation](https://github.com/sqren/backport)\n\n<!--BACKPORT\n[{\"author\":{\"name\":\"zyoshoka\",\"email\":\"107108195+zyoshoka@users.noreply.github.com\"},\"sourceCommit\":{\"committedDate\":\"2024-05-16T10:48:26Z\",\"message\":\"Remove\ndeprecated
`abab` package (#183383)\\n\\n## Summary\\r\\n\\r\\nThis PR
removes\ndeprecated\n[`abab`](https://www.npmjs.com/package/abab)\\r\\npackage.\\r\\n\\r\\n###
For\nmaintainers\\r\\n\\r\\n- [ ] This was checked for breaking API
changes
and\nwas\n[labeled\\r\\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\\r\\n\\r\\nCo-authored-by:\nJeramy
Soucy\n<jeramy.soucy@elastic.co>\",\"sha\":\"1ead6b533abbd90e8c022314ee0db1f9e4c84321\",\"branchLabelMapping\":{\"^v8.15.0$\":\"main\",\"^v(\\\\d+).(\\\\d+).\\\\d+$\":\"$1.$2\"}},\"sourcePullRequest\":{\"labels\":[\"chore\",\"release_note:skip\",\"💝community\",\"backport:all-open\",\"v8.15.0\"],\"title\":\"Remove\ndeprecated
`abab`\npackage\",\"number\":183383,\"url\":\"https://github.com/elastic/kibana/pull/183383\",\"mergeCommit\":{\"message\":\"Remove\ndeprecated
`abab` package (#183383)\\n\\n## Summary\\r\\n\\r\\nThis PR
removes\ndeprecated\n[`abab`](https://www.npmjs.com/package/abab)\\r\\npackage.\\r\\n\\r\\n###
For\nmaintainers\\r\\n\\r\\n- [ ] This was checked for breaking API
changes
and\nwas\n[labeled\\r\\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\\r\\n\\r\\nCo-authored-by:\nJeramy
Soucy\n<jeramy.soucy@elastic.co>\",\"sha\":\"1ead6b533abbd90e8c022314ee0db1f9e4c84321\"}},\"sourceBranch\":\"main\",\"suggestedTargetBranches\":[],\"targetPullRequestStates\":[{\"branch\":\"main\",\"label\":\"v8.15.0\",\"branchLabelMappingKey\":\"^v8.15.0$\",\"isSourceBranch\":true,\"state\":\"MERGED\",\"url\":\"https://github.com/elastic/kibana/pull/183383\",\"number\":183383,\"mergeCommit\":{\"message\":\"Remove\ndeprecated
`abab` package (#183383)\\n\\n## Summary\\r\\n\\r\\nThis PR
removes\ndeprecated\n[`abab`](https://www.npmjs.com/package/abab)\\r\\npackage.\\r\\n\\r\\n###
For\nmaintainers\\r\\n\\r\\n- [ ] This was checked for breaking API
changes
and\nwas\n[labeled\\r\\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\\r\\n\\r\\nCo-authored-by:\nJeramy
Soucy\n<jeramy.soucy@elastic.co>\",\"sha\":\"1ead6b533abbd90e8c022314ee0db1f9e4c84321\"}}]}]\nBACKPORT-->\n\nCo-authored-by:
zyoshoka
<107108195+zyoshoka@users.noreply.github.com>"}},{"branch":"main","label":"v8.15.0","labelRegex":"^v8.15.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/183383","number":183383,"mergeCommit":{"message":"Remove
deprecated `abab` package (#183383)\n\n## Summary\r\n\r\nThis PR removes
deprecated
[`abab`](https://www.npmjs.com/package/abab)\r\npackage.\r\n\r\n### For
maintainers\r\n\r\n- [ ] This was checked for breaking API changes and
was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\nCo-authored-by:
Jeramy Soucy
<jeramy.soucy@elastic.co>","sha":"1ead6b533abbd90e8c022314ee0db1f9e4c84321"}}]}]
BACKPORT-->

Co-authored-by: zyoshoka <107108195+zyoshoka@users.noreply.github.com>
This commit is contained in:
Jeramy Soucy 2024-05-17 15:44:08 +02:00 committed by GitHub
parent 196ed46be2
commit 02d29538ce
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 3 additions and 11 deletions

View file

@ -646,7 +646,6 @@
"@typescript-eslint/parser": "^5.62.0",
"@typescript-eslint/typescript-estree": "^5.62.0",
"@yarnpkg/lockfile": "^1.1.0",
"abab": "^2.0.4",
"aggregate-error": "^3.1.0",
"antlr4ts-cli": "^0.5.0-alpha.3",
"apidoc-markdown": "^7.3.0",

View file

@ -7,7 +7,6 @@
import fetch from 'node-fetch';
import { resolve } from 'path';
import abab from 'abab';
import pkg from '../../package.json';
function getRequestParams(argv) {
@ -16,7 +15,7 @@ function getRequestParams(argv) {
// use `--auth=myuser:mypassword` or else elastic:changeme is defaulted
// passing `--auth` with no value effectively sends no auth
const auth = argv.auth || 'elastic:changeme';
const authStr = abab.btoa(auth);
const authStr = Buffer.from(auth).toString('base64');
// auto-add a leading slash to basePath
const basePath = argv.basePath ? '/' + argv.basePath : '';

View file

@ -8,12 +8,11 @@
import Hapi from '@hapi/hapi';
import { kbnTestConfig } from '@kbn/test';
import Url from 'url';
import abab from 'abab';
import type { Plugin, CoreSetup, CoreStart, PluginInitializerContext } from 'src/core/server';
import type { ConfigSchema } from './config';
const apiToken = abab.btoa(kbnTestConfig.getUrlParts().auth!);
const apiToken = Buffer.from(kbnTestConfig.getUrlParts().auth!).toString('base64');
function renderBody(kibanaUrl: string) {
const url = Url.resolve(kibanaUrl, '/cors-test');

View file

@ -7330,14 +7330,9 @@ JSONStream@1.3.5:
jsonparse "^1.2.0"
through ">=2.2.7 <3"
abab@^2.0.4:
version "2.0.5"
resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.5.tgz#c0b678fb32d60fc1219c784d6a826fe385aeb79a"
integrity sha512-9IK9EadsbHo6jLWIpxpR6pL0sazTXV6+SQv25ZB+F7Bj9mJNaOc4nCRabwd5M/JwmUa8idz6Eci6eKfJryPs6Q==
abab@^2.0.6:
version "2.0.6"
resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.6.tgz#41b80f2c871d19686216b82309231cfd3cb3d291"
resolved "https://registry.npmjs.org/abab/-/abab-2.0.6.tgz"
integrity sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==
abbrev@1: