Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
frenzzy committed Apr 20, 2017
1 parent 95c998f commit 40a52bb
Show file tree
Hide file tree
Showing 9 changed files with 49 additions and 42 deletions.
4 changes: 2 additions & 2 deletions LICENSE.txt
@@ -1,6 +1,6 @@
The MIT License
The MIT License

Copyright (c) 2015-2016 Kriasoft, LLC. All rights reserved.
Copyright © 2015-present Kriasoft, LLC. All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 2 additions & 2 deletions README.md
@@ -1,4 +1,4 @@
<img src="https://cloud.githubusercontent.com/assets/8555194/19998202/ccab0da2-a26b-11e6-9c71-f0b904762c3b.png" width="150" height="150" />
<img width="150" height="150" align="right" src="https://raw.githubusercontent.com/kriasoft/isomorphic-style-loader/master/logo.svg" />

# Isomorphic CSS style loader for [Webpack](http://webpack.github.io)

Expand Down Expand Up @@ -174,7 +174,7 @@ because the [`debug` option has been removed](https://gist.github.com/sokra/27b2

### License

The MIT License © 2015-2016 Kriasoft, LLC. All rights reserved.
The MIT License © 2015-present Kriasoft, LLC. All rights reserved.

---
Made with ♥ by Konstantin Tarkus ([@koistya](https://twitter.com/koistya)) and [contributors](https://github.com/kriasoft/isomorphic-style-loader/graphs/contributors)
7 changes: 7 additions & 0 deletions logo.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
50 changes: 25 additions & 25 deletions package.json
Expand Up @@ -26,6 +26,9 @@
],
"license": "MIT",
"main": "lib/index.js",
"files": [
"lib"
],
"babel": {
"presets": [
"react",
Expand All @@ -49,34 +52,34 @@
}
},
"dependencies": {
"babel-runtime": "^6.11.6",
"babel-runtime": "^6.23.0",
"hoist-non-react-statics": "^1.2.0",
"loader-utils": "^0.2.16",
"loader-utils": "^1.1.0",
"prop-types": "^15.5.8"
},
"devDependencies": {
"babel-cli": "^6.16.0",
"babel-core": "^6.17.0",
"babel-eslint": "^7.0.0",
"babel-plugin-transform-runtime": "^6.15.0",
"babel-preset-latest": "^6.16.0",
"babel-preset-react": "^6.16.0",
"babel-register": "^6.16.3",
"babel-cli": "^6.24.1",
"babel-core": "^6.24.1",
"babel-eslint": "^7.2.2",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-preset-latest": "^6.24.1",
"babel-preset-react": "^6.24.1",
"babel-register": "^6.24.1",
"chai": "^3.5.0",
"coveralls": "^2.11.14",
"coveralls": "^2.13.0",
"create-react-class": "^15.5.2",
"eslint": "^3.7.1",
"eslint-config-airbnb": "^12.0.0",
"eslint-plugin-import": "^1.16.0",
"eslint-plugin-jsx-a11y": "^2.2.3",
"eslint-plugin-react": "^6.4.1",
"eslint": "^3.19.0",
"eslint-config-airbnb": "^14.1.0",
"eslint-plugin-import": "^2.2.0",
"eslint-plugin-jsx-a11y": "^4.0.0",
"eslint-plugin-react": "^6.10.3",
"istanbul": "^1.1.0-alpha.1",
"jsdom": "^9.6.0",
"mocha": "^3.1.2",
"react": "^15.3.2",
"react-dom": "^15.3.2",
"rimraf": "^2.5.4",
"sinon": "^2.0.0-pre.3"
"jsdom": "^9.12.0",
"mocha": "^3.2.0",
"react": "^15.5.4",
"react-dom": "^15.5.4",
"rimraf": "^2.6.1",
"sinon": "^2.1.0"
},
"scripts": {
"lint": "eslint src test",
Expand All @@ -86,8 +89,5 @@
"coveralls": "cat ./coverage/lcov.info | coveralls",
"build": "rimraf lib && babel src --out-dir lib",
"prepublish": "rimraf lib && babel src --out-dir lib"
},
"files": [
"lib"
]
}
}
2 changes: 1 addition & 1 deletion src/index.js
@@ -1,7 +1,7 @@
/**
* Isomorphic CSS style loader for Webpack
*
* Copyright © 2015-2016 Kriasoft, LLC. All rights reserved.
* Copyright © 2015-present Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
Expand Down
10 changes: 5 additions & 5 deletions src/insertCss.js
@@ -1,7 +1,7 @@
/**
* Isomorphic CSS style loader for Webpack
*
* Copyright © 2015-2016 Kriasoft, LLC. All rights reserved.
* Copyright © 2015-present Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
Expand All @@ -14,7 +14,7 @@ const inserted = {};
// https://developer.mozilla.org/en-US/docs/Web/API/WindowBase64/Base64_encoding_and_decoding#The_Unicode_Problem
function b64EncodeUnicode(str) {
return btoa(encodeURIComponent(str).replace(/%([0-9A-F]{2})/g, (match, p1) =>
String.fromCharCode(`0x${p1}`)
String.fromCharCode(`0x${p1}`),
));
}

Expand All @@ -23,14 +23,14 @@ function b64EncodeUnicode(str) {
* if they are no longer referenced by UI components.
*/
function removeCss(ids) {
for (const id of ids) {
ids.forEach((id) => {
if (--inserted[id] <= 0) {
const elem = document.getElementById(prefix + id);
if (elem) {
elem.parentNode.removeChild(elem);
}
}
}
});
}

