Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,4 @@ jobs:
pnpm --filter ./napi/angular-compiler exec playwright install --with-deps
pnpm test:e2e
- name: Compare tests
run: pnpm --filter @oxc/angular-compare compare --fixtures
run: pnpm --filter @oxc-angular/compare compare --fixtures
10 changes: 3 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,12 +141,8 @@ jobs:
- name: Build TypeScript
run: pnpm --filter ./napi/angular-compiler build:ts

- uses: actions/setup-node@v6
with:
registry-url: 'https://npm.pkg.github.com'

- name: Publish to npm
working-directory: napi/angular-compiler
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
npm install -g npm
npm publish --access public
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ A high-performance Angular template compiler written in Rust, leveraging the [Ox
## Installation

```bash
npm install @voidzero-dev/vite-plugin-angular
npm install @oxc-angular/vite
# or
pnpm add @voidzero-dev/vite-plugin-angular
pnpm add @oxc-angular/vite
# or
yarn add @voidzero-dev/vite-plugin-angular
yarn add @oxc-angular/vite
```

## Quick Start
Expand All @@ -30,7 +30,7 @@ yarn add @voidzero-dev/vite-plugin-angular
```typescript
// vite.config.ts
import { defineConfig } from 'vite'
import { angular } from '@voidzero-dev/vite-plugin-angular'
import { angular } from '@oxc-angular/vite'

export default defineConfig({
plugins: [
Expand All @@ -46,7 +46,7 @@ export default defineConfig({
### Programmatic API

```typescript
import { compileTemplate, transformAngularFile } from '@voidzero-dev/vite-plugin-angular/api'
import { compileTemplate, transformAngularFile } from '@oxc-angular/vite/api'

// Compile a template string
const result = await compileTemplate(
Expand Down
2 changes: 1 addition & 1 deletion crates/oxc_angular_compiler/src/transform/html_to_r3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4397,7 +4397,7 @@ impl<'a> HtmlToR3Transform<'a> {
strings.push(Atom::from_in(current_string.as_str(), self.allocator));

// Create the Interpolation expression
let span = ParseSpan::new(0, (text.span.end - text.span.start));
let span = ParseSpan::new(0, text.span.end - text.span.start);
let source_span = AbsoluteSourceSpan { start: text.span.start, end: text.span.end };
let interpolation = Interpolation { span, source_span, strings, expressions };
Some(AngularExpression::Interpolation(Box::new_in(interpolation, self.allocator)))
Expand Down
16 changes: 8 additions & 8 deletions napi/angular-compiler/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ A high-performance, Rust-based Angular compiler for Node.js. Provides both a sta
## Installation

```bash
npm install @voidzero-dev/vite-plugin-angular
npm install @oxc-angular/vite
# or
pnpm add @voidzero-dev/vite-plugin-angular
pnpm add @oxc-angular/vite
```

## Quick Start
Expand All @@ -26,7 +26,7 @@ pnpm add @voidzero-dev/vite-plugin-angular
```typescript
// vite.config.ts
import { defineConfig } from 'vite'
import { angular } from '@voidzero-dev/vite-plugin-angular/vite-plugin'
import { angular } from '@oxc-angular/vite/vite-plugin'

export default defineConfig({
plugins: [
Expand All @@ -45,7 +45,7 @@ import {
transformAngularFile,
compileTemplateSync,
extractComponentUrlsSync,
} from '@voidzero-dev/vite-plugin-angular'
} from '@oxc-angular/vite'

// Transform an entire Angular file
const result = await transformAngularFile(sourceCode, 'app.component.ts', {
Expand All @@ -60,10 +60,10 @@ const template = compileTemplateSync('<div>{{ title }}</div>', 'AppComponent', '

### Package Exports

| Export | Description |
| --------------------------------------- | ------------- |
| `@voidzero-dev/vite-plugin-angular` | Vite plugin |
| `@voidzero-dev/vite-plugin-angular/api` | Low level API |
| Export | Description |
| ----------------------- | ------------- |
| `@oxc-angular/vite` | Vite plugin |
| `@oxc-angular/vite/api` | Low level API |

### Core Functions

Expand Down
2 changes: 1 addition & 1 deletion napi/angular-compiler/benchmarks/bitwarden/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ If your bitwarden-clients repository is in a different location, update the `BIT
The `vite.config.ts` includes:

- **vite-tsconfig-paths**: Resolves 70+ path aliases from bitwarden's tsconfig
- **@voidzero-dev/vite-plugin-angular**: OXC's Angular compiler plugin
- **@oxc-angular/vite**: OXC's Angular compiler plugin
- **SCSS preprocessing**: With proper include paths for bitwarden's styles
- **PostCSS**: Matching bitwarden's configuration (tailwind, autoprefixer, etc.)
- **process.env polyfills**: For bitwarden's environment variable usage
Expand Down
4 changes: 2 additions & 2 deletions napi/angular-compiler/benchmarks/bitwarden/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@oxc/bitwarden-benchmark",
"name": "@oxc-angular/bitwarden-benchmark",
"version": "0.0.0",
"private": true,
"type": "module",
Expand Down Expand Up @@ -28,11 +28,11 @@
"zone.js": "~0.15.0"
},
"devDependencies": {
"@oxc-angular/vite": "workspace:^",
"@oxc-node/cli": "catalog:",
"@oxc-node/core": "catalog:",
"@tailwindcss/container-queries": "^0.1.1",
"@types/node": "^22.19.3",
"@voidzero-dev/vite-plugin-angular": "workspace:^",
"autoprefixer": "^10.4.23",
"buffer": "^6.0.3",
"path-browserify": "^1.0.1",
Expand Down
2 changes: 1 addition & 1 deletion napi/angular-compiler/benchmarks/bitwarden/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { resolve, dirname } from 'node:path'
import { fileURLToPath } from 'node:url'

// Use our local vite-plugin implementation
import { angular } from '@voidzero-dev/vite-plugin-angular/vite-plugin'
import { angular } from '@oxc-angular/vite/vite-plugin'
import { defineConfig, type UserConfig } from 'vite'
import wasm from 'vite-plugin-wasm'
import tsconfigPaths from 'vite-tsconfig-paths'
Expand Down
4 changes: 2 additions & 2 deletions napi/angular-compiler/benchmarks/typedb-web/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@oxc/typedb-web-benchmark",
"name": "@oxc-angular/typedb-web-benchmark",
"version": "0.0.0",
"private": true,
"type": "module",
Expand Down Expand Up @@ -39,12 +39,12 @@
"zone.js": "0.15.1"
},
"devDependencies": {
"@oxc-angular/vite": "workspace:^",
"@sanity/types": "3.97.1",
"@types/d3-force": "3.0.4",
"@types/fontfaceobserver": "2.1.1",
"@types/node": "^22.19.3",
"@types/prismjs": "1.26.0",
"@voidzero-dev/vite-plugin-angular": "workspace:^",
"sass": "^1.97.2",
"tsx": "^4.21.0",
"typescript": "catalog:",
Expand Down
2 changes: 1 addition & 1 deletion napi/angular-compiler/benchmarks/typedb-web/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { resolve, dirname } from 'node:path'
import { fileURLToPath } from 'node:url'

// Use our local vite-plugin implementation
import { angular } from '@voidzero-dev/vite-plugin-angular/vite-plugin'
import { angular } from '@oxc-angular/vite/vite-plugin'
import { defineConfig, type UserConfig } from 'vite'
import tsconfigPaths from 'vite-tsconfig-paths'

Expand Down
2 changes: 1 addition & 1 deletion napi/angular-compiler/e2e/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
},
"devDependencies": {
"@angular/compiler-cli": "^21.0.0",
"@voidzero-dev/vite-plugin-angular": "workspace:^",
"@oxc-angular/vite": "workspace:^",
"typescript": "catalog:",
"vite": "catalog:"
}
Expand Down
2 changes: 1 addition & 1 deletion napi/angular-compiler/e2e/app/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import path from 'node:path'
import { fileURLToPath } from 'node:url'

import { angular } from '@voidzero-dev/vite-plugin-angular'
import { angular } from '@oxc-angular/vite'
import { defineConfig } from 'vite'

const __filename = fileURLToPath(import.meta.url)
Expand Down
2 changes: 1 addition & 1 deletion napi/angular-compiler/e2e/compare/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

A testing tool that validates the OXC Angular compiler by comparing its output against the official Angular compiler.

> **Note**: This is a development/testing tool within the `@voidzero-dev/vite-plugin-angular` package. For the main package documentation, see the [parent README](../../README.md).
> **Note**: This is a development/testing tool within the `@oxc-angular/vite` package. For the main package documentation, see the [parent README](../../README.md).

## Purpose

Expand Down
2 changes: 1 addition & 1 deletion napi/angular-compiler/e2e/compare/fixtures/runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { fileURLToPath } from 'node:url'
import { cpus } from 'os'

import { VERSION as ANGULAR_VERSION } from '@angular/compiler'
import { compileFactory, Severity } from '@voidzero-dev/vite-plugin-angular/api'
import { compileFactory, Severity } from '@oxc-angular/vite/api'
import pLimit from 'p-limit'

import { compareJsSemantically, compareFullFileSemantically } from '../src/compare.js'
Expand Down
2 changes: 1 addition & 1 deletion napi/angular-compiler/e2e/compare/fixtures/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* compiler features not covered by real-world project testing.
*/

import type { TransformOptions } from '@voidzero-dev/vite-plugin-angular/api'
import type { TransformOptions } from '@oxc-angular/vite/api'

import type { ImportDiff, ExportDiff, ClassDiff, StaticFieldDiff } from '../src/compare.js'
import type { FunctionLevelComparison, AstDiff, ClassMetadataDiff } from '../src/types.js'
Expand Down
4 changes: 2 additions & 2 deletions napi/angular-compiler/e2e/compare/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@oxc/angular-compare",
"name": "@oxc-angular/compare",
"version": "0.1.0",
"private": true,
"description": "Compare oxc_angular_compiler output with @angular/compiler",
Expand Down Expand Up @@ -29,10 +29,10 @@
"zone.js": "^0.16.0"
},
"devDependencies": {
"@oxc-angular/vite": "workspace:*",
"@oxc-node/cli": "catalog:",
"@oxc-node/core": "catalog:",
"@types/node": "catalog:",
"@voidzero-dev/vite-plugin-angular": "workspace:*",
"oxc-parser": "^0.110.0",
"oxc-transform": "^0.110.0",
"oxfmt": "catalog:",
Expand Down
4 changes: 2 additions & 2 deletions napi/angular-compiler/e2e/compare/src/compilers/oxc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
Severity,
type TransformOptions,
type ResolvedResources,
} from '@voidzero-dev/vite-plugin-angular/api'
} from '@oxc-angular/vite/api'
import {
transformSync as oxcTransformSync,
type TransformOptions as OxcTransformOptions,
Expand All @@ -15,7 +15,7 @@ import {
import type { CompilerOutput, ProjectCompilationResult } from '../types.js'

// Re-export ResolvedResources type for use in runner
export type { ResolvedResources } from '@voidzero-dev/vite-plugin-angular/api'
export type { ResolvedResources } from '@oxc-angular/vite/api'

// Plain object version of ResolvedResources that NAPI-RS actually expects
// (NAPI-RS HashMap bindings expect plain objects, not JavaScript Map objects)
Expand Down
2 changes: 1 addition & 1 deletion napi/angular-compiler/e2e/compare/src/discovery/finder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import type {
ExtractedInputMetadata,
ExtractedOutputMetadata,
ExtractedQueryMetadata,
} from '@voidzero-dev/vite-plugin-angular/api'
} from '@oxc-angular/vite/api'
import fg from 'fast-glob'
import pLimit from 'p-limit'

Expand Down
Loading
Loading