@ama-styling/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": "@ama-styling/stylelint-plugin",
3
- "version": "13.0.0-prerelease.3",
3
+ "version": "13.0.0-prerelease.4",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -23,13 +23,13 @@
23
23
  "build:builders": "tsc -b tsconfig.builders.json --pretty && yarn generate-cjs-manifest"
24
24
  },
25
25
  "dependencies": {
26
- "@o3r/schematics": "^13.0.0-prerelease.3",
26
+ "@o3r/schematics": "^13.0.0-prerelease.4",
27
27
  "ts-node": "~10.9.2",
28
28
  "tslib": "^2.6.2"
29
29
  },
30
30
  "peerDependencies": {
31
31
  "@angular-devkit/schematics": "^20.0.0",
32
- "@o3r/schematics": "^13.0.0-prerelease.3",
32
+ "@o3r/schematics": "^13.0.0-prerelease.4",
33
33
  "@schematics/angular": "^20.0.0",
34
34
  "postcss": "^8.4.5",
35
35
  "postcss-scss": "^4.0.9",
@@ -57,10 +57,10 @@
57
57
  "@eslint-community/eslint-plugin-eslint-comments": "^4.4.0",
58
58
  "@nx/eslint-plugin": "~21.3.11",
59
59
  "@nx/jest": "~21.3.11",
60
- "@o3r/build-helpers": "^13.0.0-prerelease.3",
61
- "@o3r/eslint-config": "^13.0.0-prerelease.3",
62
- "@o3r/eslint-plugin": "^13.0.0-prerelease.3",
63
- "@o3r/test-helpers": "^13.0.0-prerelease.3",
60
+ "@o3r/build-helpers": "^13.0.0-prerelease.4",
61
+ "@o3r/eslint-config": "^13.0.0-prerelease.4",
62
+ "@o3r/eslint-plugin": "^13.0.0-prerelease.4",
63
+ "@o3r/test-helpers": "^13.0.0-prerelease.4",
64
64
  "@schematics/angular": "~20.0.0",
65
65
  "@stylistic/eslint-plugin": "~5.2.0",
66
66
  "@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;AAUpC,OAAO,KAAK,EACV,qBAAqB,EACtB,MAAM,UAAU,CAAC;AA2ClB;;;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;AAqBlB;;;GAGG;AACH,eAAO,MAAM,KAAK,GAAI,SAAS,qBAAqB,SAA2C,CAAC"}
@@ -2,50 +2,29 @@
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
  const dependenciesToInstall = [
8
9
  'postcss',
9
10
  'postcss-scss',
10
11
  'stylelint'
11
12
  ];
13
+ const devDependenciesToInstall = [];
12
14
  /**
13
15
  * Add Otter stylelint-plugin to an Angular Project
14
16
  * @param options
15
17
  */
16
18
  function ngAddFn(options) {
17
19
  /* ng add rules */
18
- return async (tree, context) => {
19
- const { NodeDependencyType } = await Promise.resolve().then(() => require('@schematics/angular/utility/dependencies'));
20
- const depsInfo = (0, schematics_1.getO3rPeerDeps)(packageJsonPath);
21
- const workspaceProject = options.projectName ? (0, schematics_1.getWorkspaceConfig)(tree)?.projects[options.projectName] : undefined;
22
- const dependencies = depsInfo.o3rPeerDeps.reduce((acc, dep) => {
23
- acc[dep] = {
24
- inManifest: [{
25
- range: `~${depsInfo.packageVersion}`,
26
- types: (0, schematics_1.getProjectNewDependenciesTypes)(workspaceProject)
27
- }]
28
- };
29
- return acc;
30
- }, (0, schematics_1.getPackageInstallConfig)(packageJsonPath, tree, options.projectName, true, !!options.exactO3rVersion));
31
- Object.entries((0, schematics_1.getExternalDependenciesVersionRange)(dependenciesToInstall, packageJsonPath, context.logger)).forEach(([dep, range]) => {
32
- dependencies[dep] = {
33
- inManifest: [{
34
- range,
35
- types: [NodeDependencyType.Dev]
36
- }]
37
- };
38
- });
39
- return (0, schematics_1.setupDependencies)({
40
- projectName: options.projectName,
41
- dependencies
42
- });
43
- };
20
+ return (0, schematics_1.chain)([
21
+ (0, schematics_2.ngAddDependenciesRule)(options, packageJsonPath, { dependenciesToInstall, devDependenciesToInstall })
22
+ ]);
44
23
  }
45
24
  /**
46
25
  * Add Otter stylelint-plugin to an Angular Project
47
26
  * @param options
48
27
  */
49
- const ngAdd = (options) => (0, schematics_1.createOtterSchematic)(ngAddFn)(options);
28
+ const ngAdd = (options) => (0, schematics_2.createOtterSchematic)(ngAddFn)(options);
50
29
  exports.ngAdd = ngAdd;
51
30
  //# 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"}