Skip to content

Revert "fix(deps): update dependency esbuild to v0.22.0"#337

Merged
EricCrosson merged 1 commit intoEricCrosson:masterfrom
bitgopatmcl:revert-esbuild-update
Jul 1, 2024
Merged

Revert "fix(deps): update dependency esbuild to v0.22.0"#337
EricCrosson merged 1 commit intoEricCrosson:masterfrom
bitgopatmcl:revert-esbuild-update

Conversation

@bitgopatmcl
Copy link
Copy Markdown
Contributor

@bitgopatmcl bitgopatmcl commented Jul 1, 2024

For some reason, the new bundler version does not inline the @actions/core and other dependencies:

var core2 = __toESM(require("@actions/core"));
var tc = __toESM(require("@actions/tool-cache"));

In the previous release, the code looks like this:

var require_command = __commonJS({
"node_modules/@actions/core/lib/command.js"(exports2) {
"use strict";
var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
if (k2 === void 0) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() {
return m[k];
} });
} : function(o, m, k, k2) {
if (k2 === void 0) k2 = k;
o[k2] = m[k];

This causes an error when running the latest version of this action:

Error: Cannot find module '@actions/core'
Require stack:
- /home/runner/work/_actions/EricCrosson/install-github-release-binary/v2/dist/index.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1145:15)
    at Module._load (node:internal/modules/cjs/loader:986:27)
    at Module.require (node:internal/modules/cjs/loader:1233:19)
    at require (node:internal/modules/helpers:179:18)
    at Object.<anonymous> (/home/runner/work/_actions/EricCrosson/install-github-release-binary/v2/dist/index.js:30:21)
    at Module._compile (node:internal/modules/cjs/loader:1358:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
    at Module.load (node:internal/modules/cjs/loader:1208:32)
    at Module._load (node:internal/modules/cjs/loader:1024:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:174:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/home/runner/work/_actions/EricCrosson/install-github-release-binary/v2/dist/index.js'
  ]
}

This reverts commit 4453ccd to un-break workflows that call this action using a major version label (such as here)

@bitgopatmcl bitgopatmcl marked this pull request as draft July 1, 2024 14:30
@bitgopatmcl bitgopatmcl force-pushed the revert-esbuild-update branch from 5a5bed6 to ebfea19 Compare July 1, 2024 14:31
@bitgopatmcl bitgopatmcl marked this pull request as ready for review July 1, 2024 14:31
@bitgopatmcl
Copy link
Copy Markdown
Contributor Author

From the 0.22 Changelog

With this release, esbuild will now omit packages from the bundle by default when the platform is node (i.e. the previous behavior of --packages=external is now the default in this case). Note that your dependencies must now be present on the file system when your bundle is run. If you don't want this behavior, you can do --packages=bundle to allow packages to be included in the bundle (i.e. the previous default behavior). Note that --packages=bundle doesn't mean all packages are bundled, just that packages are allowed to be bundled. You can still exclude individual packages from the bundle using --external: even when --packages=bundle is present.

That seems likely to be the issue

@EricCrosson
Copy link
Copy Markdown
Owner

Thanks @bitgopatmcl!

@EricCrosson EricCrosson merged commit bd6588e into EricCrosson:master Jul 1, 2024
EricCrosson added a commit that referenced this pull request Jul 1, 2024
This comes as a reaction to
#336,
which was reverted in
#337.

As esbuild's changelog recommends:

> This release deliberately contains backwards-incompatible changes. To
> avoid automatically picking up releases like this, you should either
> be pinning the exact version of esbuild in your package.json file
> (recommended) or be using a version range syntax that only accepts
> patch upgrades such as ^0.21.0 or ~0.21.0.
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jul 1, 2024

🎉 This PR is included in version 2.4.28 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants