Skip to content

Commit

Permalink
Refactor package.jsons
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Feb 12, 2025
1 parent 167d11c commit 360840f
Show file tree
Hide file tree
Showing 7 changed files with 157 additions and 140 deletions.
9 changes: 3 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,10 @@
},
"scripts": {
"build": "tsc --build --clean && tsc --build && type-coverage",
"format": "./packages/remark-cli/cli.js . --frail --output --quiet && prettier . --log-level warn --write && xo --fix",
"prepack": "npm run build && npm run format",
"test": "npm run build && npm run format && npm run test-coverage",
"format": "./packages/remark-cli/cli.js --frail --output --quiet -- . && prettier --log-level warn --write -- . && xo --fix",
"test-api": "node --conditions development test.js",
"test-coverage": "c8 --100 --reporter lcov npm run test-api"
"test-coverage": "c8 --100 --reporter lcov -- npm run test-api",
"test": "npm run build && npm run format && npm run test-coverage"
},
"prettier": {
"bracketSpacing": false,
Expand All @@ -57,8 +56,6 @@
},
"typeCoverage": {
"atLeast": 100,
"detail": true,
"ignoreCatch": true,
"strict": true
},
"xo": {
Expand Down
54 changes: 26 additions & 28 deletions packages/remark-cli/package.json
Original file line number Diff line number Diff line change
@@ -1,48 +1,46 @@
{
"name": "remark-cli",
"version": "12.0.1",
"description": "CLI to process markdown with remark",
"license": "MIT",
"keywords": [
"bin",
"cli",
"markdown",
"mdast",
"remark",
"unified"
],
"homepage": "https://remark.js.org",
"repository": "https://github.com/remarkjs/remark/tree/main/packages/remark-cli",
"bugs": "https://github.com/remarkjs/remark/issues",
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/unified"
},
"author": "Titus Wormer <[email protected]> (https://wooorm.com)",
"contributors": [
"Titus Wormer <[email protected]> (https://wooorm.com)"
],
"type": "module",
"exports": [],
"bin": {
"remark": "cli.js"
},
"files": [
"cli.js"
"bugs": "https://github.com/remarkjs/remark/issues",
"contributors": [
"Titus Wormer <[email protected]> (https://wooorm.com)"
],
"dependencies": {
"import-meta-resolve": "^4.0.0",
"markdown-extensions": "^2.0.0",
"remark": "^15.0.0",
"unified-args": "^11.0.0"
},
"description": "CLI to process markdown with remark",
"exports": [],
"files": [
"cli.js"
],
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/unified"
},
"homepage": "https://remark.js.org",
"keywords": [
"bin",
"cli",
"markdown",
"mdast",
"remark",
"unified"
],
"license": "MIT",
"name": "remark-cli",
"repository": "https://github.com/remarkjs/remark/tree/main/packages/remark-cli",
"scripts": {},
"typeCoverage": {
"atLeast": 100,
"detail": true,
"ignoreCatch": true,
"strict": true
},
"type": "module",
"version": "12.0.1",
"xo": {
"prettier": true
}
Expand Down
12 changes: 6 additions & 6 deletions packages/remark-parse/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,22 +38,22 @@ declare module 'unified' {
* This type is registered by `remark-parse`.
* Values can be registered by remark plugins that extend `micromark` and
* `mdast-util-from-markdown`.
* See {@link MicromarkExtension | `Extension`} from
* {@link https://github.com/micromark/micromark/tree/main/packages/micromark-util-types | `micromark-util-types`}.
* See {@linkcode MicromarkExtension | Extension} from
* {@linkcode https://github.com/micromark/micromark/tree/main/packages/micromark-util-types | micromark-util-types}.
*/
micromarkExtensions?: MicromarkExtension[]
micromarkExtensions?: Array<MicromarkExtension>

/**
* List of `mdast-util-from-markdown` extensions to use.
*
* This type is registered by `remark-parse`.
* Values can be registered by remark plugins that extend `micromark` and
* `mdast-util-from-markdown`.
* See {@link FromMarkdownExtension | `Extension`} from
* {@link https://github.com/syntax-tree/mdast-util-from-markdown#extension | `mdast-util-from-markdown`}.
* See {@linkcode FromMarkdownExtension | Extension} from
* {@linkcode https://github.com/syntax-tree/mdast-util-from-markdown#extension | mdast-util-from-markdown}.
*/
fromMarkdownExtensions?: Array<
FromMarkdownExtension[] | FromMarkdownExtension
Array<FromMarkdownExtension> | FromMarkdownExtension
>
}
}
84 changes: 48 additions & 36 deletions packages/remark-parse/package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,31 @@
{
"name": "remark-parse",
"version": "11.0.0",
"author": "Titus Wormer <[email protected]> (https://wooorm.com)",
"bugs": "https://github.com/remarkjs/remark/issues",
"contributors": [
"Elijah Hamovitz <[email protected]>",
"Eugene Sharygin <[email protected]>",
"Ika <[email protected]>",
"Junyoung Choi <[email protected]>",
"Titus Wormer <[email protected]> (https://wooorm.com)"
],
"dependencies": {
"@types/mdast": "^4.0.0",
"mdast-util-from-markdown": "^2.0.0",
"micromark-util-types": "^2.0.0",
"unified": "^11.0.0"
},
"description": "remark plugin to add support for parsing markdown input",
"license": "MIT",
"exports": "./index.js",
"files": [
"index.d.ts",
"index.js",
"lib/"
],
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/unified"
},
"homepage": "https://remark.js.org",
"keywords": [
"abstract",
"ast",
Expand All @@ -16,51 +39,40 @@
"tree",
"unified"
],
"homepage": "https://remark.js.org",
"license": "MIT",
"name": "remark-parse",
"repository": "https://github.com/remarkjs/remark/tree/main/packages/remark-parse",
"bugs": "https://github.com/remarkjs/remark/issues",
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/unified"
},
"author": "Titus Wormer <[email protected]> (https://wooorm.com)",
"contributors": [
"Titus Wormer <[email protected]> (https://wooorm.com)",
"Eugene Sharygin <[email protected]>",
"Junyoung Choi <[email protected]>",
"Elijah Hamovitz <[email protected]>",
"Ika <[email protected]>"
],
"sideEffects": false,
"type": "module",
"exports": "./index.js",
"files": [
"lib/",
"index.d.ts",
"index.js"
],
"dependencies": {
"@types/mdast": "^4.0.0",
"mdast-util-from-markdown": "^2.0.0",
"micromark-util-types": "^2.0.0",
"unified": "^11.0.0"
},
"scripts": {},
"sideEffects": false,
"typeCoverage": {
"atLeast": 100,
"detail": true,
"ignoreCatch": true,
"strict": true
},
"type": "module",
"version": "11.0.0",
"xo": {
"overrides": [
{
"files": [
"**/*.ts"
"**/*.d.ts"
],
"rules": {
"@typescript-eslint/ban-types": "off",
"@typescript-eslint/consistent-type-definitions": "off"
"@typescript-eslint/array-type": [
"error",
{
"default": "generic"
}
],
"@typescript-eslint/ban-types": [
"error",
{
"extendDefaults": true
}
],
"@typescript-eslint/consistent-type-definitions": [
"error",
"interface"
]
}
}
],
Expand Down
6 changes: 3 additions & 3 deletions packages/remark-stringify/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ declare module 'unified' {
* This type is registered by `remark-stringify`.
* Values can be registered by remark plugins that extend
* `mdast-util-to-markdown`.
* See {@link ToMarkdownExtension | `Options`} from
* {@link https://github.com/syntax-tree/mdast-util-to-markdown#options | `mdast-util-to-markdown`}.
* See {@linkcode ToMarkdownExtension | Options} from
* {@linkcode https://github.com/syntax-tree/mdast-util-to-markdown#options | mdast-util-to-markdown}.
*/
toMarkdownExtensions?: ToMarkdownExtension[]
toMarkdownExtensions?: Array<ToMarkdownExtension>
}
}
76 changes: 44 additions & 32 deletions packages/remark-stringify/package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,27 @@
{
"name": "remark-stringify",
"version": "11.0.0",
"author": "Titus Wormer <[email protected]> (https://wooorm.com)",
"bugs": "https://github.com/remarkjs/remark/issues",
"contributors": [
"Eugene Sharygin <[email protected]>",
"Titus Wormer <[email protected]> (https://wooorm.com)"
],
"dependencies": {
"@types/mdast": "^4.0.0",
"mdast-util-to-markdown": "^2.0.0",
"unified": "^11.0.0"
},
"description": "remark plugin to add support for serializing markdown",
"license": "MIT",
"exports": "./index.js",
"files": [
"index.d.ts",
"index.js",
"lib/"
],
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/unified"
},
"homepage": "https://remark.js.org",
"keywords": [
"abstract",
"ast",
Expand All @@ -19,47 +38,40 @@
"tree",
"unified"
],
"homepage": "https://remark.js.org",
"license": "MIT",
"name": "remark-stringify",
"repository": "https://github.com/remarkjs/remark/tree/main/packages/remark-stringify",
"bugs": "https://github.com/remarkjs/remark/issues",
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/unified"
},
"author": "Titus Wormer <[email protected]> (https://wooorm.com)",
"contributors": [
"Titus Wormer <[email protected]> (https://wooorm.com)",
"Eugene Sharygin <[email protected]>"
],
"sideEffects": false,
"type": "module",
"exports": "./index.js",
"files": [
"lib/",
"index.d.ts",
"index.js"
],
"dependencies": {
"@types/mdast": "^4.0.0",
"mdast-util-to-markdown": "^2.0.0",
"unified": "^11.0.0"
},
"scripts": {},
"sideEffects": false,
"typeCoverage": {
"atLeast": 100,
"detail": true,
"ignoreCatch": true,
"strict": true
},
"type": "module",
"version": "11.0.0",
"xo": {
"overrides": [
{
"files": [
"**/*.ts"
"**/*.d.ts"
],
"rules": {
"@typescript-eslint/ban-types": "off",
"@typescript-eslint/consistent-type-definitions": "off"
"@typescript-eslint/array-type": [
"error",
{
"default": "generic"
}
],
"@typescript-eslint/ban-types": [
"error",
{
"extendDefaults": true
}
],
"@typescript-eslint/consistent-type-definitions": [
"error",
"interface"
]
}
}
],
Expand Down
Loading

0 comments on commit 360840f

Please sign in to comment.