@kjanat/dprint-plugin-sortpackagejson
Advanced tools
Sorry, the diff of this file is not supported yet
+57
| { | ||
| "$schema": "https://json-schema.org/draft/2020-12/schema", | ||
| "$id": "https://plugins.dprint.dev/kjanat/dprint-plugin-sortpackagejson/0.2.1/schema.json", | ||
| "title": "dprint-plugin-sortpackagejson", | ||
| "description": "[dprint-plugin-sortpackagejson] plugin configuration.\nMirrors options exposed by the npm [`sort-package-json`] package,\nwith dprint-style camelCase keys.\n\nThe `use_tabs`, `indent_width`, `new_line_kind`, and `line_width` fields\nare resolved from dprint's global config by `resolve_config` and are\nnot part of the public schema (they appear in the global `dprint.json`\nschema instead).\n\n[`sort-package-json`]: https://npm.im/sort-package-json\n[dprint-plugin-sortpackagejson]: https://github.com/kjanat/dprint-plugin-sortpackagejson \"GitHub\"", | ||
| "type": "object", | ||
| "properties": { | ||
| "sortOrder": { | ||
| "description": "Custom top-level key order; empty falls back to the canonical\nsort-package-json order.", | ||
| "type": "array", | ||
| "items": { | ||
| "type": "string" | ||
| } | ||
| }, | ||
| "sortDependencies": { | ||
| "description": "Alphabetize entries inside dependency objects (`dependencies`, `devDependencies`, etc.).", | ||
| "type": "boolean" | ||
| }, | ||
| "sortScripts": { | ||
| "description": "Apply the canonical script ordering rules (pre/main/post grouping plus npm-run-all chain detection).", | ||
| "type": "boolean" | ||
| }, | ||
| "sortNested": { | ||
| "description": "Apply nested-section sort rules (engines, exports, eslintConfig, prettier, workspaces, pnpm, ...).", | ||
| "type": "boolean" | ||
| }, | ||
| "unknownKeys": { | ||
| "description": "How to order top-level keys not present in the canonical list.", | ||
| "$ref": "#/$defs/UnknownKeyPolicy" | ||
| } | ||
| }, | ||
| "additionalProperties": false, | ||
| "required": [ | ||
| "sortOrder", | ||
| "sortDependencies", | ||
| "sortScripts", | ||
| "sortNested", | ||
| "unknownKeys" | ||
| ], | ||
| "$defs": { | ||
| "UnknownKeyPolicy": { | ||
| "description": "Strategy used for top-level keys that are not in the canonical sort-package-json order.", | ||
| "oneOf": [ | ||
| { | ||
| "description": "Sort unknown keys alphabetically after canonical ones (matches\nupstream sort-package-json behavior).", | ||
| "type": "string", | ||
| "const": "alphabetical" | ||
| }, | ||
| { | ||
| "description": "Keep unknown keys in their original order, appended after canonical.", | ||
| "type": "string", | ||
| "const": "preserve" | ||
| } | ||
| ] | ||
| } | ||
| } | ||
| } |
+2
-2
@@ -1,8 +0,8 @@ | ||
| import { join } from "node:path"; | ||
| import { fileURLToPath } from "node:url"; | ||
| //#region src/index.ts | ||
| /** @returns {string} The path to the Wasm module. */ | ||
| function getPath() { | ||
| return join(import.meta.dirname, "./plugin.wasm"); | ||
| return fileURLToPath(import.meta.resolve("@kjanat/dprint-plugin-sortpackagejson/wasm")); | ||
| } | ||
| //#endregion | ||
| export { getPath }; |
+5
-3
| { | ||
| "name": "@kjanat/dprint-plugin-sortpackagejson", | ||
| "version": "0.2.0", | ||
| "version": "0.2.1", | ||
| "description": "Wasm module for dprint-plugin-sortpackagejson.", | ||
@@ -26,4 +26,4 @@ "keywords": [ | ||
| "./package.json": "./package.json", | ||
| "./wasm": "./dist/plugin.wasm", | ||
| "./schema": "./dist/schema.json" | ||
| "./wasm": "./plugin.wasm", | ||
| "./schema": "./schema.json" | ||
| }, | ||
@@ -33,2 +33,4 @@ "types": "./dist/index.d.mts", | ||
| "dist/", | ||
| "plugin.wasm", | ||
| "schema.json", | ||
| "LICENSE", | ||
@@ -35,0 +37,0 @@ "README.md" |
Sorry, the diff of this file is not supported yet
| { | ||
| "$schema": "https://json-schema.org/draft/2020-12/schema", | ||
| "$id": "https://plugins.dprint.dev/kjanat/dprint-plugin-sortpackagejson/0.2.0/schema.json", | ||
| "title": "dprint-plugin-sortpackagejson", | ||
| "description": "[dprint-plugin-sortpackagejson] plugin configuration.\nMirrors options exposed by the npm [`sort-package-json`] package,\nwith dprint-style camelCase keys.\n\nThe `use_tabs`, `indent_width`, `new_line_kind`, and `line_width` fields\nare resolved from dprint's global config by `resolve_config` and are\nnot part of the public schema (they appear in the global `dprint.json`\nschema instead).\n\n[`sort-package-json`]: https://npm.im/sort-package-json\n[dprint-plugin-sortpackagejson]: https://github.com/kjanat/dprint-plugin-sortpackagejson \"GitHub\"", | ||
| "type": "object", | ||
| "properties": { | ||
| "sortOrder": { | ||
| "description": "Custom top-level key order; empty falls back to the canonical\nsort-package-json order.", | ||
| "type": "array", | ||
| "items": { | ||
| "type": "string" | ||
| } | ||
| }, | ||
| "sortDependencies": { | ||
| "description": "Alphabetize entries inside dependency objects (`dependencies`, `devDependencies`, etc.).", | ||
| "type": "boolean" | ||
| }, | ||
| "sortScripts": { | ||
| "description": "Apply the canonical script ordering rules (pre/main/post grouping plus npm-run-all chain detection).", | ||
| "type": "boolean" | ||
| }, | ||
| "sortNested": { | ||
| "description": "Apply nested-section sort rules (engines, exports, eslintConfig, prettier, workspaces, pnpm, ...).", | ||
| "type": "boolean" | ||
| }, | ||
| "unknownKeys": { | ||
| "description": "How to order top-level keys not present in the canonical list.", | ||
| "$ref": "#/$defs/UnknownKeyPolicy" | ||
| } | ||
| }, | ||
| "additionalProperties": false, | ||
| "required": [ | ||
| "sortOrder", | ||
| "sortDependencies", | ||
| "sortScripts", | ||
| "sortNested", | ||
| "unknownKeys" | ||
| ], | ||
| "$defs": { | ||
| "UnknownKeyPolicy": { | ||
| "description": "Strategy used for top-level keys that are not in the canonical sort-package-json order.", | ||
| "oneOf": [ | ||
| { | ||
| "description": "Sort unknown keys alphabetically after canonical ones (matches\nupstream sort-package-json behavior).", | ||
| "type": "string", | ||
| "const": "alphabetical" | ||
| }, | ||
| { | ||
| "description": "Keep unknown keys in their original order, appended after canonical.", | ||
| "type": "string", | ||
| "const": "preserve" | ||
| } | ||
| ] | ||
| } | ||
| } | ||
| } |
366123
-0.14%