Skip to content

Commit

Permalink
fix(workspace): add tsconfig.json dedicated to the application
Browse files Browse the repository at this point in the history
  • Loading branch information
kpanot committed Dec 27, 2024
1 parent c8834dc commit 5d68e48
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 11 deletions.
6 changes: 5 additions & 1 deletion packages/@o3r/workspace/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,11 @@
"executor": "@nx/jest:jest",
"options": {
"jestConfig": "packages/@o3r/workspace/jest.config.js"
}
},
"dependsOn": [
"build",
"^build"
]
},
"test-int": {
"executor": "@nx/jest:jest",
Expand Down
16 changes: 8 additions & 8 deletions packages/@o3r/workspace/schematics/application/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,19 @@ const collectionPath = path.join(__dirname, '../../collection.json');
let runner: SchematicTestRunner;

describe('generateApplication', () => {
let initalTree: UnitTestTree;
let initialTree: UnitTestTree;

beforeEach(() => {
initalTree = new UnitTestTree(Tree.empty());
initalTree.create('angular.json', fs.readFileSync(path.resolve(__dirname, '..', '..', 'testing', 'mocks', 'angular.mocks.json')));
initalTree.create('package.json', fs.readFileSync(path.resolve(__dirname, '..', '..', 'testing', 'mocks', 'package.mocks.json')));
initialTree = new UnitTestTree(Tree.empty());
initialTree.create('angular.json', fs.readFileSync(path.resolve(__dirname, '..', '..', 'testing', 'mocks', 'angular.mocks.json')));
initialTree.create('package.json', fs.readFileSync(path.resolve(__dirname, '..', '..', 'testing', 'mocks', 'package.mocks.json')));
runner = new SchematicTestRunner('schematics', collectionPath);
const angularPackageJson = require.resolve('@schematics/angular/package.json');
runner.registerCollection('@schematics/angular', path.resolve(path.dirname(angularPackageJson), require(angularPackageJson).schematics));
});

it('should generate an application', async () => {
const tree = await runner.runSchematic('application', { name: 'test', routing: true }, initalTree);
const tree = await runner.runSchematic('application', { name: 'test', routing: true }, initialTree);
const mockExternalSchematic = require('@angular-devkit/schematics').externalSchematic as jest.Mock;
expect(mockExternalSchematic).toHaveBeenCalledWith('@schematics/angular', 'application', expect.objectContaining({
name: 'test',
Expand All @@ -55,7 +55,7 @@ describe('generateApplication', () => {
});

it('should generate an application with provided path', async () => {
const tree = await runner.runSchematic('application', { name: 'test', path: '/apps' }, initalTree);
const tree = await runner.runSchematic('application', { name: 'test', path: '/apps' }, initialTree);
const mockExternalSchematic = require('@angular-devkit/schematics').externalSchematic as jest.Mock;
expect(mockExternalSchematic).toHaveBeenCalledWith('@schematics/angular', 'application', expect.objectContaining({
name: 'test',
Expand All @@ -69,13 +69,13 @@ describe('generateApplication', () => {

it('should throw error if NX context is detected', async () => {
require('@o3r/schematics').isNxContext.mockReturnValueOnce(true);
await expect(runner.runSchematic('application', { name: 'test' }, initalTree)).rejects.toThrow(
await expect(runner.runSchematic('application', { name: 'test' }, initialTree)).rejects.toThrow(
'NX is not currently supported. Feature tracked via https://github.com/AmadeusITGroup/otter/issues/720');
});

it('should throw error if no workspace configuration is found', async () => {
require('@o3r/schematics').getWorkspaceConfig.mockReturnValueOnce(null);
await expect(runner.runSchematic('application', { name: 'test' }, initalTree)).rejects.toThrow(
await expect(runner.runSchematic('application', { name: 'test' }, initialTree)).rejects.toThrow(
'The `path` option is not provided and no workspace configuration file found to define it.');
});
});
8 changes: 6 additions & 2 deletions packages/@o3r/workspace/schematics/application/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import {
createSchematicWithMetricsIfInstalled,
type DependencyToAdd,
enforceTildeRange,
findConfigFileRelativePath,
getPackagesBaseRootFolder,
getWorkspaceConfig,
isNxContext,
Expand Down Expand Up @@ -51,10 +52,11 @@ function generateApplicationFn(options: NgGenerateApplicationSchema): Rule {
const packageJsonName = strings.dasherize(options.name);
const cleanName = packageJsonName.replace(/^@/, '').replaceAll(/\//g, '-');

const addProjectSpecificFiles = (targetPath: string, rootDependencies: Record<string, string | undefined>) => {
const addProjectSpecificFiles = (targetPath: string, rootDependencies: Record<string, string | undefined>, tsconfigBasePath: string) => {
return mergeWith(apply(url('./templates'), [
template({
...options,
tsconfigBasePath,
enforceTildeRange,
name: packageJsonName,
rootDependencies
Expand Down Expand Up @@ -109,13 +111,15 @@ function generateApplicationFn(options: NgGenerateApplicationSchema): Rule {
}
} as const satisfies Record<string, DependencyToAdd>;

const tsconfigBasePath = findConfigFileRelativePath(tree, ['tsconfig.base.json', 'tsconfig.json'], targetPath);

Check failure on line 114 in packages/@o3r/workspace/schematics/application/index.ts

View workflow job for this annotation

GitHub Actions / checks / test (ubuntu-latest)

generateApplication › should generate an application

TypeError: (0 , schematics_2.findConfigFileRelativePath) is not a function at ngCliUpdate (schematics/application/index.ts:114:56) at callRuleAsync (../../../.yarn/cache/@angular-devkit-schematics-npm-18.2.12-85dfcfaac2-7e3f345ce2.zip/node_modules/@angular-devkit/schematics/src/rules/call.js:77:24) at ../../../.yarn/cache/@angular-devkit-schematics-npm-18.2.12-85dfcfaac2-7e3f345ce2.zip/node_modules/@angular-devkit/schematics/src/rules/call.js:73:40 at Observable._subscribe (../../../.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/observable/defer.ts:55:15) at Observable.Object.<anonymous>.Observable._trySubscribe (../../../.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/Observable.ts:244:19) at ../../../.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/Observable.ts:234:18 at Object.errorContext (../../../.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/util/errorContext.ts:29:5) at Observable.Object.<anonymous>.Observable.subscribe (../../../.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/Observable.ts:220:5) at ../../../.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/operators/map.ts:54:12 at OperatorSubscriber.<anonymous> (../../../.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/util/lift.ts:24:18) at ../../../.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/Observable.ts:226:22 at Object.errorContext (../../../.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/util/errorContext.ts:29:5) at Observable.Object.<anonymous>.Observable.subscribe (../../../.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/Observable.ts:220:5) at doInnerSub (../../../.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/operators/mergeInternals.ts:71:40) at outerNext (../../../.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/operators/mergeInternals.ts:53:58) at OperatorSubscriber._this._next (../../../.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/operators/OperatorSubscriber.ts:70:13) at OperatorSubscriber.Object.<anonymous>.Subscriber.next (../../../.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/Subscriber.ts:75:12) at ../../../.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/operators/mergeInternals.ts:85:24 at OperatorSubscriber._this._next (../../../.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/operators/OperatorSubscriber.ts:70:13) at OperatorSubscriber.Object.<anonymous>.Subscriber.next (../../../.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/Subscriber.ts:75:12) at ../../../.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/operators/map.ts:58:20 at OperatorSubscriber._this._next (../../../.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/operators/OperatorSubscriber.ts:70:13) at OperatorSubscriber.Object.<anonymous>.Subscriber.next (../../../.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/Subscriber.ts:75:12) at ../../../.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/observable/innerFrom.ts:90:24

Check failure on line 114 in packages/@o3r/workspace/schematics/application/index.ts

View workflow job for this annotation

GitHub Actions / checks / test (ubuntu-latest)

generateApplication › should generate an application with provided path

TypeError: (0 , schematics_2.findConfigFileRelativePath) is not a function at ngCliUpdate (schematics/application/index.ts:114:56) at callRuleAsync (../../../.yarn/cache/@angular-devkit-schematics-npm-18.2.12-85dfcfaac2-7e3f345ce2.zip/node_modules/@angular-devkit/schematics/src/rules/call.js:77:24) at ../../../.yarn/cache/@angular-devkit-schematics-npm-18.2.12-85dfcfaac2-7e3f345ce2.zip/node_modules/@angular-devkit/schematics/src/rules/call.js:73:40 at Observable._subscribe (../../../.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/observable/defer.ts:55:15) at Observable.Object.<anonymous>.Observable._trySubscribe (../../../.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/Observable.ts:244:19) at ../../../.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/Observable.ts:234:18 at Object.errorContext (../../../.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/util/errorContext.ts:29:5) at Observable.Object.<anonymous>.Observable.subscribe (../../../.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/Observable.ts:220:5) at ../../../.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/operators/map.ts:54:12 at OperatorSubscriber.<anonymous> (../../../.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/util/lift.ts:24:18) at ../../../.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/Observable.ts:226:22 at Object.errorContext (../../../.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/util/errorContext.ts:29:5) at Observable.Object.<anonymous>.Observable.subscribe (../../../.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/Observable.ts:220:5) at doInnerSub (../../../.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/operators/mergeInternals.ts:71:40) at outerNext (../../../.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/operators/mergeInternals.ts:53:58) at OperatorSubscriber._this._next (../../../.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/operators/OperatorSubscriber.ts:70:13) at OperatorSubscriber.Object.<anonymous>.Subscriber.next (../../../.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/Subscriber.ts:75:12) at ../../../.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/operators/mergeInternals.ts:85:24 at OperatorSubscriber._this._next (../../../.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/operators/OperatorSubscriber.ts:70:13) at OperatorSubscriber.Object.<anonymous>.Subscriber.next (../../../.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/Subscriber.ts:75:12) at ../../../.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/operators/map.ts:58:20 at OperatorSubscriber._this._next (../../../.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/operators/OperatorSubscriber.ts:70:13) at OperatorSubscriber.Object.<anonymous>.Subscriber.next (../../../.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/Subscriber.ts:75:12) at ../../../.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/observable/innerFrom.ts:90:24

Check failure on line 114 in packages/@o3r/workspace/schematics/application/index.ts

View workflow job for this annotation

GitHub Actions / checks / test (windows-latest)

generateApplication › should generate an application

TypeError: (0 , schematics_2.findConfigFileRelativePath) is not a function at ngCliUpdate (schematics/application/index.ts:114:56) at callRuleAsync (../../../.yarn/cache/@angular-devkit-schematics-npm-18.2.12-85dfcfaac2-7e3f345ce2.zip/node_modules/@angular-devkit/schematics/src/rules/call.js:77:24) at ../../../.yarn/cache/@angular-devkit-schematics-npm-18.2.12-85dfcfaac2-7e3f345ce2.zip/node_modules/@angular-devkit/schematics/src/rules/call.js:73:40 at Observable._subscribe (../../../.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/observable/defer.ts:55:15) at Observable.Object.<anonymous>.Observable._trySubscribe (../../../.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/Observable.ts:244:19) at ../../../.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/Observable.ts:234:18 at Object.errorContext (../../../.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/util/errorContext.ts:29:5) at Observable.Object.<anonymous>.Observable.subscribe (../../../.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/Observable.ts:220:5) at ../../../.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/operators/map.ts:54:12 at OperatorSubscriber.<anonymous> (../../../.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/util/lift.ts:24:18) at ../../../.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/Observable.ts:226:22 at Object.errorContext (../../../.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/util/errorContext.ts:29:5) at Observable.Object.<anonymous>.Observable.subscribe (../../../.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/Observable.ts:220:5) at doInnerSub (../../../.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/operators/mergeInternals.ts:71:40) at outerNext (../../../.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/operators/mergeInternals.ts:53:58) at OperatorSubscriber._this._next (../../../.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/operators/OperatorSubscriber.ts:70:13) at OperatorSubscriber.Object.<anonymous>.Subscriber.next (../../../.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/Subscriber.ts:75:12) at ../../../.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/operators/mergeInternals.ts:85:24 at OperatorSubscriber._this._next (../../../.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/operators/OperatorSubscriber.ts:70:13) at OperatorSubscriber.Object.<anonymous>.Subscriber.next (../../../.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/Subscriber.ts:75:12) at ../../../.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/operators/map.ts:58:20 at OperatorSubscriber._this._next (../../../.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/operators/OperatorSubscriber.ts:70:13) at OperatorSubscriber.Object.<anonymous>.Subscriber.next (../../../.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/Subscriber.ts:75:12) at ../../../.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/observable/innerFrom.ts:90:24

Check failure on line 114 in packages/@o3r/workspace/schematics/application/index.ts

View workflow job for this annotation

GitHub Actions / checks / test (windows-latest)

generateApplication › should generate an application with provided path

TypeError: (0 , schematics_2.findConfigFileRelativePath) is not a function at ngCliUpdate (schematics/application/index.ts:114:56) at callRuleAsync (../../../.yarn/cache/@angular-devkit-schematics-npm-18.2.12-85dfcfaac2-7e3f345ce2.zip/node_modules/@angular-devkit/schematics/src/rules/call.js:77:24) at ../../../.yarn/cache/@angular-devkit-schematics-npm-18.2.12-85dfcfaac2-7e3f345ce2.zip/node_modules/@angular-devkit/schematics/src/rules/call.js:73:40 at Observable._subscribe (../../../.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/observable/defer.ts:55:15) at Observable.Object.<anonymous>.Observable._trySubscribe (../../../.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/Observable.ts:244:19) at ../../../.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/Observable.ts:234:18 at Object.errorContext (../../../.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/util/errorContext.ts:29:5) at Observable.Object.<anonymous>.Observable.subscribe (../../../.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/Observable.ts:220:5) at ../../../.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/operators/map.ts:54:12 at OperatorSubscriber.<anonymous> (../../../.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/util/lift.ts:24:18) at ../../../.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/Observable.ts:226:22 at Object.errorContext (../../../.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/util/errorContext.ts:29:5) at Observable.Object.<anonymous>.Observable.subscribe (../../../.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/Observable.ts:220:5) at doInnerSub (../../../.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/operators/mergeInternals.ts:71:40) at outerNext (../../../.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/operators/mergeInternals.ts:53:58) at OperatorSubscriber._this._next (../../../.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/operators/OperatorSubscriber.ts:70:13) at OperatorSubscriber.Object.<anonymous>.Subscriber.next (../../../.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/Subscriber.ts:75:12) at ../../../.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/operators/mergeInternals.ts:85:24 at OperatorSubscriber._this._next (../../../.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/operators/OperatorSubscriber.ts:70:13) at OperatorSubscriber.Object.<anonymous>.Subscriber.next (../../../.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/Subscriber.ts:75:12) at ../../../.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/operators/map.ts:58:20 at OperatorSubscriber._this._next (../../../.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/operators/OperatorSubscriber.ts:70:13) at OperatorSubscriber.Object.<anonymous>.Subscriber.next (../../../.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/Subscriber.ts:75:12) at ../../../.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/observable/innerFrom.ts:90:24

Check failure on line 114 in packages/@o3r/workspace/schematics/application/index.ts

View workflow job for this annotation

GitHub Actions / UT Tests report-ubuntu-latest

generateApplication ► packages/@o3r/workspace/schematics/application/index.spec.ts ► generateApplication should generate an application

Failed test found in: packages/@o3r/workspace/dist-test/junit.xml packages/@o3r/workspace/dist-test/junit.xml Error: TypeError: (0 , schematics_2.findConfigFileRelativePath) is not a function
Raw output
TypeError: (0 , schematics_2.findConfigFileRelativePath) is not a function
    at ngCliUpdate (/home/runner/work/otter/otter/packages/@o3r/workspace/schematics/application/index.ts:114:56)
    at callRuleAsync (/home/runner/work/otter/otter/.yarn/cache/@angular-devkit-schematics-npm-18.2.12-85dfcfaac2-7e3f345ce2.zip/node_modules/@angular-devkit/schematics/src/rules/call.js:77:24)
    at /home/runner/work/otter/otter/.yarn/cache/@angular-devkit-schematics-npm-18.2.12-85dfcfaac2-7e3f345ce2.zip/node_modules/@angular-devkit/schematics/src/rules/call.js:73:40
    at Observable._subscribe (/home/runner/work/otter/otter/.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/observable/defer.ts:55:15)
    at Observable.Object.<anonymous>.Observable._trySubscribe (/home/runner/work/otter/otter/.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/Observable.ts:244:19)
    at /home/runner/work/otter/otter/.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/Observable.ts:234:18
    at Object.errorContext (/home/runner/work/otter/otter/.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/util/errorContext.ts:29:5)
    at Observable.Object.<anonymous>.Observable.subscribe (/home/runner/work/otter/otter/.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/Observable.ts:220:5)
    at /home/runner/work/otter/otter/.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/operators/map.ts:54:12
    at OperatorSubscriber.<anonymous> (/home/runner/work/otter/otter/.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/util/lift.ts:24:18)
    at /home/runner/work/otter/otter/.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/Observable.ts:226:22
    at Object.errorContext (/home/runner/work/otter/otter/.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/util/errorContext.ts:29:5)
    at Observable.Object.<anonymous>.Observable.subscribe (/home/runner/work/otter/otter/.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/Observable.ts:220:5)
    at doInnerSub (/home/runner/work/otter/otter/.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/operators/mergeInternals.ts:71:40)
    at outerNext (/home/runner/work/otter/otter/.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/operators/mergeInternals.ts:53:58)
    at OperatorSubscriber._this._next (/home/runner/work/otter/otter/.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/operators/OperatorSubscriber.ts:70:13)
    at OperatorSubscriber.Object.<anonymous>.Subscriber.next (/home/runner/work/otter/otter/.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/Subscriber.ts:75:12)
    at /home/runner/work/otter/otter/.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/operators/mergeInternals.ts:85:24
    at OperatorSubscriber._this._next (/home/runner/work/otter/otter/.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/operators/OperatorSubscriber.ts:70:13)
    at OperatorSubscriber.Object.<anonymous>.Subscriber.next (/home/runner/work/otter/otter/.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/Subscriber.ts:75:12)
    at /home/runner/work/otter/otter/.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/operators/map.ts:58:20
    at OperatorSubscriber._this._next (/home/runner/work/otter/otter/.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/operators/OperatorSubscriber.ts:70:13)
    at OperatorSubscriber.Object.<anonymous>.Subscriber.next (/home/runner/work/otter/otter/.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/Subscriber.ts:75:12)
    at /home/runner/work/otter/otter/.yarn/cache/rxjs-npm-7.8.1-41c443a75b-b10cac1a52.zip/node_modules/rxjs/src/internal/observable/innerFrom.ts:90:24
    at processTicksAndRejections (node:internal/process/task_queues:95:5)

return chain([
externalSchematic<Partial<ApplicationOptions>>('@schematics/angular', 'application', {
...Object.entries(extendedOptions).reduce((acc, [key, value]) => (angularOptions.includes(key) ? { ...acc, [key]: value } : acc), {}),
name: cleanName,
projectRoot,
style: Style.Scss }),
addProjectSpecificFiles(targetPath, rootDependencies),
addProjectSpecificFiles(targetPath, rootDependencies, tsconfigBasePath),
updateProjectTsConfig(targetPath, 'tsconfig.app.json', { updateInputFiles: true }),
setupDependencies({
dependencies,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/* For IDE usage only */
{
"extends": "<%= tsconfigBasePath %>",
"references": [
{"path": "./tsconfig.app.json"},
{"path": "./tsconfig.spec.json"}
]
}

0 comments on commit 5d68e48

Please sign in to comment.