Skip to content

feat(adapter-node): add shebang to build/index.js - #17592

Open
praveen-kumary wants to merge 1 commit into
sveltejs:mainfrom
praveen-kumary:fix/adapter-node-shebang-17534
Open

praveen-kumary wants to merge 1 commit into
sveltejs:mainfrom
praveen-kumary:fix/adapter-node-shebang-17534

Conversation

@praveen-kumary

Copy link
Copy Markdown
Contributor

Summary

Closes #17534.

When running an @sveltejs/adapter-node build output directly as an executable script or specifying build/index.js in a bin field, package linters (e.g. publint) report that the file is not executable because it lacks a shebang.

Changes

  • Prepend #!/usr/bin/env node\n to ${out}/index.js in @sveltejs/adapter-node.
  • Attempt fs.chmodSync(..., 0o755) to mark the file executable where supported.
  • Added unit and build assertions verifying build/index.js includes the shebang.
  • Added changeset.

Signed-off-by: praveen-kumary <praveenkumar2000y@gmail.com>
@pkg-svelte-dev

pkg-svelte-dev Bot commented Nov 1, 2026

Copy link
Copy Markdown

Install the latest version of @sveltejs/kit from b390f85:

pnpm add https://pkg.svelte.dev/@sveltejs/kit/c/b390f8533e22d83216b5b214479ef35d12ccc024

Open in pkg.svelte.dev: https://pkg.svelte.dev/repos/kit/pr/17592

Note

This PR is from a fork. A maintainer must approve approve each commit before it can be built and installed.

@changeset-bot

changeset-bot Bot commented Nov 1, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: b390f85

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@sveltejs/adapter-node Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

adapter-node: Add a shebang to build/index.js

1 participant