Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump markdownlint from 0.35.0 to 0.36.1 #444

Merged
merged 2 commits into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/OutputFormatters.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,4 @@ For a `.markdownlint-cli2.jsonc` like:
[formatter-junit]: ../formatter-junit/markdownlint-cli2-formatter-junit.js
[formatter-sarif]: ../formatter-sarif/markdownlint-cli2-formatter-sarif.js
[markdownlint-cli2-formatter]: https://www.npmjs.com/search?q=keywords:markdownlint-cli2-formatter
[markdownlint-d-ts]: https://github.com/DavidAnson/markdownlint/blob/v0.35.0/lib/markdownlint.d.ts
[markdownlint-d-ts]: https://github.com/DavidAnson/markdownlint/blob/v0.36.1/lib/markdownlint.d.ts
20 changes: 12 additions & 8 deletions markdownlint-cli2.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,16 @@ const pathDefault = require("node:path");
const pathPosix = pathDefault.posix;
const { pathToFileURL } = require("node:url");
const markdownlintLibrary = require("markdownlint");
const {
applyFixes,
"getVersion": getLibraryVersion,
"promises": markdownlintPromises
} = markdownlintLibrary;
const {
markdownlint,
"extendConfig": markdownlintExtendConfig,
"readConfig": markdownlintReadConfig
} = markdownlintLibrary.promises;
const markdownlintRuleHelpers = require("markdownlint/helpers");
} = markdownlintPromises;
const appendToArray = require("./append-to-array");
const mergeOptions = require("./merge-options");
const resolveAndRequire = require("./resolve-and-require");
Expand All @@ -28,7 +32,7 @@ const resolveAndRequire = require("./resolve-and-require");
const packageName = "markdownlint-cli2";
const packageVersion = "0.14.0";
const libraryName = "markdownlint";
const libraryVersion = markdownlintLibrary.getVersion();
const libraryVersion = getLibraryVersion();
const bannerMessage = `${packageName} v${packageVersion} (${libraryName} v${libraryVersion})`;
const dotOnlySubstitute = "*.{md,markdown}";
const utf8 = "utf8";
Expand Down Expand Up @@ -61,9 +65,10 @@ const throwForConfigurationFile = (file, error) => {
const posixPath = (p) => p.split(pathDefault.sep).join(pathPosix.sep);

// Expands a path with a tilde to an absolute path
const expandTildePath = (id) => (
markdownlintRuleHelpers.expandTildePath(id, require("node:os"))
);
const expandTildePath = (id) => {
const markdownlintRuleHelpers = require("markdownlint/helpers");
return markdownlintRuleHelpers.expandTildePath(id, require("node:os"));
};

// Resolves module paths relative to the specified directory
const resolveModulePaths = (dir, modulePaths) => (
Expand Down Expand Up @@ -811,8 +816,7 @@ const lintFiles = (fs, dirInfos, fileContents) => {
options.files.push(fileName);
subTasks.push(fs.promises.readFile(fileName, utf8).
then((original) => {
const fixed = markdownlintRuleHelpers.
applyFixes(original, errorInfos);
const fixed = applyFixes(original, errorInfos);
return fs.promises.writeFile(fileName, fixed, utf8);
})
);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
"globby": "14.0.2",
"js-yaml": "4.1.0",
"jsonc-parser": "3.3.1",
"markdownlint": "0.35.0",
"markdownlint": "0.36.1",
"markdownlint-cli2-formatter-default": "0.0.5",
"micromatch": "4.0.8"
},
Expand Down
4 changes: 2 additions & 2 deletions schema/markdownlint-cli2-config-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"default": "https://raw.githubusercontent.com/DavidAnson/markdownlint-cli2/v0.14.0/schema/markdownlint-cli2-config-schema.json"
},
"config": {
"description": "markdownlint configuration schema : https://github.com/DavidAnson/markdownlint/blob/v0.35.0/schema/.markdownlint.jsonc",
"$ref": "https://raw.githubusercontent.com/DavidAnson/markdownlint/v0.35.0/schema/markdownlint-config-schema.json",
"description": "markdownlint configuration schema : https://github.com/DavidAnson/markdownlint/blob/v0.36.1/schema/.markdownlint.jsonc",
"$ref": "https://raw.githubusercontent.com/DavidAnson/markdownlint/v0.36.1/schema/markdownlint-config-schema.json",
"default": {}
},
"customRules": {
Expand Down
Loading