profile
viewpoint

43081j/id3 302

A JavaScript ID3 tags parser for Node & browsers.

43081j/funky 104

funky.js HTML5 camera video effects library

43081j/eslint-plugin-lit 50

lit-html support for ESLint

43081j/eslint-plugin-wc 34

ESLint rules for Web Components

43081j/integrity 14

Data integrity checking utilities for Node and the browser

43081j/array-filter 9

A Polymer element for providing array filtering/sorting while maintaining data binding/propagation.

43081j/canvas-paint 3

HTML5 canvas paint application

43081j/dataview-extra 3

DataView extra functionality

43081j/canvas-fractals 1

HTML5 fractals

push event43081j/storybook

James Garbutt

commit sha a4eb1724ede6c8bf430c9c43d786adfd4c303a0b

add web-component story types

view details

push time in 4 hours

PR opened storybookjs/storybook

add web-component story types

Fixes #11974 .

@shilman @tooppaaa can one of you let me know where the tests for this should live so i can add them?

ill leave it as a draft until then

+16 -0

0 comment

1 changed file

pr created time in 5 hours

create barnch43081j/storybook

branch : wc-types

created branch time in 5 hours

fork 43081j/storybook

📓 The UI component explorer. Develop, document, & test for React, Vue, Angular, Ember, Web Components, & more!

https://storybook.js.org

fork in 5 hours

issue commentstorybookjs/storybook

storybook@6 throws a core-js error

@shilman ill see if i get some free time at the weekend and will try debug it a bit at least. it'll be to do with the webpack config i guess and where it resolves modules from

my guess is we effectively run webpack from the project directory. then when we generate our webpack entry, somewhere down the tree we must require core-js. but by that point, webpack's CWD is the project dir rather than storybook's dir, so it will pick up whatever the root core-js version is instead of the one storybook wants.

43081j

comment created time in 12 hours

issue commentstorybookjs/storybook

storybook@6 throws a core-js error

essentially, storybook's generated output tries to require core-js for various polyfills.

im guessing because its generated output and doesn't "live" in the storybook directory (node_modules/@storybook), it will resolve the first available core-js from the top level rather than resolving it relative to storybook's directory.

so if you have storybook in a project which already has a different version of core-js (not necessarily as a direct dependency, all sorts of other projects also depend on core-js), that one may be required by accident rather than the one storybook wants.

this means the paths fail to resolve if the two core-js versions are drastically different.

43081j

comment created time in a day

issue openedstorybookjs/storybook

Define `Story` for web-components in typings

We currently define a Story in the react types:

https://github.com/storybookjs/storybook/blob/3fe7d96fd8d289f40bd8a38ec836ed95e6afe865/app/react/src/client/preview/types-6-0.ts#L23

But we don't have the equivalent for web components, even though it looks like it should be possible.

Is it as simple as defining the following in the typings?

export type WebComponentReturnType = TemplateResult|string|Node;
export type Story<Args = DefaultArgs> = BaseStory<Args, WebComponentReturnType> &
  Annotations<Args, WebComponentReturnType>;

im happy to PR it if that's right, and if you can let me know where it belongs if so.

created time in a day

issue commentstorybookjs/storybook

storybook@6 throws a core-js error

just a reminder that now that you published 6.0 officially, this is still a problem.

it is very awkward having to install core-js directly in each repo we use storybook for. do you have any suggested fix on your end for this? anything we can contribute to help?

43081j

comment created time in a day

pull request commentGoogleChrome/lighthouse

core: traverse shadow hosts in getNodePath

this should contain your changes now if you want to work on merging it once the CI passes

43081j

comment created time in 4 days

push event43081j/lighthouse

Paul Irish

commit sha 29ac0f7d0da07b87aeb9faf021f6337c5d59ce4e

getNodePath includes doc frag shadow roots in path

view details

Paul Irish

commit sha 6fd9538bb2d36feffe0ac824a8c30e34bd213b85

add test and expectations

view details

Paul Irish

commit sha 462541cc13523d3a0c5e50142ac28c7df4fed58e

bugfix: nodetype

view details

Paul Irish

commit sha b8efb9ccde33abe68c182448bc4a54c54d396ac0

restore commented out perf expectations

view details

Paul Irish

commit sha 466154b6f9c41941517367d47ff5bc2e76c98f66

Merge branch 'getnodepath-shadow' into getnodepath-shadow-fixandtest

view details

Paul Irish

commit sha a9f15c4a068ca89896d0d8e03ab8bbbee56991a8

drop new chromestatus smoektest. it's flakier than the one i handwrote

view details

Paul Irish

commit sha 039402ed632bd9bbe13959d7c902a246d7e9e4d0

cleanup

view details

Paul Irish

commit sha 424dc1889e2aa96ed43120ab67ffe3013972222e

restore the title in this smoektest page. (not sure why i removed it)

view details

Paul Irish

commit sha 473bacb0def0d59aeb492661a247678d36693d92

restore title redux: manually rebase this file against master to avoid conflict

view details

Paul Irish

commit sha 693a8fa7ccd3d350eab8464e5a109a0b2f5ad07e

comment

view details

James Garbutt

commit sha 4dcf5f1024a0c4ce46831a35897946156f827532

Merge pull request #1 from GoogleChrome/getnodepath-shadow-fixandtest getNodePath fixups

view details

push time in 4 days

PR merged 43081j/lighthouse

getNodePath fixups

hey @43081j

Thanks again for making #10956 and I'm sorry for being curt without much explanation.

I have some changes here that I'll annotate and describe below.

+25 -34

1 comment

4 changed files

paulirish

pr closed time in 4 days

Pull request review comment43081j/lighthouse

