New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

magic-comments

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

magic-comments - npm Package Compare versions

Comparing version 2.1.1 to 2.1.2

4

package.json
{
"name": "magic-comments",
"version": "2.1.1",
"version": "2.1.2",
"description": "Utility for adding webpack magic comments at build time.",

@@ -60,3 +60,3 @@ "type": "module",

"@typescript-eslint/parser": "^5.60.1",
"babel-dual-package": "^1.0.0-alpha.0",
"babel-dual-package": "^1.0.0-alpha.1",
"eslint": "^8.42.0",

@@ -63,0 +63,0 @@ "eslint-config-prettier": "^8.8.0",

@@ -111,3 +111,3 @@ # ✨ [`magic-comments`](https://www.npmjs.com/package/magic-comments)

Whether the returned comment should surrounded by `/*` and `*/`, for example, `/* comment */` vs `` comment ``.
Whether the returned comment should be surrounded by `/*` and `*/`, for example, `/* comment */` vs `` comment ``.

@@ -225,3 +225,3 @@ ### `match`

* `options.basename`:
* `true` - Use only the [basename](https://nodejs.org/api/path.html#pathbasenamepath-suffix) from the import specifier as the chunk name. Relative imports may result in name collisions. Use in areas where you know the basenames are unique.
* `true` - Use only the [basename](https://nodejs.org/api/path.html#pathbasenamepath-suffix) from the import specifier as the chunk name. Might result in name collisions. Use in areas where you know the basenames are unique.
* `false` - Use the full derived path from the import specifier in kebab-case as the chunk name, same as the default behavior.

@@ -274,3 +274,3 @@ * `options.name`:

* `FetchPriority` - Sets the fetch priority to the provided value when adding the comment.
* `(modulePath: string, importPath: string) => FetchPriority | false` - Same as using a function for the loader option.
* `(modulePath: string, importPath: string) => FetchPriority | false` - Same as using a function for the value.
* `options.active`:

@@ -320,3 +320,3 @@ * `true` - Disable the comment.

* `Mode` - Sets the chunk loading mode to the provided value when adding the comment.
* `(modulePath: string, importPath: string) => Mode | false` - Same as using a function for the loader option.
* `(modulePath: string, importPath: string) => Mode | false` - Same as using a function for the value.
* `options.active`:

@@ -404,3 +404,3 @@ * `true` - Disable the comment.

* `RegExp` - Adds a `webpackInclude` comment to **all** dynamic imports, or only those matching a path from the [`match`](#match) path if using overrides.
* `(modulePath: string, importPath: string) => RegExp` - Same as using a function in the loader option.
* `(modulePath: string, importPath: string) => RegExp` - Same as using a function for the value.
* `options.active`:

@@ -436,3 +436,3 @@ * `true` - Disable the comment.

* `RegExp` - Adds a `webpackExclude` comment to **all** dynamic imports, or only those matching a path from the [`match`](#match) path if using overrides.
* `(modulePath: string, importPath: string) => RegExp` - Same as using a function in the loader option.
* `(modulePath: string, importPath: string) => RegExp` - Same as using a function for the value.
* `options.active`:

@@ -464,3 +464,3 @@ * `true` - Disable the comment.

* `options.exports`:
* `(modulePath: string, importPath: string) => string[]` - Same as using a function in the loader option.
* `(modulePath: string, importPath: string) => string[]` - Same as using a function for the value.
* `options.active`:

@@ -534,3 +534,3 @@ * `true` - Disable the comment.

Where the generic `T` is related to the magic comment the options are associated with. The `files` and `options` keys are both **required**, where the former is a glob string, or an array thereof, and the latter is the associated magic comment's [`CommentOptions`](#commentoptions).
Where the generic `T` is related to the magic comment the options are associated with. The `files` and `options` properties are both **required**, where the former is a glob string, or an array thereof, and the latter is the associated magic comment's [`CommentOptions`](#commentoptions).

@@ -537,0 +537,0 @@ Here's a more complete example of how overrides can be applied.

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc