Skip to content
Open
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,8 @@ both the old and new forms are:
- feat(service/resourcelink): moved the `resource-link` commands under the `service` command, with an unlisted and deprecated alias of `resource-link` ([#1635](https://github.com/fastly/cli/pull/1635))
- feat(service/logging): moved the `logging` commands under the `service` command, with an unlisted and deprecated alias of `logging` ([#1642](https://github.com/fastly/cli/pull/1642))
- feat(service/auth): moved the `service-auth` commands under the `service` command and renamed to `auth`, with an unlisted and deprecated alias of `service-auth` ([#1643](https://github.com/fastly/cli/pull/1643))
- feat(compute/build): improved error messaging for JavaScript builds with pre-flight toolchain verification including Bun runtime support ([#1640](https://github.com/fastly/cli/pull/1640))

### Bug fixes:

- fix(docker): Use base image toolchain instead of reinstalling stable, which could pull in an unvalidated Rust version.
Expand Down
6 changes: 3 additions & 3 deletions pkg/commands/compute/build_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,7 @@ func TestBuildJavaScript(t *testing.T) {
// default build script inserted.
//
// NOTE: This test passes --verbose so we can validate specific outputs.
// NOTE: npmInstall is required because toolchain verification checks for node_modules.
{
name: "build script inserted dynamically when missing",
args: args("compute build --verbose"),
Expand All @@ -523,8 +524,8 @@ func TestBuildJavaScript(t *testing.T) {
wantOutput: []string{
"No [scripts.build] found in fastly.toml.", // requires --verbose
"The following default build command for",
"npm exec webpack", // our testdata package.json references webpack
},
npmInstall: true,
},
{
name: "build error",
Expand All @@ -548,7 +549,7 @@ func TestBuildJavaScript(t *testing.T) {
language = "javascript"

[scripts]
build = "%s"`, compute.JsDefaultBuildCommandForWebpack),
build = "%s"`, compute.JsDefaultBuildCommand),
wantOutput: []string{
"Creating ./bin directory (for Wasm binary)",
"Built package",
Expand Down Expand Up @@ -591,7 +592,6 @@ func TestBuildJavaScript(t *testing.T) {
T: t,
Copy: []testutil.FileIO{
{Src: filepath.Join("testdata", "build", "javascript", "package.json"), Dst: "package.json"},
{Src: filepath.Join("testdata", "build", "javascript", "webpack.config.js"), Dst: "webpack.config.js"},
{Src: filepath.Join("testdata", "build", "javascript", "src", "index.js"), Dst: filepath.Join("src", "index.js")},
},
Write: []testutil.FileIO{
Expand Down
Loading
Loading