profile
viewpoint
Jason Miller developit @google Cambridge, MA https://jasonformat.com Web DevRel at @google. Creator of @preactjs and other tiny libraries.

developit/asyncro 474

⛵️ Beautiful Array utilities for ESnext async/await ~

choojs/choop 97

🚂⚛️ - choo architecture for preact

developit/babel-preset-preact 22

Babel preset to transform JSX into h() calls

developit/babel-preset-es2015-minimal 5

:lipstick: Babel's es2015 preset in loose mode without frills.

developit/babel-preset-es2015-minimal-rollup 4

Babel es2015 preset in loose mode without frills, made for Rollup.

developit/28kb-react-redux-routing 3

React + Redux + Routing Stack for just 28kb

billneff79/recharts 2

Redefined chart library built with React and D3

developit/apple-music-js 2

A music streaming service created from the ground up using ReactJS & Redux

developit/AudioSprite.js 2

Seamlessly play named "sprite" regions within a single shared audio file.

developit/asyncModule 1

Run JS modules in their own threads.

issue commentdevelopit/microbundle

No build progress when running microbundle command

@ps-rakeshchintha it's a long shot, but could you check to see if your builds still take 2 minutes when you comment out import "whatwg-fetch"?

ps-rakeshchintha

comment created time in 4 hours

issue commentdevelopit/microbundle

Error using Fragment shorthand in React Typescript project

@breadadams does this still break if you set the following in your tsconfig.json?

{
  "compilerOptions": {
    "jsx": "preserve"
  }
}
breadadams

comment created time in 4 hours

issue closeddevelopit/microbundle

Alias API

Working on a react-native-web component that I'd love to build with microbundle. Would you be open to a PR allowing an alias.json file that looked like:

{
   'react-native': 'react-native-web'
}

closed time in 4 hours

jaredpalmer

issue commentdevelopit/microbundle

Alias API

@jviide yup!

jaredpalmer

comment created time in 4 hours

push eventdevelopit/microbundle

Lachlan Campbell

commit sha cc3e1de34b763ba5267bcac803b67b726cb21c68

Add Theme UI to README project showcase

view details

Jason Miller

commit sha 5fc25ec336ce206ed635a28671ef97849e1a9a05

Merge branch 'master' into patch-1

view details

Jason Miller

commit sha 55b1f985c62a42fe78cc1a300abfc682d860c8ef

Merge pull request #541 from lachlanjc/patch-1 Add Theme UI to README project showcase

view details

push time in 4 hours

PR merged developit/microbundle

Add Theme UI to README project showcase

h/t @jxnblk!

+1 -0

0 comment

1 changed file

lachlanjc

pr closed time in 4 hours

push eventlachlanjc/microbundle

Leah

commit sha 87a23bbb3b60190ac5747864d0dc2212ed422703

