Skip to content

Commit

Permalink
Upgrade all esm ready packages (#1029)
Browse files Browse the repository at this point in the history
* Upgrade all esm ready packages

In this diff I upgraded

- hyphenate-style-name
- css-initials
- css-vendor

which were converted to esm.

This means, that all jss and all plugins may be consumed by unpkg with
module flag like https://unpkg.com/jss-preset-default?module

We probably may get rid from unpkg prop in favour of `?module` flag for
non react packages.

* Replace react pkgs list with commonjs packages list

* upgrade css-vendor

* Revert "upgrade css-vendor"

This reverts commit ec623f7.

* upgrade css-vendor

* set yarn 1.13 in engines
  • Loading branch information
TrySound authored and kof committed Feb 12, 2019
1 parent 15a24af commit 5cbd40b
Show file tree
Hide file tree
Showing 13 changed files with 56 additions and 69 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"pre-commit": "pre-commit",
"engines": {
"node": ">=8",
"yarn": ">=1.9"
"yarn": ">=1.13"
},
"devDependencies": {
"@babel/core": "^7.2.2",
Expand Down
12 changes: 6 additions & 6 deletions packages/jss-plugin-camel-case/.size-snapshot.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"dist/jss-plugin-camel-case.js": {
"bundled": 2424,
"minified": 810,
"gzipped": 466
"bundled": 2383,
"minified": 856,
"gzipped": 486
},
"dist/jss-plugin-camel-case.min.js": {
"bundled": 2424,
"minified": 810,
"gzipped": 466
"bundled": 2383,
"minified": 856,
"gzipped": 486
},
"dist/jss-plugin-camel-case.cjs.js": {
"bundled": 1703,
Expand Down
2 changes: 1 addition & 1 deletion packages/jss-plugin-camel-case/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
},
"dependencies": {
"@babel/runtime": "^7.3.1",
"hyphenate-style-name": "^1.0.2",
"hyphenate-style-name": "^1.0.3",
"jss": "10.0.0-alpha.10"
}
}
4 changes: 2 additions & 2 deletions packages/jss-plugin-isolate/.size-snapshot.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"dist/jss-plugin-isolate.js": {
"bundled": 14396,
"bundled": 14444,
"minified": 9421,
"gzipped": 2682
},
"dist/jss-plugin-isolate.min.js": {
"bundled": 14396,
"bundled": 14444,
"minified": 9421,
"gzipped": 2682
},
Expand Down
2 changes: 1 addition & 1 deletion packages/jss-plugin-isolate/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
},
"dependencies": {
"@babel/runtime": "^7.3.1",
"css-initials": "^0.2.0",
"css-initials": "^0.3.1",
"jss": "10.0.0-alpha.10"
}
}
12 changes: 6 additions & 6 deletions packages/jss-plugin-vendor-prefixer/.size-snapshot.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"dist/jss-plugin-vendor-prefixer.js": {
"bundled": 27371,
"minified": 9573,
"gzipped": 2616
"bundled": 17314,
"minified": 5593,
"gzipped": 2167
},
"dist/jss-plugin-vendor-prefixer.min.js": {
"bundled": 27610,
"minified": 9634,
"gzipped": 2644
"bundled": 17314,
"minified": 5593,
"gzipped": 2167
},
"dist/jss-plugin-vendor-prefixer.cjs.js": {
"bundled": 1375,
Expand Down
2 changes: 1 addition & 1 deletion packages/jss-plugin-vendor-prefixer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
},
"dependencies": {
"@babel/runtime": "^7.3.1",
"css-vendor": "^1.1.0",
"css-vendor": "^2.0.0",
"jss": "10.0.0-alpha.10"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/jss-plugin-vendor-prefixer/src/index.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import expect from 'expect.js'
import {create} from 'jss'
import cssVendor from 'css-vendor'
import * as cssVendor from 'css-vendor'
import browser from 'detect-browser'
import functionPlugin from 'jss-plugin-rule-value-function'

Expand Down
12 changes: 6 additions & 6 deletions packages/jss-preset-default/.size-snapshot.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"dist/jss-preset-default.js": {
"bundled": 65776,
"minified": 22981,
"gzipped": 6769
"bundled": 55099,
"minified": 19114,
"gzipped": 6354
},
"dist/jss-preset-default.min.js": {
"bundled": 65271,
"minified": 22605,
"gzipped": 6583
"bundled": 54345,
"minified": 18655,
"gzipped": 6143
},
"dist/jss-preset-default.cjs.js": {
"bundled": 1329,
Expand Down
12 changes: 6 additions & 6 deletions packages/jss-starter-kit/.size-snapshot.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"dist/jss-starter-kit.js": {
"bundled": 81272,
"minified": 33047,
"gzipped": 9411
"bundled": 70641,
"minified": 29127,
"gzipped": 8981
},
"dist/jss-starter-kit.min.js": {
"bundled": 80767,
"minified": 32637,
"gzipped": 9236
"bundled": 69887,
"minified": 28669,
"gzipped": 8770
},
"dist/jss-starter-kit.cjs.js": {
"bundled": 2592,
Expand Down
12 changes: 6 additions & 6 deletions packages/react-jss/.size-snapshot.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"dist/react-jss.js": {
"bundled": 132114,
"minified": 45196,
"gzipped": 13337
"bundled": 109551,
"minified": 36824,
"gzipped": 11858
},
"dist/react-jss.min.js": {
"bundled": 100453,
"minified": 35276,
"gzipped": 10540
"bundled": 85012,
"minified": 29578,
"gzipped": 9684
},
"dist/react-jss.cjs.js": {
"bundled": 14716,
Expand Down
6 changes: 6 additions & 0 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ const getBabelOptions = ({useESModules}) => ({
})

const commonjsOptions = {
include: [
/\/node_modules\/react\//,
/\/node_modules\/prop-types\//,
/\/node_modules\/react-display-name\//,
/\/node_modules\/hoist-non-react-statics\//
],
ignoreGlobal: true,
// The CommonJS plugin can't resolve the exports in `react` automatically.
// https://github.com/rollup/rollup-plugin-commonjs#custom-named-exports
Expand Down
45 changes: 13 additions & 32 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1604,13 +1604,6 @@ [email protected]:
mime-types "~2.1.11"
negotiator "0.6.1"

acorn-dynamic-import@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/acorn-dynamic-import/-/acorn-dynamic-import-3.0.0.tgz#901ceee4c7faaef7e07ad2a47e890675da50a278"
integrity sha512-zVWV8Z8lislJoOKKqdNMOB+s6+XV5WERty8MnKBeFgwA+19XJjJHs2RP5dzM57FftIs+jQnRToLiWazKr6sSWg==
dependencies:
acorn "^5.0.0"

acorn-dynamic-import@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/acorn-dynamic-import/-/acorn-dynamic-import-4.0.0.tgz#482210140582a36b83c3e342e1cfebcaa9240948"
Expand All @@ -1623,11 +1616,6 @@ acorn-jsx@^4.1.1:
dependencies:
acorn "^5.0.3"

acorn@^5.0.0, acorn@^5.6.2:
version "5.7.1"
resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.1.tgz#f095829297706a7c9776958c0afc8930a9b9d9d8"
integrity sha512-d+nbxBUGKg7Arpsvbnlq61mc12ek3EY8EQldM3GPAhWJ1UVxC6TDGbIvUMNU6obBX3i1+ptCIzV4vq0gFPEGVQ==

acorn@^5.0.3, acorn@^5.6.0, acorn@^5.7.3:
version "5.7.3"
resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.3.tgz#67aa231bf8812974b85235a96771eb6bd07ea279"
Expand Down Expand Up @@ -3141,16 +3129,17 @@ crypto-browserify@^3.11.0:
randombytes "^2.0.0"
randomfill "^1.0.3"

css-initials@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/css-initials/-/css-initials-0.2.0.tgz#14c225bd8656255a6baee07231ef82fa55aacaa3"
integrity sha512-t80yjg0pi4VAIc5itIqLh6M+ZlA+cB+gUXEQkDR09+ExTDwLMGfJ8YviBsGW+DklIrb2k9fwB75Io8ooWXDxxw==
css-initials@^0.3.1:
version "0.3.1"
resolved "https://registry.yarnpkg.com/css-initials/-/css-initials-0.3.1.tgz#0406d78e586fd12b9984a3f7d8a87fcbb2073208"
integrity sha512-fkshKv9vV8AmcxkAWVQ9DmEAKiqe09GHdnFaXecp0NIfsGnXIHVJAHfsxdRy9KXV0/KiWdjBqrCYto2fYIO4xQ==

css-vendor@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/css-vendor/-/css-vendor-1.1.0.tgz#39bc1bb46b633528a9041ad5e107ddd353240388"
integrity sha512-pePyROdjdMRjHhGN+xZjBomaR9GXueNQ2ZLkEi0i2A/eVx0m4oCLglltdRsaYCSOpun0GRJWuqmWLIYj6Y/RVQ==
css-vendor@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/css-vendor/-/css-vendor-2.0.0.tgz#c7f4a49efbdd660c04e239af4626e2684d1ba60e"
integrity sha512-YOsuXi6bO0+q2QqIvWKuPpq/eMEeN4bm40zWFPQRl6UaBV1UZliARLgvEoxmtFm/KB5MpL8ySxpoGc//L2Li8Q==
dependencies:
"@babel/runtime" "^7.3.1"
is-in-browser "^1.0.2"

css.escape@^1.5.1:
Expand Down Expand Up @@ -4893,10 +4882,10 @@ humanize-ms@^1.2.1:
dependencies:
ms "^2.0.0"

hyphenate-style-name@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/hyphenate-style-name/-/hyphenate-style-name-1.0.2.tgz#31160a36930adaf1fc04c6074f7eb41465d4ec4b"
integrity sha1-MRYKNpMK2vH8BMYHT360FGXU7Es=
hyphenate-style-name@^1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/hyphenate-style-name/-/hyphenate-style-name-1.0.3.tgz#097bb7fa0b8f1a9cf0bd5c734cf95899981a9b48"
integrity sha512-EcuixamT82oplpoJ2XU4pDtKGWQ7b00CD9f1ug9IaQ3p1bkHMiKCZ9ut9QDI6qsa6cpUuB+A/I+zLtdNK4n2DQ==

[email protected]:
version "0.4.23"
Expand Down Expand Up @@ -8410,14 +8399,6 @@ scheduler@^0.12.0:
loose-envify "^1.1.0"
object-assign "^4.1.1"

schema-utils@^0.4.4:
version "0.4.7"
resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-0.4.7.tgz#ba74f597d2be2ea880131746ee17d0a093c68187"
integrity sha512-v/iwU6wvwGK8HbU9yi3/nhGzP0yGSuhQMzL6ySiec1FSrZZDkhm4noOSWzrNFo/jEc+SJY6jRTwuwbSXJPDUnQ==
dependencies:
ajv "^6.1.0"
ajv-keywords "^3.1.0"

schema-utils@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-1.0.0.tgz#0b79a93204d7b600d4b2850d1f66c2a34951c770"
Expand Down

0 comments on commit 5cbd40b

Please sign in to comment.