Skip to content

Commit

Permalink
[8.10] Upgrade openpgp 5.3.0 to 5.10.1 (#165526) (#166621)
Browse files Browse the repository at this point in the history
# Backport

This will backport the following commits from `main` to `8.10`:
- [Upgrade openpgp 5.3.0 to 5.10.1
(#165526)](#165526)

<!--- Backport version: 8.9.7 -->

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

<!--BACKPORT
[{"author":{"name":"Kurt","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-09-18T12:31:16Z","message":"Upgrade
openpgp 5.3.0 to 5.10.1 (#165526)\n\n## Summary\r\n\r\nUpgrade `openpgp`
from `5.3.0` to `5.10.1`\r\n\r\nCommit
log:\r\nhttps://github.com/openpgpjs/openpgpjs/compare/v5.3.0...v5.10.1\r\n\r\nThere
is an incompatibility of `Uint8Array` when using Jest/JSDom with\r\nthe
TextEncoder/TextDecoder from node
`util`.\r\n\r\n`https://github.com/kayahr/text-encoding` has been added
as a\r\n`devDependency` so it can be used in the polyfill. It provides a
working\r\nTextEncoder/Decoder for our Jest
tests.\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<[email protected]>","sha":"70c7fc571b714f9bc00f6d2c71c1fd13c587caad","branchLabelMapping":{"^v8.11.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["chore","Team:Security","release_note:skip","backport:all-open","v8.11.0"],"number":165526,"url":"https://github.com/elastic/kibana/pull/165526","mergeCommit":{"message":"Upgrade
openpgp 5.3.0 to 5.10.1 (#165526)\n\n## Summary\r\n\r\nUpgrade `openpgp`
from `5.3.0` to `5.10.1`\r\n\r\nCommit
log:\r\nhttps://github.com/openpgpjs/openpgpjs/compare/v5.3.0...v5.10.1\r\n\r\nThere
is an incompatibility of `Uint8Array` when using Jest/JSDom with\r\nthe
TextEncoder/TextDecoder from node
`util`.\r\n\r\n`https://github.com/kayahr/text-encoding` has been added
as a\r\n`devDependency` so it can be used in the polyfill. It provides a
working\r\nTextEncoder/Decoder for our Jest
tests.\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<[email protected]>","sha":"70c7fc571b714f9bc00f6d2c71c1fd13c587caad"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.11.0","labelRegex":"^v8.11.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/165526","number":165526,"mergeCommit":{"message":"Upgrade
openpgp 5.3.0 to 5.10.1 (#165526)\n\n## Summary\r\n\r\nUpgrade `openpgp`
from `5.3.0` to `5.10.1`\r\n\r\nCommit
log:\r\nhttps://github.com/openpgpjs/openpgpjs/compare/v5.3.0...v5.10.1\r\n\r\nThere
is an incompatibility of `Uint8Array` when using Jest/JSDom with\r\nthe
TextEncoder/TextDecoder from node
`util`.\r\n\r\n`https://github.com/kayahr/text-encoding` has been added
as a\r\n`devDependency` so it can be used in the polyfill. It provides a
working\r\nTextEncoder/Decoder for our Jest
tests.\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<[email protected]>","sha":"70c7fc571b714f9bc00f6d2c71c1fd13c587caad"}}]}]
BACKPORT-->

Co-authored-by: Kurt <[email protected]>
  • Loading branch information
kibanamachine and kc13greiner authored Sep 18, 2023
1 parent 85243e0 commit e0d5cfd
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 10 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -924,7 +924,7 @@
"object-hash": "^1.3.1",
"object-path-immutable": "^3.1.1",
"openai": "^3.3.0",
"openpgp": "5.3.0",
"openpgp": "5.10.1",
"opn": "^5.5.0",
"ora": "^4.0.4",
"p-limit": "^3.0.1",
Expand Down Expand Up @@ -1068,6 +1068,7 @@
"@jest/reporters": "^29.6.1",
"@jest/transform": "^29.6.1",
"@jest/types": "^29.6.1",
"@kayahr/text-encoding": "^1.2.0",
"@kbn/alerting-api-integration-helpers": "link:x-pack/test/alerting_api_integration/packages/helpers",
"@kbn/ambient-common-types": "link:packages/kbn-ambient-common-types",
"@kbn/ambient-ftr-types": "link:packages/kbn-ambient-ftr-types",
Expand Down
6 changes: 3 additions & 3 deletions packages/kbn-test/src/jest/setup/polyfills.jsdom.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ if (!global.URL.hasOwnProperty('createObjectURL')) {

// https://github.com/jsdom/jsdom/issues/2524
if (!global.hasOwnProperty('TextEncoder')) {
const { TextEncoder, TextDecoder } = require('util');
global.TextEncoder = TextEncoder;
global.TextDecoder = TextDecoder;
const customTextEncoding = require('@kayahr/text-encoding');
global.TextEncoder = customTextEncoding.TextEncoder;
global.TextDecoder = customTextEncoding.TextDecoder;
}

// NOTE: We should evaluate removing this once we upgrade to Node 18 and find out if loaders.gl already fixed this usage
Expand Down
3 changes: 2 additions & 1 deletion renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,8 @@
"tough-cookie",
"@types/tough-cookie",
"xml-crypto",
"@types/xml-crypto"
"@types/xml-crypto",
"@kayahr/text-encoding"
],
"reviewers": [
"team:kibana-security"
Expand Down
2 changes: 1 addition & 1 deletion src/dev/license_checker/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export const DEV_ONLY_LICENSE_ALLOWED = ['MPL-2.0'];
// there are some licenses which should not be globally allowed
// but can be brought in on a per-package basis
export const PER_PACKAGE_ALLOWED_LICENSES = {
'openpgp@5.3.0': ['LGPL-3.0+'],
'openpgp@5.10.1': ['LGPL-3.0+'],
};
// Globally overrides a license for a given package@version
export const LICENSE_OVERRIDES = {
Expand Down
20 changes: 16 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2921,6 +2921,13 @@
resolved "https://registry.yarnpkg.com/@juggle/resize-observer/-/resize-observer-3.4.0.tgz#08d6c5e20cf7e4cc02fd181c4b0c225cd31dbb60"
integrity sha512-dfLbk+PwWvFzSxwk3n5ySL0hfBog779o8h68wK/7/APo/7cgyWp5jcXockbxdk5kFRkbeXWm4Fbi9FrdN381sA==

"@kayahr/text-encoding@^1.2.0":
version "1.2.0"
resolved "https://registry.yarnpkg.com/@kayahr/text-encoding/-/text-encoding-1.2.0.tgz#9d75de6b40d7694e524c8ce39fc6e08994680746"
integrity sha512-61R84DjOQvO4bakOl4Vwuw0wU3FLbFtfUf4ApJquQ2+N3AY2VlN0j9te8rpGFHx2mzvhWKetyDgVZiLeU2/dhA==
dependencies:
tslib "^2.5.2"

"@kbn/aad-fixtures-plugin@link:x-pack/test/alerting_api_integration/common/plugins/aad":
version "0.0.0"
uid ""
Expand Down Expand Up @@ -23035,10 +23042,10 @@ opener@^1.5.2:
resolved "https://registry.yarnpkg.com/opener/-/opener-1.5.2.tgz#5d37e1f35077b9dcac4301372271afdeb2a13598"
integrity sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A==

openpgp@5.3.0:
version "5.3.0"
resolved "https://registry.yarnpkg.com/openpgp/-/openpgp-5.3.0.tgz#e8fc97e538865b8c095dbd91c7be4203bd1dd1df"
integrity sha512-qjCj0vYpV3dmmkE+vURiJ5kVAJwrMk8BPukvpWJiHcTNWKwPVsRS810plIe4klIcHVf1ScgUQwqtBbv99ff+kQ==
openpgp@5.10.1:
version "5.10.1"
resolved "https://registry.yarnpkg.com/openpgp/-/openpgp-5.10.1.tgz#3b137470187b79281719ced16fb9e60b822cfd24"
integrity sha512-SR5Ft+ej51d0+p53ld5Ney0Yiz0y8Mh1YYLJrvpRMbTaNhvS1QcDX0Oq1rW9sjBnQXtgrpWw2Zve3rm7K5C/pw==
dependencies:
asn1.js "^5.0.0"

Expand Down Expand Up @@ -28684,6 +28691,11 @@ tslib@^2.0.0, tslib@^2.0.1, tslib@^2.0.3, tslib@^2.1.0, tslib@^2.3.1, tslib@^2.4
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.1.tgz#0d0bfbaac2880b91e22df0768e55be9753a5b17e"
integrity sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==

tslib@^2.5.2:
version "2.6.2"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae"
integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==

tslib@~2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.1.0.tgz#da60860f1c2ecaa5703ab7d39bc05b6bf988b97a"
Expand Down

0 comments on commit e0d5cfd

Please sign in to comment.