slightly better tsconfig.json Should fix an error message in the jest output (which doesn't make the tests fail)

view details

Leah

commit sha 743338f42a598e69f76ef25cd92bb819e3a84bf7

update dependencies + snapshots

view details

Leah

commit sha 65d9836e246acdfc7a78dd62691effe99edb250e

add optional chaining test

view details

Leah

commit sha 0041234940288b8244ee48b9bdf109381a3ec90d

v0.12.0-next.7

view details

Leah

commit sha 41b87aff512c416c6d47244f5f2bc626a9555add

update snapshots

view details

Jovi De Croock

commit sha f5991665f3f6a609c78675b289312d8dddbe17bc

add the moved rollup dependencies (@rollup org)

view details

Jovi De Croock

commit sha d82233aecd910e8cb781ebc4691bdf458697c079

increment rollup to the latest version (minimum need of new plugins is 1.20.0)

view details

Marvin Hagemeister

commit sha 35a4ec63fd194bdcbbaad46b6f56801fc8a723c0

add the moved rollup dependencies (@rollup org) (#544) add the moved rollup dependencies (@rollup org)

view details

Jason Miller

commit sha e0001118d512a000c29cd41eeee8043636bdf44e

0.12.0-next.8

view details

Jason Miller

commit sha 0325c62b47f2de72f8e996f1d7e5d27f2cdc0b78

Merge branch 'master' into hrmny

view details

Jason Miller

commit sha 6f84f95f81c14ab95e36eb8c8e8d34823e2bb1f3

merge #538 from @ForsakenHarmony and enable lockfiles

view details

Jason Miller

commit sha 31c85742c60cbadef92f6f816a2086a62ff9370b

reduce dotfiles

view details

Jason Miller

commit sha b8db3b91e9570870acfd5a36d99ed6625de5e28b

Merge pull request #547 from developit/reduce-dotfiles reduce dotfiles

view details

Jason Miller

commit sha e83d0d157cc05e310802cbbd4c499d147681f6b2

fix core-js bloat by turning off core-js 3 (#550)

view details

Jovi De Croock

commit sha 24c3c56638e669223acfb6da49f56824e25f623a

implement preset-modules for modern

view details

Jovi De Croock

commit sha b630309050e2cde0764bde51638fa6c0b30f82a5

update pkg-lock

view details

Jovi De Croock

commit sha fc4568d9f429c4553028ef831827c8edf673c6f3

update snapshots and implement custom babelrc

view details

Jovi De Croock

commit sha 20d165cd14d35939069406b474ee5415fd5e0763

add the preset conversion

view details

Jovi De Croock

commit sha 56ab91357ebf3f50a69984a514d791235f687bc9

correct regexp

view details

Jovi De Croock

commit sha b9a6f0c244d8d0637f55b2a2fc9eacc7459abb96

update snapshots

view details

push time in 4 hours

push eventdevelopit/microbundle

Jason Miller

commit sha e83d0d157cc05e310802cbbd4c499d147681f6b2

fix core-js bloat by turning off core-js 3 (#550)

view details

Jovi De Croock

commit sha 24c3c56638e669223acfb6da49f56824e25f623a

implement preset-modules for modern

view details

Jovi De Croock

commit sha b630309050e2cde0764bde51638fa6c0b30f82a5

update pkg-lock

view details

Jovi De Croock

commit sha fc4568d9f429c4553028ef831827c8edf673c6f3

update snapshots and implement custom babelrc

view details

Jovi De Croock

commit sha 20d165cd14d35939069406b474ee5415fd5e0763

add the preset conversion

view details

Jovi De Croock

commit sha 56ab91357ebf3f50a69984a514d791235f687bc9

correct regexp

view details

Jovi De Croock

commit sha b9a6f0c244d8d0637f55b2a2fc9eacc7459abb96

update snapshots

view details

Jovi De Croock

commit sha 31f9de03d8c4dfc86f4835597d2ff50a95422552

another snapshot correction (node_modules snuck in)

view details

Marvin Hagemeister

commit sha 8431fded966801488153b7174b278dd3fb8d0b6c

Implement preset-modules for modern (#557) Implement preset-modules for modern

view details

Jovi De Croock

commit sha 43d43e386d69770dc765ed62a3624b9d3b2e4b31

add hooked-form to built with section

view details

Marvin Hagemeister

commit sha ccb8621fbaa599724fa45027ceafb30b961b68f8

Merge pull request #558 from JoviDeCroock/patch-1 add hooked-form to built with section

view details

Cristian Bote

commit sha 4c85db51bee7aa9283736e33854149e132fd8205

Adding goober to built with

view details

Marvin Hagemeister

commit sha 5ca1514a1024bf7c058d2a64bd2972836df54a63

Merge pull request #559 from cristianbote/patch-1 Adding goober to built with

view details

Marais Rossouw

commit sha 5100c7bbf2b58237e5c8d86067c118c1044d1612

Adds a `--css-modules` option (#370) * feat: adds a `--cssmodules` option * chore: Allow scopeName to come from args * chore: --css-modules is now tristate * docs: Wrote docs around how to use css-modules * chore: Fixed all tristate logic, and readable first * test: Wrote tests for all avenues * chore: Add's newlines to the end of files

view details

Marais Rossouw

commit sha 87e3dd52ce0f316dc96f8d7ae236d4da79d80b4e

chore: Runs prettier as a pre-commit hook

view details

Marais Rossouw

commit sha d2d2f2db766e84e75c1d8c662e05e5044551f0fb

chore: Updated package-lock

view details

Jason Miller

commit sha 96cfe38130e77e3c606b48dae7b8ad0f8d8dc53b

Make greenkeeper respect lockfiles

view details

Jason Miller

commit sha fe1f60cd6494694d29a93acde5100dce885f0393

Merge pull request #563 from developit/greenkeeper-lockfiles Make greenkeeper respect lockfiles

view details

Marvin Hagemeister

commit sha 13ca8702b89733c9555d41fb37af2d403a6912a6

Merge branch 'master' into feature/prettier

view details

Marvin Hagemeister

commit sha cec1b42eca834e2d62cf8972e19b01fd37fcc9a3

Merge pull request #561 from maraisr/feature/prettier chore: Runs prettier as a pre-commit hook

view details

push time in 4 hours

pull request commentdevelopit/microbundle

Strip comments from output

@marvinhagemeister Ideally I would like to extract license comments into a file if they need to be preserved.

developit

comment created time in 4 hours

push eventdevelopit/microbundle

Jason Miller

commit sha 45819991610b342c823f104687a7cdae52b1f057

add test for modern + generators

view details

push time in 4 hours

Pull request review commentbabel/babel

Include preset modules

 export default function normalizeOptions(opts: Options) {     ) || corejs.proposals;    return {+    bugfixes: validateBoolOption(+      TopLevelOptions.bugfixes,+      opts.bugfixes,+      false,

I recall we'd said this would be enabled by default - I'm guessing this is false until Babel 8?

nicolo-ribaudo

comment created time in 5 hours

Pull request review commentbabel/babel

Include preset modules

+{

@nicolo-ribaudo - meta-comment, more on the data format itself: do you think it might be easier to maintain this file if the data only specified which versions were actually affected by the bugfix plugins? For example, the edge function name plugin could just be listed as { "edge": "79" } rather than including the other browser versions which it doesn't have an effect on. A missing browser version could just be taken as "no change".

nicolo-ribaudo

comment created time in 5 hours

Pull request review commentbabel/babel

Include preset modules

 {-  "transform-regenerator": []-}\ No newline at end of file+  "transform-async-to-generator": [

Should transform-regenerator be here too?

nicolo-ribaudo

comment created time in 5 hours

Pull request review commentbabel/babel

Include preset modules

+{+  "transform-async-to-generator": {+    "chrome": "55",+    "edge": "15",+    "firefox": "52",+    "safari": "10.1",+    "node": "7.6",+    "ios": "10.3",+    "samsung": "6",+    "opera": "42",+    "electron": "1.6"+  },+  "bugfix/transform-async-arrows-in-class": {+    "chrome": "55",+    "edge": "15",+    "firefox": "52",+    "safari": "11",

~Safari should be 10.1 / 10.3 here I think? Same as async-to-generator. I may have had references to Safari 11 in the plugin since that's what I had chosen to target, but the fix should work in all ES-Modules-supporting versions of Safari (10.1+ desktop / 10.3+ ios)~

Edit: I keep thinking this list is "versions that are fixed by X", but it's actually "oldest version where this plugin is not needed", right?

nicolo-ribaudo

comment created time in 5 hours

push eventdevelopit/microbundle

Jason Miller

commit sha 5a30360fd7b79ae90380c76dd20a948e719795a0

revert unrelated terser change

view details

push time in 5 hours

push eventdevelopit/microbundle

Jason Miller

commit sha b901c62e96b638a96f8bbb2dead2a000a4187ce6

lint fixes

view details

push time in 5 hours

push eventdevelopit/microbundle

Jason Miller

commit sha c677ecdda0be5e8cee3af7e2f9e8e8bf7fd9b489

prettier

view details

push time in 6 hours

push eventdevelopit/microbundle

Jason Miller

commit sha 83255b6292bfa0796e9f78c1884a926a444752e2

prettier

view details

push time in 6 hours

PR opened developit/microbundle

Reviewers
Fix babel cache bleed

Instantiating babel.custom() separately for each output should fix #568, which I believe is caused by cached configuration bleeding from cjs into other output targets.

+2 -2

0 comment

2 changed files

pr created time in 6 hours

push eventdevelopit/microbundle

Jason Miller

commit sha 3debad187c44999158569a5f52c3c66a71731a0f

Update index.js

view details

push time in 6 hours

create barnchdevelopit/microbundle

branch : fix-babel-custom

created branch time in 6 hours

issue commentdevelopit/microbundle

microbundle users should be aware of this issue

For sure. I think short term we can detect switch cases within async functions and throw an error.

CyriacBr

comment created time in a day

startedwikimedia/wikipedia-kaios

started time in a day

push eventpreactjs/preact-render-to-string

Jason Miller

commit sha 761ba18e17e1044fdc3370e993d6b9d7920a2ff8

Update ssr.js

view details

push time in 2 days

PR opened preactjs/preact-render-to-string

[experiment] Performance improvements for SSR

This builds on the parts of #135 that did hold some promise - a dedicated codepath for SSR that excludes configurability, and some caching. I think I'm seeing performance gains with this, but I need a better benchmark.

+176 -5

0 comment

2 changed files

pr created time in 2 days

push eventpreactjs/preact-render-to-string

Jason Miller

commit sha bfaebcaad23825e9c5d376f25d375aa3220e9dd7

Cache entity encoding

view details

push time in 2 days

create barnchpreactjs/preact-render-to-string

branch : ssr-performance-2

created branch time in 2 days

push eventpreactjs/preact-render-to-string

Jason Miller

commit sha 2a7bfcc0ca4f9f71d507daeae144e5f020fe6732

fix a bug

view details

push time in 2 days

push eventpreactjs/preact-render-to-string

Jason Miller

commit sha 62a92ac012ae07f754b203207b90c825c7f240ec

Update ssr.js

view details

push time in 2 days

create barnchpreactjs/preact-render-to-string

branch : ssr-performance

created branch time in 2 days

Pull request review commentdevelopit/karmatic

Set up Prettier

 {-  "name": "karmatic",

npm install will rewrite this back to spaces every time. Is there a way to exempt it from Prettier? In other projects I use an .editorconfig to control spacing for json/me separately from JS:

https://github.com/preactjs/preact-www/blob/master/.editorconfig

suchipi

comment created time in 2 days

PR opened GoogleChromeLabs/two-up

Reviewers
Avoid forced layout during dragging

This fixes a performance issue when <two-up> is used as a split view, where dragging triggers ResizeObserver which causes _resetPosition() to be invoked that in turn called getBoundingClientRect().

Here's the CSS I'm using to turn <two-up> into a split view:

body two-up {
	display: flex !important;
	grid: none !important;

	> * {
		grid-area: none !important;
	}

	> :first-child {
		box-sizing: border-box;
		clip-path: none !important;
		order: 1;
	}

	> :nth-child(2) {
		box-sizing: border-box;
		clip-path: none !important;
		order: 3;
	}

	> :last-child {
		position: absolute;
		order: 2;
		z-index: 2;
	}

	&:not([orientation="vertical"]) {
		> *:first-child {
			width: var(--split-point, 50%);
			min-width: var(--split-point, 50%);
			max-width: var(--split-point, 50%);
		}
		> *:last-child {
			height: 100%;
		}
	}

	&[orientation="vertical"] {
		flex-direction: column;
		> *:first-child {
			box-sizing: border-box;
			clip-path: none !important;
			height: var(--split-point, 50%);
			min-height: var(--split-point, 50%);
			max-height: var(--split-point, 50%);
			order: 1;
		}
		> *:last-child {
			width: 100%;
		}
	}
}
+5 -2

0 comment

1 changed file

pr created time in 3 days

create barnchGoogleChromeLabs/two-up

branch : avoid-forced-layout-during-dragging

created branch time in 3 days

PR opened preactjs/preact

Reviewers
Update ISSUE_TEMPLATE.md
+29 -12

0 comment

1 changed file

pr created time in 4 days

create barnchpreactjs/preact

branch : issue-templates-2

created branch time in 4 days

PR opened preactjs/preact

Experimental jsx2
+24 -0

0 comment

2 changed files

pr created time in 4 days

push eventpreactjs/preact

Jason Miller

commit sha 720ee4d32df1e37d7e48e7c693afe1ee91cd8d0e

Export { jsx }

view details

push time in 4 days

create barnchpreactjs/preact

branch : experimental-jsx2

created branch time in 4 days

delete branch preactjs/preact-www

delete branch : no-build-tools

delete time in 4 days

push eventpreactjs/preact-www

Jason Miller

commit sha b48187fec91267f8d7a83bcd07934b2344277f15

Fix No Build Tools example (#540) * Fix No Build Tools example * Strip ?module * Update runner.js

view details

push time in 4 days

PR merged preactjs/preact-www

Reviewers
Fix No Build Tools example

Fixes #542.

+7 -5

1 comment

2 changed files

developit

pr closed time in 4 days

issue closedpreactjs/preact-www

Can't Get Started without Build Tools

I'm trying to get started with Preact. I'm on the "Getting Started" section of the Web page. I'm trying the code sample under the heading No build tools route (below).

import { h, Component, render } from 'https://unpkg.com/preact?module';

// Create your app
const app = h('div', null, 'Hello World!');

// Inject your application into the an element with the id `app`.
// Make sure that such an element exists in the dom ;)
render(app, document.getElementById('app'));

In Chrome browser; Version 80.0.3987.100 (Official Build) (64-bit) Windows 10 I get the following error:

Uncaught TypeError: Cannot read property '__k' of null
    at E (preact.module.js?module:1)
    at index.js:8

When I click to run the code sample in <a href="https://preactjs.com/repl?code=import%20%7B%20h%2C%20Component%2C%20render%20%7D%20from%20%27https%3A%2F%2Funpkg.com%2Fpreact%3Fmodule%27%3B%0A%0A%2F%2F%20Create%20your%20app%0Aconst%20app%20%3D%20h(%27div%27%2C%20null%2C%20%27Hello%20World!%27)%3B%0A%0A%2F%2F%20Inject%20your%20application%20into%20the%20an%20element%20with%20the%20id%20%60app%60.%0A%2F%2F%20Make%20sure%20that%20such%20an%20element%20exists%20in%20the%20dom%20%3B)%0Arender(app%2C%20document.getElementById(%27app%27))%3B">REPL</a>, I get another error:

Error: No module found for preact?module
Stack trace:
_require :1:2993
eval :6:21
Runner.execute :1:3819
Runner.execute :1:3906
unknown :0:0

I was not expecting errors. I was expecting to use a library for creating Web components. The no build tools route sounds great, and I'm excited to get started with Preact.

closed time in 4 days

jfavrod

push eventpreactjs/preact-www

Marvin Hagemeister

commit sha dcbbec9fc79e6c9ac652353ad305063d313462e5

Add Edge download link

view details

Marvin Hagemeister

commit sha eaca61358e1ecd60edf538f898230ee037945813

Merge pull request #541 from preactjs/edge-link Add Edge download link

view details

Jason Miller

commit sha bca7a17ad50764df9346fe4f836ac60b22040eb3

Merge branch 'master' into no-build-tools

view details

push time in 4 days

push eventpreactjs/preact-www

Jason Miller

commit sha 2d737256c18e719731746015c326fa96e9240471

Update runner.js

view details

push time in 4 days

startedGoogleChromeLabs/two-up

started time in 4 days

PR opened GoogleChromeLabs/two-up

Reviewers
Add demo

https://codepen.io/developit/pen/qBdbNLK

+1 -1

0 comment

1 changed file

pr created time in 4 days

create barnchGoogleChromeLabs/two-up

branch : add-demo

created branch time in 4 days

issue commentpreactjs/preact-www

Can't Get Started without Build Tools

#540 should fix this.

jfavrod

comment created time in 4 days

push eventpreactjs/preact-www

Jason Miller

commit sha 0f94e277828bd0b399c965d47013e1126f0ac6d1

Strip ?module

view details

push time in 4 days

push eventpreactjs/preact-www

Andre Wiggins

commit sha 33172e1d6438209fcb1d5bc1c56a874315c2b9e6

Use `onChange` in select example (#539) * Use `onChange` in select example Update the `select` example to use the `onChange` event which has better browser support (namely IE & old-Edge) * Rename select method to `onChange` * Update submit alert to display current value This change helps verify that the select demo is working properly Co-authored-by: Jason Miller <developit@users.noreply.github.com>

view details

Jason Miller

commit sha 7e6ff240abab75dbf11b09389fa986cb01f1efca

Merge branch 'master' into no-build-tools

view details

push time in 4 days

PR opened preactjs/preact-www

Reviewers
Fix No Build Tools example
+4 -3

0 comment

1 changed file

pr created time in 4 days

create barnchpreactjs/preact-www

branch : no-build-tools

created branch time in 4 days

push eventpreactjs/preact-www

Andre Wiggins

commit sha 33172e1d6438209fcb1d5bc1c56a874315c2b9e6

Use `onChange` in select example (#539) * Use `onChange` in select example Update the `select` example to use the `onChange` event which has better browser support (namely IE & old-Edge) * Rename select method to `onChange` * Update submit alert to display current value This change helps verify that the select demo is working properly Co-authored-by: Jason Miller <developit@users.noreply.github.com>

view details

push time in 4 days

delete branch preactjs/preact-www

delete branch : andrewiggins-patch-3

delete time in 4 days

PR merged preactjs/preact-www

Reviewers
Use `onChange` in select example

Update the select example to use the onChange event which has better browser support (namely IE & old-Edge)

+3 -3

2 comments

1 changed file

andrewiggins

pr closed time in 4 days

push eventpreactjs/preact-www

Marvin Hagemeister

commit sha 09bdc86e93f26aa0006d0f451c220b5cd4c36e1d

Remove linked state from Preact 10 docs

view details

Marvin Hagemeister

commit sha c378faec73b7d1eb3d8ae0e597096e01df3a7f1d

Merge pull request #538 from preactjs/linked-state Remove linked state from Preact 10 docs

view details

size-plugin[bot]

commit sha 131bc5096d84d6c574c094ca1df5a55732109432

👩‍👧‍👦 🚴🏿‍♂️ update size-plugin-ssr.json 👍

view details

size-plugin[bot]

commit sha 1c1886f3564114ca8e60bd424686f5ca5e9e6372

🐵 🐁 update size-plugin-browser.json 👍

view details

Jason Miller

commit sha cd6a06f62e816704fa3fef7d631d8a0e3de53098

Merge branch 'master' into andrewiggins-patch-3

view details

push time in 4 days

startedSamHerbert/SVG-Loaders

started time in 5 days

pull request commentpreactjs/preact

cleanup hooks on unmount

Ah interesting. If this ends up being the root of the memory leak in that demo, it'll be nice that we're only taking the size hit on /hooks.

JoviDeCroock

comment created time in 5 days

Pull request review commentpreactjs/preact

[draft] potential fix for memory leak

 export function unmount(vnode, parentVNode, skipRemove) { 			} 		} -		r.base = r._parentDom = null;+		r.base = r._parentDom = r._vnode = vnode._component = null;

could we switch to undefined here?

developit

comment created time in 5 days

PR opened preactjs/preact

Reviewers
[draft] potential fix for memory leak

Just a thought based on the retaining objects seen in #2336.

+1 -1

0 comment

1 changed file

pr created time in 5 days

issue commentpreactjs/preact-cli

Upgrading to Preact 10.3.1 causes compat.module.js?de84:1 Uncaught TypeError: Cannot read property 'class' of undefined at Object.__WEBPACK_IMPORTED_MODULE_1_preact__.options.vnode

I moved this issue to preact-cli since it relates to CLI upgrades, not Preact upgrades. Preact CLI v2 was never made to be compatible with Preact X, so upgrading both at the same time is the only option.

Anwardo

comment created time in 5 days

issue commentpreactjs/preact

Upgrading to Preact 10.3.1 causes compat.module.js?de84:1 Uncaught TypeError: Cannot read property 'class' of undefined at Object.__WEBPACK_IMPORTED_MODULE_1_preact__.options.vnode

When running your build you need to use the locally installed version of preact-cli:

./node_modules/.bin/preact build --no-prerender --server-worker=false

That should address the Build failed! issue you pasted.

Anwardo

comment created time in 5 days

issue commentpreactjs/preact

Preact causes memory leak on useState?

Excellent analysis. A few initial guesses at the culprit here:

  • circular references in the virtual DOM tree (vnode._parent 🔁 vnode._children[0])
  • component._hooks being attached to those vnodes as vnode._component.__hooks
avkonst

comment created time in 5 days

issue commentrollup/rollup

Annotation for pure getters (discussion)

Something I wanted to point out that may or may not be useful here: Webpack's codegen for modules currently constructs something very similar to what @kzc is proposing, and I think that precedent makes his suggestion all the more interesting.

// current webpack output:
var _React = require("react");
Object(x.default.createElement)("span", null, "hello world");

It's relatively trivial to convert this to a hoisted "helper" that is really just assigned to Object. This would obviously change the context when applied to a callee, but I'd be curious to know how much the two needs intersect.

// proposed
var __PURE_GET__ = Object;
var _React = require("react");
__PURE_GET__(x.default.createElement)("span", null, "hello world");

FWIW, few/none of these seem to address destructured assignment, which seems worth fixing:

// how can this be marked as pure?
const { a: { b: { c } } } = obj;

// ...or this
let c;
({ a: { b: { c } } } = obj);
fabiosantoscode

comment created time in 5 days

startedRich-Harris/code-red

started time in 5 days

push eventGoogleChromeLabs/css-paint-polyfill

Jason Miller

commit sha 06e4ad103b649a90997eef99321b7f234835163c

🌲 Spruce up the README

view details

push time in 5 days

issue openedGoogleChromeLabs/css-paint-polyfill

[todo] Extract addModule() into its own repo

The addModule implementation here (and perhaps Realm?) could be useful for other worklet polyfills. The AudioWorklet polyfill currently ships a different implementation.

created time in 5 days

issue openedGoogleChromeLabs/css-paint-polyfill

[todo] Add second "options" argument to addModule()

This is in the spec, but was not implemented in the polyfill. The only relevant option is credentials, which can be forwarded to the XMLHttpRequest used to load Worklets.

created time in 5 days

push eventGoogleChromeLabs/css-paint-polyfill

Jason Miller

commit sha 3c80b997e333792dd9f8e521920ef34505328424

Update README.md

view details

push time in 5 days

release GoogleChromeLabs/css-paint-polyfill

1.1.1

released time in 5 days

release GoogleChromeLabs/css-paint-polyfill

1.1.0

released time in 5 days

release GoogleChromeLabs/css-paint-polyfill

1.0.3

released time in 5 days

release GoogleChromeLabs/css-paint-polyfill

1.0.2

released time in 5 days

release GoogleChromeLabs/css-paint-polyfill

1.0.1

released time in 5 days

created tagGoogleChromeLabs/css-paint-polyfill

tag1.1.1

A polyfill for the CSS Paint API, with special browser optimizations.

created time in 5 days

push eventGoogleChromeLabs/css-paint-polyfill

Jason Miller

commit sha d04d53c9cb8a297f4e9b40ca594daf685f04b928

Ignore CORS-blocked stylesheets. Fixes #6

view details

Jason Miller

commit sha 0733a0bc1362c489188b57720cc2c6cb8f58e586

1.1.1

view details

push time in 5 days

issue closedGoogleChromeLabs/css-paint-polyfill

Firefox error with CSS from different domain

Not sure if this is something that should be fixed, but I at least wanted to mention it. I'm using this polyfill, but I also load a font file from Google's fonts. Which comes down to a stylesheet from another domain. When I try to use the polyfill, Firefox gives me the following error: SecurityError: The operation is insecure., when trying to access sheet.cssRules in the walkStyles function.

For now I've found two ways to get around it:

I can add crossorigin="anonymous" to the Google fonts load, e.g.:

<link href="https://fonts.googleapis.com/css?family=Signika" rel="stylesheet" crossorigin="anonymous">

I don't know enough about it to say if that will work with every external CSS file though...

I can (also) filter out anything that comes from the google fonts domain. I know this "solution" is only going to work if the only external CSS that you load is from Google's fonts, so I guess it isn't really a solution. But perhaps any CSS from a separate domain could be filtered out instead?

//Change the original start of the update function from
//function update() {
//	let sheets = [].slice.call(document.styleSheets)
//to
function update() {
        let sheets = [].slice.call(document.styleSheets)
        sheets = sheets.filter(p => p.href && !p.href.includes("fonts.googleapis.com"))

For now I'm assuming that people using this polyfill will have it working through their own CSS files, although that's probably too strong of an assumption to make...

closed time in 5 days

nbremer

issue commentGoogleChromeLabs/css-paint-polyfill

Firefox error with CSS from different domain

Fixed in 1.1.1.

nbremer

comment created time in 5 days

push eventGoogleChromeLabs/css-paint-polyfill

Jason Miller

commit sha dc1c5cb499fd2ecc1cd67eaf806ba2b7c9734af5

Updates

view details

push time in 5 days

issue commentGoogleChromeLabs/css-paint-polyfill

Firefox error with CSS from different domain

I think we can solve this by wrapping the stylesheet access in a try/catch. It'll still allow using crossorigin, but won't break in cases where the polyfill isn't going to be able to access those rules anyway.

nbremer

comment created time in 5 days

created tagGoogleChromeLabs/css-paint-polyfill

tag1.0.3

A polyfill for the CSS Paint API, with special browser optimizations.

created time in 5 days

created tagGoogleChromeLabs/css-paint-polyfill

tag1.1.0

A polyfill for the CSS Paint API, with special browser optimizations.

created time in 5 days

push eventGoogleChromeLabs/css-paint-polyfill

Jason Miller

commit sha 79af7d032f12d4936fe3bc790a2ea2ae1bed1dba

add release script

view details

Jason Miller

commit sha db7bb6a702e5eb24cb450aee78bc3b780abbc66d

1.1.0

view details

push time in 5 days

push eventGoogleChromeLabs/css-paint-polyfill

Jason Miller

commit sha 838d4c4ae722d7b52b1a7f532b3ae2b3ba5ccf69

Updates

view details

push time in 5 days

delete branch GoogleChromeLabs/css-paint-polyfill

delete branch : dependabot/npm_and_yarn/serve-11.3.0

delete time in 5 days

push eventGoogleChromeLabs/css-paint-polyfill

dependabot[bot]

commit sha 9e4ae7ae74caa3883b60f70c88a8bff3c08bde6e

Bump serve from 6.5.8 to 11.3.0 Bumps [serve](https://github.com/zeit/serve) from 6.5.8 to 11.3.0. - [Release notes](https://github.com/zeit/serve/releases) - [Commits](https://github.com/zeit/serve/compare/6.5.8...11.3.0) Signed-off-by: dependabot[bot] <support@github.com>

view details

Jason Miller

commit sha c3915db51b85098332b04255087f71f5c5314bc8

Merge pull request #9 from GoogleChromeLabs/dependabot/npm_and_yarn/serve-11.3.0 Bump serve from 6.5.8 to 11.3.0

view details

push time in 5 days

PR merged GoogleChromeLabs/css-paint-polyfill

Bump serve from 6.5.8 to 11.3.0 dependencies

Bumps serve from 6.5.8 to 11.3.0. <details> <summary>Release notes</summary>

Sourced from serve's releases.

11.3.0

Minor Changes

  • Add back --cors option: #527

Credits

Huge thanks to @​TrevorDev for helping!

11.2.0

Minor Changes

  • Add support for manual SSL certs/keys: #520

Patches

  • Fixed ZEIT Now reference in readme: #554
  • Add information about how to serve a specific path: #548
  • Bumped serve-handler to the latest version: #559

Credits

Huge thanks to @​mattdodge, @​d2s, and @​Johann-S for helping!

11.1.0

Minor Changes

  • Update serve-handler to v6.1.0 and enable etag option by default: #546
  • Updated README for better understanding where to place the serve.json: #544
  • Allow absolute file paths: #526

Patches

  • Add --no-compression option to help message: #523

Credits

Huge thanks to @​philippescher, @​christopherjbaker, and @​mbalabash for helping!

11.0.2

Patches

  • Bumped serve-handler to latest version: #539

11.0.1

Patches

  • Updated lockfile for yarn: #530

11.0.0

</tr></table> ... (truncated) </details> <details> <summary>Commits</summary>

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


<details> <summary>Dependabot commands and options</summary> <br />

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
  • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
  • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
  • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

You can disable automated security fix PRs for this repo from the Security Alerts page.

</details>

+1 -1

0 comment

1 changed file

dependabot[bot]

pr closed time in 5 days

push eventGoogleChromeLabs/css-paint-polyfill

Jason Miller

commit sha ecfced04af6968392b37c75aa90dcfe922f53c04

Avoid processing polyfill-generated CSS rules

view details

Jason Miller

commit sha dbd3ea4cbb9f38d79de3b6b900eedd04fed82d1b

Bugfix: properly detect nested paint rules

view details

Jason Miller

commit sha aa7b08d53ed45053cf3d255daf8ebf26779db082

Bugfix: correct dimensions when elements have padding.

view details

Jason Miller

commit sha cdca00555258147f76967dc4f75a2f9871bae0e2

1.0.3

view details

Jason Miller

commit sha 030cbad5d86d342a8325bbcad0116bfd9cf683da

Merge branch 'master' of github.com:GoogleChromeLabs/css-paint-polyfill

view details

push time in 5 days

delete branch GoogleChromeLabs/css-paint-polyfill

delete branch : promise-add-module

delete time in 5 days

push eventGoogleChromeLabs/css-paint-polyfill

Sam Thorogood

commit sha 8a191b07396db28e2e80331ca2878477d13a448a

return optional Promise from addModule

view details

Jason Miller

commit sha 325794e940d700e474ae6a527afb261a63dd6292

Merge pull request #8 from GoogleChromeLabs/promise-add-module return optional Promise from addModule

view details

push time in 5 days

startedWAVM/WAVM

started time in 5 days

Pull request review commentpreactjs/preact-www

Use `onChange` in select example

 class MySelect extends Component {   render(_, { value }) {     return (       <form onSubmit={this.onSubmit}>-        <select value={value} onInput={this.onInput}>+        <select value={value} onChange={this.onInput}>

yeah, lets.

andrewiggins

comment created time in 6 days

startedevanw/esbuild

started time in 6 days

issue closedpreactjs/preact

Support Asynchronous Components

Inspired by https://twitter.com/youyuxi/status/824659082816716802

It'd be great if we could do the same with Preact. Looking forward to a discussion about what would it take to add support. Off the top of my head, this would possibly need

  1. Async rendering support
  2. Caching of ^ so subsequent renders are immediately resolved
  3. Update h to support Promises as children

A common argument against this would be to have this in userland code, however there are legitimate cases where having this baked into the framework itself would strongly encourage developers to start using code-splitting, which I think fits into Preact's goals of performance and min size.

closed time in 6 days

neeharv

issue commentpreactjs/preact

Support Asynchronous Components

Agreed @robertknight. We have support for Suspense-based deferred hydration and tree creation landing in #2291 / #2214 and that will likely be the most logical path forward here. It avoids the pitfalls mentioned in this thread relating to deadlocked async trees, and doesn't rely on the renderer dealing with concurrent asynchronous trees.

neeharv

comment created time in 6 days

issue closedpreactjs/preact

handle user input on SSR content before preact is loaded

Hi

Sometimes, when serving SSR content, the user can enter data before preact is loaded (slow connection, big js bundle, etc.). Then when preact bootstraps, it wipes out that state.

Related issues in the react repo: 4293 and 2585.

react-safe-universal-inputs seems like a workaround for react but it doesn't work in preact.

In addition, I created a HOC as a wrapper for the relevant inputs, which sets id's and then on client side, tries to access the input and its value (with document.getElementById) on constructor, componentWillMount and componentDidMount lifecycle events, but without success.

The relevant inputs isn't available at the mentioned lifecycle events - seems like preact removes the SSR inputs before calling the events.

I used the technique mentioned here (watch for DOM updates) and I don't understand why while hydrating these inputs (and other elements) are being replaced and not just updated (same content served from server is being rendered on client). I digged into the relevant issues in this repo and I'm rendering preact on client side after serving SSR content as recommended:

render(<App />, window.document.body, window.document.body.lastElementChild)

Any suggestions how to address this use case ?

Thanks for a great lib !!

closed time in 6 days

borisirota

issue commentpreactjs/preact

handle user input on SSR content before preact is loaded

This is fixed now that Preact X has a dedicated hydrate() codepath. Dirtied DOM values (input value, checked, etc) are never modified during hydration, and can be inspected using a ref of lifecycle callback. They are only re-synced to the Virtual DOM on the second render (setState/forceUpdate).

Example of resynced input:

function Input({ ref, ...props }) {
  const key = 'checked' in props ? 'checked' : 'value';
  return <input {...props} ref={c => {
    if (c && c[key] != props[key]) {
      setTimeout(() => {
        c.dispatchEvent(new Event('input'));
        c.dispatchEvent(new Event('change'));
      });
    }
  }} />;
}
borisirota

comment created time in 6 days

more