getNodePath fixups

 function getNodePath(node) {   }    const path = [];-  while (node && node.parentNode) {+  while (node && !!getNodeParent(node)) {     const index = getNodeIndex(node);     path.push([index, node.nodeName]);-    if (node.parentNode.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {-      path.push([0, node.parentNode.nodeName]);-      node = node.parentNode.host;

yep i didn't really like this either since we weren't just naturally iterating through it. good idea moving the function out. overall it seems the part i had missed/got wrong was the index in the end (a vs 0) but i had no clue where they were coming from (chrome i guess). if you ever find a way to do that test, that both implementations match up, that'd be incredibly useful.

paulirish

comment created time in 4 days

Pull request review comment43081j/lighthouse

getNodePath fixups

 function ultradumbBenchmark() {  /**  * Adapted from DevTools' SDK.DOMNode.prototype.path- *   https://github.com/ChromeDevTools/devtools-frontend/blob/7a2e162ddefd/front_end/sdk/DOMModel.js#L530-L552- * TODO: Doesn't handle frames or shadow roots...+ *   https://github.com/ChromeDevTools/devtools-frontend/blob/4fff931bb/front_end/sdk/DOMModel.js#L625-L647+ * Backend: https://source.chromium.org/search?q=f:node.cc%20symbol:PrintNodePathTo&sq=&ss=chromium%2Fchromium%2Fsrc+ *+ * TODO: DevTools nodePath handling doesn't currently support iframes, but probably could.  * @param {Node} node  */ /* istanbul ignore next */ function getNodePath(node) {+  // For our purposes, there's no worthwhile difference between shadow root and document fragment+  // We can consider them entirely synonymous.+  const isShadowRoot = node => node.nodeType === Node.DOCUMENT_FRAGMENT_NODE;+  const getNodeParent = node => isShadowRoot(node) ? node.host : node.parentNode;+   /** @param {Node} node */   function getNodeIndex(node) {+    if (isShadowRoot(node)) {+      // User-agent shadow roots get 'u'. Non-UA shadow roots get 'a'.+      return 'a';

Why? I have no idea.

Is this because its a behaviour defined in Chrome? as in we're just complying with whatever the implementation is over there basically

paulirish

comment created time in 4 days

pull request comment43081j/lighthouse

getNodePath fixups

No worries I'll have a read through in the morning. Thanks for picking this up and explaining it more

paulirish

comment created time in 6 days

delete branch 43081j/flat

delete branch : no-deps

delete time in 8 days

pull request commentQix-/node-error-ex

remove microdependency

here.

i read your README and this is exactly the behaviour your own docs specify (which in fact, the issue from years ago and the proposed diff did not support and actually would've broken).

as the readme describes, something like this:

var AdvancedError = errorEx('AdvancedError', {
	foo: {
		message: function (value) {
			if (value) {
				return 'bar ' + value;
			}
			return null;
		}
	}
})

would now result in bar theValueOfFoo, whereas if foo isn't set, it would result in whatever .message was.

43081j

comment created time in 10 days

push event43081j/node-error-ex

James Garbutt

commit sha 2db683e421443679dca1118dff53c4f960d091c7

drop isArray entirely

view details

push time in 10 days

push event43081j/node-error-ex

James Garbutt

commit sha 6cb408e41f15024eb6176ba5fbc441060f789eb9

drop isArray entirely

view details

push time in 10 days

push event43081j/node-error-ex

James Garbutt

commit sha 9380cd2f4bbfa6eb5b45de1d9b4e4ec7d8ef3cb5

drop isArray entirely

view details

push time in 10 days

pull request commentQix-/node-error-ex

remove microdependency

Yep that's true, though it should have never had the dependency in the first place.

I'll do it.

43081j

comment created time in 10 days

pull request commentQix-/node-error-ex

remove microdependency

Is that any time soon? If not, we could still merge this now as a patch version until that happens.

43081j

comment created time in 10 days

PR opened drawrowfly/tiktok-scraper

improve async tests & enable type checking everywhere

Basically:

  • Removed all but one of the ts-disable flags
  • Removed all but one of the eslint-disable flags
  • Added an editorconfig file
  • Enabled the jest ESLint env for *.test.ts
  • Changed a few async tests to use expect(...).rejects.toBe(...)

For the async tests, we had this:

try {
  await doSomething();
} catch (err) {
  expect(err).toBe('something');
}

this meant if doSomething resolved, it would pass the test but be wrong.

let me know if you're interested in these changes.

+40 -49

0 comment

4 changed files

pr created time in 12 days

create barnch43081j/tiktok-scraper

branch : cleanup

created branch time in 12 days

fork 43081j/tiktok-scraper

TikTok Scraper. Download video posts, collect user/trend/hashtag/music feed metadata, sign URL and etc.

fork in 12 days

PR opened Qix-/node-error-ex

remove microdependency

You really don't need this micro-dependency, Array.isArray will do just fine for your use case here.

One less dependency, and now zero-dependencies overall.

+2 -5

0 comment

2 changed files

pr created time in 13 days

create barnch43081j/node-error-ex

branch : microdeps

created branch time in 13 days

fork 43081j/node-error-ex

Easy error subclassing and stack customization

fork in 13 days

Pull request review commentDefinitelyTyped/DefinitelyTyped

Add generics to type definitions for Sinon Fakes

 declare namespace Sinon {         /**          * Creates a basic fake, with no behavior          */-        (): SinonSpy;+        (): SinonSpy<any[], void>;

Theoretically yes. But the likelihood of a person specifying what a fake returns and using it as if it's something else is much lower than someone misusing the default "untyped" fake.

It is very unlikely someone makes a fake which returns a number and assigns it to a string.

It is likely someone makes a default fake and assigns it to non void.

It is difficult to measure the risk which is why I haven't written this as a blocking review. As it is indeed meant to be "void". It is just a question of if we want to risk the breaking change or not (that's what it is).

Fakes have a much smaller usage than things like spies so I wouldn't worry over this being merged as is. But it is something to keep a very close eye on (if issues come up)

jmacmahon

comment created time in 16 days

pull request commentrunem/lit-analyzer

no-complex-attribute-binding: take converters into consideration

Good question. I just commit via git through a terminal so I would have expected husky to be fine.

I'll have a look tomorrow and see if there's any obvious reason it isn't

43081j

comment created time in 19 days

Pull request review commentrunem/lit-analyzer

no-complex-attribute-binding: take converters into consideration

 export function isAssignableInAttributeBinding( 	const { assignment } = htmlAttr; 	if (assignment == null) return undefined; +	if (htmlAttr.kind === HtmlNodeAttrKind.ATTRIBUTE) {

@runem is this what you had in mind?

43081j

comment created time in 20 days

push event43081j/lit-analyzer

43081j

commit sha f0c6be4e3a5af34d67aaa454a2574705dd0dc651

run prettier

view details

push time in 20 days

push event43081j/lit-analyzer

43081j

commit sha 3f2a0ae2360e85d78e6009f24685c5900267b97c

skip type checking if a converter exists

view details

43081j

commit sha 27f6a10d3199d1e2904ae903b6eca1f6451ba7c1

add a test for converters

view details

push time in 20 days

push event43081j/lit-analyzer

43081j

commit sha 1935e8dfff59478d1485dc70bf685853f1a00464

run prettier

view details

push time in 20 days

PR opened runem/lit-analyzer

no-complex-attribute-binding: take converters into consideration

Fixes #123

like i mention in the issue, i might add on to this to make no-incompatible-type-binding also take them into account.

let me know if you think thats sensible

+39 -3

0 comment

3 changed files

pr created time in 20 days

create barnch43081j/lit-analyzer

branch : complex-converter

created branch time in 20 days

issue commentrunem/lit-analyzer

lit-plugin(no-complex-attribute-binding) when property has a converter

I can have a go at this, though question for @runem: do we keep any context around the original property definition? by the time our visitors get the assignment, the target will just be a typed property will it not? i.e. it won't have any knowledge by that point of if there's a converter or not.

my suggested fix is:

  • change the no-complex-attribute-binding to check if there is a converter and, if there is, add string to the target type it checks against (so it would become string[]|string in this case)
  • possibly change is-assignable-in-attribute-binding to do similar, but given this doesn't seem to have problems here maybe it already handles it fine
bennypowers

comment created time in 20 days

created tag43081j/eslint-plugin-lit

tagv1.2.2

lit-html support for ESLint

created time in 20 days

push event43081j/eslint-plugin-lit

43081j

commit sha e3931ed55d3015abc7d9401cb9435d5ff398aa7d

fix lint I was bad and committed before checking...

view details

43081j

commit sha 0346dc913da7a201f51e672b9869dc4f3181ded9

1.2.2

view details

push time in 20 days

created tag43081j/eslint-plugin-lit

tagv1.2.1

lit-html support for ESLint

created time in 20 days

push event43081j/eslint-plugin-lit

43081j

commit sha 84c259562703f61b4506a82b437df0e78f190a25

1.2.1

view details

push time in 20 days

delete branch 43081j/eslint-plugin-lit

delete branch : dep-updates

delete time in 20 days

push event43081j/eslint-plugin-lit

James Garbutt

commit sha ce4cc3d37176eb39b92a225e781f3daf85681f0d

Update dependencies (dev/prod) (#69) * update dev dependencies * update parse5

view details

push time in 20 days

PR merged 43081j/eslint-plugin-lit

Update dependencies (dev/prod)

Here i've updated a bunch of devDeps, but also parse5 so we can fix what we saw in #63

Fixes #63.

+1306 -1718

0 comment

6 changed files

43081j

pr closed time in 20 days

issue closed43081j/eslint-plugin-lit

lit/no-invalid-html rule can get into a fight with Prettier

Prettier insists on auto-fixing everything towards <hr />-like, and this gets us into a fight with lit/no-invalid-html

Prettier issue has a lengthy discussion that seems to be going towards no action, so I was wondering what this ESLint ruleset thinks about this situation. Should lit/no-invalid-html ruleset maybe be amended for a whitelist of standard HTML5 tags, or...?

closed time in 20 days

lkraav

PR closed 43081j/eslint-plugin-lit

fix: take into account void elements and allow self-closing opening tags

WIP: need to add the actual fix, this is just a failing test

Could use some guidance here on where I need to look for fixing this. I don't think parse5 contains information about whether an element is a void element that can contain a self-closing slash, at least I couldn't see it when checking it in ASTExplorer.

So feels like we need to grab a list (ideas welcome!) or maintain a list ourselves and add a fix to not error on the self-closing slash?

Let me know your thoughts, I'm happy to finish it up, fixes https://github.com/43081j/eslint-plugin-lit/issues/63 cc: @aress31

+14 -1

6 comments

1 changed file

jorenbroekema

pr closed time in 20 days

pull request comment43081j/eslint-plugin-lit

fix: take into account void elements and allow self-closing opening tags

im gonna close this as the problem seems fixed by the new parse5 release (see #69 ).

thanks for helping out though, wouldn't have got fixed otherwise!

jorenbroekema

comment created time in 20 days

PR opened 43081j/eslint-plugin-lit

Update dependencies (dev/prod)

Here i've updated a bunch of devDeps, but also parse5 so we can fix what we saw in #63

+1306 -1718

0 comment

6 changed files

pr created time in 20 days

create barnch43081j/eslint-plugin-lit

branch : dep-updates

created branch time in 20 days

delete branch 43081j/parse5

delete branch : hr-closing

delete time in 21 days

pull request commentinikulin/parse5

set hr tags as self closing

there's plenty of test cases in there which use a <hr> so im not sure how they didn't catch this.

not entirely sure what the test is that would cover this given that...

43081j

comment created time in 23 days

Pull request review commentDefinitelyTyped/DefinitelyTyped

Add generics to type definitions for Sinon Fakes

 declare namespace Sinon {         /**          * Creates a basic fake, with no behavior          */-        (): SinonSpy;+        (): SinonSpy<any[], void>;

we don't know where consumers of these types are referencing fakes from. its very possible someone has an explicitly typed variable holding the fake which will differ from this one.

its also possible someone has used the return value somewhere, even though logically it wouldn't do anything/make sense. basically the point here is we don't know. the fact that it is possible means someone somewhere has done it, more than likely, so we have to account for that.

with the previous types, a lot more cases would be valid where you pass a fake into something. i imagine there are people who have been passing fakes into handlers, methods, etc which in fact consume something non-void usually.

your type here is indeed right, and i wish it could be that, but we all know someone somewhere will be depending on the fact it is currently any.

jmacmahon

comment created time in 23 days

Pull request review commentDefinitelyTyped/DefinitelyTyped

Add generics to type definitions for Sinon Fakes

 declare namespace Sinon {         /**          * Creates a basic fake, with no behavior          */-        (): SinonSpy;+        (): SinonSpy<any[], void>;

for backwards compat this should probably be <any[], any>

jmacmahon

comment created time in 24 days

PR opened inikulin/parse5

set hr tags as self closing

as far as i can see, this is a typo.

it is currently causing failures in our linter (which depends on parse5) when parsing HR tags.

your tests are a little non-self-explanatory so if there's somewhere i can add one, please do let me know.

+1 -1

0 comment

1 changed file

pr created time in 24 days

create barnch43081j/parse5

branch : hr-closing

created branch time in 24 days

fork 43081j/parse5

HTML parsing/serialization toolset for Node.js. WHATWG HTML Living Standard (aka HTML5)-compliant.

fork in 24 days

pull request comment43081j/eslint-plugin-lit

fix: take into account void elements and allow self-closing opening tags

it is a bug in parse5!

https://github.com/inikulin/parse5/blob/252819607421a5741cf745bb60c404f023531b0d/packages/parse5/lib/parser/index.js#L1549

here p is the parser, it has no such property ackSelfClosing. it should read token.ackSelfClosing = true; instead.

i have no clue why astexplorer works but this is definitely wrong in parse5's code as far as i can see

jorenbroekema

comment created time in 24 days

pull request comment43081j/eslint-plugin-lit

fix: take into account void elements and allow self-closing opening tags

you can see here: https://github.com/inikulin/parse5/blob/252819607421a5741cf745bb60c404f023531b0d/packages/parse5/lib/parser/index.js#L1542-L1550

that it should in fact set ackSelfClosing which is what controls whether this error is thrown or not.

im afraid it'll just need some debugging/breakpoints to see what exactly parse5 is seeing when it throws the error, here: https://github.com/inikulin/parse5/blob/252819607421a5741cf745bb60c404f023531b0d/packages/parse5/lib/parser/index.js#L688

jorenbroekema

comment created time in 24 days

pull request comment43081j/eslint-plugin-lit

fix: take into account void elements and allow self-closing opening tags

yup sorry just catching up on this...

parse5 internally has a visitor method for each kind of tag effectively. some of these set a flag to specify that the tag can be self-closing, so this implicitly creates a "whitelist" of tags already.

its been a while since i investigated this problem but basically from what i remember, the error is thrown by parse5 and not us. still, it works in astexplorer (which uses some version of parse5) so is still worth debugging.

jorenbroekema

comment created time in 24 days

create barnch43081j/dtslint

branch : eslint

created branch time in a month

issue openedmicrosoft/dtslint

Investigating ESLint migration

Hello 👋

Recently, out of interest, I made a branch of dtslint which drops tslint entirely and uses ESLint instead.

TSLint has been obsolete for a very long time, and deprecated for quite some time too. It would be good to move towards removing it IMO, is that something you're interested in?

I'm happy to continue my branch if that's the case, but it would be very nice to have some help converting the individual rules as there are many and I haven't touched this repo before.

Couple of notes from what I've found so far:

  • dts-critic returns a diagnostic which has a position of {start, length} which is aligned with TSLint but not ESLint. In ESLint we need a {column, line} or a Node
  • Rules can be converted easily if you understand their logic already, this is where I am slow since I have to first understand each rule's intention and what it does
  • We used to interact with the typescript api directly, but it seems this might go away as you can simply rely on ESLint to have already parsed/processed the AST instead
  • For those rules that need type information, if any, we can use typescript-eslint's additional types/helpers

If you're interested in seeing my branch, i could make a draft PR which doesn't yet build and leave comments where I'm unsure what to do (usually vague types that were previously any or inferred).

created time in a month

Pull request review commentrunem/lit-analyzer

add event bindings to no-incompatible-type-binding rule

+import { isAssignableToSimpleTypeKind, SimpleType, typeToString, validateType } from "ts-simple-type";+import { parseSimpleJsDocTypeExpression } from "web-component-analyzer";+import { HtmlNodeAttr } from "../../../analyze/types/html-node/html-node-attr-types";+import { RuleModuleContext } from "../../../analyze/types/rule/rule-module-context";+import { rangeFromHtmlNodeAttr } from "../../../analyze/util/range-util";+import { isAssignableToType } from "./is-assignable-to-type";++export function isAssignableInEventBinding(+	htmlAttr: HtmlNodeAttr,+	{ typeA, typeB }: { typeA: SimpleType; typeB: SimpleType },+	context: RuleModuleContext+): boolean | undefined {+	// Make sure that the expression given to the event listener binding a function or an object with "handleEvent" property.+	// This catches typos like: @click="onClick()"+	if (!isTypeBindableToEventListener(typeB)) {+		context.report({+			location: rangeFromHtmlNodeAttr(htmlAttr),+			message: `You are setting up an event listener with a non-callable type '${typeToString(typeB)}'`+		});++		return false;+	}++	return isEventAssignable(htmlAttr, { typeA, typeB }, context);+}++export function isEventAssignable(+	htmlAttr: HtmlNodeAttr,+	{ typeA, typeB }: { typeA: SimpleType; typeB: SimpleType },+	context: RuleModuleContext+): boolean | undefined {+	// Treat type "ANY" as "Event"+	if (typeA.kind === "ANY") {+		typeA = parseSimpleJsDocTypeExpression("Event", context);+	}++	// Construct an event handler type to perform type checking against+	const expectedType: SimpleType = {+		kind: "OBJECT",

aha learn something new every day, thanks for the explanation :+1:

43081j

comment created time in a month

Pull request review commentrunem/lit-analyzer

add event bindings to no-incompatible-type-binding rule

+import { isAssignableToSimpleTypeKind, SimpleType, typeToString, validateType } from "ts-simple-type";+import { parseSimpleJsDocTypeExpression } from "web-component-analyzer";+import { HtmlNodeAttr } from "../../../analyze/types/html-node/html-node-attr-types";+import { RuleModuleContext } from "../../../analyze/types/rule/rule-module-context";+import { rangeFromHtmlNodeAttr } from "../../../analyze/util/range-util";+import { isAssignableToType } from "./is-assignable-to-type";++export function isAssignableInEventBinding(+	htmlAttr: HtmlNodeAttr,+	{ typeA, typeB }: { typeA: SimpleType; typeB: SimpleType },+	context: RuleModuleContext+): boolean | undefined {+	// Make sure that the expression given to the event listener binding a function or an object with "handleEvent" property.+	// This catches typos like: @click="onClick()"+	if (!isTypeBindableToEventListener(typeB)) {+		context.report({+			location: rangeFromHtmlNodeAttr(htmlAttr),+			message: `You are setting up an event listener with a non-callable type '${typeToString(typeB)}'`+		});++		return false;+	}++	return isEventAssignable(htmlAttr, { typeA, typeB }, context);+}++export function isEventAssignable(+	htmlAttr: HtmlNodeAttr,+	{ typeA, typeB }: { typeA: SimpleType; typeB: SimpleType },+	context: RuleModuleContext+): boolean | undefined {+	// Treat type "ANY" as "Event"+	if (typeA.kind === "ANY") {+		typeA = parseSimpleJsDocTypeExpression("Event", context);+	}++	// Construct an event handler type to perform type checking against+	const expectedType: SimpleType = {+		kind: "OBJECT",

would you mind explaining what this layer is representing? and why it isn't just kind: FUNCTION at top level?

43081j

comment created time in a month

pull request commentrunem/lit-analyzer

add event bindings to no-incompatible-type-binding rule

awesome ill have a read through the commits.

strictFunctionTypes

This stuff is an interesting point. I suppose it is actually right, though... you should strongly type your handlers to the exact subtype of event needed.

But i can imagine most people (incl. myself) have plenty of handlers typed that way (just Event rather than a specific type).

no-noncallable-event-binding

i noticed this too, it should go away IMO. it is replaced by the fact that these type checks will now cover it. if we can have a custom error message in there for non-callable handlers, though, i agree it would be a nice solution. For sake of having specific error messages.

bubbling events

I think iterating over the possible events in the union and checking each one makes sense.

In most cases, we already make these assumptions when writing code. If i listen on change of a custom input, i assume it is only going to fire its own change event and will stop any inner ones from bubbling up. This can't really exist in the type system without knowing the implementation of the components you're using.

So i think best effort is to do what you say and test against each individual signature.

43081j

comment created time in a month

issue commentPolymer/lit-html

Ideas for lit-html 2.0

Template pre-compiler

Would this involve exposing a way at run-time to create instances of a single template programmatically?

In our case, we're struggling to come up with a clean solution whereby we can take rows of data from the backend and render them with a single template on the frontend. Normally, this is easy but in our case which template we use depends on the data which came back (or should...).

This sounds similar SSR i guess, in that SSR has to have some way of instantiating a template (re-using it) with data?

Basically i think the ultimate solution for us is the "template instantiation" RFC ive seen floating around for the past few years. But that won't come any time soon i imagine.

i.e. we want this:

render() {
  return someAlreadyCompiledTemplate.apply({some: "data"});
}
justinfagnani

comment created time in a month

pull request commentrunem/lit-analyzer

add event bindings to no-incompatible-type-binding rule

I rebased.

You seem to have it in your head already what we need to do here so feel free to have a go at it. Especially since it crosses over with other changes you've been making recently

43081j

comment created time in a month

push event43081j/lit-analyzer

runem

commit sha 12d3254a2920938aca71e7b3f7513d88275bee8f

Update dependencies

view details

runem

commit sha 2a231b5723bf0701bf6a25a064381c41818afc33

Make the order of analyzed files by the CLI alphabetical

view details

Felix Schulze Sindern

commit sha e28e3d9b306a68e2d793ab5446e766f59cf7ace8

Make maxInternalDepth and maxExternalDepth configurable.

view details

Felix Schulze Sindern

commit sha 3bf074e64f1da8e27fc41a831f1dedcb4debb8d9

Move parsing of module traversal depth to lit-analyzer.

view details

Felix Schulze Sindern

commit sha 5c9a95dc1b3afee8ee2fbcd432c3269e25159a56

Rename config names.

view details

Felix Schulze Sindern

commit sha a175160de0c4b335a6987ee48d88afe568549e1a

Use -1 instead of 'Infinity' to display Infinity.

view details

Felix Schulze Sindern

commit sha 96b7b046f963d77c84472bdec56b524a7d3d3f26

Add documentation for maxNodeModuleImportDepth and maxProjectImportDepth.

view details

Felix Schulze Sindern

commit sha efc40a15a6991447fadf31d9d3ab866d5c26528f

Improve codefix for 'no-missing-import' rule.

view details

runem

commit sha 21812b7c666d4e35bd85601942fef2258ace94d4

Always import DOM lib from Typescript

view details

runem

commit sha da22d1a6592261e347a21d3d27d416ddeedee0fe

Fix wrong diagnostic offsets for diagnostics inside style tags

view details

Rune Mehlsen

commit sha 750176bba09c4cffd899cc4e52bd6af4e5f4dd68

Merge pull request #117 from FelixSchuSi/1.2.0-simplify-suggested-import-path Improve codefix for 'no-missing-import' rule.

view details

Rune Mehlsen

commit sha 8e29ceb36ffa1190663790fb423b48e1711b98a4

Merge pull request #116 from FelixSchuSi/1.2.0-traversal-depth-config Make maxInternalDepth and maxExternalDepth configurable.

view details

runem

commit sha b04fb0e2d7bb3454b6b6899e3dfd720b1bd8a1c5

Merge branch '1.2.0' of github.com:runem/lit-analyzer into 1.2.0

view details

runem

commit sha 68620f62d408f484e51629fcecfb719389daab10

Change strict severity of 'no-incompatible-property-type' to 'error' and 'no-property-visibility-mismatch' to 'warning'

view details

runem

commit sha 4a16f1f59a4c600c8078c6881ba92f287d54664c

Make it possible to set different timeout per operation kind

view details

runem

commit sha 00fc5202cc103ed7b2faf6c59e853148e6cd9535

Fix problem where unknown attribute code fixes weren't getting applied correctly

view details

runem

commit sha d7c8a9e1f2b068deff30bceeaf9c70fa671d1750

Add support for DirectiveFn<T>

view details

runem

commit sha 61977d819d4f529061c8d749a4c26ea0b3976b9f

Fix problem where some declarations would get cache-invalidated incorrectly

view details

runem

commit sha afc073c632cdfb36f18c6c0151d40d67c83fca10

Fix 'changeTagName' code fix

view details

runem

commit sha 8d201815a799c47d425bd6575ce03caa6203d0f7

Add global 'part' property

view details

push time in a month

pull request commentrunem/lit-analyzer

add event bindings to no-incompatible-type-binding rule

I'm just about to rebase, but once i do that, go for it

43081j

comment created time in a month

pull request commentrunem/lit-analyzer

add event bindings to no-incompatible-type-binding rule

You could probably make use of program.isSourceFileFromExternalLibrary rather than guessing whats part of the lib and what isn't, too.

That does sound like a possible solution, though. Implementing full knowledge of the built-in types would be a huge job so one way or another i think a workaround/shortcut has to exist for now.

43081j

comment created time in a month

delete branch 43081j/lit-analyzer

delete branch : rules

delete time in a month

delete branch 43081j/lit-analyzer

delete branch : rule-iteration

delete time in a month

pull request commentrunem/lit-analyzer

add event bindings to no-incompatible-type-binding rule

@runem is this still a thing you haven't done in one of your branches yourself? its been a while since i started work on it so its very possible the functionality just exists now.

if not, im happy to finish it off if you can point me in the right direction

43081j

comment created time in a month

issue commentrunem/lit-analyzer

ts-simple-type performance

wow that just shows how a small slow down can blow up. we have a lot of files in this project so makes sense it'd shave off so many seconds. nice work again, i'd say its definitely performant now

43081j

comment created time in a month

push event43081j/lit-analyzer

James Garbutt

commit sha 38b729b34c8bfb002ea85b87b8e5cd39a5590019

fix merge issues

view details

push time in a month

push event43081j/lit-analyzer

Peter Burns

commit sha b0fdf594249e30847e2e3886107009b7a04dd23b

Handle more cases in isLitDirective There's now a BooleanAttributePart, and a directive that works on multiple parts can take a union of Part types.

view details

43081j

commit sha d8a0ff7ff0dfb74a2692bbbf3ce5f8a2c77630ad

no-legacy-attribute rule

view details

43081j

commit sha 4639ef49f06f786296b23ef543f1824600ed3455

add to readme

view details

Rune Mehlsen

commit sha 2811a83fbcb1130959c1ca105729385c1f1e985f

Merge pull request #95 from 43081j/legacy-syntax no-legacy-attribute rule

view details

43081j

commit sha 09e3b33d426f80bde59e0d641531b759581c3120

perf: do not traverse nested imports

view details

43081j

commit sha c85b4a46b0fb061bb753e338aa745525ef245ae5

rule: no-property-visibility-mismatch

view details

43081j

commit sha 93bfa010273576806be3333d124ab16ccc3bac22

run format

view details

43081j

commit sha f9cd54e7b9b4bcdf83432f1f5d7795141a7a2404

use a max depth flag instead

view details

43081j

commit sha fcd6b3964eba0851bea5a844b87f85e43b84f54f

update editorconfig

view details

Rune Mehlsen

commit sha cae7afac1a8bcf2f200fda9202777f21350c92f5

Merge pull request #93 from 43081j/perf-things performance: import traversal

view details

43081j

commit sha e587e0c050e7bdecfe619122faecd5e52855687d

update internalproperty detection

view details

43081j

commit sha dc74978db2db1e7b25badc9b1f6b1368c786bfe5

fix whitespace

view details

43081j

commit sha 66fd93f78d153ab6ca6e08cc84d13d5a88e198d6

use ts from context

view details

43081j

commit sha cf0f1caecfee3111a1555e18d7bdf39ce99002d1

use provided decorator

view details

Rune Mehlsen

commit sha dd0b22c1228245dc18af97f613d77f2dba0e97a7

Merge pull request #100 from 43081j/visibility-mismatch rule: property visibility mismatch

view details

runem

commit sha 9575bde6618d051451024b3456a9bc1ed9af6dc0

Update changelog for version 1.1.11

view details

runem

commit sha eb4e77e50ee0c76c46f3e0096b977057db70ed41

v1.1.11

view details

runem

commit sha 2f850a072b406bdc7160d1e450a207bd16050e2e

Add code fix to no-property-visibility-mismatch rule and make sure it only runs on properties where either the property or internalProperty decorator is used

view details

runem

commit sha fcacc1fc746172f42154020722ae0b87a3e7ad6e

Improve fix messages and include them in the output for the CLI

view details

runem

commit sha db65c1e8dabe6403a310b5d59a54887218365c5a

Add TS 3.9 to the set of TS modules being tested. Remove TS 3.5

view details

push time in a month

issue commentrunem/lit-analyzer

ts-simple-type performance

10s roughly, whatever you changed was a good change haha.

well done

43081j

comment created time in a month

created tag43081j/shadow-utils

tagv0.1.1

Utils for querying shadow DOM

created time in a month

push event43081j/shadow-utils

43081j

commit sha e33cd2f7f08fc8a4695d1660a0f0338cc83f832e

fix lint

view details

43081j

commit sha cd5b1b4cce62753104b48f93c0632f40ccc76610

0.1.1

view details

push time in a month

created tag43081j/shadow-utils

tagv0.1.0

Utils for querying shadow DOM

created time in a month

push event43081j/shadow-utils

43081j

commit sha 9b7e0356bf13988f03e01e6d757865fcd237f3c4

0.1.0

view details

push time in a month

push event43081j/shadow-utils

43081j

commit sha 01aa4214d87c147e8b12075c53dd6e69e66ee868

add querySelector tests

view details

push time in a month

push event43081j/shadow-utils

43081j

commit sha 7551a982ee409ad6c56a88259a2200e43ad13345

update readme

view details

push time in a month

push event43081j/shadow-utils

43081j

commit sha fcb128c57dcd0dd0c09c3790abd4391840322294

update readme

view details

push time in a month

push event43081j/shadow-utils

43081j

commit sha 059e65645751821c6092c3451d345a9448c7cfcd

update readme

view details

push time in a month

push event43081j/shadow-utils

43081j

commit sha e58f98e9d2c53b815bc9aa752fb7f5b4efade983

fix package-lock

view details

push time in a month

delete branch 43081j/gatsby

delete branch : remove-micro-modules

delete time in a month

push event43081j/fake-timers

Ariel Weinberger

commit sha 499af273593b45a9572564a7d4c71ea9970c7058

Cast to number if not already

view details

Ariel Weinberger

commit sha 0a5dc175e29ecb7e9b2c9bba6a0fe2756e16ac30

Use double quotes

view details

Ariel Weinberger

commit sha 322c9a8dd5fd10fef8fd0de6ef4869b453ea5f8a

Fix linting issues

view details

Ariel Weinberger

commit sha 74f87f701dbda4d3b5aef78c0c2900abeb47ac21

Add tests

view details

Ariel Weinberger

commit sha a0ac099d869267bbb9daa9e1f7ebd6948ed82974

Fix typo

view details

itay

commit sha 1f83b99639f57a3980847da7aaddcf3d11308b5d

issue #304 fix - clearTimeout clears setInterval and clearInterval clears setTimeout

view details

Benjamin Gruenbaum

commit sha 2ebd23c01130c9a525b4424e899aef24bb19c4bb

Merge pull request #322 from arielweinberger/feature/fix-immediate-fire-315 Convert timer delay to number if not already

view details

Benjamin Gruenbaum

commit sha 89e9e9b58c12fdf3301067dee6282ca829c48c56

Merge pull request #324 from itayperry/master Thanks!

view details

itay

commit sha bbd69c51258ce8520c224dfa1690a6a3f4bcb37a

issue #319 fix - The use of 'eval' has been removed

view details

itay

commit sha 2a74d2d6cb168d2bb7ad9d866528994590cb1442

issue #319 fix - Error message changed to TypeError

view details

Rens Groothuijsen

commit sha 2bcf1329fa44862857705ace9329c6ee6ac29727

Support timeout.refresh in node environments

view details

itay

commit sha 356988f32c2171222a4e85f702fc49149bd6f136

issue #319 partial fix - rollup no longer throws error on eval

view details

itay

commit sha 81b6dc053dd8e9f5f75773357dfd77e23e0bf739

use of prettier canceled to prevent radical changes

view details

itay

commit sha 639cf388abbd01d31271f4a3a6644f9c29e1adfd

test added and lint issue was fixed

view details

itay

commit sha a211987568e37a25aab82d845a570a7a8d905471

comment deleted

view details

Benjamin Gruenbaum

commit sha cb4c2f6e2eaddfd2c1be49f14e7f6d51f6633280

Merge pull request #328 from rgroothuijsen/FAKE-TIMERS-187 Support timeout.refresh in node environments

view details

Alistair Brown

commit sha a6f814b11a20615b9870397bb02e212f4ac38df5

Add stack trace to code recursively scheduling timers Use stack information for jobs and timers to provide more context when an infinite loop error is thrown. Fixes #230

view details

Alistair Brown

commit sha 52d6dba2ede53fd0be88ff750f59937fbb10daee

Add flag for approaching infinite loop Use a flag when approaching infinite loop detection which will enable an error object to be attached to the job, which can then be used for generating the stack output.

view details

Alistair Brown

commit sha 135c6fec9a48930e13a1c2b4130ddd2935aa770e

Update for PR feedback - Safely update stack property using `defineProperty`, wrapped in try/catch - Tests for more clock functions to confirm stack trace provided - Stack trace slice automatically calculated based on clock function position

view details

Alistair Brown

commit sha d95493e7010ac6b66c5c2ad38c2f98a43205e46f

Remove unnecessary durations and use globals - Use global setInterval and setImmediate to match setTimeout use - Remove unnecessary duration parameter from setImmediate and setImmediate

view details

push time in a month

pull request commentsinonjs/fake-timers

add esm bundle

@SimenB im having trouble finding time at the min to finish this off. especially if you want to use node's ESM implementation as new tests will need writing and a new test harness/setup.

ill catch the branch up but not sure when ill get chance to do those changes yet

43081j

comment created time in a month

pull request commentgatsbyjs/gatsby

Remove micro modules

FYI ci seems to fail because of some unrelated yarn error (it couldn't build a dependency or something errored during install).

43081j

comment created time in 2 months

issue commentrunem/lit-analyzer

ts-simple-type performance

Next branch: ~25s Master: ~160s

not too bad 👍 good work

43081j

comment created time in 2 months

push event43081j/gatsby

43081j

commit sha 879c588b8bc5f361f708d5956cee2ef7e0e73d2b

drop micro packages

view details

push time in 2 months

push event43081j/gatsby

James Garbutt

commit sha 02cfbe188137d3097ce7227b934109831d38ee4b

revert some query-string changes

view details

push time in 2 months

push event43081j/gatsby

Antoine Caron

commit sha 299ae644b4f70bce47884a3220129e8cea9f636a

chore(jest/circleci): setup test report for units (#23851) Co-authored-by: Michal Piechowiak <misiek.piechowiak@gmail.com>

view details

renovate[bot]

commit sha 3bbc541831bd571ec99d58671a359e9e850814c6

fix: update starters and examples (#23915) Co-authored-by: Renovate Bot <bot@renovateapp.com>

view details

Hashim Warren

commit sha ca629be0f44ee6228bda6f0426556a813a418034

add seoTitle (#23912) Co-authored-by: gatsbybot <mathews.kyle+gatsbybot@gmail.com>

view details

Francesco Agnoletto

commit sha 9715aaff4be629b7a263263c871f12bcd2545f33

chore(gatsby): convert page-component to typescript (#23277) * Draft types for page-component.ts * Fix imports * Fix type error * chore: format * chore: format * Fix import * Add machine state and event types * Convert page-component tests to TypeScript * chore: format * Remove unused comment * Explain action types choice * Add feedback * Remove eslint exception * chore: format Co-authored-by: gatsbybot <mathews.kyle+gatsbybot@gmail.com>

view details

Andres Alvarez

commit sha 5a5f0099dd5486b149dc0b33185e09fcdb01d166

Table of contents for API reference pages (#23537) * feat(www): Table of contents for API reference pages * Add DocsMarkdownPage and integrate it and fix heading * Use PageMetadata instead of custom Helmet * Improve code style * Add tests :3 * Move enableScrollSync and add some defensive code * Add comment and use not defined instead of null check in tests * Rollback not defined insteand of null for test * Remove APIContents since is not being used Co-authored-by: gatsbybot <mathews.kyle+gatsbybot@gmail.com>

view details

Nicholas Duffy

commit sha c8fd6d2daf2e81833ef93174de00023d859a1837

Update data update webhooks env naming (#23919)

view details

Michelle Gienow

commit sha f312f18b36419aeed4f76122f67e733330a0a848

Adjust frontmatter and add CTA (#23914) * Adjust frontmatter and add CTA * chore: format Co-authored-by: gatsbybot <mathews.kyle+gatsbybot@gmail.com>

view details

Kyle Mathews

commit sha 251dc58dddfb1a6a2cd82846f1b38109360b9743

feat(gatsby-recipes): Improve ongoing summary of steps + add end summary (#23888) * Print out text + completed steps as recipe executes + again with a summary at the end * Update tests * Fix lint problems * Update packages/gatsby-recipes/src/cli.js Co-authored-by: John Otander <johnotander@gmail.com> * Update packages/gatsby-recipes/src/cli.js Co-authored-by: John Otander <johnotander@gmail.com> Co-authored-by: John Otander <johnotander@gmail.com>

view details

Lennart

commit sha fcea3d061b4adb4f872b0de6ec8ba347115bf585

fix(using-markdown-pages): Example and docs (#23867) * example change * doc change

view details

Nat Alison

commit sha d749913c14b46d923d5a70a136b003438e354f98

maintenance(www): Simplify the way we structure and set up the /packages pages (#23471) * Comment out package generation code in docs * remove packages * simplify package readme page * readme in right place * fix up package directory * no need for todo * console.log * add FIXME * remove markdown page footer * remove FIXME * use package owner instead of reading local packages * restrict getting packages to main gatsby package for api docs * forget it lol * get rid of unused plugins field * add isOfficialPackage utility function * add a test * fix page breaking * Fix page AGAIN

view details

Michael

commit sha 5c56595fa064d781b182007c996d32952a2a7901

fix(docs): typescript - 404 (#23920)

view details

Michael

commit sha 27f5aaa9c219206a190860160e08ee83591ebef3

fix(docs): add trainling slash to doc-links.yaml (#23921)

view details

Alex Moon

commit sha 91530826f6c491b96a2ca7e9cde9ccebc27e855e

chore(docs,blog): Cosmic Rebranding (#23858)

view details

Michal Piechowiak

commit sha d1d4a492e155cfed87bca7328b225adf7c9e2630

chore: get rid of weird registry mirrors from lock (#23930)

view details

shannonbux

commit sha 51fabdb9194635294bc5c34914eb143374df064d

Quick fix to recipes discoverability (#23767) * Quick fix Should we list the official recipes out? I'm not sure how to link to the community recipes individually. Where is that list? Or we could just share this in the umbrella issue and tweet it and ask people to PR in their own link. * Update automated-recipes.md * chore: format * couple updates thanks @laurieontech and @ascorbic! * simplified PR ok @laurieontech and @aishablake I think this will be the simplest quick fix to solve SEO issue * Update relative link Co-authored-by: gatsbybot <mathews.kyle+gatsbybot@gmail.com> Co-authored-by: Aisha Blake <aisha@gatsbyjs.com>

view details

Eduard Aymerich

commit sha e36d73157e5964267fbcc62ed3b2d0e2582b735e

Add Catalan to i18n.json languages (#23939)

view details

Andrés Bedoya

commit sha e267ca00f519a1cddb230a34fc11acf5d8e2fc17

Update deploying-to-zeit-now.md (#23946)

view details

Michal Piechowiak

commit sha 88056f054cb6a539f5cb371336174516e47a1c07

fix(www): allow to tree shake lodash-es (#23967)

view details

Albert Lash

commit sha f7dc43fe310ebcecf99bc81cc25df256ffe38f51

fix(gatsby-cli): don't fail when using `--log-pages` and/or `--write-to-file` (#23951) * Adding new cli options for page optimization * prettier * make them hidden, add some description as well as comment about why they are hidden Co-authored-by: Michal Piechowiak <misiek.piechowiak@gmail.com>

view details

Michal Piechowiak

commit sha c34bd667b3ecdfaef365ced82d8c2fa46d73ad39

chore(release): Publish - gatsby-admin@0.1.22 - gatsby-cli@2.12.16 - gatsby-recipes@0.1.15 - gatsby-theme-blog-core@1.4.22 - gatsby-theme-blog@1.5.22 - gatsby-theme-notes@1.3.22 - gatsby-theme-ui-preset@0.0.12 - gatsby@2.21.22

view details

push time in 2 months

issue openedstorybookjs/storybook

storybook@6 throws a core-js error

With storybook 6, my very basic typescript setup throws errors about core-js polyfills every time.

Module not found: Error: Can't resolve 'core-js/modules/web.dom-collections.iterator'

this is thrown from 'generated-stories-entry'. i can see earlier in the webpack output that the polyfill was built:

[./node_modules/@storybook/core/dist/server/common/polyfills.js] 120 bytes {vendors~main} [built]

which afaik is where you include core-js.

with storybook 5, this works just fine. its a clean setup from today, npm i -D @storybook/html (5 or 6) and this config:

module.exports = {
  stories: ['../src/**/*.stories.ts'],
  webpackFinal: (config) => {
    config.module.rules.push({
      test: /\.ts$/,
      use: [
        {loader: require.resolve('ts-loader')}
      ]
    });
    config.resolve.extensions.push('.ts');
    return config;
  }
};

I think this is because there are multiple core-js versions in my node_modules and storybook is resolving the wrong one (somehow). if i look at the one inside storybook's packages, its got the right files.

this isn't something i should have to 'fix' though IMO, as so many dependencies use core-js it seems like a very likely situation for many to bump into. my guess is you can fix it by installing core-js as a direct dependency but thats also far from ideal.

created time in 2 months

issue commentcypress-io/cypress

4.8.0 ShadowDOM - Only seems to allow you to travel down through one level

Do you have any example of the code you're using in your test? The selector etc. It definitely does traverse deeply as that was the point of the implementation. So this will either be a bug or usage issue

shaunswales

comment created time in 2 months

push event43081j/lighthouse

43081j

commit sha b6d662a672e6087d7ca574aefcf759c36a7ad60a

add an expectation

view details

push time in 2 months

pull request commentGoogleChrome/lighthouse

core: traverse shadow hosts in getNodePath

btw @connorjclark i tried the test, nodeLabel ends up as some string about Waiting for a script to register a property may not be desirable in all case..

and it seems flaky on chromestatus. some runs, LCP is the footer

43081j

comment created time in 2 months

Pull request review commentGoogleChrome/lighthouse

core: traverse shadow hosts in getNodePath

 function getNodePath(node) {   while (node && node.parentNode) {     const index = getNodeIndex(node);     path.push([index, node.nodeName]);-    node = node.parentNode;+    if (node.parentNode.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {

yep, the current function gives me this:

2,HTML,1,BODY,0,APP-DRAWER-LAYOUT,1,APP-HEADER-LAYOUT,1,DIV,1,CHROMEDASH-FEATURELIST,0,#document-fragment,164,DIV,1,CHROMEDASH-FEATURE,0,#document-fragment,2,SECTION,0,SUMMARY,1,P
43081j

comment created time in 2 months

push event43081j/lighthouse

43081j

commit sha b6b9c696a476d85666439d6df7d6dc1c7baa78e4

add node name

view details

push time in 2 months

Pull request review commentGoogleChrome/lighthouse

core: traverse shadow hosts in getNodePath

 function getNodePath(node) {   while (node && node.parentNode) {     const index = getNodeIndex(node);     path.push([index, node.nodeName]);-    node = node.parentNode;+    if (node.parentNode.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {

i did add a small change so the path contains the shadow root as an entry, too. maybe that was it, we shall see...

and yes thats a great point, someone could set host to anything on a document fragment. its very unlikely but not impossible. the ideal solution is simply instanceof ShadowRoot but i didn't want to do that in case there's a situation window (in context of the function call) is different to the window of the node...

43081j

comment created time in 2 months

push event43081j/squoosh

Masataka Yakura

commit sha 364a5db5d54837f618f4edeb37cc1b4009a97ea1

add maskable icon file

view details

Masataka Yakura

commit sha ef2318bcc187df38ed768414c93cbd7e16082c83

support maskable icon add a new entry to the icons member referring the maskable icon file added in 364a5db

view details

Surma

commit sha 9f660e5178e359e5acbc9e5868c07edb793816e2

add maskable icon (#709) add maskable icon

view details

Jake Archibald

commit sha 8bf741ed4eba55e6309d9c27f44b19008b57c6fa

1.9.0

view details

Ingvar Stepanyan

commit sha d60d0ae47d08e4ec323f6b5dd7f5a59fcc1d7963

Update Emscripten (1.39.4)

view details

Ingvar Stepanyan

commit sha fce61c8c89e082502c4afaa34053c8f143444158

Switch to emscripten-upstream Before: 255184 bytes, 2m15s After: 238270 bytes, 2m6s

view details

Ingvar Stepanyan

commit sha a056d1c36379c5b118b5da5f7eb10fd1ca0d10ce

Switch to `make` to build optipng Mostly a build config simplification for now, no noticeable changes in time or output size.

view details

Ingvar Stepanyan

commit sha 570e604be024a0df9d85c5f46f10487c7e57a076

optipng: switch to bundled zlib and libpng Benefits: - newer versions of the libraries - zlib: 1.2.8 -> 1.2.11 - libpng: 1.6.18beta04 -> 1.6.34 - much fewer dependencies to install (as libs are already in optipng archive and we don't need napa) - much smaller build thanks to customised versions of zlib and libpng containing only APIs necessary for optipng itself: 238950 -> 177359 bytes - much faster build thanks to preconfigured libpng and stripped APIs: 2m15s -> 40s - much simpler build script: 77 -> 46 lines

view details

Surma

commit sha 7638bb795e55228b571f08ce17d2fe8365f682e8

Merge pull request #727 from GoogleChromeLabs/optipng optipng build improvements

view details

Jake Archibald

commit sha 650db99818d6108dfed1689f606fd6c656d8fc80

Package-json update

view details

Jake Archibald

commit sha 1b7d3fa394d63c6201e7d85b6dcede8bc058394d

1.9.1

view details

Alon Zakai

commit sha 48c06e86fa3a055ded54746579534f8f2d0e04c4

Use closure in optpng build, which shrinks the JS to less than half.

view details

Surma

commit sha 71b3c7dda2940e6c1eeaead632bab4149c6c72fc

Merge pull request #728 from kripken/closure Use closure in optipng build, which shrinks the JS to less than half

view details

Alon Zakai

commit sha 6aeaae6160ff96642e0b0007c160e35d36dc7d1e

Closure all the things

view details

Alon Zakai

commit sha 309947a08f8f5858286e0c94d458e6819aa6b113

Merge branch 'master' into closure2

view details

Alon Zakai

commit sha d7fb0d9b4066b65a6fae6bcc95461312db389560

Remove unneeded compile flags from imagequant

view details

Jason Miller

commit sha 6b0a675469628f02e9cd5f961ea50a31fef40783

Fix SyntaxError for `{}.nextTick`

view details

Surma

commit sha b22adc9957b3a511835a4614250799644f748c97

Merge pull request #737 from GoogleChromeLabs/fix-process-syntaxerror Fix SyntaxError for `{}.nextTick`

view details

Ingvar Stepanyan

commit sha 164191d746c7bbff32c0770c3693c905cd4b85a0

Upgrade node-sass (#742) 4.13 is the minimum version that works with Node.js 13.

view details

Ingvar Stepanyan

commit sha 4621cbcae915dafaecb67bed7998b915ae3defa8

Add encoding/decoding times to console This intentionally excludes time of loading corresponding modules, and only measures actual processing. While this is not perfect as it's not integrated in the UI (cc @jakearchibald), it gives at least some way to measure performance of different codecs and their integrations on particular files.

view details

push time in 2 months

more