heading-case 1.0.6 → 1.1.0
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/README.md +2 -0
- package/dist/index.js +35 -6
- package/package.json +6 -5
package/README.md
CHANGED
|
@@ -44,6 +44,8 @@ Check all markdown and MDX files in the current directory:
|
|
|
44
44
|
npx heading-case
|
|
45
45
|
```
|
|
46
46
|
|
|
47
|
+
By default, files ignored by Git are skipped as well, including rules from `.gitignore`, `.git/info/exclude`, and global Git ignore files.
|
|
48
|
+
|
|
47
49
|
Check and write the formatted content to the file:
|
|
48
50
|
|
|
49
51
|
```bash
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as __rspack_external_fs from "fs";
|
|
2
2
|
import { __webpack_require__ } from "./rslib-runtime.js";
|
|
3
|
+
import { execFileSync } from "node:child_process";
|
|
3
4
|
import node_fs from "node:fs";
|
|
4
5
|
import node_process from "node:process";
|
|
5
6
|
import node_os from "node:os";
|
|
@@ -2507,7 +2508,7 @@ var abbreviates_namespaceObject = JSON.parse('{"abi":"ABI","amd":"AMD","api":"AP
|
|
|
2507
2508
|
var brands_namespaceObject = JSON.parse('{"airbnb":"Airbnb","alphago":"AlphaGo","bitbucket":"Bitbucket","bytedance":"ByteDance","circleci":"CircleCI","cloudflare":"Cloudflare","freecodecamp":"freeCodeCamp","gitea":"Gitea","gitee":"Gitee","github":"GitHub","gitlab":"GitLab","gitops":"GitOps","gitpod":"Gitpod","hp":"HP","ibm":"IBM","jsdelivr":"jsDelivr","kfc":"KFC","leetcode":"LeetCode","linkedin":"LinkedIn","mcdonald":"McDonald","nvidia":"NVIDIA","pagerduty":"PagerDuty","producthunt":"Product Hunt","stackblitz":"StackBlitz","stackit":"STACKIT","stackoverflow":"Stack Overflow","unjs":"UnJS","v2ex":"V2EX","vuefes":"Vue Fes","youtube":"YouTube"}');
|
|
2508
2509
|
var general_namespaceObject = JSON.parse('{"aiaas":"AIaaS","baas":"BaaS","caas":"CaaS","daas":"DaaS","ddos":"DDoS","devops":"DevOps","devtools":"DevTools","esim":"eSIM","faas":"FaaS","iac":"IaC","iaas":"IaaS","ioc":"IoC","ipsec":"IPsec","mpaas":"mPaaS","paas":"PaaS","saas":"SaaS","wifi":"Wi-Fi","xaas":"XaaS"}');
|
|
2509
2510
|
var products_namespaceObject = JSON.parse('{"airdrop":"AirDrop","airpods":"AirPods","airtag":"AirTag","homekit":"HomeKit","homepod":"HomePod","imac":"iMac","ipad":"iPad","iphone":"iPhone","ipod":"iPod","macbook":"MacBook","macbook air":"MacBook Air","macbook pro":"MacBook Pro","yubikey":"YubiKey"}');
|
|
2510
|
-
var softwares_namespaceObject = JSON.parse('{"1password":"1Password","3dtiles":"3DTiles","actionscript":"ActionScript","adblock":"AdBlock","ajax":"AJAX","alipay":"Alipay","amap":"AMap","angularjs":"AngularJS","ant design":"Ant Design","ant design vue":"Ant Design Vue","antd":"AntD","antdesign":"AntDesign","antdesignvue":"AntDesignVue","antv":"AntV","apifox":"Apifox","app store":"App Store","apple pay":"Apple Pay","applescript":"AppleScript","appletalk":"AppleTalk","arangodb":"ArangoDB","arcgis":"ArcGIS","arcmap":"ArcMap","arcobjects":"ArcObjects","beego":"Beego","bittorrent":"BitTorrent","bluesky":"Bluesky","busybox":"BusyBox","centos":"CentOS","cesiumjs":"CesiumJS","chatgpt":"ChatGPT","citygml":"CityGML","cityjson":"CityJSON","ckeditor":"CKEditor","clashx":"ClashX","clickhouse":"ClickHouse","cloudfront":"CloudFront","cmake":"CMake","cockroachdb":"CockroachDB","cocoapods":"CocoaPods","codepen":"CodePen","codesandbox":"CodeSandbox","coffeescript":"CoffeeScript","commonjs":"CommonJS","composition api":"Composition API","compositionapi":"CompositionAPI","coredns":"CoreDNS","css modules":"CSS Modules","dapr":"Dapr","datadog":"Datadog","datagrip":"DataGrip","dbase":"dBase","definitelytyped":"DefinitelyTyped","denodeploy":"DenoDeploy","digital ocean":"DigitalOcean","digitalocean":"DigitalOcean","dingtalk":"DingTalk","directx":"DirectX","django":"Django","duckduckgo":"DuckDuckGo","dynamodb":"DynamoDB","echarts":"ECharts","ecmascript":"ECMAScript","edgedb":"EdgeDB","eggjs":"Egg.js","elasticsearch":"Elasticsearch","element plus":"Element Plus","elementui":"ElementUI","esbuild":"esbuild","eslint":"ESLint","esxi":"ESXi","etcd":"etcd","facetime":"FaceTime","fastapi":"FastAPI","ffmpeg":"FFmpeg","filezilla":"FileZilla","firefox":"Firefox","freemarker":"FreeMarker","gdnative":"GDNative","gdscript":"GDScript","geforce":"GeForce","geojson":"GeoJSON","geopackage":"GeoPackage","geopandas":"GeoPandas","geoserver":"GeoServer","gitbook":"GitBook","gitkraken":"GitKraken","gltf":"glTF","gnome":"GNOME","gnu":"GNU","gnupg":"GnuPG","goland":"GoLand","google pay":"Google Pay","graph rag":"Graph RAG","graphql":"GraphQL","graphrag":"GraphRAG","greensock":"GreenSock","grpc":"gRPC","hackernews":"Hacker News","hacpai":"HacPai","hbase":"HBase","hbuilderx":"HBuilderX","ibook":"iBook","icloud":"iCloud","idrac":"iDRAC","ilo":"iLO","imessage":"iMessage","imovie":"iMovie","imtoken":"imToken","influxdb":"InfluxDB","intellij":"IntelliJ","intellij idea":"IntelliJ IDEA","ios":"iOS","ipados":"iPadOS","iphoto":"iPhoto","iscsi":"iSCSI","iterm":"iTerm","itunes":"iTunes","iwork":"iWork","javascript":"JavaScript","jetbrains":"JetBrains","jquery":"jQuery","jsdoc":"JSDoc","jupyterlab":"JupyterLab","katex":"KaTeX","kubernetes":"Kubernetes","latex":"LaTeX","less":"Less","libreoffice":"LibreOffice","line pay":"LINE Pay","lineageos":"LineageOS","macos":"macOS","mariadb":"MariaDB","markdown":"Markdown","markdownlint":"MarkdownLint","
|
|
2511
|
+
var softwares_namespaceObject = JSON.parse('{"1password":"1Password","3dtiles":"3DTiles","actionscript":"ActionScript","adblock":"AdBlock","ajax":"AJAX","alipay":"Alipay","amap":"AMap","angularjs":"AngularJS","ant design":"Ant Design","ant design vue":"Ant Design Vue","antd":"AntD","antdesign":"AntDesign","antdesignvue":"AntDesignVue","antv":"AntV","apifox":"Apifox","app store":"App Store","apple pay":"Apple Pay","applescript":"AppleScript","appletalk":"AppleTalk","arangodb":"ArangoDB","arcgis":"ArcGIS","arcmap":"ArcMap","arcobjects":"ArcObjects","beego":"Beego","bittorrent":"BitTorrent","bluesky":"Bluesky","busybox":"BusyBox","centos":"CentOS","cesiumjs":"CesiumJS","chatgpt":"ChatGPT","citygml":"CityGML","cityjson":"CityJSON","ckeditor":"CKEditor","clashx":"ClashX","clickhouse":"ClickHouse","cloudfront":"CloudFront","cmake":"CMake","cockroachdb":"CockroachDB","cocoapods":"CocoaPods","codepen":"CodePen","codesandbox":"CodeSandbox","coffeescript":"CoffeeScript","commonjs":"CommonJS","composition api":"Composition API","compositionapi":"CompositionAPI","coredns":"CoreDNS","css modules":"CSS Modules","dapr":"Dapr","datadog":"Datadog","datagrip":"DataGrip","dbase":"dBase","definitelytyped":"DefinitelyTyped","denodeploy":"DenoDeploy","digital ocean":"DigitalOcean","digitalocean":"DigitalOcean","dingtalk":"DingTalk","directx":"DirectX","django":"Django","duckduckgo":"DuckDuckGo","dynamodb":"DynamoDB","echarts":"ECharts","ecmascript":"ECMAScript","edgedb":"EdgeDB","eggjs":"Egg.js","elasticsearch":"Elasticsearch","element plus":"Element Plus","elementui":"ElementUI","esbuild":"esbuild","eslint":"ESLint","esxi":"ESXi","etcd":"etcd","facetime":"FaceTime","fastapi":"FastAPI","ffmpeg":"FFmpeg","filezilla":"FileZilla","firefox":"Firefox","freemarker":"FreeMarker","gdnative":"GDNative","gdscript":"GDScript","geforce":"GeForce","geojson":"GeoJSON","geopackage":"GeoPackage","geopandas":"GeoPandas","geoserver":"GeoServer","gitbook":"GitBook","gitkraken":"GitKraken","gltf":"glTF","gnome":"GNOME","gnu":"GNU","gnupg":"GnuPG","goland":"GoLand","google pay":"Google Pay","graph rag":"Graph RAG","graphql":"GraphQL","graphrag":"GraphRAG","greensock":"GreenSock","grpc":"gRPC","hackernews":"Hacker News","hacpai":"HacPai","hbase":"HBase","hbuilderx":"HBuilderX","ibook":"iBook","icloud":"iCloud","idrac":"iDRAC","ilo":"iLO","imessage":"iMessage","imovie":"iMovie","imtoken":"imToken","influxdb":"InfluxDB","intellij":"IntelliJ","intellij idea":"IntelliJ IDEA","ios":"iOS","ipados":"iPadOS","iphoto":"iPhoto","iscsi":"iSCSI","iterm":"iTerm","itunes":"iTunes","iwork":"iWork","javascript":"JavaScript","jetbrains":"JetBrains","jquery":"jQuery","jsdoc":"JSDoc","jupyterlab":"JupyterLab","katex":"KaTeX","kubernetes":"Kubernetes","latex":"LaTeX","less":"Less","libreoffice":"LibreOffice","line pay":"LINE Pay","lineageos":"LineageOS","macos":"macOS","mariadb":"MariaDB","markdown":"Markdown","markdownlint":"MarkdownLint","mathjax":"MathJax","mathml":"MathML","mathtype":"MathType","matlab":"MATLAB","mediawiki":"MediaWiki","memcached":"Memcached","messagepack":"MessagePack","metamask":"MetaMask","mkdocs":"MkDocs","mlaas":"MLaaS","mlops":"MLOps","mobx":"MobX","mongodb":"MongoDB","mongoose":"Mongoose","ms-dos":"MS-DOS","mybatis":"MyBatis","mysql":"MySQL","naive ui":"Naive UI","naiveui":"NaiveUI","neo4j":"Neo4j","nestjs":"NestJS","netbeans":"NetBeans","netbios":"NetBIOS","nextjs":"Next.js","nixos":"NixOS","nocodb":"NocoDB","node.js":"Node.js","nosql":"NoSQL","notepad ++":"Notepad++","npm":"npm","numpy":"NumPy","nuxtjs":"NuxtJS","oauth":"OAuth","obs":"OBS","ocaml":"OCaml","onedrive":"OneDrive","onenote":"OneNote","openai":"OpenAI","openapi":"OpenAPI","opencv":"OpenCV","openfaas":"OpenFaaS","openflow":"OpenFlow","opengauss":"openGauss","opengl":"OpenGL","opengl es":"OpenGL ES","openjdk":"OpenJDK","openlayers":"OpenLayers","openpgp":"OpenPGP","opensea":"OpenSea","openssl":"OpenSSL","openstack":"OpenStack","openstreetmap":"OpenStreetMap","opensuse":"openSUSE","openvino":"OpenVINO","openwrt":"OpenWrt","opnsense":"OPNsense","pagp":"PAgP","paypal":"PayPal","photoshop":"Photoshop","php":"PHP","phpstorm":"PhpStorm","pihole":"Pi-hole","planetscale":"PlanetScale","postcss":"PostCSS","postgis":"PostGIS","postgresql":"PostgreSQL","potplayer":"PotPlayer","powerpoint":"PowerPoint","powershell":"PowerShell","premid":"PreMiD","primevue":"PrimeVue","protobuf":"Protobuf","pycharm":"PyCharm","pytorch":"PyTorch","qtscript":"QtScript","raii":"RAII","react native":"React Native","redhat":"RedHat","redisearch":"RediSearch","redisjson":"RedisJSON","rescript":"ReScript","restful":"RESTful","rethinkdb":"RethinkDB","rsshub":"RSSHub","rust":"Rust","rxdb":"RxDB","rxjs":"RxJS","samsung pay":"Samsung Pay","sass":"Sass","scss":"SCSS","segmentfault":"SegmentFault","socket.io":"Socket.IO","solarwinds":"SolarWinds","spatiallite":"SpatialLite","spir-v":"SPIR-V","springboot":"SpringBoot","springcloud":"SpringCloud","springmvc":"SpringMVC","sqlite":"SQLite","sqlserver":"SQLServer","storybook":"Storybook","stylus":"Stylus","sublime text":"Sublime Text","surrealdb":"SurrealDB","sveltekit":"SvelteKit","tailwind css":"Tailwind CSS","tailwindcss":"TailwindCSS","teamviewer":"TeamViewer","tensorflow":"TensorFlow","testflight":"TestFlight","tex":"TeX","threejs":"ThreeJS","tianocore":"TianoCore","tidb":"TiDB","tiflash":"TiFlash","tiktok":"TikTok","tikv":"TiKV","travis ci":"Travis CI","trpc":"tRPC","tsconfig":"TSConfig","tsdoc":"TSDoc","tsdx":"TSdx","turbopack":"Turbopack","turborepo":"Turborepo","typeorm":"TypeORM","typescript":"TypeScript","uniapp":"uniapp","unifi":"UniFi","unix":"UNIX","unocss":"UnoCSS","upnp":"UPnP","vercel":"Vercel","videolan":"VideoLAN","vim":"Vim","virtualbox":"VirtualBox","visual studio":"Visual Studio","visual studio code":"Visual Studio Code","vitepress":"VitePress","vividcortex":"VividCortex","vlc":"VLC","vmware":"VMware","voip":"VoIP","vs code":"VS Code","vs codium":"VSCodium","vscode":"VS Code","vscodium":"VSCodium","vue cli":"Vue CLI","vuepress":"VuePress","vueuse":"VueUse","vulkan":"Vulkan","w3c":"W3C","wasm":"Wasm","watchos":"watchOS","web assembly":"WebAssembly","webar":"WebAR","webassembly":"WebAssembly","webgl":"WebGL","webgpu":"WebGPU","webkit":"WebKit","webpack":"webpack","webrtc":"WebRTC","websocket":"WebSocket","webstorm":"WebStorm","webvr":"WebVR","webxr":"WebXR","wechat":"WeChat","wechat pay":"WeChat Pay","whatsapp":"WhatsApp","windi css":"Windi CSS","windicss":"WindiCSS","wireguard":"WireGuard","wordpress":"WordPress","xmind":"XMind","xstate":"XState","yapi":"YApi"}');
|
|
2511
2512
|
const dict = [
|
|
2512
2513
|
...Object.values(abbreviates_namespaceObject),
|
|
2513
2514
|
...Object.values(brands_namespaceObject),
|
|
@@ -2516,6 +2517,7 @@ const dict = [
|
|
|
2516
2517
|
...Object.values(softwares_namespaceObject),
|
|
2517
2518
|
'Angular',
|
|
2518
2519
|
'Agent Skills',
|
|
2520
|
+
'API Report File',
|
|
2519
2521
|
'App Router',
|
|
2520
2522
|
'Create React App',
|
|
2521
2523
|
'Cloudflare Pages',
|
|
@@ -2574,6 +2576,36 @@ const dict = [
|
|
|
2574
2576
|
];
|
|
2575
2577
|
const picocolors = __webpack_require__("./node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js");
|
|
2576
2578
|
var picocolors_default = /*#__PURE__*/ __webpack_require__.n(picocolors);
|
|
2579
|
+
const DEFAULT_IGNORE = [
|
|
2580
|
+
'**/node_modules',
|
|
2581
|
+
'**/dist',
|
|
2582
|
+
'**/.git',
|
|
2583
|
+
'**/.cache',
|
|
2584
|
+
'**/temp'
|
|
2585
|
+
];
|
|
2586
|
+
function getGitIgnorePatterns(cwd) {
|
|
2587
|
+
try {
|
|
2588
|
+
const stdout = execFileSync('git', [
|
|
2589
|
+
'ls-files',
|
|
2590
|
+
'--others',
|
|
2591
|
+
'--ignored',
|
|
2592
|
+
'--exclude-standard',
|
|
2593
|
+
'--directory',
|
|
2594
|
+
'-z'
|
|
2595
|
+
], {
|
|
2596
|
+
cwd,
|
|
2597
|
+
encoding: 'utf8',
|
|
2598
|
+
stdio: [
|
|
2599
|
+
'ignore',
|
|
2600
|
+
'pipe',
|
|
2601
|
+
'ignore'
|
|
2602
|
+
]
|
|
2603
|
+
});
|
|
2604
|
+
return stdout.split('\0').filter(Boolean).map((path)=>escapePath(path));
|
|
2605
|
+
} catch {
|
|
2606
|
+
return [];
|
|
2607
|
+
}
|
|
2608
|
+
}
|
|
2577
2609
|
async function globMarkdownFiles(cwd) {
|
|
2578
2610
|
return glob([
|
|
2579
2611
|
'**/*.md',
|
|
@@ -2581,11 +2613,8 @@ async function globMarkdownFiles(cwd) {
|
|
|
2581
2613
|
], {
|
|
2582
2614
|
cwd,
|
|
2583
2615
|
ignore: [
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
'**/.git',
|
|
2587
|
-
'**/.cache',
|
|
2588
|
-
'**/temp'
|
|
2616
|
+
...DEFAULT_IGNORE,
|
|
2617
|
+
...getGitIgnorePatterns(cwd)
|
|
2589
2618
|
],
|
|
2590
2619
|
absolute: true
|
|
2591
2620
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "heading-case",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"repository": "https://github.com/rstackjs/heading-case",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -30,16 +30,17 @@
|
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@biomejs/biome": "^1.9.4",
|
|
33
|
-
"@rslib/core": "^0.19.
|
|
34
|
-
"@types/node": "^
|
|
35
|
-
"case-police": "^2.
|
|
33
|
+
"@rslib/core": "^0.19.6",
|
|
34
|
+
"@types/node": "^24.12.0",
|
|
35
|
+
"case-police": "^2.2.0",
|
|
36
|
+
"pathe": "^2.0.3",
|
|
36
37
|
"picocolors": "^1.1.1",
|
|
37
38
|
"rslog": "^1.3.2",
|
|
38
39
|
"simple-git-hooks": "^2.13.1",
|
|
39
40
|
"tinyglobby": "^0.2.15",
|
|
40
41
|
"typescript": "^5.9.3"
|
|
41
42
|
},
|
|
42
|
-
"packageManager": "pnpm@10.
|
|
43
|
+
"packageManager": "pnpm@10.31.0",
|
|
43
44
|
"publishConfig": {
|
|
44
45
|
"access": "public",
|
|
45
46
|
"registry": "https://registry.npmjs.org/"
|