Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
ai committed Feb 23, 2018
1 parent 62726ef commit 3e4ecd0
Show file tree
Hide file tree
Showing 5 changed files with 929 additions and 377 deletions.
32 changes: 16 additions & 16 deletions package.json
Expand Up @@ -16,38 +16,38 @@
"bin": "cli.js",
"dependencies": {
"bytes": "^3.0.0",
"chalk": "^2.3.0",
"chalk": "^2.3.1",
"ci-job-number": "^0.3.0",
"compression-webpack-plugin": "^1.1.6",
"compression-webpack-plugin": "^1.1.7",
"cosmiconfig": "^4.0.0",
"css-loader": "^0.28.9",
"css-loader": "^0.28.10",
"escape-string-regexp": "^1.0.5",
"file-loader": "^1.1.6",
"globby": "^7.1.1",
"file-loader": "^1.1.9",
"globby": "^8.0.1",
"gzip-size": "^4.1.0",
"memory-fs": "^0.4.1",
"read-pkg-up": "^3.0.0",
"style-loader": "^0.20.1",
"uglifyjs-webpack-plugin": "^1.1.8",
"style-loader": "^0.20.2",
"uglifyjs-webpack-plugin": "^1.2.0",
"webpack": "^3.11.0",
"webpack-bundle-analyzer": "^2.10.0",
"yargs": "^11.0.0"
},
"devDependencies": {
"attr-accept": "^1.1.0",
"attr-accept": "^1.1.2",
"cross-spawn": "^6.0.4",
"eslint": "^4.17.0",
"eslint": "^4.18.1",
"eslint-ci": "^0.1.1",
"eslint-config-logux": "^19.0.0",
"eslint-config-standard": "^10.2.1",
"eslint-plugin-import": "^2.8.0",
"eslint-plugin-jest": "^21.8.0",
"eslint-plugin-node": "^6.0.0",
"eslint-config-logux": "^21.0.0",
"eslint-config-standard": "^11.0.0",
"eslint-plugin-import": "^2.9.0",
"eslint-plugin-jest": "^21.12.2",
"eslint-plugin-node": "^6.0.1",
"eslint-plugin-promise": "^3.6.0",
"eslint-plugin-security": "^1.4.0",
"eslint-plugin-standard": "^3.0.1",
"jest": "^22.2.2",
"lint-staged": "^6.1.0",
"jest": "^22.4.2",
"lint-staged": "^7.0.0",
"pre-commit": "^1.2.2",
"redux": "^3.7.2",
"yaspeller-ci": "^1.0.0"
Expand Down
4 changes: 2 additions & 2 deletions test/cli.test.js
Expand Up @@ -253,8 +253,8 @@ it('uses different units', () => {

it('shows bytes if value is same in different units', () => {
return run([], { cwd: fixture('exact') }).then(result => {
expect(result.out).toContain('Package size: 1876 B')
expect(result.out).toContain('Size limit: 1873 B')
expect(result.out).toContain('Package size: 2287 B')
expect(result.out).toContain('Size limit: 2283 B')
expect(result.code).toEqual(3)
})
})
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/exact/package.json
Expand Up @@ -6,7 +6,7 @@
"size-limit": [
{
"path": "index.js",
"limit": "1.83 KB"
"limit": "2.23 KB"
}
]
}
9 changes: 5 additions & 4 deletions test/index.test.js
Expand Up @@ -8,6 +8,10 @@ function fixture (name) {
return path.join(__dirname, 'fixtures', `${ name }.js`)
}

function trim (num) {
return Math.floor(num / 10) * 10
}

it('returns 0 for empty project', () => {
return getSize(fixture('unlimit/empty')).then(size => {
expect(size).toEqual(0)
Expand Down Expand Up @@ -46,14 +50,11 @@ it('support images', () => {

it('supports CSS', () => {
return getSize(fixture('css/index')).then(size => {
expect(size).toEqual(2341)
expect(trim(size)).toEqual(2340)
})
})

it('supports CSS modules', () => {
function trim (num) {
return Math.floor(num / 10) * 10
}
return getSize(fixture('cssmodules/index')).then(size => {
expect(trim(size)).toEqual(2370)
})
Expand Down

0 comments on commit 3e4ecd0

Please sign in to comment.