Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: The tsconfig spec generated for library contains several issues #2481

Open
matthieu-crouzet opened this issue Nov 18, 2024 · 1 comment · May be fixed by #2584
Open

[Bug]: The tsconfig spec generated for library contains several issues #2481

matthieu-crouzet opened this issue Nov 18, 2024 · 1 comment · May be fixed by #2584
Assignees

Comments

@matthieu-crouzet
Copy link
Contributor

matthieu-crouzet commented Nov 18, 2024

Package name

workspace

Package version

11.4.1

Reproduction steps

To reproduce the issue you can run the following commands:

npm create @o3r monorepo
cd monorepo
npm run ng g @o3r/workspace:library lib

If you try to run

npm run ng test lib

You will have errors because of issues in the libs/lib/tsconfig.spec.json

Current result

libs/lib/tsconfig.spec.json content is the following:

{
  "extends": "../../tsconfig.json",
  "compilerOptions": {
    "composite": true,
    "outDir": "test",
    "rootDir": ".",
  },
  "include": [
    "./src/**/*.spec.ts"
  ],
  "exclude": [],
  "references": [
    {
      "path": "./tsconfig.build.composite.json"
    }
  ]
}

but libs/lib/tsconfig.build.composite.json does not exist.

Expected result

libs/lib/tsconfig.spec.json should contain only relevant references.
Running npm run ng test lib should works fine.

Additional comments

It seems that IDE is complaining also on the composite, to be checked why.
The library is generated with jest for testing but "types": ["jest"] is missing in the libs/lib/tsconfig.spec.json#compilerOptions

@matthieu-crouzet matthieu-crouzet added bug Something isn't working triage labels Nov 18, 2024
@matthieu-crouzet matthieu-crouzet changed the title [Bug]: The tsconfig spec generated for library contains unknown reference [Bug]: The tsconfig spec generated for library contains several issues Nov 18, 2024
@matthieu-crouzet
Copy link
Contributor Author

Issue referenced in packages/@o3r/eslint-config/schematics/index.it.spec.ts

@cpaulve-1A cpaulve-1A self-assigned this Dec 6, 2024
cpaulve-1A added a commit that referenced this issue Dec 12, 2024
…2481

Align with application generation and reuse angular tsconfig.spec.json
cpaulve-1A added a commit that referenced this issue Dec 13, 2024
…2481

Align with application generation and reuse angular tsconfig.spec.json
cpaulve-1A added a commit that referenced this issue Dec 16, 2024
…2481

Align with application generation and reuse angular tsconfig.spec.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants