From 69947844f42e618f336aeeb9af1d6c9f4ee1e82b Mon Sep 17 00:00:00 2001 From: "Xunnamius (Romulus)" Date: Sat, 28 Jan 2023 21:50:16 -0800 Subject: [PATCH] build: stabilize build process --- babel.config.js | 51 +++++++++++++------ package.json | 4 +- packages/mdast-util-hidden/package.json | 24 ++++----- .../mdast-util-hidden/tsconfig.types.json | 2 +- .../mdast-util-tight-comments/package.json | 24 ++++----- .../tsconfig.types.json | 2 +- .../remark-capitalize-headings/package.json | 24 ++++----- .../tsconfig.types.json | 2 +- packages/remark-ignore/package.json | 40 +++++++-------- packages/remark-ignore/src/end.ts | 2 +- packages/remark-ignore/src/start.ts | 2 +- packages/remark-ignore/tsconfig.types.json | 2 +- .../package.json | 24 ++++----- .../src/index.ts | 2 +- .../tsconfig.types.json | 2 +- .../package.json | 24 ++++----- .../tsconfig.types.json | 2 +- .../remark-lint-list-item-style/package.json | 24 ++++----- .../remark-lint-list-item-style/src/index.ts | 4 +- .../tsconfig.types.json | 2 +- .../package.json | 24 ++++----- .../tsconfig.types.json | 2 +- .../package.json | 24 ++++----- .../tsconfig.types.json | 2 +- .../remark-renumber-references/package.json | 24 ++++----- .../remark-renumber-references/src/index.ts | 2 +- .../tsconfig.types.json | 2 +- packages/remark-sort-definitions/package.json | 24 ++++----- .../tsconfig.types.json | 2 +- packages/remark-tight-comments/package.json | 24 ++++----- packages/remark-tight-comments/src/index.ts | 2 +- .../remark-tight-comments/tsconfig.types.json | 2 +- 32 files changed, 196 insertions(+), 201 deletions(-) diff --git a/babel.config.js b/babel.config.js index 57ab42e..4db0099 100644 --- a/babel.config.js +++ b/babel.config.js @@ -21,17 +21,19 @@ const generateProductionEsmConfigObject = (mutateConfigFunction) => { // ? We don't care about minification ], plugins: [ - /* // ? Ensure all local imports without extensions now end in .mjs - ['add-import-extension', { extension: 'mjs' }], - // ? Fix ESM relative local imports referencing package.json [ - 'transform-rename-import', + 'transform-rewrite-imports', { - replacements: [ - { original: '../package.json', replacement: `../../package.json` } - ] + // ? Ensure all local imports without extensions now end in .mjs + appendExtension: '.mjs', + replaceExtensions: { + // ? Ensure built distributables can locate the package.json file + '^../package.json$': '../../package.json', + // ? Replace pkgverse imports with their runtime equivalents + '^pkgverse/([^/]+)/src/index$': '$1' + } } - ] */ + ] ] }; @@ -44,9 +46,15 @@ const generateProductionEsmConfigObject = (mutateConfigFunction) => { debug('NODE_ENV: %O', process.env.NODE_ENV); +/** + * @type {import('@babel/core').TransformOptions} + */ module.exports = { comments: false, parserOpts: { strictMode: true }, + assumptions: { + constantReexports: true + }, plugins: [ '@babel/plugin-proposal-export-default-from', [ @@ -100,19 +108,30 @@ module.exports = { ], ['@babel/preset-typescript', { allowDeclareFields: true }] // ? Minification is handled externally (e.g. by webpack) - ] /* , - plugins: [ - // ? Interoperable named CJS imports for free - [ - 'transform-default-named-imports', - { exclude: [/^next([/?#].+)?/, /^mongodb([/?#].+)?/] } - ] - ] */ + ] }, // * Used by `npm run build` for compiling ESM to code output in ./dist 'production-esm': generateProductionEsmConfigObject((config) => { config.presets[0][1].targets = NODE_LTS; }), + // * Used by `npm run build` for fixing declaration file imports in ./dist + 'production-types': { + comments: true, + plugins: [ + ['@babel/plugin-syntax-typescript', { dts: true }], + [ + 'transform-rewrite-imports', + { + replaceExtensions: { + // ? Ensure deep package.json imports resolve properly + '^../../../package.json$': '../../package.json', + // ? Ensure deep imports resolve properly + '^../../../(.*)$': '../$1' + } + } + ] + ] + }, // * Used by `npm run build-externals` for compiling to ESM code output in // * ./external-scripts/bin 'production-external': generateProductionEsmConfigObject((config) => { diff --git a/package.json b/package.json index d9b5ea1..dee4f4a 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "repository": { "type": "git", "url": "https://github.com/Xunnamius/unified-utils", - "lens": "next" + "lens": "lib-esm" }, "license": "MIT", "workspaces": [ @@ -15,7 +15,7 @@ "__test:repeat:all": "echo 'Repeating test suite [initializing]...'; (i=0; while [ \"$((( i += 1 ) <= 100 ))\" -ne 0 ]; do sleep 0.1 && echo \"\\r\\033[1A\\033[0KRepeating test suite [run $i/100]...\" && JEST_SILENT_REPORTER_SHOW_WARNINGS=true NODE_ENV=test jest --reporters=jest-silent-reporter || exit; done) && echo \"All tests passed! Congrats!\"", "__test:repeat:unit": "echo 'Repeating test suite [initializing]...'; (i=0; while [ \"$((( i += 1 ) <= 100 ))\" -ne 0 ]; do sleep 0.1 && echo \"\\r\\033[1A\\033[0KRepeating test suite [run $i/100]...\" && JEST_SILENT_REPORTER_SHOW_WARNINGS=true NODE_ENV=test jest --reporters=jest-silent-reporter --testPathIgnorePatterns test/integration-*.test.ts dist || exit; done) && echo \"All tests passed! Congrats!\"", "clean": "git ls-files --exclude-standard --ignored --others --directory | grep -vE '^((\\.(env|vscode|husky))|next-env\\.d\\.ts|node_modules)($|\\/)' | xargs -p rm -rf", - "format": "MD_FILES=$(node -e 'console.log(require(`glob-gitignore`).sync(`**/*.md`, { ignore: require(`fs`).readFileSync(`.prettierignore`, `utf8`).split(`\n`).filter(Boolean), dot: true }).join(`\n`))') && (echo $MD_FILES | xargs remark --no-config --no-stdout --quiet --frail --use gfm --use lint-no-undefined-references || (echo -n '\u001b' && echo '[37;41;1m FAIL \u001b[0m cannot continue with undefined references present' && false)) && sort-package-json './package.json' './packages/*/package.json' && echo $MD_FILES | NODE_ENV=format xargs remark --output --frail && echo $MD_FILES | xargs doctoc --no-title --maxlevel 3 --update-only && echo $MD_FILES | xargs prettier --write", + "format": "MD_FILES=$(node -e 'console.log(require(`glob-gitignore`).sync(`**/*.md`, { ignore: require(`fs`).readFileSync(`.prettierignore`, `utf8`).split(`\n`).filter(Boolean), dot: true }).join(`\n`))') && (echo $MD_FILES | xargs remark --no-config --no-stdout --quiet --frail --use gfm --use lint-no-undefined-references || (echo -n '\u001b' && echo '[37;41;1m FAIL \u001b[0m cannot continue with undefined references present' && false)) && sort-package-json './package.json' './packages/*/package.json' && echo $MD_FILES | NODE_ENV=format xargs remark --output --frail && echo $MD_FILES | xargs doctoc --no-title --maxlevel 3 --update-only && prettier --write .", "lint": "stdbuf -i0 -o0 -e0 tsc --project tsconfig.lint.json; X=$?; stdbuf -i0 -o0 -e0 eslint --parser-options=project:tsconfig.lint.json --no-error-on-unmatched-pattern packages src; Y=$?; MD_FILES=$(node -e 'console.log(require(`glob-gitignore`).sync(`**/*.md`, { ignore: require(`fs`).readFileSync(`.prettierignore`, `utf8`).split(`\n`).filter(Boolean), dot: true }).join(`\n`))') && echo $MD_FILES | NODE_ENV=lint xargs remark --quiet --frail --no-stdout; Z=$?; [ $X -eq 0 ] && [ $Y -eq 0 ] && [ $Z -eq 0 ]", "lint:all": "stdbuf -i0 -o0 -e0 tsc --project tsconfig.eslint.json; X=$?; stdbuf -i0 -o0 -e0 eslint --parser-options=project:tsconfig.eslint.json .; Y=$?; MD_FILES=$(node -e 'console.log(require(`glob-gitignore`).sync(`**/*.md`, { ignore: require(`fs`).readFileSync(`.prettierignore`, `utf8`).split(`\n`).filter(Boolean), dot: true }).join(`\n`))') && echo $MD_FILES | NODE_ENV=lint xargs remark --quiet --frail --no-stdout; Z=$?; [ $X -eq 0 ] && [ $Y -eq 0 ] && [ $Z -eq 0 ]", "list-tasks": "node -e 'console.log(Object.keys(require(\"./package.json\").scripts).join(\"\\n\"))' && npm run -ws list-tasks --if-present", diff --git a/packages/mdast-util-hidden/package.json b/packages/mdast-util-hidden/package.json index 4033401..bf81ca6 100644 --- a/packages/mdast-util-hidden/package.json +++ b/packages/mdast-util-hidden/package.json @@ -28,9 +28,9 @@ "type": "commonjs", "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./dist/index.mjs", - "default": "./dist/index.mjs" + "types": "./dist/src/index.d.ts", + "node": "./dist/src/index.mjs", + "default": "./dist/src/index.mjs" }, "./package": "./package.json", "./package.json": "./package.json" @@ -38,7 +38,7 @@ "typesVersions": { "*": { "*": [ - "./dist/index.d.ts" + "./dist/src/index.d.ts" ] } }, @@ -51,8 +51,8 @@ "scripts": { "build": "npm run build:dist --", "build:changelog": "conventional-changelog --outfile CHANGELOG.md --config ../../conventional.config.js --release-count 0 --skip-unstable && (if [ \"$CHANGELOG_SKIP_TITLE\" != 'true' ]; then { node -e 'console.log(require(\"../../conventional.config.js\").changelogTitle)'; cat CHANGELOG.md; } > CHANGELOG.md.ignore && mv CHANGELOG.md.ignore CHANGELOG.md; fi) && NODE_ENV=format remark --output --frail CHANGELOG.md && prettier --write CHANGELOG.md", - "build:dist": "NODE_ENV=production tsc --project tsconfig.types.json --incremental false && tsconfig-replace-paths --project tsconfig.types.json && NODE_ENV=production-esm babel src --extensions .ts --out-dir dist --out-file-extension .mjs --root-mode upward", - "build:docs": "if [ -r ./next.config.js ]; then typedoc --plugin typedoc-plugin-markdown --cleanOutputDir --tsconfig tsconfig.docs.json --out docs --readme none lib src test types external-scripts --exclude '**/*.test.*' --exclude external-scripts/bin; else ENTRY=`node -e 'const entry = require(\"./package.json\").config?.[\"plugin-build\"]?.docs?.entry; if(!entry) throw new Error(\"\\\"config['\"'\"'plugin-build'\"'\"'].docs.entry\\\" field is not defined in package.json\"); console.log(entry)'` && echo 'Entry file:' \"$ENTRY\" && typedoc --plugin typedoc-plugin-markdown --cleanOutputDir --tsconfig tsconfig.docs.json --out docs --readme none $(echo $ENTRY); fi", + "build:dist": "echo '> Generating types...' && NODE_ENV=production tsc --project tsconfig.types.json --incremental false && tsconfig-replace-paths --project tsconfig.types.json && echo '> Building distributables...' && NODE_ENV=production-esm babel src --extensions .ts --out-dir dist/src --out-file-extension .mjs --root-mode upward && echo '> Organizing types...' && cp --recursive --link --force --target-directory=dist dist/$(realpath --relative-base=../.. .)/* && rm --recursive --force dist/$(realpath --relative-base=../.. ..) && echo '> Refactoring types...' && NODE_ENV=production-types npx babel dist --extensions .ts --only '**/*.d.ts' --out-dir dist --keep-file-extension --root-mode upward", + "build:docs": "if [ -r ./next.config.js ]; then typedoc --plugin typedoc-plugin-markdown --cleanOutputDir --tsconfig tsconfig.docs.json --out docs --readme none lib src test types external-scripts --exclude '**/*.test.*' --exclude external-scripts/bin; else ENTRY=`node -e 'const entry = require(\"./package.json\").project?.documentation?.entry; if(!entry) throw new Error(\"\\\"project.documentation.entry\\\" field is not defined in package.json\"); console.log(entry)'` && echo 'Entry file:' \"$ENTRY\" && typedoc --plugin typedoc-plugin-markdown --cleanOutputDir --tsconfig tsconfig.docs.json --out docs --readme none $(echo $ENTRY); fi", "clean": "git ls-files --exclude-standard --ignored --others --directory | grep -vE '^((\\.(env|vscode|husky))|next-env\\.d\\.ts|node_modules)($|\\/)' | xargs -p rm -rf", "format": "cd ../.. && npm run format", "lint": "echo 'IMPLEMENT ME'", @@ -61,13 +61,6 @@ "test:integration": "echo 'IMPLEMENT ME'", "test:unit": "echo 'IMPLEMENT ME'" }, - "config": { - "plugin-build": { - "docs": { - "entry": "./src/*" - } - } - }, "dependencies": { "@types/mdast": "^3.0.10", "@types/unist": "^2.0.6", @@ -79,5 +72,10 @@ }, "publishConfig": { "access": "public" + }, + "project": { + "documentation": { + "entry": "./src/*" + } } } diff --git a/packages/mdast-util-hidden/tsconfig.types.json b/packages/mdast-util-hidden/tsconfig.types.json index c5793eb..f314bc8 100644 --- a/packages/mdast-util-hidden/tsconfig.types.json +++ b/packages/mdast-util-hidden/tsconfig.types.json @@ -6,7 +6,7 @@ "isolatedModules": false, "noEmit": false, "outDir": "dist", - "rootDir": "./src" + "rootDir": "../../" }, "extends": "../../tsconfig.json", "include": ["../../types/**/*", "src/**/*"] diff --git a/packages/mdast-util-tight-comments/package.json b/packages/mdast-util-tight-comments/package.json index 69713fb..5f4c9d5 100644 --- a/packages/mdast-util-tight-comments/package.json +++ b/packages/mdast-util-tight-comments/package.json @@ -32,9 +32,9 @@ "type": "commonjs", "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./dist/index.mjs", - "default": "./dist/index.mjs" + "types": "./dist/src/index.d.ts", + "node": "./dist/src/index.mjs", + "default": "./dist/src/index.mjs" }, "./package": "./package.json", "./package.json": "./package.json" @@ -42,7 +42,7 @@ "typesVersions": { "*": { "*": [ - "./dist/index.d.ts" + "./dist/src/index.d.ts" ] } }, @@ -55,8 +55,8 @@ "scripts": { "build": "npm run build:dist --", "build:changelog": "conventional-changelog --outfile CHANGELOG.md --config ../../conventional.config.js --release-count 0 --skip-unstable && (if [ \"$CHANGELOG_SKIP_TITLE\" != 'true' ]; then { node -e 'console.log(require(\"../../conventional.config.js\").changelogTitle)'; cat CHANGELOG.md; } > CHANGELOG.md.ignore && mv CHANGELOG.md.ignore CHANGELOG.md; fi) && NODE_ENV=format remark --output --frail CHANGELOG.md && prettier --write CHANGELOG.md", - "build:dist": "NODE_ENV=production tsc --project tsconfig.types.json --incremental false && tsconfig-replace-paths --project tsconfig.types.json && NODE_ENV=production-esm babel src --extensions .ts --out-dir dist --out-file-extension .mjs --root-mode upward", - "build:docs": "if [ -r ./next.config.js ]; then typedoc --plugin typedoc-plugin-markdown --cleanOutputDir --tsconfig tsconfig.docs.json --out docs --readme none lib src test types external-scripts --exclude '**/*.test.*' --exclude external-scripts/bin; else ENTRY=`node -e 'const entry = require(\"./package.json\").config?.[\"plugin-build\"]?.docs?.entry; if(!entry) throw new Error(\"\\\"config['\"'\"'plugin-build'\"'\"'].docs.entry\\\" field is not defined in package.json\"); console.log(entry)'` && echo 'Entry file:' \"$ENTRY\" && typedoc --plugin typedoc-plugin-markdown --cleanOutputDir --tsconfig tsconfig.docs.json --out docs --readme none $(echo $ENTRY); fi", + "build:dist": "echo '> Generating types...' && NODE_ENV=production tsc --project tsconfig.types.json --incremental false && tsconfig-replace-paths --project tsconfig.types.json && echo '> Building distributables...' && NODE_ENV=production-esm babel src --extensions .ts --out-dir dist/src --out-file-extension .mjs --root-mode upward && echo '> Organizing types...' && cp --recursive --link --force --target-directory=dist dist/$(realpath --relative-base=../.. .)/* && rm --recursive --force dist/$(realpath --relative-base=../.. ..) && echo '> Refactoring types...' && NODE_ENV=production-types npx babel dist --extensions .ts --only '**/*.d.ts' --out-dir dist --keep-file-extension --root-mode upward", + "build:docs": "if [ -r ./next.config.js ]; then typedoc --plugin typedoc-plugin-markdown --cleanOutputDir --tsconfig tsconfig.docs.json --out docs --readme none lib src test types external-scripts --exclude '**/*.test.*' --exclude external-scripts/bin; else ENTRY=`node -e 'const entry = require(\"./package.json\").project?.documentation?.entry; if(!entry) throw new Error(\"\\\"project.documentation.entry\\\" field is not defined in package.json\"); console.log(entry)'` && echo 'Entry file:' \"$ENTRY\" && typedoc --plugin typedoc-plugin-markdown --cleanOutputDir --tsconfig tsconfig.docs.json --out docs --readme none $(echo $ENTRY); fi", "clean": "git ls-files --exclude-standard --ignored --others --directory | grep -vE '^((\\.(env|vscode|husky))|next-env\\.d\\.ts|node_modules)($|\\/)' | xargs -p rm -rf", "format": "cd ../.. && npm run format", "lint": "echo 'IMPLEMENT ME'", @@ -65,13 +65,6 @@ "test:integration": "echo 'IMPLEMENT ME'", "test:unit": "echo 'IMPLEMENT ME'" }, - "config": { - "plugin-build": { - "docs": { - "entry": "./src/*" - } - } - }, "dependencies": { "mdast-util-to-markdown": "^1.5.0" }, @@ -80,5 +73,10 @@ }, "publishConfig": { "access": "public" + }, + "project": { + "documentation": { + "entry": "./src/*" + } } } diff --git a/packages/mdast-util-tight-comments/tsconfig.types.json b/packages/mdast-util-tight-comments/tsconfig.types.json index c5793eb..f314bc8 100644 --- a/packages/mdast-util-tight-comments/tsconfig.types.json +++ b/packages/mdast-util-tight-comments/tsconfig.types.json @@ -6,7 +6,7 @@ "isolatedModules": false, "noEmit": false, "outDir": "dist", - "rootDir": "./src" + "rootDir": "../../" }, "extends": "../../tsconfig.json", "include": ["../../types/**/*", "src/**/*"] diff --git a/packages/remark-capitalize-headings/package.json b/packages/remark-capitalize-headings/package.json index d27d821..55c51e9 100644 --- a/packages/remark-capitalize-headings/package.json +++ b/packages/remark-capitalize-headings/package.json @@ -27,9 +27,9 @@ "type": "commonjs", "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./dist/index.mjs", - "default": "./dist/index.mjs" + "types": "./dist/src/index.d.ts", + "node": "./dist/src/index.mjs", + "default": "./dist/src/index.mjs" }, "./package": "./package.json", "./package.json": "./package.json" @@ -37,7 +37,7 @@ "typesVersions": { "*": { "*": [ - "./dist/index.d.ts" + "./dist/src/index.d.ts" ] } }, @@ -50,8 +50,8 @@ "scripts": { "build": "npm run build:dist --", "build:changelog": "conventional-changelog --outfile CHANGELOG.md --config ../../conventional.config.js --release-count 0 --skip-unstable && (if [ \"$CHANGELOG_SKIP_TITLE\" != 'true' ]; then { node -e 'console.log(require(\"../../conventional.config.js\").changelogTitle)'; cat CHANGELOG.md; } > CHANGELOG.md.ignore && mv CHANGELOG.md.ignore CHANGELOG.md; fi) && NODE_ENV=format remark --output --frail CHANGELOG.md && prettier --write CHANGELOG.md", - "build:dist": "NODE_ENV=production tsc --project tsconfig.types.json --incremental false && tsconfig-replace-paths --project tsconfig.types.json && NODE_ENV=production-esm babel src --extensions .ts --out-dir dist --out-file-extension .mjs --root-mode upward", - "build:docs": "if [ -r ./next.config.js ]; then typedoc --plugin typedoc-plugin-markdown --cleanOutputDir --tsconfig tsconfig.docs.json --out docs --readme none lib src test types external-scripts --exclude '**/*.test.*' --exclude external-scripts/bin; else ENTRY=`node -e 'const entry = require(\"./package.json\").config?.[\"plugin-build\"]?.docs?.entry; if(!entry) throw new Error(\"\\\"config['\"'\"'plugin-build'\"'\"'].docs.entry\\\" field is not defined in package.json\"); console.log(entry)'` && echo 'Entry file:' \"$ENTRY\" && typedoc --plugin typedoc-plugin-markdown --cleanOutputDir --tsconfig tsconfig.docs.json --out docs --readme none $(echo $ENTRY); fi", + "build:dist": "echo '> Generating types...' && NODE_ENV=production tsc --project tsconfig.types.json --incremental false && tsconfig-replace-paths --project tsconfig.types.json && echo '> Building distributables...' && NODE_ENV=production-esm babel src --extensions .ts --out-dir dist/src --out-file-extension .mjs --root-mode upward && echo '> Organizing types...' && cp --recursive --link --force --target-directory=dist dist/$(realpath --relative-base=../.. .)/* && rm --recursive --force dist/$(realpath --relative-base=../.. ..) && echo '> Refactoring types...' && NODE_ENV=production-types npx babel dist --extensions .ts --only '**/*.d.ts' --out-dir dist --keep-file-extension --root-mode upward", + "build:docs": "if [ -r ./next.config.js ]; then typedoc --plugin typedoc-plugin-markdown --cleanOutputDir --tsconfig tsconfig.docs.json --out docs --readme none lib src test types external-scripts --exclude '**/*.test.*' --exclude external-scripts/bin; else ENTRY=`node -e 'const entry = require(\"./package.json\").project?.documentation?.entry; if(!entry) throw new Error(\"\\\"project.documentation.entry\\\" field is not defined in package.json\"); console.log(entry)'` && echo 'Entry file:' \"$ENTRY\" && typedoc --plugin typedoc-plugin-markdown --cleanOutputDir --tsconfig tsconfig.docs.json --out docs --readme none $(echo $ENTRY); fi", "clean": "git ls-files --exclude-standard --ignored --others --directory | grep -vE '^((\\.(env|vscode|husky))|next-env\\.d\\.ts|node_modules)($|\\/)' | xargs -p rm -rf", "format": "cd ../.. && npm run format", "lint": "echo 'IMPLEMENT ME'", @@ -60,13 +60,6 @@ "test:integration": "echo 'IMPLEMENT ME'", "test:unit": "echo 'IMPLEMENT ME'" }, - "config": { - "plugin-build": { - "docs": { - "entry": "./src/*" - } - } - }, "dependencies": { "@types/mdast": "^3.0.10", "mdast-util-to-string": "^3.1.1", @@ -79,5 +72,10 @@ }, "publishConfig": { "access": "public" + }, + "project": { + "documentation": { + "entry": "./src/*" + } } } diff --git a/packages/remark-capitalize-headings/tsconfig.types.json b/packages/remark-capitalize-headings/tsconfig.types.json index c5793eb..f314bc8 100644 --- a/packages/remark-capitalize-headings/tsconfig.types.json +++ b/packages/remark-capitalize-headings/tsconfig.types.json @@ -6,7 +6,7 @@ "isolatedModules": false, "noEmit": false, "outDir": "dist", - "rootDir": "./src" + "rootDir": "../../" }, "extends": "../../tsconfig.json", "include": ["../../types/**/*", "src/**/*"] diff --git a/packages/remark-ignore/package.json b/packages/remark-ignore/package.json index 69671c4..e2ea781 100644 --- a/packages/remark-ignore/package.json +++ b/packages/remark-ignore/package.json @@ -27,19 +27,19 @@ "type": "commonjs", "exports": { "./start": { - "types": "./dist/start.d.ts", - "node": "./dist/start.mjs", - "default": "./dist/start.mjs" + "types": "./dist/src/start.d.ts", + "node": "./dist/src/start.mjs", + "default": "./dist/src/start.mjs" }, "./end": { - "types": "./dist/end.d.ts", - "node": "./dist/end.mjs", - "default": "./dist/end.mjs" + "types": "./dist/src/end.d.ts", + "node": "./dist/src/end.mjs", + "default": "./dist/src/end.mjs" }, ".": { - "types": "./dist/index.d.ts", - "node": "./dist/index.mjs", - "default": "./dist/index.mjs" + "types": "./dist/src/index.d.ts", + "node": "./dist/src/index.mjs", + "default": "./dist/src/index.mjs" }, "./package": "./package.json", "./package.json": "./package.json" @@ -47,13 +47,13 @@ "typesVersions": { "*": { "start": [ - "./dist/start.d.ts" + "./dist/src/start.d.ts" ], "end": [ - "./dist/end.d.ts" + "./dist/src/end.d.ts" ], "*": [ - "./dist/index.d.ts" + "./dist/src/index.d.ts" ] } }, @@ -66,8 +66,8 @@ "scripts": { "build": "npm run build:dist --", "build:changelog": "conventional-changelog --outfile CHANGELOG.md --config ../../conventional.config.js --release-count 0 --skip-unstable && (if [ \"$CHANGELOG_SKIP_TITLE\" != 'true' ]; then { node -e 'console.log(require(\"../../conventional.config.js\").changelogTitle)'; cat CHANGELOG.md; } > CHANGELOG.md.ignore && mv CHANGELOG.md.ignore CHANGELOG.md; fi) && NODE_ENV=format remark --output --frail CHANGELOG.md && prettier --write CHANGELOG.md", - "build:dist": "NODE_ENV=production tsc --project tsconfig.types.json --incremental false && tsconfig-replace-paths --project tsconfig.types.json && NODE_ENV=production-esm babel src --extensions .ts --out-dir dist --out-file-extension .mjs --root-mode upward", - "build:docs": "if [ -r ./next.config.js ]; then typedoc --plugin typedoc-plugin-markdown --cleanOutputDir --tsconfig tsconfig.docs.json --out docs --readme none lib src test types external-scripts --exclude '**/*.test.*' --exclude external-scripts/bin; else ENTRY=`node -e 'const entry = require(\"./package.json\").config?.[\"plugin-build\"]?.docs?.entry; if(!entry) throw new Error(\"\\\"config['\"'\"'plugin-build'\"'\"'].docs.entry\\\" field is not defined in package.json\"); console.log(entry)'` && echo 'Entry file:' \"$ENTRY\" && typedoc --plugin typedoc-plugin-markdown --cleanOutputDir --tsconfig tsconfig.docs.json --out docs --readme none $(echo $ENTRY); fi", + "build:dist": "echo '> Generating types...' && NODE_ENV=production tsc --project tsconfig.types.json --incremental false && tsconfig-replace-paths --project tsconfig.types.json && echo '> Building distributables...' && NODE_ENV=production-esm babel src --extensions .ts --out-dir dist/src --out-file-extension .mjs --root-mode upward && echo '> Organizing types...' && cp --recursive --link --force --target-directory=dist dist/$(realpath --relative-base=../.. .)/* && rm --recursive --force dist/$(realpath --relative-base=../.. ..) && echo '> Refactoring types...' && NODE_ENV=production-types npx babel dist --extensions .ts --only '**/*.d.ts' --out-dir dist --keep-file-extension --root-mode upward", + "build:docs": "if [ -r ./next.config.js ]; then typedoc --plugin typedoc-plugin-markdown --cleanOutputDir --tsconfig tsconfig.docs.json --out docs --readme none lib src test types external-scripts --exclude '**/*.test.*' --exclude external-scripts/bin; else ENTRY=`node -e 'const entry = require(\"./package.json\").project?.documentation?.entry; if(!entry) throw new Error(\"\\\"project.documentation.entry\\\" field is not defined in package.json\"); console.log(entry)'` && echo 'Entry file:' \"$ENTRY\" && typedoc --plugin typedoc-plugin-markdown --cleanOutputDir --tsconfig tsconfig.docs.json --out docs --readme none $(echo $ENTRY); fi", "clean": "git ls-files --exclude-standard --ignored --others --directory | grep -vE '^((\\.(env|vscode|husky))|next-env\\.d\\.ts|node_modules)($|\\/)' | xargs -p rm -rf", "format": "cd ../.. && npm run format", "lint": "echo 'IMPLEMENT ME'", @@ -76,13 +76,6 @@ "test:integration": "echo 'IMPLEMENT ME'", "test:unit": "echo 'IMPLEMENT ME'" }, - "config": { - "plugin-build": { - "docs": { - "entry": "./src/*" - } - } - }, "dependencies": { "@types/mdast": "^3.0.10", "mdast-comment-marker": "^2.1.1", @@ -95,5 +88,10 @@ }, "publishConfig": { "access": "public" + }, + "project": { + "documentation": { + "entry": "./src/*" + } } } diff --git a/packages/remark-ignore/src/end.ts b/packages/remark-ignore/src/end.ts index eea1d73..c5c7bd8 100644 --- a/packages/remark-ignore/src/end.ts +++ b/packages/remark-ignore/src/end.ts @@ -1,4 +1,4 @@ -import { visitAndReveal } from 'mdast-util-hidden'; +import { visitAndReveal } from 'pkgverse/mdast-util-hidden/src/index'; import type { Plugin } from 'unified'; import type { Root } from 'mdast'; diff --git a/packages/remark-ignore/src/start.ts b/packages/remark-ignore/src/start.ts index c2e304b..c5a962e 100644 --- a/packages/remark-ignore/src/start.ts +++ b/packages/remark-ignore/src/start.ts @@ -1,4 +1,4 @@ -import { hide } from 'mdast-util-hidden'; +import { hide } from 'pkgverse/mdast-util-hidden/src/index'; import { commentMarker } from 'mdast-comment-marker'; import { visit, SKIP } from 'unist-util-visit'; diff --git a/packages/remark-ignore/tsconfig.types.json b/packages/remark-ignore/tsconfig.types.json index c5793eb..f314bc8 100644 --- a/packages/remark-ignore/tsconfig.types.json +++ b/packages/remark-ignore/tsconfig.types.json @@ -6,7 +6,7 @@ "isolatedModules": false, "noEmit": false, "outDir": "dist", - "rootDir": "./src" + "rootDir": "../../" }, "extends": "../../tsconfig.json", "include": ["../../types/**/*", "src/**/*"] diff --git a/packages/remark-lint-fenced-code-flag-case/package.json b/packages/remark-lint-fenced-code-flag-case/package.json index 0b19b33..6f616f3 100644 --- a/packages/remark-lint-fenced-code-flag-case/package.json +++ b/packages/remark-lint-fenced-code-flag-case/package.json @@ -30,9 +30,9 @@ "type": "commonjs", "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./dist/index.mjs", - "default": "./dist/index.mjs" + "types": "./dist/src/index.d.ts", + "node": "./dist/src/index.mjs", + "default": "./dist/src/index.mjs" }, "./package": "./package.json", "./package.json": "./package.json" @@ -40,7 +40,7 @@ "typesVersions": { "*": { "*": [ - "./dist/index.d.ts" + "./dist/src/index.d.ts" ] } }, @@ -53,8 +53,8 @@ "scripts": { "build": "npm run build:dist --", "build:changelog": "conventional-changelog --outfile CHANGELOG.md --config ../../conventional.config.js --release-count 0 --skip-unstable && (if [ \"$CHANGELOG_SKIP_TITLE\" != 'true' ]; then { node -e 'console.log(require(\"../../conventional.config.js\").changelogTitle)'; cat CHANGELOG.md; } > CHANGELOG.md.ignore && mv CHANGELOG.md.ignore CHANGELOG.md; fi) && NODE_ENV=format remark --output --frail CHANGELOG.md && prettier --write CHANGELOG.md", - "build:dist": "NODE_ENV=production tsc --project tsconfig.types.json --incremental false && tsconfig-replace-paths --project tsconfig.types.json && NODE_ENV=production-esm babel src --extensions .ts --out-dir dist --out-file-extension .mjs --root-mode upward", - "build:docs": "if [ -r ./next.config.js ]; then typedoc --plugin typedoc-plugin-markdown --cleanOutputDir --tsconfig tsconfig.docs.json --out docs --readme none lib src test types external-scripts --exclude '**/*.test.*' --exclude external-scripts/bin; else ENTRY=`node -e 'const entry = require(\"./package.json\").config?.[\"plugin-build\"]?.docs?.entry; if(!entry) throw new Error(\"\\\"config['\"'\"'plugin-build'\"'\"'].docs.entry\\\" field is not defined in package.json\"); console.log(entry)'` && echo 'Entry file:' \"$ENTRY\" && typedoc --plugin typedoc-plugin-markdown --cleanOutputDir --tsconfig tsconfig.docs.json --out docs --readme none $(echo $ENTRY); fi", + "build:dist": "echo '> Generating types...' && NODE_ENV=production tsc --project tsconfig.types.json --incremental false && tsconfig-replace-paths --project tsconfig.types.json && echo '> Building distributables...' && NODE_ENV=production-esm babel src --extensions .ts --out-dir dist/src --out-file-extension .mjs --root-mode upward && echo '> Organizing types...' && cp --recursive --link --force --target-directory=dist dist/$(realpath --relative-base=../.. .)/* && rm --recursive --force dist/$(realpath --relative-base=../.. ..) && echo '> Refactoring types...' && NODE_ENV=production-types npx babel dist --extensions .ts --only '**/*.d.ts' --out-dir dist --keep-file-extension --root-mode upward", + "build:docs": "if [ -r ./next.config.js ]; then typedoc --plugin typedoc-plugin-markdown --cleanOutputDir --tsconfig tsconfig.docs.json --out docs --readme none lib src test types external-scripts --exclude '**/*.test.*' --exclude external-scripts/bin; else ENTRY=`node -e 'const entry = require(\"./package.json\").project?.documentation?.entry; if(!entry) throw new Error(\"\\\"project.documentation.entry\\\" field is not defined in package.json\"); console.log(entry)'` && echo 'Entry file:' \"$ENTRY\" && typedoc --plugin typedoc-plugin-markdown --cleanOutputDir --tsconfig tsconfig.docs.json --out docs --readme none $(echo $ENTRY); fi", "clean": "git ls-files --exclude-standard --ignored --others --directory | grep -vE '^((\\.(env|vscode|husky))|next-env\\.d\\.ts|node_modules)($|\\/)' | xargs -p rm -rf", "format": "cd ../.. && npm run format", "lint": "echo 'IMPLEMENT ME'", @@ -63,13 +63,6 @@ "test:integration": "echo 'IMPLEMENT ME'", "test:unit": "echo 'IMPLEMENT ME'" }, - "config": { - "plugin-build": { - "docs": { - "entry": "./src/*" - } - } - }, "dependencies": { "unified-lint-rule": "^2.1.1", "unist-util-generated": "^2.0.1", @@ -80,5 +73,10 @@ }, "publishConfig": { "access": "public" + }, + "project": { + "documentation": { + "entry": "./src/*" + } } } diff --git a/packages/remark-lint-fenced-code-flag-case/src/index.ts b/packages/remark-lint-fenced-code-flag-case/src/index.ts index 64ba8ec..7be7a7f 100644 --- a/packages/remark-lint-fenced-code-flag-case/src/index.ts +++ b/packages/remark-lint-fenced-code-flag-case/src/index.ts @@ -21,7 +21,7 @@ export type Options = { * * @default "lower" */ - case?: typeof optionsCases[number]; + case?: (typeof optionsCases)[number]; }; /** diff --git a/packages/remark-lint-fenced-code-flag-case/tsconfig.types.json b/packages/remark-lint-fenced-code-flag-case/tsconfig.types.json index c5793eb..f314bc8 100644 --- a/packages/remark-lint-fenced-code-flag-case/tsconfig.types.json +++ b/packages/remark-lint-fenced-code-flag-case/tsconfig.types.json @@ -6,7 +6,7 @@ "isolatedModules": false, "noEmit": false, "outDir": "dist", - "rootDir": "./src" + "rootDir": "../../" }, "extends": "../../tsconfig.json", "include": ["../../types/**/*", "src/**/*"] diff --git a/packages/remark-lint-heading-word-length/package.json b/packages/remark-lint-heading-word-length/package.json index e0cece6..64eedb6 100644 --- a/packages/remark-lint-heading-word-length/package.json +++ b/packages/remark-lint-heading-word-length/package.json @@ -29,9 +29,9 @@ "type": "commonjs", "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./dist/index.mjs", - "default": "./dist/index.mjs" + "types": "./dist/src/index.d.ts", + "node": "./dist/src/index.mjs", + "default": "./dist/src/index.mjs" }, "./package": "./package.json", "./package.json": "./package.json" @@ -39,7 +39,7 @@ "typesVersions": { "*": { "*": [ - "./dist/index.d.ts" + "./dist/src/index.d.ts" ] } }, @@ -52,8 +52,8 @@ "scripts": { "build": "npm run build:dist --", "build:changelog": "conventional-changelog --outfile CHANGELOG.md --config ../../conventional.config.js --release-count 0 --skip-unstable && (if [ \"$CHANGELOG_SKIP_TITLE\" != 'true' ]; then { node -e 'console.log(require(\"../../conventional.config.js\").changelogTitle)'; cat CHANGELOG.md; } > CHANGELOG.md.ignore && mv CHANGELOG.md.ignore CHANGELOG.md; fi) && NODE_ENV=format remark --output --frail CHANGELOG.md && prettier --write CHANGELOG.md", - "build:dist": "NODE_ENV=production tsc --project tsconfig.types.json --incremental false && tsconfig-replace-paths --project tsconfig.types.json && NODE_ENV=production-esm babel src --extensions .ts --out-dir dist --out-file-extension .mjs --root-mode upward", - "build:docs": "if [ -r ./next.config.js ]; then typedoc --plugin typedoc-plugin-markdown --cleanOutputDir --tsconfig tsconfig.docs.json --out docs --readme none lib src test types external-scripts --exclude '**/*.test.*' --exclude external-scripts/bin; else ENTRY=`node -e 'const entry = require(\"./package.json\").config?.[\"plugin-build\"]?.docs?.entry; if(!entry) throw new Error(\"\\\"config['\"'\"'plugin-build'\"'\"'].docs.entry\\\" field is not defined in package.json\"); console.log(entry)'` && echo 'Entry file:' \"$ENTRY\" && typedoc --plugin typedoc-plugin-markdown --cleanOutputDir --tsconfig tsconfig.docs.json --out docs --readme none $(echo $ENTRY); fi", + "build:dist": "echo '> Generating types...' && NODE_ENV=production tsc --project tsconfig.types.json --incremental false && tsconfig-replace-paths --project tsconfig.types.json && echo '> Building distributables...' && NODE_ENV=production-esm babel src --extensions .ts --out-dir dist/src --out-file-extension .mjs --root-mode upward && echo '> Organizing types...' && cp --recursive --link --force --target-directory=dist dist/$(realpath --relative-base=../.. .)/* && rm --recursive --force dist/$(realpath --relative-base=../.. ..) && echo '> Refactoring types...' && NODE_ENV=production-types npx babel dist --extensions .ts --only '**/*.d.ts' --out-dir dist --keep-file-extension --root-mode upward", + "build:docs": "if [ -r ./next.config.js ]; then typedoc --plugin typedoc-plugin-markdown --cleanOutputDir --tsconfig tsconfig.docs.json --out docs --readme none lib src test types external-scripts --exclude '**/*.test.*' --exclude external-scripts/bin; else ENTRY=`node -e 'const entry = require(\"./package.json\").project?.documentation?.entry; if(!entry) throw new Error(\"\\\"project.documentation.entry\\\" field is not defined in package.json\"); console.log(entry)'` && echo 'Entry file:' \"$ENTRY\" && typedoc --plugin typedoc-plugin-markdown --cleanOutputDir --tsconfig tsconfig.docs.json --out docs --readme none $(echo $ENTRY); fi", "clean": "git ls-files --exclude-standard --ignored --others --directory | grep -vE '^((\\.(env|vscode|husky))|next-env\\.d\\.ts|node_modules)($|\\/)' | xargs -p rm -rf", "format": "cd ../.. && npm run format", "lint": "echo 'IMPLEMENT ME'", @@ -62,13 +62,6 @@ "test:integration": "echo 'IMPLEMENT ME'", "test:unit": "echo 'IMPLEMENT ME'" }, - "config": { - "plugin-build": { - "docs": { - "entry": "./src/*" - } - } - }, "dependencies": { "mdast-util-to-string": "^3.1.1", "unified-lint-rule": "^2.1.1", @@ -80,5 +73,10 @@ }, "publishConfig": { "access": "public" + }, + "project": { + "documentation": { + "entry": "./src/*" + } } } diff --git a/packages/remark-lint-heading-word-length/tsconfig.types.json b/packages/remark-lint-heading-word-length/tsconfig.types.json index c5793eb..f314bc8 100644 --- a/packages/remark-lint-heading-word-length/tsconfig.types.json +++ b/packages/remark-lint-heading-word-length/tsconfig.types.json @@ -6,7 +6,7 @@ "isolatedModules": false, "noEmit": false, "outDir": "dist", - "rootDir": "./src" + "rootDir": "../../" }, "extends": "../../tsconfig.json", "include": ["../../types/**/*", "src/**/*"] diff --git a/packages/remark-lint-list-item-style/package.json b/packages/remark-lint-list-item-style/package.json index 28f5fab..f2a4da1 100644 --- a/packages/remark-lint-list-item-style/package.json +++ b/packages/remark-lint-list-item-style/package.json @@ -30,9 +30,9 @@ "type": "commonjs", "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./dist/index.mjs", - "default": "./dist/index.mjs" + "types": "./dist/src/index.d.ts", + "node": "./dist/src/index.mjs", + "default": "./dist/src/index.mjs" }, "./package": "./package.json", "./package.json": "./package.json" @@ -40,7 +40,7 @@ "typesVersions": { "*": { "*": [ - "./dist/index.d.ts" + "./dist/src/index.d.ts" ] } }, @@ -53,8 +53,8 @@ "scripts": { "build": "npm run build:dist --", "build:changelog": "conventional-changelog --outfile CHANGELOG.md --config ../../conventional.config.js --release-count 0 --skip-unstable && (if [ \"$CHANGELOG_SKIP_TITLE\" != 'true' ]; then { node -e 'console.log(require(\"../../conventional.config.js\").changelogTitle)'; cat CHANGELOG.md; } > CHANGELOG.md.ignore && mv CHANGELOG.md.ignore CHANGELOG.md; fi) && NODE_ENV=format remark --output --frail CHANGELOG.md && prettier --write CHANGELOG.md", - "build:dist": "NODE_ENV=production tsc --project tsconfig.types.json --incremental false && tsconfig-replace-paths --project tsconfig.types.json && NODE_ENV=production-esm babel src --extensions .ts --out-dir dist --out-file-extension .mjs --root-mode upward", - "build:docs": "if [ -r ./next.config.js ]; then typedoc --plugin typedoc-plugin-markdown --cleanOutputDir --tsconfig tsconfig.docs.json --out docs --readme none lib src test types external-scripts --exclude '**/*.test.*' --exclude external-scripts/bin; else ENTRY=`node -e 'const entry = require(\"./package.json\").config?.[\"plugin-build\"]?.docs?.entry; if(!entry) throw new Error(\"\\\"config['\"'\"'plugin-build'\"'\"'].docs.entry\\\" field is not defined in package.json\"); console.log(entry)'` && echo 'Entry file:' \"$ENTRY\" && typedoc --plugin typedoc-plugin-markdown --cleanOutputDir --tsconfig tsconfig.docs.json --out docs --readme none $(echo $ENTRY); fi", + "build:dist": "echo '> Generating types...' && NODE_ENV=production tsc --project tsconfig.types.json --incremental false && tsconfig-replace-paths --project tsconfig.types.json && echo '> Building distributables...' && NODE_ENV=production-esm babel src --extensions .ts --out-dir dist/src --out-file-extension .mjs --root-mode upward && echo '> Organizing types...' && cp --recursive --link --force --target-directory=dist dist/$(realpath --relative-base=../.. .)/* && rm --recursive --force dist/$(realpath --relative-base=../.. ..) && echo '> Refactoring types...' && NODE_ENV=production-types npx babel dist --extensions .ts --only '**/*.d.ts' --out-dir dist --keep-file-extension --root-mode upward", + "build:docs": "if [ -r ./next.config.js ]; then typedoc --plugin typedoc-plugin-markdown --cleanOutputDir --tsconfig tsconfig.docs.json --out docs --readme none lib src test types external-scripts --exclude '**/*.test.*' --exclude external-scripts/bin; else ENTRY=`node -e 'const entry = require(\"./package.json\").project?.documentation?.entry; if(!entry) throw new Error(\"\\\"project.documentation.entry\\\" field is not defined in package.json\"); console.log(entry)'` && echo 'Entry file:' \"$ENTRY\" && typedoc --plugin typedoc-plugin-markdown --cleanOutputDir --tsconfig tsconfig.docs.json --out docs --readme none $(echo $ENTRY); fi", "clean": "git ls-files --exclude-standard --ignored --others --directory | grep -vE '^((\\.(env|vscode|husky))|next-env\\.d\\.ts|node_modules)($|\\/)' | xargs -p rm -rf", "format": "cd ../.. && npm run format", "lint": "echo 'IMPLEMENT ME'", @@ -63,13 +63,6 @@ "test:integration": "echo 'IMPLEMENT ME'", "test:unit": "echo 'IMPLEMENT ME'" }, - "config": { - "plugin-build": { - "docs": { - "entry": "./src/*" - } - } - }, "dependencies": { "mdast-util-to-string": "^3.1.1", "unified-lint-rule": "^2.1.1", @@ -81,5 +74,10 @@ }, "publishConfig": { "access": "public" + }, + "project": { + "documentation": { + "entry": "./src/*" + } } } diff --git a/packages/remark-lint-list-item-style/src/index.ts b/packages/remark-lint-list-item-style/src/index.ts index ace5a89..4804170 100644 --- a/packages/remark-lint-list-item-style/src/index.ts +++ b/packages/remark-lint-list-item-style/src/index.ts @@ -50,7 +50,7 @@ export type Options = { * * @default "capitalize" */ - checkFirstWord?: typeof optionsCheckFirstWord[number]; + checkFirstWord?: (typeof optionsCheckFirstWord)[number]; /** * Words that would normally be checked with respect to the `checkFirstWord` * option will be ignored if they match at least one of the given values. @@ -66,7 +66,7 @@ export type Options = { * * @default "each" */ - checkListSpread?: typeof optionsCheckListSpread[number]; + checkListSpread?: (typeof optionsCheckListSpread)[number]; }; /** diff --git a/packages/remark-lint-list-item-style/tsconfig.types.json b/packages/remark-lint-list-item-style/tsconfig.types.json index c5793eb..f314bc8 100644 --- a/packages/remark-lint-list-item-style/tsconfig.types.json +++ b/packages/remark-lint-list-item-style/tsconfig.types.json @@ -6,7 +6,7 @@ "isolatedModules": false, "noEmit": false, "outDir": "dist", - "rootDir": "./src" + "rootDir": "../../" }, "extends": "../../tsconfig.json", "include": ["../../types/**/*", "src/**/*"] diff --git a/packages/remark-remove-unused-definitions/package.json b/packages/remark-remove-unused-definitions/package.json index 3e16c71..4751801 100644 --- a/packages/remark-remove-unused-definitions/package.json +++ b/packages/remark-remove-unused-definitions/package.json @@ -29,9 +29,9 @@ "type": "commonjs", "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./dist/index.mjs", - "default": "./dist/index.mjs" + "types": "./dist/src/index.d.ts", + "node": "./dist/src/index.mjs", + "default": "./dist/src/index.mjs" }, "./package": "./package.json", "./package.json": "./package.json" @@ -39,7 +39,7 @@ "typesVersions": { "*": { "*": [ - "./dist/index.d.ts" + "./dist/src/index.d.ts" ] } }, @@ -52,8 +52,8 @@ "scripts": { "build": "npm run build:dist --", "build:changelog": "conventional-changelog --outfile CHANGELOG.md --config ../../conventional.config.js --release-count 0 --skip-unstable && (if [ \"$CHANGELOG_SKIP_TITLE\" != 'true' ]; then { node -e 'console.log(require(\"../../conventional.config.js\").changelogTitle)'; cat CHANGELOG.md; } > CHANGELOG.md.ignore && mv CHANGELOG.md.ignore CHANGELOG.md; fi) && NODE_ENV=format remark --output --frail CHANGELOG.md && prettier --write CHANGELOG.md", - "build:dist": "NODE_ENV=production tsc --project tsconfig.types.json --incremental false && tsconfig-replace-paths --project tsconfig.types.json && NODE_ENV=production-esm babel src --extensions .ts --out-dir dist --out-file-extension .mjs --root-mode upward", - "build:docs": "if [ -r ./next.config.js ]; then typedoc --plugin typedoc-plugin-markdown --cleanOutputDir --tsconfig tsconfig.docs.json --out docs --readme none lib src test types external-scripts --exclude '**/*.test.*' --exclude external-scripts/bin; else ENTRY=`node -e 'const entry = require(\"./package.json\").config?.[\"plugin-build\"]?.docs?.entry; if(!entry) throw new Error(\"\\\"config['\"'\"'plugin-build'\"'\"'].docs.entry\\\" field is not defined in package.json\"); console.log(entry)'` && echo 'Entry file:' \"$ENTRY\" && typedoc --plugin typedoc-plugin-markdown --cleanOutputDir --tsconfig tsconfig.docs.json --out docs --readme none $(echo $ENTRY); fi", + "build:dist": "echo '> Generating types...' && NODE_ENV=production tsc --project tsconfig.types.json --incremental false && tsconfig-replace-paths --project tsconfig.types.json && echo '> Building distributables...' && NODE_ENV=production-esm babel src --extensions .ts --out-dir dist/src --out-file-extension .mjs --root-mode upward && echo '> Organizing types...' && cp --recursive --link --force --target-directory=dist dist/$(realpath --relative-base=../.. .)/* && rm --recursive --force dist/$(realpath --relative-base=../.. ..) && echo '> Refactoring types...' && NODE_ENV=production-types npx babel dist --extensions .ts --only '**/*.d.ts' --out-dir dist --keep-file-extension --root-mode upward", + "build:docs": "if [ -r ./next.config.js ]; then typedoc --plugin typedoc-plugin-markdown --cleanOutputDir --tsconfig tsconfig.docs.json --out docs --readme none lib src test types external-scripts --exclude '**/*.test.*' --exclude external-scripts/bin; else ENTRY=`node -e 'const entry = require(\"./package.json\").project?.documentation?.entry; if(!entry) throw new Error(\"\\\"project.documentation.entry\\\" field is not defined in package.json\"); console.log(entry)'` && echo 'Entry file:' \"$ENTRY\" && typedoc --plugin typedoc-plugin-markdown --cleanOutputDir --tsconfig tsconfig.docs.json --out docs --readme none $(echo $ENTRY); fi", "clean": "git ls-files --exclude-standard --ignored --others --directory | grep -vE '^((\\.(env|vscode|husky))|next-env\\.d\\.ts|node_modules)($|\\/)' | xargs -p rm -rf", "format": "cd ../.. && npm run format", "lint": "echo 'IMPLEMENT ME'", @@ -62,13 +62,6 @@ "test:integration": "echo 'IMPLEMENT ME'", "test:unit": "echo 'IMPLEMENT ME'" }, - "config": { - "plugin-build": { - "docs": { - "entry": "./src/*" - } - } - }, "dependencies": { "@types/mdast": "^3.0.10", "unified": "^10.1.2", @@ -80,5 +73,10 @@ }, "publishConfig": { "access": "public" + }, + "project": { + "documentation": { + "entry": "./src/*" + } } } diff --git a/packages/remark-remove-unused-definitions/tsconfig.types.json b/packages/remark-remove-unused-definitions/tsconfig.types.json index c5793eb..f314bc8 100644 --- a/packages/remark-remove-unused-definitions/tsconfig.types.json +++ b/packages/remark-remove-unused-definitions/tsconfig.types.json @@ -6,7 +6,7 @@ "isolatedModules": false, "noEmit": false, "outDir": "dist", - "rootDir": "./src" + "rootDir": "../../" }, "extends": "../../tsconfig.json", "include": ["../../types/**/*", "src/**/*"] diff --git a/packages/remark-remove-url-trailing-slash/package.json b/packages/remark-remove-url-trailing-slash/package.json index 177b3ea..9e03c00 100644 --- a/packages/remark-remove-url-trailing-slash/package.json +++ b/packages/remark-remove-url-trailing-slash/package.json @@ -27,9 +27,9 @@ "type": "commonjs", "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./dist/index.mjs", - "default": "./dist/index.mjs" + "types": "./dist/src/index.d.ts", + "node": "./dist/src/index.mjs", + "default": "./dist/src/index.mjs" }, "./package": "./package.json", "./package.json": "./package.json" @@ -37,7 +37,7 @@ "typesVersions": { "*": { "*": [ - "./dist/index.d.ts" + "./dist/src/index.d.ts" ] } }, @@ -50,8 +50,8 @@ "scripts": { "build": "npm run build:dist --", "build:changelog": "conventional-changelog --outfile CHANGELOG.md --config ../../conventional.config.js --release-count 0 --skip-unstable && (if [ \"$CHANGELOG_SKIP_TITLE\" != 'true' ]; then { node -e 'console.log(require(\"../../conventional.config.js\").changelogTitle)'; cat CHANGELOG.md; } > CHANGELOG.md.ignore && mv CHANGELOG.md.ignore CHANGELOG.md; fi) && NODE_ENV=format remark --output --frail CHANGELOG.md && prettier --write CHANGELOG.md", - "build:dist": "NODE_ENV=production tsc --project tsconfig.types.json --incremental false && tsconfig-replace-paths --project tsconfig.types.json && NODE_ENV=production-esm babel src --extensions .ts --out-dir dist --out-file-extension .mjs --root-mode upward", - "build:docs": "if [ -r ./next.config.js ]; then typedoc --plugin typedoc-plugin-markdown --cleanOutputDir --tsconfig tsconfig.docs.json --out docs --readme none lib src test types external-scripts --exclude '**/*.test.*' --exclude external-scripts/bin; else ENTRY=`node -e 'const entry = require(\"./package.json\").config?.[\"plugin-build\"]?.docs?.entry; if(!entry) throw new Error(\"\\\"config['\"'\"'plugin-build'\"'\"'].docs.entry\\\" field is not defined in package.json\"); console.log(entry)'` && echo 'Entry file:' \"$ENTRY\" && typedoc --plugin typedoc-plugin-markdown --cleanOutputDir --tsconfig tsconfig.docs.json --out docs --readme none $(echo $ENTRY); fi", + "build:dist": "echo '> Generating types...' && NODE_ENV=production tsc --project tsconfig.types.json --incremental false && tsconfig-replace-paths --project tsconfig.types.json && echo '> Building distributables...' && NODE_ENV=production-esm babel src --extensions .ts --out-dir dist/src --out-file-extension .mjs --root-mode upward && echo '> Organizing types...' && cp --recursive --link --force --target-directory=dist dist/$(realpath --relative-base=../.. .)/* && rm --recursive --force dist/$(realpath --relative-base=../.. ..) && echo '> Refactoring types...' && NODE_ENV=production-types npx babel dist --extensions .ts --only '**/*.d.ts' --out-dir dist --keep-file-extension --root-mode upward", + "build:docs": "if [ -r ./next.config.js ]; then typedoc --plugin typedoc-plugin-markdown --cleanOutputDir --tsconfig tsconfig.docs.json --out docs --readme none lib src test types external-scripts --exclude '**/*.test.*' --exclude external-scripts/bin; else ENTRY=`node -e 'const entry = require(\"./package.json\").project?.documentation?.entry; if(!entry) throw new Error(\"\\\"project.documentation.entry\\\" field is not defined in package.json\"); console.log(entry)'` && echo 'Entry file:' \"$ENTRY\" && typedoc --plugin typedoc-plugin-markdown --cleanOutputDir --tsconfig tsconfig.docs.json --out docs --readme none $(echo $ENTRY); fi", "clean": "git ls-files --exclude-standard --ignored --others --directory | grep -vE '^((\\.(env|vscode|husky))|next-env\\.d\\.ts|node_modules)($|\\/)' | xargs -p rm -rf", "format": "cd ../.. && npm run format", "lint": "echo 'IMPLEMENT ME'", @@ -60,13 +60,6 @@ "test:integration": "echo 'IMPLEMENT ME'", "test:unit": "echo 'IMPLEMENT ME'" }, - "config": { - "plugin-build": { - "docs": { - "entry": "./src/*" - } - } - }, "dependencies": { "@types/mdast": "^3.0.10", "unified": "^10.1.2", @@ -77,5 +70,10 @@ }, "publishConfig": { "access": "public" + }, + "project": { + "documentation": { + "entry": "./src/*" + } } } diff --git a/packages/remark-remove-url-trailing-slash/tsconfig.types.json b/packages/remark-remove-url-trailing-slash/tsconfig.types.json index c5793eb..f314bc8 100644 --- a/packages/remark-remove-url-trailing-slash/tsconfig.types.json +++ b/packages/remark-remove-url-trailing-slash/tsconfig.types.json @@ -6,7 +6,7 @@ "isolatedModules": false, "noEmit": false, "outDir": "dist", - "rootDir": "./src" + "rootDir": "../../" }, "extends": "../../tsconfig.json", "include": ["../../types/**/*", "src/**/*"] diff --git a/packages/remark-renumber-references/package.json b/packages/remark-renumber-references/package.json index 99498a8..61b1f33 100644 --- a/packages/remark-renumber-references/package.json +++ b/packages/remark-renumber-references/package.json @@ -30,9 +30,9 @@ "type": "commonjs", "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./dist/index.mjs", - "default": "./dist/index.mjs" + "types": "./dist/src/index.d.ts", + "node": "./dist/src/index.mjs", + "default": "./dist/src/index.mjs" }, "./package": "./package.json", "./package.json": "./package.json" @@ -40,7 +40,7 @@ "typesVersions": { "*": { "*": [ - "./dist/index.d.ts" + "./dist/src/index.d.ts" ] } }, @@ -53,8 +53,8 @@ "scripts": { "build": "npm run build:dist --", "build:changelog": "conventional-changelog --outfile CHANGELOG.md --config ../../conventional.config.js --release-count 0 --skip-unstable && (if [ \"$CHANGELOG_SKIP_TITLE\" != 'true' ]; then { node -e 'console.log(require(\"../../conventional.config.js\").changelogTitle)'; cat CHANGELOG.md; } > CHANGELOG.md.ignore && mv CHANGELOG.md.ignore CHANGELOG.md; fi) && NODE_ENV=format remark --output --frail CHANGELOG.md && prettier --write CHANGELOG.md", - "build:dist": "NODE_ENV=production tsc --project tsconfig.types.json --incremental false && tsconfig-replace-paths --project tsconfig.types.json && NODE_ENV=production-esm babel src --extensions .ts --out-dir dist --out-file-extension .mjs --root-mode upward", - "build:docs": "if [ -r ./next.config.js ]; then typedoc --plugin typedoc-plugin-markdown --cleanOutputDir --tsconfig tsconfig.docs.json --out docs --readme none lib src test types external-scripts --exclude '**/*.test.*' --exclude external-scripts/bin; else ENTRY=`node -e 'const entry = require(\"./package.json\").config?.[\"plugin-build\"]?.docs?.entry; if(!entry) throw new Error(\"\\\"config['\"'\"'plugin-build'\"'\"'].docs.entry\\\" field is not defined in package.json\"); console.log(entry)'` && echo 'Entry file:' \"$ENTRY\" && typedoc --plugin typedoc-plugin-markdown --cleanOutputDir --tsconfig tsconfig.docs.json --out docs --readme none $(echo $ENTRY); fi", + "build:dist": "echo '> Generating types...' && NODE_ENV=production tsc --project tsconfig.types.json --incremental false && tsconfig-replace-paths --project tsconfig.types.json && echo '> Building distributables...' && NODE_ENV=production-esm babel src --extensions .ts --out-dir dist/src --out-file-extension .mjs --root-mode upward && echo '> Organizing types...' && cp --recursive --link --force --target-directory=dist dist/$(realpath --relative-base=../.. .)/* && rm --recursive --force dist/$(realpath --relative-base=../.. ..) && echo '> Refactoring types...' && NODE_ENV=production-types npx babel dist --extensions .ts --only '**/*.d.ts' --out-dir dist --keep-file-extension --root-mode upward", + "build:docs": "if [ -r ./next.config.js ]; then typedoc --plugin typedoc-plugin-markdown --cleanOutputDir --tsconfig tsconfig.docs.json --out docs --readme none lib src test types external-scripts --exclude '**/*.test.*' --exclude external-scripts/bin; else ENTRY=`node -e 'const entry = require(\"./package.json\").project?.documentation?.entry; if(!entry) throw new Error(\"\\\"project.documentation.entry\\\" field is not defined in package.json\"); console.log(entry)'` && echo 'Entry file:' \"$ENTRY\" && typedoc --plugin typedoc-plugin-markdown --cleanOutputDir --tsconfig tsconfig.docs.json --out docs --readme none $(echo $ENTRY); fi", "clean": "git ls-files --exclude-standard --ignored --others --directory | grep -vE '^((\\.(env|vscode|husky))|next-env\\.d\\.ts|node_modules)($|\\/)' | xargs -p rm -rf", "format": "cd ../.. && npm run format", "lint": "echo 'IMPLEMENT ME'", @@ -63,13 +63,6 @@ "test:integration": "echo 'IMPLEMENT ME'", "test:unit": "echo 'IMPLEMENT ME'" }, - "config": { - "plugin-build": { - "docs": { - "entry": "./src/*" - } - } - }, "dependencies": { "@types/mdast": "^3.0.10", "mdast-util-hidden": "^1.1.3", @@ -84,5 +77,10 @@ }, "publishConfig": { "access": "public" + }, + "project": { + "documentation": { + "entry": "./src/*" + } } } diff --git a/packages/remark-renumber-references/src/index.ts b/packages/remark-renumber-references/src/index.ts index de2b078..45f1bb8 100644 --- a/packages/remark-renumber-references/src/index.ts +++ b/packages/remark-renumber-references/src/index.ts @@ -1,6 +1,6 @@ import assert from 'node:assert'; import { visit, SKIP } from 'unist-util-visit'; -import { hide, visitAndReveal } from 'mdast-util-hidden'; +import { hide, visitAndReveal } from 'pkgverse/mdast-util-hidden/src/index'; import { removePosition } from 'unist-util-remove-position'; import remarkInlineLinks from 'remark-inline-links'; import remarkReferenceLinks from 'remark-reference-links'; diff --git a/packages/remark-renumber-references/tsconfig.types.json b/packages/remark-renumber-references/tsconfig.types.json index c5793eb..f314bc8 100644 --- a/packages/remark-renumber-references/tsconfig.types.json +++ b/packages/remark-renumber-references/tsconfig.types.json @@ -6,7 +6,7 @@ "isolatedModules": false, "noEmit": false, "outDir": "dist", - "rootDir": "./src" + "rootDir": "../../" }, "extends": "../../tsconfig.json", "include": ["../../types/**/*", "src/**/*"] diff --git a/packages/remark-sort-definitions/package.json b/packages/remark-sort-definitions/package.json index daf84e0..afb6395 100644 --- a/packages/remark-sort-definitions/package.json +++ b/packages/remark-sort-definitions/package.json @@ -29,9 +29,9 @@ "type": "commonjs", "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./dist/index.mjs", - "default": "./dist/index.mjs" + "types": "./dist/src/index.d.ts", + "node": "./dist/src/index.mjs", + "default": "./dist/src/index.mjs" }, "./package": "./package.json", "./package.json": "./package.json" @@ -39,7 +39,7 @@ "typesVersions": { "*": { "*": [ - "./dist/index.d.ts" + "./dist/src/index.d.ts" ] } }, @@ -52,8 +52,8 @@ "scripts": { "build": "npm run build:dist --", "build:changelog": "conventional-changelog --outfile CHANGELOG.md --config ../../conventional.config.js --release-count 0 --skip-unstable && (if [ \"$CHANGELOG_SKIP_TITLE\" != 'true' ]; then { node -e 'console.log(require(\"../../conventional.config.js\").changelogTitle)'; cat CHANGELOG.md; } > CHANGELOG.md.ignore && mv CHANGELOG.md.ignore CHANGELOG.md; fi) && NODE_ENV=format remark --output --frail CHANGELOG.md && prettier --write CHANGELOG.md", - "build:dist": "NODE_ENV=production tsc --project tsconfig.types.json --incremental false && tsconfig-replace-paths --project tsconfig.types.json && NODE_ENV=production-esm babel src --extensions .ts --out-dir dist --out-file-extension .mjs --root-mode upward", - "build:docs": "if [ -r ./next.config.js ]; then typedoc --plugin typedoc-plugin-markdown --cleanOutputDir --tsconfig tsconfig.docs.json --out docs --readme none lib src test types external-scripts --exclude '**/*.test.*' --exclude external-scripts/bin; else ENTRY=`node -e 'const entry = require(\"./package.json\").config?.[\"plugin-build\"]?.docs?.entry; if(!entry) throw new Error(\"\\\"config['\"'\"'plugin-build'\"'\"'].docs.entry\\\" field is not defined in package.json\"); console.log(entry)'` && echo 'Entry file:' \"$ENTRY\" && typedoc --plugin typedoc-plugin-markdown --cleanOutputDir --tsconfig tsconfig.docs.json --out docs --readme none $(echo $ENTRY); fi", + "build:dist": "echo '> Generating types...' && NODE_ENV=production tsc --project tsconfig.types.json --incremental false && tsconfig-replace-paths --project tsconfig.types.json && echo '> Building distributables...' && NODE_ENV=production-esm babel src --extensions .ts --out-dir dist/src --out-file-extension .mjs --root-mode upward && echo '> Organizing types...' && cp --recursive --link --force --target-directory=dist dist/$(realpath --relative-base=../.. .)/* && rm --recursive --force dist/$(realpath --relative-base=../.. ..) && echo '> Refactoring types...' && NODE_ENV=production-types npx babel dist --extensions .ts --only '**/*.d.ts' --out-dir dist --keep-file-extension --root-mode upward", + "build:docs": "if [ -r ./next.config.js ]; then typedoc --plugin typedoc-plugin-markdown --cleanOutputDir --tsconfig tsconfig.docs.json --out docs --readme none lib src test types external-scripts --exclude '**/*.test.*' --exclude external-scripts/bin; else ENTRY=`node -e 'const entry = require(\"./package.json\").project?.documentation?.entry; if(!entry) throw new Error(\"\\\"project.documentation.entry\\\" field is not defined in package.json\"); console.log(entry)'` && echo 'Entry file:' \"$ENTRY\" && typedoc --plugin typedoc-plugin-markdown --cleanOutputDir --tsconfig tsconfig.docs.json --out docs --readme none $(echo $ENTRY); fi", "clean": "git ls-files --exclude-standard --ignored --others --directory | grep -vE '^((\\.(env|vscode|husky))|next-env\\.d\\.ts|node_modules)($|\\/)' | xargs -p rm -rf", "format": "cd ../.. && npm run format", "lint": "echo 'IMPLEMENT ME'", @@ -62,13 +62,6 @@ "test:integration": "echo 'IMPLEMENT ME'", "test:unit": "echo 'IMPLEMENT ME'" }, - "config": { - "plugin-build": { - "docs": { - "entry": "./src/*" - } - } - }, "dependencies": { "@types/mdast": "^3.0.10", "unified": "^10.1.2", @@ -79,5 +72,10 @@ }, "publishConfig": { "access": "public" + }, + "project": { + "documentation": { + "entry": "./src/*" + } } } diff --git a/packages/remark-sort-definitions/tsconfig.types.json b/packages/remark-sort-definitions/tsconfig.types.json index c5793eb..f314bc8 100644 --- a/packages/remark-sort-definitions/tsconfig.types.json +++ b/packages/remark-sort-definitions/tsconfig.types.json @@ -6,7 +6,7 @@ "isolatedModules": false, "noEmit": false, "outDir": "dist", - "rootDir": "./src" + "rootDir": "../../" }, "extends": "../../tsconfig.json", "include": ["../../types/**/*", "src/**/*"] diff --git a/packages/remark-tight-comments/package.json b/packages/remark-tight-comments/package.json index b0f9a15..9e1b2c6 100644 --- a/packages/remark-tight-comments/package.json +++ b/packages/remark-tight-comments/package.json @@ -27,9 +27,9 @@ "type": "commonjs", "exports": { ".": { - "types": "./dist/index.d.ts", - "node": "./dist/index.mjs", - "default": "./dist/index.mjs" + "types": "./dist/src/index.d.ts", + "node": "./dist/src/index.mjs", + "default": "./dist/src/index.mjs" }, "./package": "./package.json", "./package.json": "./package.json" @@ -37,7 +37,7 @@ "typesVersions": { "*": { "*": [ - "./dist/index.d.ts" + "./dist/src/index.d.ts" ] } }, @@ -50,8 +50,8 @@ "scripts": { "build": "npm run build:dist --", "build:changelog": "conventional-changelog --outfile CHANGELOG.md --config ../../conventional.config.js --release-count 0 --skip-unstable && (if [ \"$CHANGELOG_SKIP_TITLE\" != 'true' ]; then { node -e 'console.log(require(\"../../conventional.config.js\").changelogTitle)'; cat CHANGELOG.md; } > CHANGELOG.md.ignore && mv CHANGELOG.md.ignore CHANGELOG.md; fi) && NODE_ENV=format remark --output --frail CHANGELOG.md && prettier --write CHANGELOG.md", - "build:dist": "NODE_ENV=production tsc --project tsconfig.types.json --incremental false && tsconfig-replace-paths --project tsconfig.types.json && NODE_ENV=production-esm babel src --extensions .ts --out-dir dist --out-file-extension .mjs --root-mode upward", - "build:docs": "if [ -r ./next.config.js ]; then typedoc --plugin typedoc-plugin-markdown --cleanOutputDir --tsconfig tsconfig.docs.json --out docs --readme none lib src test types external-scripts --exclude '**/*.test.*' --exclude external-scripts/bin; else ENTRY=`node -e 'const entry = require(\"./package.json\").config?.[\"plugin-build\"]?.docs?.entry; if(!entry) throw new Error(\"\\\"config['\"'\"'plugin-build'\"'\"'].docs.entry\\\" field is not defined in package.json\"); console.log(entry)'` && echo 'Entry file:' \"$ENTRY\" && typedoc --plugin typedoc-plugin-markdown --cleanOutputDir --tsconfig tsconfig.docs.json --out docs --readme none $(echo $ENTRY); fi", + "build:dist": "echo '> Generating types...' && NODE_ENV=production tsc --project tsconfig.types.json --incremental false && tsconfig-replace-paths --project tsconfig.types.json && echo '> Building distributables...' && NODE_ENV=production-esm babel src --extensions .ts --out-dir dist/src --out-file-extension .mjs --root-mode upward && echo '> Organizing types...' && cp --recursive --link --force --target-directory=dist dist/$(realpath --relative-base=../.. .)/* && rm --recursive --force dist/$(realpath --relative-base=../.. ..) && echo '> Refactoring types...' && NODE_ENV=production-types npx babel dist --extensions .ts --only '**/*.d.ts' --out-dir dist --keep-file-extension --root-mode upward", + "build:docs": "if [ -r ./next.config.js ]; then typedoc --plugin typedoc-plugin-markdown --cleanOutputDir --tsconfig tsconfig.docs.json --out docs --readme none lib src test types external-scripts --exclude '**/*.test.*' --exclude external-scripts/bin; else ENTRY=`node -e 'const entry = require(\"./package.json\").project?.documentation?.entry; if(!entry) throw new Error(\"\\\"project.documentation.entry\\\" field is not defined in package.json\"); console.log(entry)'` && echo 'Entry file:' \"$ENTRY\" && typedoc --plugin typedoc-plugin-markdown --cleanOutputDir --tsconfig tsconfig.docs.json --out docs --readme none $(echo $ENTRY); fi", "clean": "git ls-files --exclude-standard --ignored --others --directory | grep -vE '^((\\.(env|vscode|husky))|next-env\\.d\\.ts|node_modules)($|\\/)' | xargs -p rm -rf", "format": "cd ../.. && npm run format", "lint": "echo 'IMPLEMENT ME'", @@ -60,13 +60,6 @@ "test:integration": "echo 'IMPLEMENT ME'", "test:unit": "echo 'IMPLEMENT ME'" }, - "config": { - "plugin-build": { - "docs": { - "entry": "./src/*" - } - } - }, "dependencies": { "@types/mdast": "^3.0.10", "mdast-util-tight-comments": "^1.0.5", @@ -77,5 +70,10 @@ }, "publishConfig": { "access": "public" + }, + "project": { + "documentation": { + "entry": "./src/*" + } } } diff --git a/packages/remark-tight-comments/src/index.ts b/packages/remark-tight-comments/src/index.ts index 35f95a4..be3d257 100644 --- a/packages/remark-tight-comments/src/index.ts +++ b/packages/remark-tight-comments/src/index.ts @@ -1,4 +1,4 @@ -import { joinTightComments } from 'mdast-util-tight-comments'; +import { joinTightComments } from 'pkgverse/mdast-util-tight-comments/src/index'; import type { Plugin } from 'unified'; import type { Root } from 'mdast'; diff --git a/packages/remark-tight-comments/tsconfig.types.json b/packages/remark-tight-comments/tsconfig.types.json index c5793eb..f314bc8 100644 --- a/packages/remark-tight-comments/tsconfig.types.json +++ b/packages/remark-tight-comments/tsconfig.types.json @@ -6,7 +6,7 @@ "isolatedModules": false, "noEmit": false, "outDir": "dist", - "rootDir": "./src" + "rootDir": "../../" }, "extends": "../../tsconfig.json", "include": ["../../types/**/*", "src/**/*"]