Product
Introducing Enhanced Alert Actions and Triage Functionality
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
@esbuild/linux-riscv64
Advanced tools
Changelog
0.17.1
Make it possible to cancel a build (#2725)
The context object introduced in version 0.17.0 has a new cancel()
method. You can use it to cancel a long-running build so that you can start a new one without needing to wait for the previous one to finish. When this happens, the previous build should always have at least one error and have no output files (i.e. it will be a failed build).
Using it might look something like this:
JS:
let ctx = await esbuild.context({
// ...
})
let rebuildWithTimeLimit = timeLimit => {
let timeout = setTimeout(() => ctx.cancel(), timeLimit)
return ctx.rebuild().finally(() => clearTimeout(timeout))
}
let build = await rebuildWithTimeLimit(500)
Go:
ctx, err := api.Context(api.BuildOptions{
// ...
})
if err != nil {
return
}
rebuildWithTimeLimit := func(timeLimit time.Duration) api.BuildResult {
t := time.NewTimer(timeLimit)
go func() {
<-t.C
ctx.Cancel()
}()
result := ctx.Rebuild()
t.Stop()
return result
}
build := rebuildWithTimeLimit(500 * time.Millisecond)
This API is a quick implementation and isn't maximally efficient, so the build may continue to do some work for a little bit before stopping. For example, I have added stop points between each top-level phase of the bundler and in the main module graph traversal loop, but I haven't added fine-grained stop points within the internals of the linker. How quickly esbuild stops can be improved in future releases. This means you'll want to wait for cancel()
and/or the previous rebuild()
to finish (i.e. await the returned promise in JavaScript) before starting a new build, otherwise rebuild()
will give you the just-canceled build that still hasn't ended yet. Note that onEnd
callbacks will still be run regardless of whether or not the build was canceled.
Fix server-sent events without servedir
(#2827)
The server-sent events for live reload were incorrectly using servedir
to calculate the path to modified output files. This means events couldn't be sent when servedir
wasn't specified. This release uses the internal output directory (which is always present) instead of servedir
(which might be omitted), so live reload should now work when servedir
is not specified.
Custom entry point output paths now work with the copy
loader (#2828)
Entry points can optionally provide custom output paths to change the path of the generated output file. For example, esbuild foo=abc.js bar=xyz.js --outdir=out
generates the files out/foo.js
and out/bar.js
. However, this previously didn't work when using the copy
loader due to an oversight. This bug has been fixed. For example, you can now do esbuild foo=abc.html bar=xyz.html --outdir=out --loader:.html=copy
to generate the files out/foo.html
and out/bar.html
.
The JS API can now take an array of objects (#2828)
Previously it was not possible to specify two entry points with the same custom output path using the JS API, although it was possible to do this with the Go API and the CLI. This will not cause a collision if both entry points use different extensions (e.g. if one uses .js
and the other uses .css
). You can now pass the JS API an array of objects to work around this API limitation:
// The previous API didn't let you specify duplicate output paths
let result = await esbuild.build({
entryPoints: {
// This object literal contains a duplicate key, so one is ignored
'dist': 'foo.js',
'dist': 'bar.css',
},
})
// You can now specify duplicate output paths as an array of objects
let result = await esbuild.build({
entryPoints: [
{ in: 'foo.js', out: 'dist' },
{ in: 'bar.css', out: 'dist' },
],
})
Readme
This is the Linux RISC-V 64-bit binary for esbuild, a JavaScript bundler and minifier. See https://github.com/evanw/esbuild for details.
FAQs
The Linux RISC-V 64-bit binary for esbuild, a JavaScript bundler.
The npm package @esbuild/linux-riscv64 receives a total of 4,819,930 weekly downloads. As such, @esbuild/linux-riscv64 popularity was classified as popular.
We found that @esbuild/linux-riscv64 demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
Security News
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.