Skip to content

Commit

Permalink
feat: allow webpack3 peer dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Lewis committed Jun 20, 2017
1 parent 83837f7 commit c697eda
Show file tree
Hide file tree
Showing 6 changed files with 114 additions and 81 deletions.
3 changes: 2 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
yarn.lock -diff

* text=auto
bin/* eol=lf
bin/* eol=lf
package-lock.json -diff
47 changes: 31 additions & 16 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,48 @@
sudo: false
dist: trusty
language: node_js
branches:
only:
- master
matrix:
jobs:
fast_finish: true
allow_failures:
- env: WEBPACK_VERSION=canary
include:
- os: linux
node_js: '7'
env: WEBPACK_VERSION="2.2.0" JOB_PART=lint
- os: linux
node_js: '4.3'
env: WEBPACK_VERSION="2.2.0" JOB_PART=test
- os: linux
node_js: '6'
env: WEBPACK_VERSION="2.2.0" JOB_PART=test
- os: linux
node_js: '7'
env: WEBPACK_VERSION="2.2.0" JOB_PART=coverage
- &test-latest
stage: Webpack latest
nodejs: 6
env: WEBPACK_VERSION=latest JOB_PART=test
script: npm run travis:$JOB_PART
- <<: *test-latest
nodejs: 4.3
env: WEBPACK_VERSION=latest JOB_PART=test
script: npm run travis:$JOB_PART
- <<: *test-latest
node_js: 8
env: WEBPACK_VERSION=latest JOB_PART=lint
script: npm run travis:$JOB_PART
- <<: *test-latest
node_js: 8
env: WEBPACK_VERSION=latest JOB_PART=coverage
script: npm run travis:$JOB_PART
after_success: 'bash <(curl -s https://codecov.io/bash)'
- stage: Webpack canary
before_script: npm i --no-save git://github.com/webpack/webpack.git#master
script: npm run travis:$JOB_PART
node_js: 8
env: WEBPACK_VERSION=canary JOB_PART=test
before_install:
- 'if [[ `npm -v` != 5* ]]; then npm i -g npm@^5.0.0; fi'
- nvm --version
- node --version
- npm --version
before_script:
- |-
if [ "$WEBPACK_VERSION" ]; then
yarn add webpack@^$WEBPACK_VERSION
npm i --no-save webpack@$WEBPACK_VERSION
fi
script:
- 'yarn run pretest'
- 'yarn run travis:$JOB_PART'
- 'npm run travis:$JOB_PART'
after_success:
- 'bash <(curl -s https://codecov.io/bash)'
35 changes: 15 additions & 20 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,28 @@
# appveyor file
# http://www.appveyor.com/docs/appveyor-yml

init:
- git config --global core.autocrlf input

branches:
only:
- master

# what combinations to test
init:
- git config --global core.autocrlf input
environment:
matrix:
- nodejs_version: 7
- nodejs_version: '8'
webpack_version: 2.6.0
job_part: test
- nodejs_version: 6
- nodejs_version: '6'
webpack_version: 2.6.0
job_part: test
- nodejs_version: 4
- nodejs_version: '4.3'
webpack_version: 2.6.0
job_part: test

install:
- ps: Install-Product node $env:nodejs_version x64
- yarn install

build: off

build: 'off'
matrix:
fast_finish: true

install:
- 'ps: Install-Product node $env:nodejs_version x64'
- npm install
before_test:
- 'cmd: npm install webpack@^%webpack_version%'
test_script:
- node --version
- npm --version
- cmd: yarn run appveyor:%job_part%
- 'cmd: npm run appveyor:%job_part%'
26 changes: 13 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,29 @@
"version": "4.0.4",
"author": "Johannes Ewald @jhnns",
"description": "Less loader for webpack. Compiles Less to CSS.",
"main": "dist/index.js",
"main": "dist/cjs.js",
"scripts": {
"create-spec": "babel-node test/helpers/createSpec.js",
"pretest": "npm run create-spec",
"test": "jest",
"posttest": "npm run lint",
"travis:test": "yarn run test",
"appveyor:test": "npm test",
"travis:test": "npm run test -- --runInBand",
"appveyor:test": "npm run test",
"lint": "eslint --cache src test",
"webpack-defaults": "webpack-defaults",
"start": "yarn run build -- -w",
"start": "npm run build -- -w",
"build": "cross-env NODE_ENV=production babel src -d dist --ignore 'src/**/*.test.js'",
"clean:dist": "del-cli dist",
"lint-staged": "lint-staged",
"prebuild": "yarn run clean",
"prepublish": "yarn run build",
"release": "yarn run standard-version",
"prebuild": "npm run clean",
"prepublish": "npm run build",
"release": "standard-version",
"security": "nsp check",
"serve:dev": "nodemon $2 --exec babel-node",
"test:watch": "jest --watch",
"test:coverage": "jest --collectCoverageFrom='src/**/*.js' --coverage",
"travis:coverage": "yarn run test:coverage",
"travis:lint": "yarn run lint && yarn run security",
"travis:coverage": "npm run test:coverage -- --runInBand",
"travis:lint": "npm run lint && npm run security",
"clean": "del-cli dist"
},
"engines": {
Expand All @@ -38,7 +38,7 @@
},
"peerDependencies": {
"less": "^2.3.1",
"webpack": "^2.2.0"
"webpack": "^2.0.0 || >= 3.0.0-rc.0 || ^3.0.0"
},
"devDependencies": {
"babel-cli": "^6.24.0",
Expand All @@ -59,8 +59,8 @@
"nsp": "^2.6.3",
"pre-commit": "^1.2.2",
"standard-version": "^4.0.0",
"webpack": "^2.3.2",
"webpack-defaults": "^1.0.1"
"webpack": "^3.0.0",
"webpack-defaults": "^1.4.0"
},
"repository": {
"type": "git",
Expand All @@ -79,4 +79,4 @@
"git add"
]
}
}
}
1 change: 1 addition & 0 deletions src/cjs.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require('./index').default;
83 changes: 52 additions & 31 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -54,17 +54,30 @@ agent-base@2:
extend "~3.0.0"
semver "~5.0.1"

