Skip to content

Commit 87378c7

Browse files
onairmarcEncoreBot
andauthored
Fix Over Aggressive Glob Match (#1)
Co-authored-by: EncoreBot <ghbot@encoredigitalgroup.com>
1 parent de73c38 commit 87378c7

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

bin/cli.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
* All Rights Reserved.
55
*/
66

7-
87
const {sortPackageFile, sortTsConfigFile} = require("../dist");
98
const path = require("path");
109
const prettier = require("prettier");
@@ -42,11 +41,15 @@ async function runPrettier(targetDir, dryRun) {
4241
prettierConfig = require(configPath);
4342
}
4443

45-
const files = glob.sync("**/*.{js,ts,jsx,tsx,json,md,yml,yaml,css,scss}", {
44+
const files = glob.sync("**/*.{js,ts,jsx,tsx}", {
4645
cwd: targetDir,
47-
ignore: ["node_modules/**", "dist/**"],
46+
ignore: ["node_modules/**", "dist/**", "vendor/**"],
4847
});
4948

49+
files.push("package.json");
50+
files.push("package-lock.json");
51+
files.push("tsconfig.json");
52+
5053
console.info(`Running Prettier on ${files.length} files...`);
5154

5255
for (const file of files) {

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
"version": "0.0.0",
55
"description": "Common Configurations for Encore Digital Group NPM Packages",
66
"publishConfig": {
7-
"registry": "https://registry.npmjs.org",
8-
"access": "public"
7+
"access": "public",
8+
"registry": "https://registry.npmjs.org"
99
},
1010
"engines": {
1111
"node": ">=20.0.0"

src/sortPackage.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
* Copyright (c) 2025. Encore Digital Group.
33
* All Rights Reserved.
44
*/
5-
65
import {sortExportsKeys} from "./formatters/package";
76
import {SortOptions} from "./shared/types";
87
import fs from "fs";

src/sortTSConfig.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
* Copyright (c) 2025. Encore Digital Group.
33
* All Rights Reserved.
44
*/
5-
65
import {SortOptions} from "./shared/types";
76
import fs from "fs";
87
import path from "path";

0 commit comments

Comments
 (0)