/**
Expand Down Expand Up @@ -74,7 +74,7 @@ function insertCss(styles, { replace = false, prepend = false } = {}) {
}

let cssText = css;
if (sourceMap && btoa) { // skip IE9 and below, see http://caniuse.com/atob-btoa
if (sourceMap && typeof btoa === 'function') { // skip IE9 and below, see http://caniuse.com/atob-btoa
cssText += `\n/*# sourceMappingURL=data:application/json;base64,${
b64EncodeUnicode(JSON.stringify(sourceMap))}*/`;
cssText += `\n/*# sourceURL=${sourceMap.file}?${id}*/`;
Expand Down
2 changes: 1 addition & 1 deletion src/withStyles.js
@@ -1,7 +1,7 @@
/**
* Isomorphic CSS style loader for Webpack
*
* Copyright © 2015-2016 Kriasoft, LLC. All rights reserved.
* Copyright © 2015-present Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
Expand Down
2 changes: 1 addition & 1 deletion test/insertCss.spec.js
@@ -1,7 +1,7 @@
/**
* Isomorphic CSS style loader for Webpack
*
* Copyright © 2015-2016 Kriasoft, LLC. All rights reserved.
* Copyright © 2015-present Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
Expand Down
10 changes: 5 additions & 5 deletions test/withStyles.spec.js
@@ -1,7 +1,7 @@
/**
* Isomorphic CSS style loader for Webpack
*
* Copyright © 2015-2016 Kriasoft, LLC. All rights reserved.
* Copyright © 2015-present Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
Expand Down Expand Up @@ -56,7 +56,7 @@ describe('withStyles(...styles)(WrappedComponent)', () => {
<Provider insertCss={insertCss}>
<FooWithStyles />
</Provider>,
container
container,
);
ReactDOM.unmountComponentAtNode(container);
expect(insertCss.calledOnce).to.be.true;
Expand All @@ -68,7 +68,7 @@ describe('withStyles(...styles)(WrappedComponent)', () => {
render() {
return <div />;
}
}
},
).displayName).to.equal('WithStyles(Foo)');

expect(withStyles('')(
Expand All @@ -77,15 +77,15 @@ describe('withStyles(...styles)(WrappedComponent)', () => {
render() {
return <div />;
},
})
}),
).displayName).to.equal('WithStyles(Bar)');

expect(withStyles('')(
createClass({
render() {
return <div />;
},
})
}),
).displayName).to.be.oneOf(['WithStyles(Component)', 'WithStyles(Constructor)']);
});

Expand Down

0 comments on commit 40a52bb

Please sign in to comment.