Skip to content

Commit

Permalink
feat: support signal input from angular 17.1
Browse files Browse the repository at this point in the history
Adds a custom transformer to transform Angular Code, specifically,
signals (input, query and models) to behave better in jit-environment.

Solves help-me-mom#7976
  • Loading branch information
André Andersson committed Apr 25, 2024
1 parent 0afae31 commit 866af7e
Show file tree
Hide file tree
Showing 9 changed files with 519 additions and 2 deletions.
7 changes: 6 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ commands:
paths:
- ./e2e/<< parameters.dir >>/node_modules
- ~/.cache/puppeteer
- ./transformers/jit-transform.js
test:
parameters:
dir:
Expand Down Expand Up @@ -164,6 +165,7 @@ jobs:
paths:
- ./node_modules
- ~/.cache/puppeteer
- ./transformers/jit-transform.js
- run:
name: Prettier
command: npm run prettier:check
Expand All @@ -172,7 +174,7 @@ jobs:
command: npx commitlint -V --from=origin/master
- run:
name: Lint code style
command: npm run lint -- --ignore-pattern e2e/ --ignore-pattern tests-e2e/
command: npm run lint -- --ignore-pattern e2e/ --ignore-pattern tests-e2e/ --ignore-pattern transformers/jit-transform.js
- run:
name: Lint typescript
command: npm run ts:check
Expand Down Expand Up @@ -250,6 +252,7 @@ jobs:
paths:
- ./tests-e2e/node_modules
- ~/.cache/puppeteer
- ./transformers/jit-transform.js
- run:
name: E2E
command: npm run e2e
Expand Down Expand Up @@ -282,6 +285,7 @@ jobs:
paths:
- ./docs/node_modules
- ~/.cache/puppeteer
- ./transformers/jit-transform.js
- run:
name: Docs
command: npm run build:docs
Expand Down Expand Up @@ -368,6 +372,7 @@ jobs:
- ./e2e/a5es5/node_modules
- ~/.cache/puppeteer
- /ProgramData/nvm/temp
- ./transformers/jit-transform.js
- run:
name: Spreading Build
command: |
Expand Down
6 changes: 6 additions & 0 deletions karma.conf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ import path from 'node:path';
import { Config } from 'karma';
import puppeteer from 'puppeteer';
import { TsconfigPathsPlugin } from 'tsconfig-paths-webpack-plugin';
import { Program } from 'typescript';

import { angularJitApplicationTransform } from './transformers/jit-transform.js';

process.env.CHROME_BIN = puppeteer.executablePath();

Expand Down Expand Up @@ -120,6 +123,9 @@ export default (config: Config) => {
options: {
configFile: './tsconfig.json',
transpileOnly: true,
getCustomTransformers: (program: Program) => ({
before: [angularJitApplicationTransform(program)],
}),
},
},
],
Expand Down
Loading

0 comments on commit 866af7e

Please sign in to comment.