From 7f2c5c68e03d663344001afb2ef9267855aab0e1 Mon Sep 17 00:00:00 2001 From: evilebottnawi Date: Fri, 13 Dec 2019 14:21:53 +0300 Subject: [PATCH] chore(defaults): update --- .editorconfig | 1 - CHANGELOG.md | 7 +++++ azure-pipelines.yml | 61 +++++++++++++++++++++++++++---------------- lint-staged.config.js | 2 +- package.json | 32 +++++++++++++---------- test/helpers.js | 8 ++++-- 6 files changed, 71 insertions(+), 40 deletions(-) diff --git a/.editorconfig b/.editorconfig index 9f89f364d..5f7952820 100644 --- a/.editorconfig +++ b/.editorconfig @@ -9,5 +9,4 @@ insert_final_newline = true trim_trailing_whitespace = true [*.md] -insert_final_newline = true trim_trailing_whitespace = false diff --git a/CHANGELOG.md b/CHANGELOG.md index 31f4e3e42..b4f61eb49 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ 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. +### [3.3.2](https://github.com/webpack-contrib/css-loader/compare/v3.3.1...v3.3.2) (2019-12-12) + + +### Bug Fixes + +* logic for order and media queries for imports ([1fb5134](https://github.com/webpack-contrib/css-loader/commit/1fb51340a7719b6f5b517cb71ea85ec5d45c1199)) + ### [3.3.1](https://github.com/webpack-contrib/css-loader/compare/v3.3.0...v3.3.1) (2019-12-12) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 500925c2c..6616426d2 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -2,10 +2,13 @@ trigger: - master - next +variables: + npm_config_cache: $(Pipeline.Workspace)/.npm + jobs: - job: Lint pool: - vmImage: ubuntu-16.04 + vmImage: ubuntu-latest steps: - task: NodeTool@0 inputs: @@ -20,10 +23,12 @@ jobs: node -v npm -v displayName: 'Print versions' - - task: Npm@1 + - task: CacheBeta@1 inputs: - command: custom - customCommand: ci + key: npm | $(Agent.OS) | package-lock.json + path: $(npm_config_cache) + displayName: 'Cache npm' + - script: npm ci displayName: 'Install dependencies' - script: npm run lint displayName: 'Run lint' @@ -34,10 +39,13 @@ jobs: - job: Linux pool: - vmImage: ubuntu-16.04 + vmImage: ubuntu-latest strategy: - maxParallel: 4 + maxParallel: 5 matrix: + node-13: + node_version: ^13.0.0 + webpack_version: latest node-12: node_version: ^12.0.0 webpack_version: latest @@ -50,7 +58,6 @@ jobs: node-10-canary: node_version: ^10.13.0 webpack_version: next - continue_on_error: true steps: - task: NodeTool@0 inputs: @@ -65,10 +72,12 @@ jobs: node -v npm -v displayName: 'Print versions' - - task: Npm@1 + - task: CacheBeta@1 inputs: - command: custom - customCommand: ci + key: npm | $(Agent.OS) | package-lock.json + path: $(npm_config_cache) + displayName: 'Cache npm' + - script: npm ci displayName: 'Install dependencies' - script: npm i webpack@$(webpack_version) displayName: 'Install "webpack@$(webpack_version)"' @@ -86,10 +95,13 @@ jobs: - job: macOS pool: - vmImage: macOS-10.14 + vmImage: macOS-latest strategy: - maxParallel: 4 + maxParallel: 5 matrix: + node-13: + node_version: ^13.0.0 + webpack_version: latest node-12: node_version: ^12.0.0 webpack_version: latest @@ -102,7 +114,6 @@ jobs: node-10-canary: node_version: ^10.13.0 webpack_version: next - continue_on_error: true steps: - task: NodeTool@0 inputs: @@ -117,10 +128,12 @@ jobs: node -v npm -v displayName: 'Print versions' - - task: Npm@1 + - task: CacheBeta@1 inputs: - command: custom - customCommand: ci + key: npm | $(Agent.OS) | package-lock.json + path: $(npm_config_cache) + displayName: 'Cache npm' + - script: npm ci displayName: 'Install dependencies' - script: npm i webpack@$(webpack_version) displayName: 'Install "webpack@$(webpack_version)"' @@ -138,10 +151,13 @@ jobs: - job: Windows pool: - vmImage: windows-2019 + vmImage: windows-latest strategy: - maxParallel: 4 + maxParallel: 5 matrix: + node-13: + node_version: ^13.0.0 + webpack_version: latest node-12: node_version: ^12.0.0 webpack_version: latest @@ -154,7 +170,6 @@ jobs: node-10-canary: node_version: ^10.13.0 webpack_version: next - continue_on_error: true steps: - script: 'git config --global core.autocrlf input' displayName: 'Config git core.autocrlf' @@ -172,10 +187,12 @@ jobs: node -v npm -v displayName: 'Print versions' - - task: Npm@1 + - task: CacheBeta@1 inputs: - command: custom - customCommand: ci + key: npm | $(Agent.OS) | package-lock.json + path: $(npm_config_cache) + displayName: 'Cache npm' + - script: npm ci displayName: 'Install dependencies' - script: npm i webpack@$(webpack_version) displayName: 'Install "webpack@$(webpack_version)"' diff --git a/lint-staged.config.js b/lint-staged.config.js index 77a86a716..618a5ec4e 100644 --- a/lint-staged.config.js +++ b/lint-staged.config.js @@ -1,4 +1,4 @@ module.exports = { '*.js': ['prettier --write', 'eslint --fix', 'git add'], - '*.{json,md,yml,css}': ['prettier --write', 'git add'], + '*.{json,md,yml,css,ts}': ['prettier --write', 'git add'], }; diff --git a/package.json b/package.json index 12ec12309..003bbb850 100644 --- a/package.json +++ b/package.json @@ -1,35 +1,39 @@ { "name": "css-loader", - "version": "3.3.1", + "version": "3.3.2", "description": "css loader module for webpack", "license": "MIT", "repository": "webpack-contrib/css-loader", "author": "Tobias Koppers @sokra", "homepage": "https://github.com/webpack-contrib/css-loader", "bugs": "https://github.com/webpack-contrib/css-loader/issues", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, "main": "dist/cjs.js", "engines": { "node": ">= 8.9.0" }, "scripts": { "start": "npm run build -- -w", - "prebuild": "npm run clean", - "build": "cross-env NODE_ENV=production babel src -d dist --ignore \"src/**/*.test.js\" --copy-files", + "clean": "del-cli dist", "validate:runtime": "es-check es5 \"dist/runtime/**/*.js\"", + "prebuild": "npm run clean", + "build": "cross-env NODE_ENV=production babel src -d dist --copy-files", "postbuild": "npm run validate:runtime", - "clean": "del-cli dist", "commitlint": "commitlint --from=master", - "lint:prettier": "prettier \"{**/*,*}.{js,json,md,yml,css}\" --list-different", - "lint:js": "eslint --cache src test", - "lint": "npm-run-all -l -p \"lint:**\"", - "prepare": "npm run build", - "release": "standard-version", "security": "npm audit", + "lint:prettier": "prettier \"{**/*,*}.{js,json,md,yml,css,ts}\" --list-different", + "lint:js": "eslint --cache .", + "lint": "npm-run-all -l -p \"lint:**\"", "test:only": "cross-env NODE_ENV=test jest", - "test:watch": "cross-env NODE_ENV=test jest --watch", - "test:coverage": "cross-env NODE_ENV=test jest --collectCoverageFrom=\"src/**/*.js\" --coverage", + "test:watch": "npm run test:only -- --watch", + "test:coverage": "npm run test:only -- --collectCoverageFrom=\"src/**/*.js\" --coverage", "pretest": "npm run lint", - "test": "cross-env NODE_ENV=test npm run test:coverage", + "test": "npm run test:coverage", + "prepare": "npm run build", + "release": "standard-version", "defaults": "webpack-defaults" }, "files": [ @@ -60,7 +64,7 @@ "@babel/preset-env": "^7.7.4", "@commitlint/cli": "^8.2.0", "@commitlint/config-conventional": "^8.2.0", - "@webpack-contrib/defaults": "^5.0.2", + "@webpack-contrib/defaults": "^6.3.0", "@webpack-contrib/eslint-config-webpack": "^3.0.0", "babel-jest": "^24.9.0", "commitlint-azure-pipelines-cli": "^1.0.2", @@ -76,7 +80,7 @@ "jest": "^24.9.0", "jest-junit": "^9.0.0", "lint-staged": "^9.5.0", - "memory-fs": "^0.5.0", + "memfs": "^3.0.1", "npm-run-all": "^4.1.5", "postcss-loader": "^3.0.0", "postcss-preset-env": "^6.7.0", diff --git a/test/helpers.js b/test/helpers.js index dc1824010..12c85f8cc 100644 --- a/test/helpers.js +++ b/test/helpers.js @@ -3,7 +3,7 @@ import path from 'path'; import del from 'del'; import webpack from 'webpack'; -import MemoryFS from 'memory-fs'; +import { createFsFromVolume, Volume } from 'memfs'; import stripAnsi from 'strip-ansi'; import normalizePath from 'normalize-path'; @@ -205,7 +205,11 @@ function compile(fixture, config = {}, options = {}) { const compiler = webpack(config); if (!options.output) { - compiler.outputFileSystem = new MemoryFS(); + const outputFileSystem = createFsFromVolume(new Volume()); + // Todo remove when we drop webpack@4 support + outputFileSystem.join = path.join.bind(path); + + compiler.outputFileSystem = outputFileSystem; } return new Promise((resolve, reject) =>