Skip to content

Commit

Permalink
Remove deprecated abab package (#183383)
Browse files Browse the repository at this point in the history
## Summary

This PR removes deprecated [`abab`](https://www.npmjs.com/package/abab)
package.

### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

Co-authored-by: Jeramy Soucy <[email protected]>
  • Loading branch information
zyoshoka and jeramysoucy authored May 16, 2024
1 parent 8ec0c68 commit 1ead6b5
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 6 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1552,7 +1552,6 @@
"@typescript-eslint/typescript-estree": "^5.62.0",
"@wojtekmaj/enzyme-adapter-react-17": "^0.6.7",
"@yarnpkg/lockfile": "^1.1.0",
"abab": "^2.0.4",
"aggregate-error": "^3.1.0",
"apidoc-markdown": "^7.3.0",
"argsplit": "^1.0.5",
Expand Down
3 changes: 1 addition & 2 deletions x-pack/dev-tools/api_debug/request_from_api.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

import fetch from 'node-fetch';
import { resolve } from 'path';
import abab from 'abab';
import pkg from '../../package.json';
import { X_ELASTIC_INTERNAL_ORIGIN_REQUEST } from '@kbn/core-http-common/src/constants';

Expand All @@ -17,7 +16,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 : '';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@
import Hapi from '@hapi/hapi';
import { kbnTestConfig } from '@kbn/test/kbn_test_config';
import Url from 'url';
import abab from 'abab';

import type { Plugin, CoreSetup, CoreStart, PluginInitializerContext } from '@kbn/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');
Expand Down
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11383,7 +11383,7 @@
resolved "https://registry.yarnpkg.com/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz#e77a97fbd345b76d83245edcd17d393b1b41fb31"
integrity sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ==

abab@^2.0.4, abab@^2.0.6:
abab@^2.0.6:
version "2.0.6"
resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.6.tgz#41b80f2c871d19686216b82309231cfd3cb3d291"
integrity sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==
Expand Down

0 comments on commit 1ead6b5

Please sign in to comment.