Skip to content

Commit

Permalink
fix: match glob logic for unignore ignores (#115)
Browse files Browse the repository at this point in the history
Co-authored-by: Charlie Croom <[email protected]>
Co-authored-by: Anthony Fu <[email protected]>
  • Loading branch information
3 people authored Jan 3, 2025
1 parent 68caa6d commit 58df9b1
Show file tree
Hide file tree
Showing 11 changed files with 441 additions and 85 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,5 @@ jobs:
- name: Build
run: nr build

# - name: Test
# run: nr test
- name: Test
run: nr test
2 changes: 1 addition & 1 deletion app/pages/configs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ watchEffect(() => {
fileMatchResult.value = matchFile(
filters.filepath,
payload.value.configs,
payload.value.configsIgnoreOnly,
payload.value.meta.basePath,
)
if (fileMatchResult.value.configs.length) {
configs = Array.from(new Set([
Expand Down
1 change: 1 addition & 0 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export default defineNuxtConfig({

experimental: {
typedPages: true,
clientNodeCompat: true,
},

features: {
Expand Down
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"start": "node bin.mjs",
"prepack": "pnpm build",
"lint": "nuxi prepare && eslint .",
"test": "vitest",
"typecheck": "vue-tsc --noEmit"
},
"peerDependencies": {
Expand Down Expand Up @@ -79,11 +80,15 @@
"textmate-grammar-glob": "catalog:",
"typescript": "catalog:",
"unbuild": "catalog:",
"vitest": "^2.1.8",
"vue-tsc": "catalog:"
},
"pnpm": {
"overrides": {
"nitropack": "catalog:"
},
"patchedDependencies": {
"@eslint/[email protected]": "patches/@[email protected]"
}
},
"simple-git-hooks": {
Expand Down
26 changes: 26 additions & 0 deletions patches/@[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
diff --git a/dist/cjs/index.cjs b/dist/cjs/index.cjs
index cc033c315239251752f4a2feb3d7546ef0d24013..356fc93fe59e43794bb84ea61fd18a45ced0df8f 100644
--- a/dist/cjs/index.cjs
+++ b/dist/cjs/index.cjs
@@ -241,7 +241,7 @@ const CONFIG_TYPES = new Set(["array", "function"]);
* Fields that are considered metadata and not part of the config object.
* @type {Set<string>}
*/
-const META_FIELDS = new Set(["name"]);
+const META_FIELDS = new Set(["name", "index"]);

/**
* A schema containing just files and ignores for early validation.
diff --git a/dist/esm/index.js b/dist/esm/index.js
index 1e68f33e3d641d856ab25b8206be085b6c205067..7dd46e0b8872078bba033ac75c79a9046020d589 100644
--- a/dist/esm/index.js
+++ b/dist/esm/index.js
@@ -221,7 +221,7 @@ const CONFIG_TYPES = new Set(["array", "function"]);
* Fields that are considered metadata and not part of the config object.
* @type {Set<string>}
*/
-const META_FIELDS = new Set(["name"]);
+const META_FIELDS = new Set(["name", "index"]);

/**
* A schema containing just files and ignores for early validation.
Loading

0 comments on commit 58df9b1

Please sign in to comment.