Skip to content

Commit

Permalink
6.0.1 release
Browse files Browse the repository at this point in the history
  • Loading branch information
robinweser committed Sep 28, 2021
1 parent 6534ed1 commit 82154d0
Show file tree
Hide file tree
Showing 12 changed files with 28 additions and 59 deletions.
6 changes: 3 additions & 3 deletions modules/__tests__/createPrefixer-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,12 +232,12 @@ describe('Static Prefixer', () => {
transition: '200ms linear appearance, 100ms linear width',
}
const output = {
WebkitTransition:
'200ms linear -webkit-appearance,200ms linear appearance, 100ms linear width',
MozTransition:
'200ms linear -moz-appearance,200ms linear appearance, 100ms linear width',
WebkitTransition:
'200ms linear -webkit-appearance,200ms linear appearance, 100ms linear width',
transition:
'200ms linear -moz-appearance,200ms linear -webkit-appearance,200ms linear appearance, 100ms linear width',
'200ms linear -ms-appearance,200ms linear -moz-appearance,200ms linear -webkit-appearance,200ms linear appearance, 100ms linear width',
}
expect(prefix(input)).toEqual(output)
expect(prefix(input)).toEqual(output)
Expand Down
10 changes: 7 additions & 3 deletions modules/generator/generatePrefixMap.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export default function generatePrefixMap(browserList: Object): Object {
filterAndRemoveIfEmpty(
prefixMap,
flexPropsIE[i],
prefix => prefix !== 'ms' && prefix !== 'Moz'
(prefix) => prefix !== 'ms' && prefix !== 'Moz'
)
}

Expand All @@ -82,11 +82,15 @@ export default function generatePrefixMap(browserList: Object): Object {
filterAndRemoveIfEmpty(
prefixMap,
'transition',
prefix => prefix !== 'Moz' && prefix !== 'Webkit'
(prefix) => prefix !== 'Moz' && prefix !== 'Webkit'
)

// remove WebkitFlexDirection as it does not exist
filterAndRemoveIfEmpty(prefixMap, 'flexDirection', prefix => prefix !== 'Moz')
filterAndRemoveIfEmpty(
prefixMap,
'flexDirection',
(prefix) => prefix !== 'Moz'
)

return prefixMap
}
4 changes: 2 additions & 2 deletions modules/generator/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export function generateFile(
compatibility?: boolean
) {
const pluginImports = pluginList
.map(plugin => generateImportString(plugin, compatibility))
.map((plugin) => generateImportString(plugin, compatibility))
.join('\n')

const moduleExporter = compatibility ? 'module.exports = ' : 'export default'
Expand Down Expand Up @@ -51,7 +51,7 @@ function saveFile(fileContent: string, path: string): void {
const fs = require('fs')
/* eslint-enable global-require */

fs.writeFile(path, fileContent, err => {
fs.writeFile(path, fileContent, (err) => {
if (err) {
throw err
}
Expand Down
2 changes: 1 addition & 1 deletion modules/plugins/calc.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ export default function calc(property: string, value: any): ?Array<string> {
!isPrefixedValue(value) &&
value.indexOf('calc(') > -1
) {
return prefixes.map(prefix => value.replace(/calc\(/g, `${prefix}calc(`))
return prefixes.map((prefix) => value.replace(/calc\(/g, `${prefix}calc(`))
}
}
2 changes: 1 addition & 1 deletion modules/plugins/crossFade.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default function crossFade(
!isPrefixedValue(value) &&
value.indexOf('cross-fade(') > -1
) {
return prefixes.map(prefix =>
return prefixes.map((prefix) =>
value.replace(/cross-fade\(/g, `${prefix}cross-fade(`)
)
}
Expand Down
2 changes: 1 addition & 1 deletion modules/plugins/cursor.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ const values = {

export default function cursor(property: string, value: any): ?Array<string> {
if (property === 'cursor' && values.hasOwnProperty(value)) {
return prefixes.map(prefix => prefix + value)
return prefixes.map((prefix) => prefix + value)
}
}
2 changes: 1 addition & 1 deletion modules/plugins/filter.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default function filter(property: string, value: any): ?Array<string> {
!isPrefixedValue(value) &&
value.indexOf('filter(') > -1
) {
return prefixes.map(prefix =>
return prefixes.map((prefix) =>
value.replace(/filter\(/g, `${prefix}filter(`)
)
}
Expand Down
4 changes: 3 additions & 1 deletion modules/plugins/gradient.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ export default function gradient(property: string, value: any): ?Array<string> {
!isPrefixedValue(value) &&
values.test(value)
) {
return prefixes.map(prefix => value.replace(values, grad => prefix + grad))
return prefixes.map((prefix) =>
value.replace(values, (grad) => prefix + grad)
)
}
}
2 changes: 1 addition & 1 deletion modules/plugins/imageSet.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default function imageSet(property: string, value: any): ?Array<string> {
!isPrefixedValue(value) &&
value.indexOf('image-set(') > -1
) {
return prefixes.map(prefix =>
return prefixes.map((prefix) =>
value.replace(/image-set\(/g, `${prefix}image-set(`)
)
}
Expand Down
4 changes: 2 additions & 2 deletions modules/plugins/transition.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export default function transition(
// if the property is already prefixed
const webkitOutput = outputValue
.split(/,(?![^()]*(?:\([^()]*\))?\))/g)
.filter(val => !/-moz-|-ms-/.test(val))
.filter((val) => !/-moz-|-ms-/.test(val))
.join(',')

if (property.indexOf('Webkit') > -1) {
Expand All @@ -77,7 +77,7 @@ export default function transition(

const mozOutput = outputValue
.split(/,(?![^()]*(?:\([^()]*\))?\))/g)
.filter(val => !/-webkit-|-ms-/.test(val))
.filter((val) => !/-webkit-|-ms-/.test(val))
.join(',')

if (property.indexOf('Moz') > -1) {
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "inline-style-prefixer",
"version": "6.0.0",
"version": "6.0.1",
"description": "Run-time Autoprefixer for JavaScript style objects",
"module": "es/index.js",
"jsnext:main": "es/index.js",
Expand All @@ -23,7 +23,7 @@
"format": "prettier --write \"./modules/**/*.js\"",
"generate": "cross-env BABEL_ENV=commonjs babel-node generateDefaultData",
"lint": "eslint modules/**/*.js",
"release": "yarn build && npm publish && yarn docs",
"release": "yarn build && npm publish",
"test": "cross-env BABEL_ENV=commonjs jest",
"coverage": "yarn test --coverage"
},
Expand Down
45 changes: 4 additions & 41 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,6 @@ ansi-escapes@^1.1.0, ansi-escapes@^1.4.0:
resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-1.4.0.tgz#d3a8a83b319aa67793662b13e761c7911422306e"
integrity sha1-06ioOzGapneTZisT52HHkRQiMG4=

ansi-regex@*:
version "5.0.0"
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75"
integrity sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==

ansi-regex@^2.0.0:
version "2.1.1"
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df"
Expand Down Expand Up @@ -2225,7 +2220,7 @@ debug@~2.2.0:
dependencies:
ms "0.7.1"

debuglog@*, debuglog@^1.0.1:
debuglog@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/debuglog/-/debuglog-1.0.1.tgz#aa24ffb9ac3df9a2351837cfb2d279360cd78492"
integrity sha1-qiT/uaw9+aI1GDfPstJ5NgzXhJI=
Expand Down Expand Up @@ -4117,7 +4112,7 @@ import-lazy@^2.1.0:
resolved "https://registry.yarnpkg.com/import-lazy/-/import-lazy-2.1.0.tgz#05698e3d45c88e8d7e9d92cb0584e77f096f3e43"
integrity sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM=

imurmurhash@*, imurmurhash@^0.1.4:
imurmurhash@^0.1.4:
version "0.1.4"
resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea"
integrity sha1-khi5srkoojixPcT7a21XbyMUU+o=
Expand Down Expand Up @@ -5157,11 +5152,6 @@ lodash._baseflatten@~4.2.0:
resolved "https://registry.yarnpkg.com/lodash._baseflatten/-/lodash._baseflatten-4.2.1.tgz#54acad5e6ef53532a5b8269c0ad725470cfd9208"
integrity sha1-VKytXm71NTKluCacCtclRwz9kgg=

lodash._baseindexof@*:
version "3.1.0"
resolved "https://registry.yarnpkg.com/lodash._baseindexof/-/lodash._baseindexof-3.1.0.tgz#fe52b53a1c6761e42618d654e4a25789ed61822c"
integrity sha1-/lK1OhxnYeQmGNZU5KJXie1hgiw=

lodash._baseuniq@~4.6.0:
version "4.6.0"
resolved "https://registry.yarnpkg.com/lodash._baseuniq/-/lodash._baseuniq-4.6.0.tgz#0ebb44e456814af7905c6212fa2c9b2d51b841e8"
Expand All @@ -5170,33 +5160,11 @@ lodash._baseuniq@~4.6.0:
lodash._createset "~4.0.0"
lodash._root "~3.0.0"

lodash._bindcallback@*:
version "3.0.1"
resolved "https://registry.yarnpkg.com/lodash._bindcallback/-/lodash._bindcallback-3.0.1.tgz#e531c27644cf8b57a99e17ed95b35c748789392e"
integrity sha1-5THCdkTPi1epnhftlbNcdIeJOS4=

lodash._cacheindexof@*:
version "3.0.2"
resolved "https://registry.yarnpkg.com/lodash._cacheindexof/-/lodash._cacheindexof-3.0.2.tgz#3dc69ac82498d2ee5e3ce56091bafd2adc7bde92"
integrity sha1-PcaayCSY0u5ePOVgkbr9Ktx73pI=

lodash._createcache@*:
version "3.1.2"
resolved "https://registry.yarnpkg.com/lodash._createcache/-/lodash._createcache-3.1.2.tgz#56d6a064017625e79ebca6b8018e17440bdcf093"
integrity sha1-VtagZAF2JeeevKa4AY4XRAvc8JM=
dependencies:
lodash._getnative "^3.0.0"

lodash._createset@~4.0.0:
version "4.0.3"
resolved "https://registry.yarnpkg.com/lodash._createset/-/lodash._createset-4.0.3.tgz#0f4659fbb09d75194fa9e2b88a6644d363c9fe26"
integrity sha1-D0ZZ+7CddRlPqeK4imZE02PJ/iY=

lodash._getnative@*, lodash._getnative@^3.0.0:
version "3.9.1"
resolved "https://registry.yarnpkg.com/lodash._getnative/-/lodash._getnative-3.9.1.tgz#570bc7dede46d61cdcde687d65d3eecbaa3aaff5"
integrity sha1-VwvH3t5G1hzc3mh9ZdPuy6o6r/U=

lodash._root@~3.0.0:
version "3.0.1"
resolved "https://registry.yarnpkg.com/lodash._root/-/lodash._root-3.0.1.tgz#fba1c4524c19ee9a5f8136b4609f017cf4ded692"
Expand Down Expand Up @@ -5304,11 +5272,6 @@ lodash.rest@^4.0.0:
resolved "https://registry.yarnpkg.com/lodash.rest/-/lodash.rest-4.0.5.tgz#954ef75049262038c96d1fc98b28fdaf9f0772aa"
integrity sha1-lU73UEkmIDjJbR/Jiyj9r58Hcqo=

lodash.restparam@*:
version "3.6.1"
resolved "https://registry.yarnpkg.com/lodash.restparam/-/lodash.restparam-3.6.1.tgz#936a4e309ef330a7645ed4145986c85ae5b20805"
integrity sha1-k2pOMJ7zMKdkXtQUWYbIWuWyCAU=

lodash.some@^4.4.0:
version "4.6.0"
resolved "https://registry.yarnpkg.com/lodash.some/-/lodash.some-4.6.0.tgz#1bb9f314ef6b8baded13b549169b2a945eb68e4d"
Expand Down Expand Up @@ -7248,7 +7211,7 @@ readable-stream@~2.1.2, readable-stream@~2.1.5:
string_decoder "~0.10.x"
util-deprecate "~1.0.1"

readdir-scoped-modules@*, readdir-scoped-modules@^1.0.0:
readdir-scoped-modules@^1.0.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/readdir-scoped-modules/-/readdir-scoped-modules-1.1.0.tgz#8d45407b4f870a0dcaebc0e28670d18e74514309"
integrity sha512-asaikDeqAQg7JifRsZn1NJZXo9E+VwlyCfbkZhwyISinqk5zNS6266HS5kah6P0SaQKGF6SkNnZVHUzHFYxYDw==
Expand Down Expand Up @@ -8660,7 +8623,7 @@ v8flags@^2.1.1:
dependencies:
user-home "^1.1.1"

validate-npm-package-license@*, validate-npm-package-license@^3.0.1, validate-npm-package-license@~3.0.1:
validate-npm-package-license@^3.0.1, validate-npm-package-license@~3.0.1:
version "3.0.4"
resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a"
integrity sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==
Expand Down

0 comments on commit 82154d0

Please sign in to comment.