mirror of
https://github.com/erlef/setup-beam.git
synced 2026-07-22 22:56:07 +00:00
Remove lodash Dependency (#457)
NodeJS 24 contains RegExp.escape, no need for lodash.
This commit is contained in:
Vendored
+5
-17278
File diff suppressed because it is too large
Load Diff
Generated
-7
@@ -11,7 +11,6 @@
|
||||
"@actions/exec": "3.0.0",
|
||||
"@actions/tool-cache": "4.0.0",
|
||||
"csv-parse": "6.2.1",
|
||||
"lodash": "4.17.23",
|
||||
"semver": "7.7.4",
|
||||
"smol-toml": "1.6.1"
|
||||
},
|
||||
@@ -2183,12 +2182,6 @@
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/lodash": {
|
||||
"version": "4.17.23",
|
||||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.23.tgz",
|
||||
"integrity": "sha512-LgVTMpQtIopCi79SJeDiP0TfWi5CNEc/L/aRdTh3yIvmZXTnheWpKjSZhnvMl8iXbC1tFg9gdHHDMLoV7CnG+w==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/make-dir": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz",
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
"@actions/exec": "3.0.0",
|
||||
"@actions/tool-cache": "4.0.0",
|
||||
"csv-parse": "6.2.1",
|
||||
"lodash": "4.17.23",
|
||||
"semver": "7.7.4",
|
||||
"smol-toml": "1.6.1"
|
||||
},
|
||||
|
||||
+2
-5
@@ -7,7 +7,6 @@ import { exec } from '@actions/exec'
|
||||
import * as tc from '@actions/tool-cache'
|
||||
import * as semver from 'semver'
|
||||
import * as csv from 'csv-parse/sync'
|
||||
import _ from 'lodash'
|
||||
import toml from 'smol-toml'
|
||||
|
||||
const __dirname = path.dirname(fileURLToPath(import.meta.url))
|
||||
@@ -378,9 +377,7 @@ async function getOTPVersions(osVersion) {
|
||||
})
|
||||
} else if (process.platform === 'win32') {
|
||||
const otpArch = otpArchitecture()
|
||||
const file_regex = new RegExp(
|
||||
`^otp_win${_.escapeRegExp(otpArch)}_(.*).exe$`,
|
||||
)
|
||||
const file_regex = new RegExp(`^otp_win${RegExp.escape(otpArch)}_(.*).exe$`)
|
||||
otpVersionsListings.forEach((otpVersionsListing) => {
|
||||
otpVersionsListing
|
||||
.map((x) => x.assets)
|
||||
@@ -982,7 +979,7 @@ async function install(toolName, opts) {
|
||||
const otpArch = otpArchitecture()
|
||||
return (
|
||||
'https://github.com/erlang/otp/releases/download/' +
|
||||
`OTP-${toolVersion}/otp_win${_.escapeRegExp(otpArch)}_${toolVersion}.exe`
|
||||
`OTP-${toolVersion}/otp_win${otpArch}_${toolVersion}.exe`
|
||||
)
|
||||
},
|
||||
extract: async () => ['file', 'otp.exe'],
|
||||
|
||||
Reference in New Issue
Block a user