Skip to content
This repository was archived by the owner on Mar 17, 2021. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: webpack-contrib/file-loader
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v6.1.0
Choose a base ref
...
head repository: webpack-contrib/file-loader
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v6.1.1
Choose a head ref
  • 2 commits
  • 5 files changed
  • 2 contributors

Commits on Oct 9, 2020

  1. chore(deps): update

    evilebottnawi authored Oct 9, 2020
    Copy the full SHA
    60508cf View commit details
  2. Copy the full SHA
    6fadfbe View commit details
Showing with 963 additions and 754 deletions.
  1. +6 −0 CHANGELOG.md
  2. +934 −732 package-lock.json
  3. +17 −17 package.json
  4. +5 −5 src/index.js
  5. +1 −0 test/helpers/getCompiler.js
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -2,6 +2,12 @@

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.

### [6.1.1](https://github.com/webpack-contrib/file-loader/compare/v6.1.0...v6.1.1) (2020-10-09)

### Chore

* update `schema-utils`

## [6.1.0](https://github.com/webpack-contrib/file-loader/compare/v6.0.0...v6.1.0) (2020-08-31)


1,666 changes: 934 additions & 732 deletions package-lock.json

Large diffs are not rendered by default.

34 changes: 17 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "file-loader",
"version": "6.1.0",
"version": "6.1.1",
"description": "A file loader module for webpack",
"license": "MIT",
"repository": "webpack-contrib/file-loader",
@@ -42,32 +42,32 @@
},
"dependencies": {
"loader-utils": "^2.0.0",
"schema-utils": "^2.7.1"
"schema-utils": "^3.0.0"
},
"devDependencies": {
"@babel/cli": "^7.10.5",
"@babel/core": "^7.11.4",
"@babel/preset-env": "^7.11.0",
"@commitlint/cli": "^10.0.0",
"@commitlint/config-conventional": "^10.0.0",
"@babel/cli": "^7.11.6",
"@babel/core": "^7.11.6",
"@babel/preset-env": "^7.11.5",
"@commitlint/cli": "^11.0.0",
"@commitlint/config-conventional": "^11.0.0",
"@webpack-contrib/defaults": "^6.3.0",
"@webpack-contrib/eslint-config-webpack": "^3.0.0",
"babel-jest": "^26.3.0",
"babel-jest": "^26.5.2",
"cross-env": "^7.0.2",
"del": "^5.1.0",
"del": "^6.0.0",
"del-cli": "^3.0.1",
"eslint": "^7.7.0",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-import": "^2.22.0",
"husky": "^4.2.5",
"jest": "^26.4.2",
"lint-staged": "^10.2.13",
"eslint": "^7.10.0",
"eslint-config-prettier": "^6.12.0",
"eslint-plugin-import": "^2.22.1",
"husky": "^4.3.0",
"jest": "^26.5.2",
"lint-staged": "^10.4.0",
"memfs": "^3.2.0",
"npm-run-all": "^4.1.5",
"prettier": "^2.1.1",
"prettier": "^2.1.2",
"standard-version": "^9.0.0",
"url-loader": "^4.1.0",
"webpack": "^4.44.1"
"webpack": "^4.44.2"
},
"keywords": [
"webpack"
10 changes: 5 additions & 5 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import path from 'path';

import loaderUtils from 'loader-utils';
import validateOptions from 'schema-utils';
import { getOptions, interpolateName } from 'loader-utils';
import { validate } from 'schema-utils';

import schema from './options.json';

export default function loader(content) {
const options = loaderUtils.getOptions(this);
const options = getOptions(this);

validateOptions(schema, options, {
validate(schema, options, {
name: 'File Loader',
baseDataPath: 'options',
});
@@ -17,7 +17,7 @@ export default function loader(content) {
const name = options.name || '[contenthash].[ext]';
const immutable = /\[([^:\]]+:)?(hash|contenthash)(:[^\]]+)?\]/gi.test(name);

const url = loaderUtils.interpolateName(this, name, {
const url = interpolateName(this, name, {
context,
content,
regExp: options.regExp,
1 change: 1 addition & 0 deletions test/helpers/getCompiler.js
Original file line number Diff line number Diff line change
@@ -10,6 +10,7 @@ export default (fixture, loaderOptions = {}, config = {}) => {
context: path.resolve(__dirname, '../fixtures'),
entry: path.resolve(__dirname, '../fixtures', fixture),
output: {
publicPath: '',
path: path.resolve(__dirname, '../outputs'),
filename: '[name].bundle.js',
chunkFilename: '[name].chunk.js',