ember-codemod-remove-ember-css-modules 3.0.8 → 3.1.1

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.
@@ -1,3 +1,4 @@
1
+ import { EOL } from 'node:os';
1
2
  import { createFiles, findFiles, mapFilePaths, moveFiles, } from '@codemod-utils/files';
2
3
  function canSkip(options) {
3
4
  const { projectRoot } = options;
@@ -34,7 +35,7 @@ function moveAppCssToAssets(options) {
34
35
  const fileMap = new Map([
35
36
  [
36
37
  'app/styles/app.css',
37
- '/* Ember supports plain CSS out of the box. More info: https://cli.emberjs.com/release/advanced-use/stylesheets/ */\n',
38
+ `/* Ember supports plain CSS out of the box. More info: https://cli.emberjs.com/release/advanced-use/stylesheets/ */${EOL}`,
38
39
  ],
39
40
  ]);
40
41
  createFiles(fileMap, options);
@@ -1,10 +1,10 @@
1
- import { join } from 'node:path';
1
+ import { join, sep } from 'node:path';
2
2
  import { parseFilePath } from '@codemod-utils/files';
3
3
  export function analyzeFilePaths(filePaths) {
4
4
  const entities = new Map();
5
5
  filePaths.forEach((filePath) => {
6
6
  const { dir, ext, name } = parseFilePath(filePath);
7
- const entityName = join(dir, name);
7
+ const entityName = join(dir, name).replaceAll(sep, '/');
8
8
  if (entities.has(entityName)) {
9
9
  entities.get(entityName).add(ext);
10
10
  return;
@@ -113,6 +113,6 @@ export function updateClass(entityName, { customizations, options }) {
113
113
  if (error instanceof Error) {
114
114
  message += ` (${error.message})`;
115
115
  }
116
- console.warn(`${message}\n`);
116
+ console.warn(message);
117
117
  }
118
118
  }
@@ -362,6 +362,6 @@ export function updateTemplate(entityName, { customizations, options }) {
362
362
  if (error instanceof Error) {
363
363
  message += ` (${error.message})`;
364
364
  }
365
- console.warn(`${message}\n`);
365
+ console.warn(message);
366
366
  }
367
367
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ember-codemod-remove-ember-css-modules",
3
- "version": "3.0.8",
3
+ "version": "3.1.1",
4
4
  "description": "Codemod to replace ember-css-modules with embroider-css-modules",
5
5
  "keywords": [
6
6
  "codemod",
@@ -26,32 +26,32 @@
26
26
  "dist"
27
27
  ],
28
28
  "dependencies": {
29
- "@codemod-utils/ast-javascript": "^2.0.9",
30
- "@codemod-utils/ast-template": "^2.0.4",
31
- "@codemod-utils/blueprints": "^2.0.3",
29
+ "@codemod-utils/ast-javascript": "^2.1.0",
30
+ "@codemod-utils/ast-template": "^2.1.0",
31
+ "@codemod-utils/blueprints": "^2.1.0",
32
32
  "@codemod-utils/ember": "^3.0.4",
33
- "@codemod-utils/files": "^3.0.6",
34
- "@codemod-utils/package-json": "^3.2.3",
33
+ "@codemod-utils/files": "^3.2.1",
34
+ "@codemod-utils/package-json": "^3.3.1",
35
35
  "yargs": "^18.0.0"
36
36
  },
37
37
  "devDependencies": {
38
- "@codemod-utils/tests": "^2.0.6",
38
+ "@codemod-utils/tests": "^2.2.0",
39
39
  "@sondr3/minitest": "^0.1.2",
40
- "@types/node": "^20.19.25",
40
+ "@types/node": "^20.19.26",
41
41
  "@types/yargs": "^17.0.35",
42
42
  "concurrently": "^9.2.1",
43
43
  "eslint": "^9.39.1",
44
- "prettier": "^3.6.2",
44
+ "prettier": "^3.7.4",
45
45
  "typescript": "^5.9.3",
46
46
  "@shared-configs/eslint-config-node": "0.0.0",
47
- "@shared-configs/typescript": "0.0.0",
48
- "@shared-configs/prettier": "0.0.0"
47
+ "@shared-configs/prettier": "0.0.0",
48
+ "@shared-configs/typescript": "0.0.0"
49
49
  },
50
50
  "engines": {
51
51
  "node": "20.* || >= 22"
52
52
  },
53
53
  "scripts": {
54
- "build": "./build.sh --production",
54
+ "build": "sh build.sh --production",
55
55
  "format": "prettier . --cache --write",
56
56
  "lint": "concurrently \"pnpm:lint:*(!fix)\" --names \"lint:\"",
57
57
  "lint:fix": "concurrently \"pnpm:lint:*:fix\" --names \"fix:\" && pnpm format",
@@ -59,6 +59,6 @@
59
59
  "lint:js": "eslint . --cache",
60
60
  "lint:js:fix": "eslint . --fix",
61
61
  "lint:types": "tsc --noEmit",
62
- "test": "./build.sh --test && mt dist-for-testing --quiet"
62
+ "test": "sh build.sh --test && mt dist-for-testing --quiet"
63
63
  }
64
64
  }