heading-case 0.1.1 → 0.1.2

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/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export declare function globMarkdownFiles(cwd: string): Promise<string[]>;
2
+ export declare const formatLine: (originalLine: string) => string;
2
3
  export declare function headingCase({ root, }?: {
3
4
  root?: string;
4
5
  }): Promise<void>;
package/dist/index.js CHANGED
@@ -2912,14 +2912,19 @@ const dict = [
2912
2912
  ...Object.values(general_namespaceObject),
2913
2913
  ...Object.values(products_namespaceObject),
2914
2914
  ...Object.values(softwares_namespaceObject),
2915
+ 'Angular',
2915
2916
  'Create React App',
2917
+ 'Cloudflare Pages',
2916
2918
  'CSS Modules',
2917
2919
  'Docusaurus Faster',
2918
2920
  'EJS',
2921
+ 'Emotion',
2919
2922
  'Fast Refresh',
2923
+ 'GitHub Pages',
2920
2924
  'I',
2921
2925
  'Lightning CSS',
2922
2926
  'Module Federation',
2927
+ 'Relay',
2923
2928
  'Parcel',
2924
2929
  'Preact',
2925
2930
  'Preact Refresh',
@@ -2937,8 +2942,12 @@ const dict = [
2937
2942
  'Rspress',
2938
2943
  'Rstest',
2939
2944
  'Solid',
2945
+ 'Svelte',
2940
2946
  'Server Action',
2947
+ 'Service Worker',
2948
+ 'TanStack Router',
2941
2949
  'Vite',
2950
+ 'Vue',
2942
2951
  'Web Workers',
2943
2952
  'Xcode'
2944
2953
  ];
@@ -3013,6 +3022,12 @@ async function headingCase({ root = process.cwd() } = {}) {
3013
3022
  const isFormatted = await formatFile(file);
3014
3023
  if (isFormatted) count++;
3015
3024
  }
3016
- if (count) logger.success(`[heading-case] formatted ${picocolors_default().yellow(count.toString())} files.`);
3025
+ if (count) {
3026
+ if (shouldWrite) logger.success(`[heading-case] formatted ${picocolors_default().yellow(count.toString())} files.`);
3027
+ else {
3028
+ logger.info(`[heading-case] found issues in ${picocolors_default().yellow(count.toString())} files.`);
3029
+ process.exit(1);
3030
+ }
3031
+ }
3017
3032
  }
3018
- export { globMarkdownFiles, headingCase };
3033
+ export { formatLine, globMarkdownFiles, headingCase };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "heading-case",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "repository": "https://github.com/rspack-contrib/heading-case",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -15,9 +15,16 @@
15
15
  },
16
16
  "module": "./dist/index.mjs",
17
17
  "types": "./dist/index.d.ts",
18
- "files": [
19
- "dist"
20
- ],
18
+ "files": ["dist"],
19
+ "scripts": {
20
+ "build": "rslib build",
21
+ "dev": "rslib build --watch",
22
+ "lint": "biome check .",
23
+ "lint:write": "biome check . --write",
24
+ "prepare": "simple-git-hooks && npm run build",
25
+ "test": "node test/index.js",
26
+ "bump": "npx bumpp"
27
+ },
21
28
  "simple-git-hooks": {
22
29
  "pre-commit": "npm run lint:write"
23
30
  },
@@ -32,16 +39,9 @@
32
39
  "tinyglobby": "^0.2.10",
33
40
  "typescript": "^5.7.2"
34
41
  },
42
+ "packageManager": "pnpm@9.14.4",
35
43
  "publishConfig": {
36
44
  "access": "public",
37
45
  "registry": "https://registry.npmjs.org/"
38
- },
39
- "scripts": {
40
- "build": "rslib build",
41
- "dev": "rslib build --watch",
42
- "lint": "biome check .",
43
- "lint:write": "biome check . --write",
44
- "test": "playwright test",
45
- "bump": "npx bumpp"
46
46
  }
47
- }
47
+ }