ajv-keywords@^1.0.0, ajv-keywords@^1.1.1:
ajv-keywords@^1.0.0:
version "1.5.1"
resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-1.5.1.tgz#314dd0a4b3368fad3dfcdc54ede6171b886daf3c"

ajv-keywords@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-2.1.0.tgz#a296e17f7bfae7c1ce4f7e0de53d29cb32162df0"

ajv@^4.7.0, ajv@^4.9.1:
version "4.11.8"
resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.8.tgz#82ffb02b29e662ae53bdc20af15947706739c536"
dependencies:
co "^4.6.0"
json-stable-stringify "^1.0.1"

ajv@^5.1.5:
version "5.2.0"
resolved "https://registry.yarnpkg.com/ajv/-/ajv-5.2.0.tgz#c1735024c5da2ef75cc190713073d44f098bf486"
dependencies:
co "^4.6.0"
fast-deep-equal "^0.1.0"
json-schema-traverse "^0.3.0"
json-stable-stringify "^1.0.1"

align-text@^0.1.1, align-text@^0.1.3:
version "0.1.4"
resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117"
Expand Down Expand Up @@ -1951,6 +1964,10 @@ [email protected]:
version "1.0.2"
resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.0.2.tgz#e1080e0658e300b06294990cc70e1502235fd550"

fast-deep-equal@^0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-0.1.0.tgz#5c6f4599aba6b333ee3342e2ed978672f1001f8d"

fast-levenshtein@~2.0.4:
version "2.0.6"
resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917"
Expand Down Expand Up @@ -3007,6 +3024,10 @@ json-loader@^0.5.4:
version "0.5.4"
resolved "https://registry.yarnpkg.com/json-loader/-/json-loader-0.5.4.tgz#8baa1365a632f58a3c46d20175fc6002c96e37de"

json-schema-traverse@^0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.3.0.tgz#0016c0b1ca1efe46d44d37541bcdfc19dcfae0db"

[email protected]:
version "0.2.3"
resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13"
Expand Down Expand Up @@ -3186,15 +3207,6 @@ loader-runner@^2.3.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-2.3.0.tgz#f482aea82d543e07921700d5a46ef26fdac6b8a2"

loader-utils@^0.2.16:
version "0.2.17"
resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-0.2.17.tgz#f86e6374d43205a6e6c60e9196f17c0299bfb348"
dependencies:
big.js "^3.1.3"
emojis-list "^2.0.0"
json5 "^0.5.0"
object-assign "^4.0.1"

