Skip to content

Commit

Permalink
v1.2.1 (#1752)
Browse files Browse the repository at this point in the history
  • Loading branch information
romainmenke authored Dec 9, 2023
1 parent 5600f08 commit b36851f
Show file tree
Hide file tree
Showing 10 changed files with 172 additions and 144 deletions.
231 changes: 122 additions & 109 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"prettier": {
"useTabs": true
},
"version": "1.2.0",
"version": "1.2.1",
"volta": {
"node": "20.2.0",
"npm": "9.6.7"
Expand Down
66 changes: 41 additions & 25 deletions packages/babel-plugin-core-web/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,8 @@ module.exports = function(api) {

return {
plugins: [
["@mrhenry/core-web", {
browsers: {
chrome: "31",
firefox: "26",
edge: "12",
opera: "26",
safari: "8",
ie: "11",
}
}]
// Use browserslist default :
["@mrhenry/core-web"]
]
};
};
Expand All @@ -58,13 +50,20 @@ module.exports = function(api) {

return {
plugins: [
// Use browserslist default :
["@mrhenry/core-web"]
// A custom browserslist config :
["@mrhenry/core-web", {
browserslist: [
"last 2 versions",
">0.5%"
]
}]
]
};
};
```

### manually describe which browsers

```js
module.exports = function(api) {
/*
Expand All @@ -75,12 +74,15 @@ module.exports = function(api) {

return {
plugins: [
// A custom browserslist config :
["@mrhenry/core-web", {
browserslist: [
"last 2 versions",
">0.5%"
]
browsers: {
chrome: "31",
firefox: "26",
edge: "12",
opera: "26",
safari: "8",
ie: "11",
}
}]
]
};
Expand All @@ -102,14 +104,10 @@ const babelPresetEnv = require( '@babel/preset-env' );
[
'@mrhenry/core-web',
{
browsers: {
chrome: "63",
firefox: "57",
edge: "18",
opera: "57",
safari: "12",
ie: "11",
},
browserslist: [
"last 2 versions",
">0.5%"
]
},
],
],
Expand All @@ -133,6 +131,24 @@ const babelPresetEnv = require( '@babel/preset-env' );
}
```

## ignore comments

```js
// core-web-ignore @mrhenry/core-web/modules/console.warn
/* core-web-ignore @mrhenry/core-web/modules/console.error */
/*! core-web-ignore @mrhenry/core-web/modules/console.table */

console.warn('A warning!'); /* no polyfill because it is marked as ignored above */
console.error('An error'); /* no polyfill because it is marked as ignored above */
console.table(['A table']); /* no polyfill because it is marked as ignored above */
```

## manually add a polyfill

```js
import "@mrhenry/core-web/modules/Element.prototype.after";
```

## Example with script tags (`module` vs `nomodules`)

[example migration](https://github.com/mrhenry/core-web-example-script-tag)
Expand Down
4 changes: 2 additions & 2 deletions packages/babel-plugin-core-web/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mrhenry/babel-plugin-core-web",
"version": "1.2.0",
"version": "1.2.1",
"description": "browser feature polyfills as a babel plugin",
"main": "lib/index.js",
"author": "Simon Menke <simon.menke@gmail.com>",
Expand Down Expand Up @@ -33,7 +33,7 @@
"dependencies": {
"@babel/helper-module-imports": "^7.15.4",
"@babel/types": "^7.23.5",
"@mrhenry/core-web": "^1.2.0",
"@mrhenry/core-web": "^1.2.1",
"fast-deep-equal": "^3.1.3"
},
"bugs": {
Expand Down
2 changes: 1 addition & 1 deletion packages/core-web-example/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mrhenry/core-web-example",
"version": "1.2.0",
"version": "1.2.1",
"private": true,
"scripts": {
"build": "babel src -d lib"
Expand Down
3 changes: 1 addition & 2 deletions packages/core-web-generator/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mrhenry/core-web-generator",
"version": "1.2.0",
"version": "1.2.1",
"private": true,
"scripts": {
"clean": "rm -rf ./lib/",
Expand All @@ -18,7 +18,6 @@
"@webcomponents/shadydom": "^1.9.0",
"@webcomponents/template": "^1.5.0",
"polyfill-library": "^4.0.0"

},
"devDependencies": {
"@babel/parser": "*",
Expand Down
2 changes: 1 addition & 1 deletion packages/core-web-tests/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mrhenry/core-web-tests",
"version": "1.2.0",
"version": "1.2.1",
"private": true,
"scripts": {
"build": "webpack",
Expand Down
2 changes: 1 addition & 1 deletion packages/core-web/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mrhenry/core-web",
"version": "1.2.0",
"version": "1.2.1",
"description": "browser feature polyfills as a babel plugin",
"main": "lib/index.js",
"author": "Simon Menke <simon.menke@gmail.com>",
Expand Down
2 changes: 1 addition & 1 deletion packages/pages-worker/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@mrhenry/pages-worker",
"main": "index.js",
"version": "1.2.0",
"version": "1.2.1",
"license": "MIT",
"private": true,
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion packages/pages/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mrhenry/pages",
"version": "1.2.0",
"version": "1.2.1",
"description": "generator for GitHub pages.",
"license": "MIT",
"main": "lib/pages.js",
Expand Down

0 comments on commit b36851f

Please sign in to comment.