nuxt-content-assets 1.3.0 → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/module.json CHANGED
@@ -4,5 +4,5 @@
4
4
  "compatibility": {
5
5
  "nuxt": "^3.0.0"
6
6
  },
7
- "version": "1.3.0"
7
+ "version": "1.3.1"
8
8
  }
package/dist/module.mjs CHANGED
@@ -41,9 +41,8 @@ const extensions = {
41
41
  media: matchTokens("mp3 m4a wav mp4 mov webm ogg avi flv avchd")
42
42
  };
43
43
  function makeIgnores(extensions2) {
44
- const matched = matchTokens(extensions2);
45
- const ignored = matched.join("|");
46
- return `[^:]+\\.(?!(${ignored})$)`;
44
+ const included = matchTokens(extensions2).join("|");
45
+ return `^(?:(?!(${included})).)+$`;
47
46
  }
48
47
 
49
48
  function removeQuery(path) {
@@ -7,5 +7,8 @@ export declare const extensions: {
7
7
  };
8
8
  /**
9
9
  * Create a Nuxt Content ignore string
10
+ *
11
+ * @see https://stackoverflow.com/questions/10052032/regex-pattern-that-does-not-match-certain-extensions
12
+ * @see https://regex101.com/r/gC3HXz/1
10
13
  */
11
14
  export declare function makeIgnores(extensions: string | string[]): string;
@@ -6,7 +6,6 @@ export const extensions = {
6
6
  media: matchTokens("mp3 m4a wav mp4 mov webm ogg avi flv avchd")
7
7
  };
8
8
  export function makeIgnores(extensions2) {
9
- const matched = matchTokens(extensions2);
10
- const ignored = matched.join("|");
11
- return `[^:]+\\.(?!(${ignored})$)`;
9
+ const included = matchTokens(extensions2).join("|");
10
+ return `^(?:(?!(${included})).)+$`;
12
11
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nuxt-content-assets",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "description": "Enable locally-located assets in Nuxt Content",
5
5
  "repository": "davestewart/nuxt-content-assets",
6
6
  "license": "MIT",