loader-utils@^1.0.3, loader-utils@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.1.0.tgz#c98aef488bcceda2ffb5e2de646d6a754429f5cd"
Expand Down Expand Up @@ -4420,9 +4432,9 @@ [email protected]:
dependencies:
hoek "2.x.x"

source-list-map@^1.1.1:
version "1.1.2"
resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-1.1.2.tgz#9889019d1024cce55cdc069498337ef6186a11a1"
source-list-map@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.0.tgz#aaa47403f7b245a92fbc97ea08f250d6087ed085"

source-map-support@^0.4.2:
version "0.4.15"
Expand Down Expand Up @@ -4809,9 +4821,9 @@ typedarray@^0.0.6:
version "0.0.6"
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"

uglify-js@^2.6, uglify-js@^2.8.27:
version "2.8.27"
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.27.tgz#47787f912b0f242e5b984343be8e35e95f694c9c"
uglify-js@^2.6, uglify-js@^2.8.29:
version "2.8.29"
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd"
dependencies:
source-map "~0.5.1"
yargs "~3.10.0"
Expand All @@ -4822,6 +4834,14 @@ uglify-to-browserify@~1.0.0:
version "1.0.2"
resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7"

uglifyjs-webpack-plugin@^0.4.4:
version "0.4.6"
resolved "https://registry.yarnpkg.com/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-0.4.6.tgz#b951f4abb6bd617e66f63eb891498e391763e309"
dependencies:
source-map "^0.5.6"
uglify-js "^2.8.29"
webpack-sources "^1.0.1"

uid-number@^0.0.6:
version "0.0.6"
resolved "https://registry.yarnpkg.com/uid-number/-/uid-number-0.0.6.tgz#0ea10e8035e8eb5b8e4449f06da1c730663baa81"
Expand Down Expand Up @@ -4951,9 +4971,9 @@ webidl-conversions@^4.0.0:
version "4.0.1"
resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.1.tgz#8015a17ab83e7e1b311638486ace81da6ce206a0"

webpack-defaults@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/webpack-defaults/-/webpack-defaults-1.0.1.tgz#73c40b85c02b4e6408576fd03a59325c0215a978"
webpack-defaults@^1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/webpack-defaults/-/webpack-defaults-1.4.0.tgz#2aa873a32ebe9bd0aff9d15c22c40c778683df46"
dependencies:
chalk "^1.1.3"
mrm-core "^1.1.0"
Expand All @@ -4964,37 +4984,38 @@ webpack-merge@^4.0.0:
dependencies:
lodash "^4.17.4"

webpack-sources@^0.2.3:
version "0.2.3"
resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-0.2.3.tgz#17c62bfaf13c707f9d02c479e0dcdde8380697fb"
webpack-sources@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-1.0.1.tgz#c7356436a4d13123be2e2426a05d1dad9cbe65cf"
dependencies:
source-list-map "^1.1.1"
source-list-map "^2.0.0"
source-map "~0.5.3"

webpack@^2.3.2:
version "2.6.1"
resolved "https://registry.yarnpkg.com/webpack/-/webpack-2.6.1.tgz#2e0457f0abb1ac5df3ab106c69c672f236785f07"
webpack@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/webpack/-/webpack-3.0.0.tgz#ee9bcebf21247f7153cb410168cab45e3a59d4d7"
dependencies:
acorn "^5.0.0"
acorn-dynamic-import "^2.0.0"
ajv "^4.7.0"
ajv-keywords "^1.1.1"
ajv "^5.1.5"
ajv-keywords "^2.0.0"
async "^2.1.2"
enhanced-resolve "^3.0.0"
escope "^3.6.0"
interpret "^1.0.0"
json-loader "^0.5.4"
json5 "^0.5.1"
loader-runner "^2.3.0"
loader-utils "^0.2.16"
loader-utils "^1.1.0"
memory-fs "~0.4.1"
mkdirp "~0.5.0"
node-libs-browser "^2.0.0"
source-map "^0.5.3"
supports-color "^3.1.0"
tapable "~0.2.5"
uglify-js "^2.8.27"
uglifyjs-webpack-plugin "^0.4.4"
watchpack "^1.3.1"
webpack-sources "^0.2.3"
webpack-sources "^1.0.1"
yargs "^6.0.0"

whatwg-encoding@^1.0.1:
Expand Down

0 comments on commit c697eda

Please sign in to comment.