Skip to content

Conversation

@csvn
Copy link

@csvn csvn commented Aug 18, 2025

PR Checklist

Please check to confirm your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

What is the current behavior?

Issue Number: #30947

What is the new behavior?

It's possible to use deno to install packages, similar to bun.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@angular-robot angular-robot bot added detected: feature PR contains a feature commit area: @angular/cli labels Aug 18, 2025
@csvn csvn marked this pull request as ready for review August 18, 2025 20:28
@angular-robot angular-robot bot added the area: build & ci Related the build and CI infrastructure of the project label Aug 19, 2025
@alan-agius4 alan-agius4 linked an issue Aug 19, 2025 that may be closed by this pull request
@alan-agius4 alan-agius4 added the needs: discussion On the agenda for team meeting to determine next steps label Aug 19, 2025
@dgp1130 dgp1130 requested a review from alan-agius4 November 17, 2025 16:56
@alan-agius4 alan-agius4 removed the needs: discussion On the agenda for team meeting to determine next steps label Nov 17, 2025
@alan-agius4
Copy link
Collaborator

@csvn, can you please rebase? Thanks.

@alan-agius4 alan-agius4 added the action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews label Nov 18, 2025
@csvn csvn force-pushed the feat/deno-installation branch from 93e7cb3 to 38470cb Compare November 20, 2025 10:15
@csvn
Copy link
Author

csvn commented Nov 20, 2025

Sorry for the delay, rebased now @alan-agius4 🙂

@alan-agius4
Copy link
Collaborator

Looks like Deno has a bug. And the install is failing with Failed to parse "/package.json" as JSON. UnexpectedEndOfString at offset: 456.

@alan-agius4 alan-agius4 removed the action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews label Nov 20, 2025

if (name === PackageManager.Deno) {
// Deno CLI outputs "deno 2.4.4"
return version.replace('deno ', '');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to have changed.

deno --version
deno 2.5.6 (stable, release, x86_64-unknown-linux-gnu)
v8 14.0.365.5-rusty
typescript 5.9.2

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm... maybe this differs by platform? For me on Windows I get a shorter version output with -v, and a more verbose one with --version. That's why I added the ternary to switch to the -v flag on L224:

const versionArg = name !== PackageManager.Deno ? '--version' : '-v';

> PS C:\Users\csvn\dev\angular-cli> deno --version
deno 2.5.6 (stable, release, x86_64-pc-windows-msvc)
v8 14.0.365.5-rusty
typescript 5.9.2

> PS C:\Users\csvn\dev\angular-cli> deno -v
deno 2.5.6

I used the shorter one (-v) to simplify parsing the version correctly. But I could perhaps change to a regex to extract the version when using --version? Something along the lines of /deno (?<version>\S{5,})/.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't looked into the E2E test errors yet, so I don't know why those fail. But I know it works to create a new Angular project with Deno like this:

> PS C:\Users\ChristianSvensson\Dev\_personal> deno run -Ar npm:@angular/cli new test-project --skip-install --test-runner karma
✔ Which stylesheet system would you like to use? CSS             [ https://developer.mozilla.org/docs/Web/CSS]
✔ Do you want to enable Server-Side Rendering (SSR) and Static Site Generation (SSG/Prerendering)? No
✔ Which AI tools do you want to configure with Angular best practices? https://angular.dev/ai/develop-with-ai None
CREATE test-project/angular.json (2166 bytes)
...[snip]...
CREATE test-project/public/favicon.ico (15086 bytes)
    Successfully initialized git.

> PS C:\Users\ChristianSvensson\Dev\_personal>

'yarn': '1.22.22',
'pnpm': '10.17.1',
'bun': '1.3.2',
'deno': '2.4.4',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you try to update to 2.5.6 to see if the Deno install issue has been addressed?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated in 4d0947a.

@csvn csvn force-pushed the feat/deno-installation branch from ac20240 to f26427e Compare November 20, 2025 18:05
@csvn
Copy link
Author

csvn commented Nov 20, 2025

I missed scope in my commits, force pushed to correct commit messages and address failing lint job. 😅

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

Labels

area: @angular/cli area: build & ci Related the build and CI infrastructure of the project detected: feature PR contains a feature commit

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow using Deno as package manager

2 participants