Skip to content

Commit

Permalink
fix: support webpack@5
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-akait committed Dec 18, 2019
1 parent 3203688 commit 0428206
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 22 deletions.
71 changes: 50 additions & 21 deletions azure-pipelines.yml
Expand Up @@ -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:
Expand All @@ -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'
Expand All @@ -34,10 +39,13 @@ jobs:

- job: Linux
pool:
vmImage: ubuntu-16.04
vmImage: ubuntu-latest
strategy:
maxParallel: 5
maxParallel: 6
matrix:
node-13:
node_version: ^13.0.0
webpack_version: latest
node-12:
node_version: ^12.0.0
webpack_version: latest
Expand All @@ -50,6 +58,9 @@ jobs:
node-6:
node_version: ^6.9.0
webpack_version: latest
node-10-canary:
node_version: ^10.13.0
webpack_version: next
steps:
- task: NodeTool@0
inputs:
Expand All @@ -64,14 +75,16 @@ 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)"'
- script: npm run test:coverage -- --ci --reporters="default" --reporters="jest-junit"
- script: npm run test:coverage -- --ci --reporters="default" --reporters="jest-junit" || $(continue_on_error)
displayName: 'Run tests with coverage'
- task: PublishTestResults@2
inputs:
Expand All @@ -85,10 +98,13 @@ jobs:

- job: macOS
pool:
vmImage: macOS-10.14
vmImage: macOS-latest
strategy:
maxParallel: 5
maxParallel: 6
matrix:
node-13:
node_version: ^13.0.0
webpack_version: latest
node-12:
node_version: ^12.0.0
webpack_version: latest
Expand All @@ -101,6 +117,9 @@ jobs:
node-6:
node_version: ^6.9.0
webpack_version: latest
node-10-canary:
node_version: ^10.13.0
webpack_version: next
steps:
- task: NodeTool@0
inputs:
Expand All @@ -115,14 +134,16 @@ 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)"'
- script: npm run test:coverage -- --ci --reporters="default" --reporters="jest-junit"
- script: npm run test:coverage -- --ci --reporters="default" --reporters="jest-junit" || $(continue_on_error)
displayName: 'Run tests with coverage'
- task: PublishTestResults@2
inputs:
Expand All @@ -136,10 +157,13 @@ jobs:

- job: Windows
pool:
vmImage: windows-2019
vmImage: windows-latest
strategy:
maxParallel: 5
maxParallel: 6
matrix:
node-13:
node_version: ^13.0.0
webpack_version: latest
node-12:
node_version: ^12.0.0
webpack_version: latest
Expand All @@ -152,6 +176,9 @@ jobs:
node-6:
node_version: ^6.9.0
webpack_version: latest
node-10-canary:
node_version: ^10.13.0
webpack_version: next
steps:
- script: 'git config --global core.autocrlf input'
displayName: 'Config git core.autocrlf'
Expand All @@ -169,10 +196,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)"'
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -114,7 +114,7 @@
"webpack-cli": "^3.3.10"
},
"peerDependencies": {
"webpack": "^4.0.0"
"webpack": "^4.0.0 || ^5.0.0"
},
"author": "Tobias Koppers @sokra",
"bugs": "https://github.com/webpack/webpack-dev-server/issues",
Expand Down

0 comments on commit 0428206

Please sign in to comment.