@o3r/stylelint-plugin 13.0.0-prerelease.3 → 13.0.0-prerelease.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@o3r/stylelint-plugin",
3
- "version": "13.0.0-prerelease.3",
3
+ "version": "13.0.0-prerelease.4",
4
4
  "deprecated": "This package is will be removed in Otter v14. Please use @ama-styling/stylelint-plugin instead.",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -24,13 +24,13 @@
24
24
  "build:builders": "tsc -b tsconfig.builders.json --pretty && yarn generate-cjs-manifest"
25
25
  },
26
26
  "dependencies": {
27
- "@o3r/schematics": "^13.0.0-prerelease.3",
27
+ "@o3r/schematics": "^13.0.0-prerelease.4",
28
28
  "ts-node": "~10.9.2",
29
29
  "tslib": "^2.6.2"
30
30
  },
31
31
  "peerDependencies": {
32
32
  "@angular-devkit/schematics": "^20.0.0",
33
- "@o3r/schematics": "^13.0.0-prerelease.3",
33
+ "@o3r/schematics": "^13.0.0-prerelease.4",
34
34
  "@schematics/angular": "^20.0.0",
35
35
  "postcss": "^8.4.5",
36
36
  "postcss-scss": "^4.0.9",
@@ -62,10 +62,10 @@
62
62
  "@eslint-community/eslint-plugin-eslint-comments": "^4.4.0",
63
63
  "@nx/eslint-plugin": "~21.3.11",
64
64
  "@nx/jest": "~21.3.11",
65
- "@o3r/build-helpers": "^13.0.0-prerelease.3",
66
- "@o3r/eslint-config": "^13.0.0-prerelease.3",
67
- "@o3r/eslint-plugin": "^13.0.0-prerelease.3",
68
- "@o3r/test-helpers": "^13.0.0-prerelease.3",
65
+ "@o3r/build-helpers": "^13.0.0-prerelease.4",
66
+ "@o3r/eslint-config": "^13.0.0-prerelease.4",
67
+ "@o3r/eslint-plugin": "^13.0.0-prerelease.4",
68
+ "@o3r/test-helpers": "^13.0.0-prerelease.4",
69
69
  "@schematics/angular": "~20.0.0",
70
70
  "@stylistic/eslint-plugin": "~5.2.0",
71
71
  "@types/css-tree": "~2.3.0",
@@ -1,4 +1,4 @@
1
- import type { Rule } from '@angular-devkit/schematics';
1
+ import { type Rule } from '@angular-devkit/schematics';
2
2
  import type { NgAddSchematicsSchema } from './schema';
3
3
  /**
4
4
  * Add Otter stylelint-plugin to an Angular Project
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/ng-add/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,IAAI,EACL,MAAM,4BAA4B,CAAC;AAapC,OAAO,KAAK,EACV,qBAAqB,EACtB,MAAM,UAAU,CAAC;AA0DlB;;;GAGG;AACH,eAAO,MAAM,KAAK,GAAI,SAAS,qBAAqB,SAA2C,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/ng-add/index.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,IAAI,EACV,MAAM,4BAA4B,CAAC;AAKpC,OAAO,KAAK,EACV,qBAAqB,EACtB,MAAM,UAAU,CAAC;AA8BlB;;;GAGG;AACH,eAAO,MAAM,KAAK,GAAI,SAAS,qBAAqB,SAA2C,CAAC"}
@@ -2,7 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ngAdd = void 0;
4
4
  const path = require("node:path");
5
- const schematics_1 = require("@o3r/schematics");
5
+ const schematics_1 = require("@angular-devkit/schematics");
6
+ const schematics_2 = require("@o3r/schematics");
6
7
  const packageJsonPath = path.resolve(__dirname, '..', '..', 'package.json');
7
8
  /**
8
9
  * List of external dependencies to be added to the project as peer dependencies
@@ -22,40 +23,14 @@ const devDependenciesToInstall = [
22
23
  */
23
24
  function ngAddFn(options) {
24
25
  /* ng add rules */
25
- return (tree, context) => {
26
- const depsInfo = (0, schematics_1.getO3rPeerDeps)(packageJsonPath);
27
- const workspaceProject = options.projectName ? (0, schematics_1.getWorkspaceConfig)(tree)?.projects[options.projectName] : undefined;
28
- const projectDirectory = workspaceProject?.root || '.';
29
- const projectPackageJson = tree.readJson(path.posix.join(projectDirectory, 'package.json'));
30
- const dependencies = depsInfo.o3rPeerDeps.reduce((acc, dep) => {
31
- acc[dep] = {
32
- inManifest: [{
33
- range: `~${depsInfo.packageVersion}`,
34
- types: (0, schematics_1.getProjectNewDependenciesTypes)(workspaceProject)
35
- }]
36
- };
37
- return acc;
38
- }, (0, schematics_1.getPackageInstallConfig)(packageJsonPath, tree, options.projectName, true, !!options.exactO3rVersion));
39
- const externalDependenciesInfo = (0, schematics_1.getExternalDependenciesInfo)({
40
- devDependenciesToInstall,
41
- dependenciesToInstall,
42
- projectPackageJson,
43
- o3rPackageJsonPath: packageJsonPath,
44
- projectType: workspaceProject?.projectType
45
- }, context.logger);
46
- return (0, schematics_1.setupDependencies)({
47
- projectName: options.projectName,
48
- dependencies: {
49
- ...dependencies,
50
- ...externalDependenciesInfo
51
- }
52
- });
53
- };
26
+ return (0, schematics_1.chain)([
27
+ (0, schematics_2.ngAddDependenciesRule)(options, packageJsonPath, { dependenciesToInstall, devDependenciesToInstall })
28
+ ]);
54
29
  }
55
30
  /**
56
31
  * Add Otter stylelint-plugin to an Angular Project
57
32
  * @param options
58
33
  */
59
- const ngAdd = (options) => (0, schematics_1.createOtterSchematic)(ngAddFn)(options);
34
+ const ngAdd = (options) => (0, schematics_2.createOtterSchematic)(ngAddFn)(options);
60
35
  exports.ngAdd = ngAdd;
61
36
  //# sourceMappingURL=index.js.map
@@ -1,8 +1,4 @@
1
- import type { SchematicOptionObject } from '@o3r/schematics';
2
- export interface NgAddSchematicsSchema extends SchematicOptionObject {
3
- /** Project name */
4
- projectName?: string | undefined;
5
- /** Use a pinned version for otter packages */
6
- exactO3rVersion?: boolean;
1
+ import type { NgAddOptions, SchematicOptionObject } from '@o3r/schematics';
2
+ export interface NgAddSchematicsSchema extends NgAddOptions, SchematicOptionObject {
7
3
  }
8
4
  //# sourceMappingURL=schema.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../schematics/ng-add/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACtB,MAAM,iBAAiB,CAAC;AAEzB,MAAM,WAAW,qBAAsB,SAAQ,qBAAqB;IAClE,mBAAmB;IACnB,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,8CAA8C;IAC9C,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B"}
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../schematics/ng-add/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,qBAAqB,EACtB,MAAM,iBAAiB,CAAC;AAEzB,MAAM,WAAW,qBAAsB,SAAQ,YAAY,EAAE,qBAAqB;CAAG"}