Skip to content

Commit

Permalink
fix: o3r/pipeline as dev dep
Browse files Browse the repository at this point in the history
  • Loading branch information
vscaiceanu-1a committed Jan 24, 2025
1 parent eabb580 commit 99b3ad0
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/@o3r/extractors/src/core/wrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export const createBuilderWithMetricsIfInstalled: BuilderWrapper = (builderFn) =
message: `
Would you like to share anonymous data about the usage of Otter builders and schematics with the Otter Team at Amadeus ?
It will help us to improve our tools.
For more details and instructions on how to change these settings, see https://github.com/AmadeusITGroup/otter/blob/main/docs/telemetry/PRIVACY_NOTICE.md.
For more details and instructions on how to change these settings, see https://github.com/AmadeusITGroup/otter/blob/main/docs/telemetry/PRIVACY_NOTICE.md
`,
default: false
} as const satisfies Question;
Expand Down
3 changes: 3 additions & 0 deletions packages/@o3r/pipeline/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,5 +111,8 @@
"schematics": "./collection.json",
"ng-update": {
"migrations": "./migration.json"
},
"ng-add": {
"save": "devDependencies"
}
}
11 changes: 11 additions & 0 deletions packages/@o3r/pipeline/schematics/index.it.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,19 @@ const o3rEnvironment = globalThis.o3rEnvironment;
import {
execSync,
} from 'node:child_process';
import {
readFileSync,
} from 'node:fs';
import * as path from 'node:path';
import {
getDefaultExecSyncOptions,
getGitDiff,
packageManagerExec,
packageManagerInstall,
} from '@o3r/test-helpers';
import type {
PackageJson,
} from 'type-fest';

describe('new otter project', () => {
test('should add a GitHub pipeline to existing project', () => {
Expand All @@ -30,6 +36,11 @@ describe('new otter project', () => {
expect(diff.deleted.length).toBe(0);
expect(diff.modified).toContain('package.json');
expect(diff.modified).toContain(isYarnTest ? 'yarn.lock' : 'package-lock.json');

const packageJson = JSON.parse(readFileSync(path.join(workspacePath, 'package.json'), { encoding: 'utf8' })) as PackageJson;
expect(packageJson.devDependencies).toHaveProperty('@o3r/pipeline');
expect(packageJson.dependencies).not.toHaveProperty('@o3r/pipeline');

['.github/actions/setup/action.yml', '.github/workflows/main.yml'].forEach((yamlFile) => {
expect(diff.added).toContain(yamlFile);
execSync(`npx -p @action-validator/cli action-validator ${yamlFile}`, execAppOptions);
Expand Down
2 changes: 1 addition & 1 deletion packages/@o3r/schematics/src/utility/wrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export const createSchematicWithMetricsIfInstalled: SchematicWrapper = (schemati
message: `
Would you like to share anonymous data about the usage of Otter builders and schematics with the Otter Team at Amadeus ?
It will help us to improve our tools.
For more details and instructions on how to change these settings, see https://github.com/AmadeusITGroup/otter/blob/main/docs/telemetry/PRIVACY_NOTICE.md.
For more details and instructions on how to change these settings, see https://github.com/AmadeusITGroup/otter/blob/main/docs/telemetry/PRIVACY_NOTICE.md
`,
default: false
} as const satisfies Question;
Expand Down

0 comments on commit 99b3ad0

Please sign in to comment.