Skip to content

Commit

Permalink
[Maintenance] Bumps re2 and supertest
Browse files Browse the repository at this point in the history
* Removes manual resolution on qs.
* Adds steps for upgrading re2.

Signed-off-by: Tommy Markley <5437176+tmarkley@users.noreply.github.com>
  • Loading branch information
tmarkley committed Dec 3, 2022
1 parent 9d62439 commit 0d7f5dc
Show file tree
Hide file tree
Showing 5 changed files with 358 additions and 345 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
### 🛠 Maintenance

- Adding @zhongnansu as maintainer. ([#2590](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2590))
- Bumps `re2` and `supertest` ([3018](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3018))

### 🪛 Refactoring

Expand Down
7 changes: 2 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@
"**/loader-utils": "^2.0.3",
"**/node-jose": "^2.1.0",
"**/nth-check": "^2.0.1",
"**/qs": "^6.10.3",
"**/trim": "^0.0.3",
"**/typescript": "4.0.2",
"**/unset-value": "^2.0.1",
Expand Down Expand Up @@ -195,7 +194,7 @@
"pegjs": "0.10.0",
"proxy-from-env": "1.0.0",
"query-string": "^6.13.2",
"re2": "^1.15.4",
"re2": "^1.17.8",
"react": "^16.14.0",
"react-dom": "^16.12.0",
"react-input-range": "^1.3.0",
Expand Down Expand Up @@ -319,8 +318,6 @@
"@types/sinon": "^7.0.13",
"@types/strip-ansi": "^5.2.1",
"@types/styled-components": "^5.1.19",
"@types/supertest": "^2.0.11",
"@types/supertest-as-promised": "^2.0.38",
"@types/tapable": "^1.0.6",
"@types/tar": "^4.0.3",
"@types/testing-library__jest-dom": "^5.14.2",
Expand Down Expand Up @@ -444,7 +441,7 @@
"strip-ansi": "^6.0.0",
"stylelint": "^14.5.2",
"stylelint-config-standard-scss": "^3.0.0",
"supertest": "^6.2.2",
"supertest": "^6.3.2",
"supertest-as-promised": "^4.0.2",
"tape": "^5.0.1",
"topojson-client": "3.0.0",
Expand Down
4 changes: 2 additions & 2 deletions src/dev/build/tasks/patch_native_modules_task.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ it('patch native modules task downloads the correct platform package', async ()
"destination": <absolute path>/.native_modules/re2/linux-arm64-83.tar.gz,
"log": <ToolingLog>,
"retries": 3,
"sha256": "f25124adc64d269a513b99abd4a5eed8d7a929db565207f8ece1f3b7b7931668",
"url": "https://d1v1sj258etie.cloudfront.net/node-re2/releases/download/1.15.4/linux-arm64-83.tar.gz",
"sha256": "38ec2ac319ed7f5552d0b3c2785e9914acb40ee6ed6de2f605a22a6e6c0480ef",
"url": "https://d1v1sj258etie.cloudfront.net/node-re2/releases/download/1.17.8/linux-arm64-83.tar.gz",
},
],
]
Expand Down
26 changes: 17 additions & 9 deletions src/dev/build/tasks/patch_native_modules_task.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,31 +52,39 @@ interface Package {
>;
}

// Process for updating urls and checksums after bumping the version of `re2`:
// 1. Match `version` with the version in the yarn.lock file.
// 2. Update the url to match the version.
// 2a. If a Node.js update occurs, the node module version must match as
// well (i.e. '83'). See https://nodejs.org/en/download/releases/#ref-1.
// 3. Generate the new checksum by executing the following commands:
// 3a. `echo "{url}" > url.txt`
// 3b. `sha256sum url.txt`
const packages: Package[] = [
{
name: 're2',
version: '1.15.4',
version: '1.17.8',
destinationPath: 'node_modules/re2/build/Release/re2.node',
extractMethod: 'gunzip',
archives: {
'darwin-x64': {
url: 'https://github.com/uhop/node-re2/releases/download/1.15.4/darwin-x64-83.gz',
sha256: 'b45cd8296fd6eb2a091399c20111af43093ba30c99ed9e5d969278f5ff69ba8f',
url: 'https://github.com/uhop/node-re2/releases/download/1.17.8/darwin-x64-83.gz',
sha256: 'da608fe181fae7e86bb693ff527d978ab3e68d8abd3d4abc60696aecfbcbcf75',
},
'linux-x64': {
url: 'https://github.com/uhop/node-re2/releases/download/1.15.4/linux-x64-83.gz',
sha256: '1bbc3f90f0ba105772b37c04e3a718f69544b4df01dda00435c2b8e50b2ad0d9',
url: 'https://github.com/uhop/node-re2/releases/download/1.17.8/linux-x64-83.gz',
sha256: 'ac3810cefb4b3d732b01f8505082047bc943ed83ed32d6f955061b30351fefb4',
},
'linux-arm64': {
url:
'https://d1v1sj258etie.cloudfront.net/node-re2/releases/download/1.15.4/linux-arm64-83.tar.gz',
sha256: 'f25124adc64d269a513b99abd4a5eed8d7a929db565207f8ece1f3b7b7931668',
'https://d1v1sj258etie.cloudfront.net/node-re2/releases/download/1.17.8/linux-arm64-83.tar.gz',
sha256: '38ec2ac319ed7f5552d0b3c2785e9914acb40ee6ed6de2f605a22a6e6c0480ef',
overriddenExtractMethod: 'untar',
overriddenDestinationPath: 'node_modules/re2/build/Release',
},
'win32-x64': {
url: 'https://github.com/uhop/node-re2/releases/download/1.15.4/win32-x64-83.gz',
sha256: 'efe939d3cda1d64ee3ee3e60a20613b95166d55632e702c670763ea7e69fca06',
url: 'https://github.com/uhop/node-re2/releases/download/1.17.8/win32-x64-83.gz',
sha256: '16d6ab576b788495052c40d93854420fd5482719c0cf00bc7dde4c1ad632ef4b',
},
},
},
Expand Down
Loading

0 comments on commit 0d7f5dc

Please sign in to comment.