magic-comments
Advanced tools
Comparing version 1.0.0 to 2.0.0
{ | ||
"name": "magic-comments", | ||
"version": "1.0.0", | ||
"version": "2.0.0", | ||
"description": "Utility for adding webpack magic comments at build time.", | ||
@@ -9,8 +9,26 @@ "type": "module", | ||
".": { | ||
"import": "./dist/index.js", | ||
"require": "./dist/cjs/index.cjs", | ||
"import": { | ||
"types": "./dist/types.d.ts", | ||
"default": "./dist/index.js" | ||
}, | ||
"require": { | ||
"types": "./dist/cjs/types.d.cts", | ||
"default": "./dist/cjs/index.cjs" | ||
}, | ||
"default": "./dist/index.js" | ||
}, | ||
"./*.js": { | ||
"import": { | ||
"types": "./dist/*.d.ts", | ||
"default": "./dist/*.js" | ||
}, | ||
"require": { | ||
"types": "./dist/cjs/*.d.cts", | ||
"default": "./dist/cjs/*.cjs" | ||
}, | ||
"default": "./dist/*.js" | ||
}, | ||
"./package.json": "./package.json" | ||
}, | ||
"types": "./dist/index.d.ts", | ||
"engines": { | ||
@@ -20,9 +38,10 @@ "node": ">=12.17.0" | ||
"scripts": { | ||
"prepack": "npm run build", | ||
"build": "npm run build:esm && npm run build:cjs", | ||
"build:esm": "babel src --out-dir dist", | ||
"build:cjs": "BABEL_ENV=cjs babel src --out-dir dist/cjs --out-file-extension .cjs", | ||
"lint": "eslint . src __tests__ --ext .js", | ||
"check-types": "tsc --noEmit", | ||
"build:types": "tsc --emitDeclarationOnly && tsc -p ./tsconfig.cjs.json", | ||
"build:dual": "babel-dual-package --out-dir dist --extensions .ts src", | ||
"build": "npm run build:types && npm run build:dual", | ||
"lint": "eslint . src __tests__ --ext .js,.ts", | ||
"lint:fix": "npm run lint -- --fix", | ||
"test": "node --experimental-vm-modules --no-warnings ./node_modules/.bin/jest" | ||
"test": "BABEL_ENV=test jest", | ||
"prepack": "npm run build" | ||
}, | ||
@@ -38,3 +57,8 @@ "dependencies": { | ||
"@babel/preset-env": "^7.22.5", | ||
"babel-plugin-replace-import-extension": "^1.1.3", | ||
"@babel/preset-typescript": "^7.22.5", | ||
"@jest/globals": "^29.6.1", | ||
"@types/micromatch": "^4.0.2", | ||
"@typescript-eslint/eslint-plugin": "^5.60.1", | ||
"@typescript-eslint/parser": "^5.60.1", | ||
"babel-dual-package": "^1.0.0-alpha.0", | ||
"eslint": "^8.42.0", | ||
@@ -44,4 +68,6 @@ "eslint-config-prettier": "^8.8.0", | ||
"eslint-plugin-prettier": "^4.2.0", | ||
"jest": "^29.5.0", | ||
"prettier": "^2.8.8" | ||
"jest": "^29.6.1", | ||
"prettier": "^2.8.8", | ||
"ts-jest-resolver": "^2.0.1", | ||
"typescript": "5.0.4" | ||
}, | ||
@@ -48,0 +74,0 @@ "repository": { |
@@ -51,8 +51,9 @@ # ✨ [`magic-comments`](https://www.npmjs.com/package/magic-comments) | ||
options: { | ||
webpackChunkName: true, | ||
webpackFetchPriority: "high" | ||
webpackChunkName: ['**/src/**/*.js'], | ||
webpackMode: 'eager' | ||
webpackFetchPriority: 'high' | ||
} | ||
}) | ||
// prints /* webpackChunkName: "folder-module", webpackFetchPriority: "high" */ | ||
// prints /* webpackChunkName: "folder-module", webpackMode: "eager", webpackFetchPriority: "high" */ | ||
console.log(magicComment) | ||
@@ -59,0 +60,0 @@ }) |
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
103280
2584
66
18
32
1
1