source-map-loader
Advanced tools
Comparing version 0.2.4 to 1.0.0
@@ -1,5 +0,29 @@ | ||
# Change Log | ||
# Changelog | ||
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. | ||
## [1.0.0](https://github.com/webpack-contrib/source-map-loader/compare/v0.2.4...v1.0.0) (2020-05-26) | ||
### ⚠ BREAKING CHANGES | ||
* minimum supported Node.js version is `10.13` | ||
* minimum supported `webpack` version is `4` | ||
### Features | ||
* support indexed source maps ([c18d1f9](https://github.com/webpack-contrib/source-map-loader/commit/c18d1f9495fce229d21993aba1d215cc75986d84)) | ||
* support `charsert` for Data URLs | ||
### Bug Fixes | ||
* absolute path for sources ([b64f7d8](https://github.com/webpack-contrib/source-map-loader/commit/b64f7d82de27769c8bbd2be280faf4f9f97492d5)) | ||
* avoid crash on big data URL source maps ([7f769aa](https://github.com/webpack-contrib/source-map-loader/commit/7f769aa5a09d362cf29eeb52f4c8155360e1afad)) | ||
* improve performance ([#101](https://github.com/webpack-contrib/source-map-loader/issues/101)) ([4c39c22](https://github.com/webpack-contrib/source-map-loader/commit/4c39c228ae215b43d6c90fd1727d572dfd3d5929)) | ||
* use webpack fs ([#105](https://github.com/webpack-contrib/source-map-loader/issues/105)) ([1e785a1](https://github.com/webpack-contrib/source-map-loader/commit/1e785a1114afe2f40a9f2361d8a326a99b5050e6)) | ||
* support `file` protocol | ||
* improve error messages | ||
* avoid conflicts with other source maps | ||
* fix compatibility with `5` version of `webpack` | ||
<a name="0.2.4"></a> | ||
@@ -6,0 +30,0 @@ ## [0.2.4](https://github.com/webpack-contrib/source-map-loader/compare/v0.2.3...v0.2.4) (2018-08-14) |
{ | ||
"name": "source-map-loader", | ||
"version": "0.2.4", | ||
"version": "1.0.0", | ||
"description": "extracts inlined source map and offers it to webpack", | ||
"license": "MIT", | ||
"repository": "webpack-contrib/source-map-loader", | ||
"author": "Tobias Koppers @sokra", | ||
"description": "extracts inlined source map and offers it to webpack", | ||
"homepage": "https://github.com/webpack-contrib/source-map-loader", | ||
"bugs": "https://github.com/webpack-contrib/source-map-loader/issues", | ||
"funding": { | ||
"type": "opencollective", | ||
"url": "https://opencollective.com/webpack" | ||
}, | ||
"main": "dist/cjs.js", | ||
"engines": { | ||
"node": ">= 6" | ||
"node": ">= 10.13.0" | ||
}, | ||
"scripts": { | ||
"test": "mocha -R spec", | ||
"travis:test": "mocha -R spec", | ||
"release": "standard-version" | ||
"start": "npm run build -- -w", | ||
"clean": "del-cli dist", | ||
"prebuild": "npm run clean", | ||
"build": "cross-env NODE_ENV=production babel src -d dist --copy-files", | ||
"commitlint": "commitlint --from=master", | ||
"security": "npm audit", | ||
"lint:prettier": "prettier --list-different .", | ||
"lint:js": "eslint --cache .", | ||
"lint": "npm-run-all -l -p \"lint:**\"", | ||
"test:only": "cross-env NODE_ENV=test jest", | ||
"test:watch": "npm run test:only -- --watch", | ||
"test:coverage": "npm run test:only -- --collectCoverageFrom=\"src/**/*.js\" --coverage", | ||
"pretest": "npm run lint", | ||
"test": "npm run test:coverage", | ||
"prepare": "npm run build", | ||
"release": "standard-version", | ||
"defaults": "webpack-defaults" | ||
}, | ||
"files": [ | ||
"dist" | ||
], | ||
"peerDependencies": { | ||
"webpack": "^4.0.0 || ^5.0.0" | ||
}, | ||
"dependencies": { | ||
"async": "^2.5.0", | ||
"loader-utils": "^1.1.0" | ||
"data-urls": "^2.0.0", | ||
"iconv-lite": "^0.5.1", | ||
"loader-utils": "^2.0.0", | ||
"schema-utils": "^2.6.6", | ||
"source-map": "^0.6.0" | ||
}, | ||
"devDependencies": { | ||
"mocha": "^5.0.5", | ||
"should": "^13.2.1", | ||
"standard-version": "^4.4.0" | ||
"@babel/cli": "^7.8.4", | ||
"@babel/core": "^7.9.6", | ||
"@babel/preset-env": "^7.9.6", | ||
"@commitlint/cli": "^8.3.5", | ||
"@commitlint/config-conventional": "^8.3.4", | ||
"@webpack-contrib/defaults": "^6.3.0", | ||
"@webpack-contrib/eslint-config-webpack": "^3.0.0", | ||
"babel-jest": "^26.0.1", | ||
"cross-env": "^7.0.2", | ||
"del": "^5.1.0", | ||
"del-cli": "^3.0.0", | ||
"eslint": "^7.0.0", | ||
"eslint-config-prettier": "^6.11.0", | ||
"eslint-plugin-import": "^2.20.2", | ||
"husky": "^4.2.5", | ||
"jest": "^26.0.1", | ||
"lint-staged": "^10.2.2", | ||
"memfs": "^3.1.2", | ||
"npm-run-all": "^4.1.5", | ||
"prettier": "^2.0.5", | ||
"standard-version": "^8.0.0", | ||
"webpack": "^4.43.0" | ||
}, | ||
"bugs": "https://github.com/webpack-contrib/source-map-loader/issues", | ||
"homepage": "https://github.com/webpack-contrib/source-map-loader", | ||
"repository": "https://github.com/webpack-contrib/source-map-loader.git", | ||
"license": "MIT" | ||
"keywords": [ | ||
"webpack" | ||
] | ||
} |
134
README.md
@@ -1,17 +0,23 @@ | ||
[![npm][npm]][npm-url] | ||
[![deps][deps]][deps-url] | ||
[![chat][chat]][chat-url] | ||
<div align="center"> | ||
<!-- replace with accurate logo e.g from https://worldvectorlogo.com/ --> | ||
<a href="https://github.com/webpack/webpack"> | ||
<img width="200" height="200" vspace="" hspace="25" | ||
src="https://cdn.rawgit.com/webpack/media/e7485eb2/logo/icon.svg"> | ||
<img width="200" height="200" src="https://webpack.js.org/assets/icon-square-big.svg"> | ||
</a> | ||
<h1>Sourcemap Loader</h1> | ||
<p>Extracts source maps from existing source files (from their <code>sourceMappingURL</code>).<p> | ||
</div> | ||
<h2 align="center">Install</h2> | ||
[![npm][npm]][npm-url] | ||
[![node][node]][node-url] | ||
[![deps][deps]][deps-url] | ||
[![tests][tests]][tests-url] | ||
[![coverage][cover]][cover-url] | ||
[![chat][chat]][chat-url] | ||
[![size][size]][size-url] | ||
# source-map-loader | ||
Extracts source maps from existing source files (from their <code>sourceMappingURL</code>). | ||
## Getting Started | ||
To begin, you'll need to install `source-map-loader`: | ||
```bash | ||
@@ -21,10 +27,13 @@ npm i -D source-map-loader | ||
<h2 align="center">Usage</h2> | ||
Then add the plugin to your `webpack` config. For example: | ||
[Documentation: Using loaders](https://webpack.js.org/concepts/#loaders) | ||
**file.js** | ||
```js | ||
import css from 'file.css'; | ||
``` | ||
### Example webpack config | ||
**webpack.config.js** | ||
``` javascript | ||
```js | ||
module.exports = { | ||
@@ -35,57 +44,70 @@ module: { | ||
test: /\.js$/, | ||
use: ["source-map-loader"], | ||
enforce: "pre" | ||
} | ||
] | ||
} | ||
enforce: 'pre', | ||
use: ['source-map-loader'], | ||
}, | ||
], | ||
}, | ||
}; | ||
``` | ||
`source-map-loader` extracts existing source maps from all JavaScript entries. This includes both inline source maps as well as those linked via URL. All source map data is passed to webpack for processing as per a chosen [source map style](https://webpack.js.org/configuration/devtool/) specified by the `devtool` option in [webpack.config.js](https://webpack.js.org/configuration/). | ||
`source-map-loader` extracts existing source maps from all JavaScript entries. | ||
This includes both inline source maps as well as those linked via URL. | ||
All source map data is passed to webpack for processing as per a chosen [source map style](https://webpack.js.org/configuration/devtool/) specified by the `devtool` option in [webpack.config.js](https://webpack.js.org/configuration/). | ||
This loader is especially useful when using 3rd-party libraries having their own source maps. | ||
If not extracted and processed into the source map of the webpack bundle, browsers may misinterpret source map data. `source-map-loader` allows webpack to maintain source map data continuity across libraries so ease of debugging is preserved. | ||
`source-map-loader` will extract from any JavaScript file, including those in the `node_modules` directory. | ||
Be mindful in setting [include](https://webpack.js.org/configuration/module/#rule-include) and [exclude](https://webpack.js.org/configuration/module/#rule-exclude) rule conditions to maximize bundling performance. | ||
This loader is especially useful when using 3rd-party libraries having their own source maps. If not extracted and processed into the source map of the webpack bundle, browsers may misinterpret source map data. `source-map-loader` allows webpack to maintain source map data continuity across libraries so ease of debugging is preserved. | ||
And run `webpack` via your preferred method. | ||
`source-map-loader` will extract from any JavaScript file, including those in the `node_modules` directory. Be mindful in setting [include](https://webpack.js.org/configuration/module/#rule-include) and [exclude](https://webpack.js.org/configuration/module/#rule-exclude) rule conditions to maximize bundling performance. | ||
## Examples | ||
<h2 align="center">Maintainers</h2> | ||
### Ignoring Warnings | ||
<table> | ||
<tbody> | ||
<tr> | ||
<td align="center"> | ||
<img width="150" height="150" | ||
src="https://avatars3.githubusercontent.com/u/166921?v=3&s=150"> | ||
</br> | ||
<a href="https://github.com/bebraw">Juho Vepsäläinen</a> | ||
</td> | ||
<td align="center"> | ||
<img width="150" height="150" | ||
src="https://avatars2.githubusercontent.com/u/8420490?v=3&s=150"> | ||
</br> | ||
<a href="https://github.com/d3viant0ne">Joshua Wiens</a> | ||
</td> | ||
<td align="center"> | ||
<img width="150" height="150" | ||
src="https://avatars3.githubusercontent.com/u/533616?v=3&s=150"> | ||
</br> | ||
<a href="https://github.com/SpaceK33z">Kees Kluskens</a> | ||
</td> | ||
<td align="center"> | ||
<img width="150" height="150" | ||
src="https://avatars3.githubusercontent.com/u/3408176?v=3&s=150"> | ||
</br> | ||
<a href="https://github.com/TheLarkInn">Sean Larkin</a> | ||
</td> | ||
</tr> | ||
<tbody> | ||
</table> | ||
To ignore warnings, you can use the following configuration: | ||
**webpack.config.js** | ||
```js | ||
module.exports = { | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.js$/, | ||
enforce: 'pre', | ||
use: ['source-map-loader'], | ||
}, | ||
], | ||
}, | ||
stats: { | ||
warningsFilter: [/Failed to parse source map/], | ||
}, | ||
}; | ||
``` | ||
More information about the `warningsFilters` option you can find [here](https://webpack.js.org/configuration/stats/#statswarningsfilter); | ||
## Contributing | ||
Please take a moment to read our contributing guidelines if you haven't yet done so. | ||
[CONTRIBUTING](./.github/CONTRIBUTING.md) | ||
## License | ||
[MIT](./LICENSE) | ||
[npm]: https://img.shields.io/npm/v/source-map-loader.svg | ||
[npm-url]: https://npmjs.com/package/source-map-loader | ||
[node]: https://img.shields.io/node/v/source-map-loader.svg | ||
[node-url]: https://nodejs.org | ||
[deps]: https://david-dm.org/webpack-contrib/source-map-loader.svg | ||
[deps-url]: https://david-dm.org/webpack-contrib/source-map-loader | ||
[chat]: https://img.shields.io/badge/gitter-webpack%2Fwebpack-brightgreen.svg | ||
[tests]: https://github.com/webpack-contrib/source-map-loader/workflows/source-map-loader/badge.svg | ||
[tests-url]: https://github.com/webpack-contrib/source-map-loader/actions | ||
[cover]: https://codecov.io/gh/webpack-contrib/source-map-loader/branch/master/graph/badge.svg | ||
[cover-url]: https://codecov.io/gh/webpack-contrib/source-map-loader | ||
[chat]: https://badges.gitter.im/webpack/webpack.svg | ||
[chat-url]: https://gitter.im/webpack/webpack | ||
[size]: https://packagephobia.now.sh/badge?p=source-map-loader | ||
[size-url]: https://packagephobia.now.sh/result?p=source-map-loader |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
25447
477
0
112
1
6
22
9
+ Addeddata-urls@^2.0.0
+ Addediconv-lite@^0.5.1
+ Addedschema-utils@^2.6.6
+ Addedsource-map@^0.6.0
+ Added@jridgewell/gen-mapping@0.3.5(transitive)
+ Added@jridgewell/resolve-uri@3.1.2(transitive)
+ Added@jridgewell/set-array@1.2.1(transitive)
+ Added@jridgewell/source-map@0.3.6(transitive)
+ Added@jridgewell/sourcemap-codec@1.5.0(transitive)
+ Added@jridgewell/trace-mapping@0.3.25(transitive)
+ Added@types/eslint@9.6.1(transitive)
+ Added@types/eslint-scope@3.7.7(transitive)
+ Added@types/estree@1.0.6(transitive)
+ Added@types/json-schema@7.0.15(transitive)
+ Added@types/node@22.9.0(transitive)
+ Added@webassemblyjs/ast@1.14.1(transitive)
+ Added@webassemblyjs/floating-point-hex-parser@1.13.2(transitive)
+ Added@webassemblyjs/helper-api-error@1.13.2(transitive)
+ Added@webassemblyjs/helper-buffer@1.14.1(transitive)
+ Added@webassemblyjs/helper-numbers@1.13.2(transitive)
+ Added@webassemblyjs/helper-wasm-bytecode@1.13.2(transitive)
+ Added@webassemblyjs/helper-wasm-section@1.14.1(transitive)
+ Added@webassemblyjs/ieee754@1.13.2(transitive)
+ Added@webassemblyjs/leb128@1.13.2(transitive)
+ Added@webassemblyjs/utf8@1.13.2(transitive)
+ Added@webassemblyjs/wasm-edit@1.14.1(transitive)
+ Added@webassemblyjs/wasm-gen@1.14.1(transitive)
+ Added@webassemblyjs/wasm-opt@1.14.1(transitive)
+ Added@webassemblyjs/wasm-parser@1.14.1(transitive)
+ Added@webassemblyjs/wast-printer@1.14.1(transitive)
+ Added@xtuc/ieee754@1.2.0(transitive)
+ Added@xtuc/long@4.2.2(transitive)
+ Addedabab@2.0.6(transitive)
+ Addedacorn@8.14.0(transitive)
+ Addedajv@6.12.6(transitive)
+ Addedajv-keywords@3.5.2(transitive)
+ Addedbrowserslist@4.24.2(transitive)
+ Addedbuffer-from@1.1.2(transitive)
+ Addedcaniuse-lite@1.0.30001679(transitive)
+ Addedchrome-trace-event@1.0.4(transitive)
+ Addedcommander@2.20.3(transitive)
+ Addeddata-urls@2.0.0(transitive)
+ Addedelectron-to-chromium@1.5.55(transitive)
+ Addedenhanced-resolve@5.17.1(transitive)
+ Addedes-module-lexer@1.5.4(transitive)
+ Addedescalade@3.2.0(transitive)
+ Addedeslint-scope@5.1.1(transitive)
+ Addedesrecurse@4.3.0(transitive)
+ Addedestraverse@4.3.05.3.0(transitive)
+ Addedevents@3.3.0(transitive)
+ Addedfast-deep-equal@3.1.3(transitive)
+ Addedfast-json-stable-stringify@2.1.0(transitive)
+ Addedglob-to-regexp@0.4.1(transitive)
+ Addedgraceful-fs@4.2.11(transitive)
+ Addedhas-flag@4.0.0(transitive)
+ Addediconv-lite@0.5.2(transitive)
+ Addedjest-worker@27.5.1(transitive)
+ Addedjson-parse-even-better-errors@2.3.1(transitive)
+ Addedjson-schema-traverse@0.4.1(transitive)
+ Addedjson5@2.2.3(transitive)
+ Addedloader-runner@4.3.0(transitive)
+ Addedloader-utils@2.0.4(transitive)
+ Addedmerge-stream@2.0.0(transitive)
+ Addedmime-db@1.52.0(transitive)
+ Addedmime-types@2.1.35(transitive)
+ Addedneo-async@2.6.2(transitive)
+ Addednode-releases@2.0.18(transitive)
+ Addedpicocolors@1.1.1(transitive)
+ Addedpunycode@2.3.1(transitive)
+ Addedrandombytes@2.1.0(transitive)
+ Addedsafe-buffer@5.2.1(transitive)
+ Addedsafer-buffer@2.1.2(transitive)
+ Addedschema-utils@2.7.13.3.0(transitive)
+ Addedserialize-javascript@6.0.2(transitive)
+ Addedsource-map@0.6.1(transitive)
+ Addedsource-map-support@0.5.21(transitive)
+ Addedsupports-color@8.1.1(transitive)
+ Addedtapable@2.2.1(transitive)
+ Addedterser@5.36.0(transitive)
+ Addedterser-webpack-plugin@5.3.10(transitive)
+ Addedtr46@2.1.0(transitive)
+ Addedundici-types@6.19.8(transitive)
+ Addedupdate-browserslist-db@1.1.1(transitive)
+ Addeduri-js@4.4.1(transitive)
+ Addedwatchpack@2.4.2(transitive)
+ Addedwebidl-conversions@6.1.0(transitive)
+ Addedwebpack@5.96.1(transitive)
+ Addedwebpack-sources@3.2.3(transitive)
+ Addedwhatwg-mimetype@2.3.0(transitive)
+ Addedwhatwg-url@8.7.0(transitive)
- Removedasync@^2.5.0
- Removedasync@2.6.4(transitive)
- Removedjson5@1.0.2(transitive)
- Removedloader-utils@1.4.2(transitive)
- Removedminimist@1.2.8(transitive)
Updatedloader-utils@^2.0.0