Skip to content

Commit 0688efa

Browse files
committed
chore(deps): lit 2.0
migrate from lit-element to the new lit package: https://lit.dev/docs/releases/upgrade/
1 parent 1bebfa6 commit 0688efa

File tree

95 files changed

+236
-161
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+236
-161
lines changed

.eslintrc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@
1313
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended", "prettier"],
1414
"rules": {
1515
"prettier/prettier": "error",
16-
"@typescript-eslint/explicit-module-boundary-types": "off"
16+
"@typescript-eslint/explicit-module-boundary-types": 0
1717
}
1818
}

_templates/element/new/element.stories.ts.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
to: src/<%= name %>-element.stories.ts
33
---
4-
import { html } from 'lit-html';
4+
import { html } from 'lit';
55
import './<%= name %>-element';
66

77
export default {

_templates/element/new/element.ts.t

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
---
22
to: src/<%= name %>-element.ts
33
---
4-
import { customElement, html, LitElement, property, svg } from 'lit-element';
4+
import { html, LitElement, svg } from 'lit';
5+
import { customElement, property} from 'lit/decorators.js';
56

67
@customElement('wokwi-<%= name %>')
78
export class <%= h.className(name) %>Element extends LitElement {

package-lock.json

Lines changed: 91 additions & 60 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
"husky": "^6.0.0",
3131
"hygen": "^6.1.0",
3232
"lint-staged": "^10.2.11",
33-
"lit-html": "^1.4.0",
3433
"prettier": "^2.3.2",
3534
"react-is": "^16.13.1",
3635
"rimraf": "^3.0.2",
@@ -42,7 +41,7 @@
4241
"web-component-analyzer": "^1.1.6"
4342
},
4443
"dependencies": {
45-
"lit-element": "^2.3.1"
44+
"lit": "^2.0.0"
4645
},
4746
"scripts": {
4847
"build": "rimraf dist && tsc --sourceMap false && tsc -m esnext --outDir dist/esm --sourceMap false && rollup -c rollup.config.js && terser -c -m -o dist/wokwi-elements.bundle.min.js dist/wokwi-elements.bundle.js",

src/7segment-element.stories.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { withKnobs, select } from '@storybook/addon-knobs';
22
import { storiesOf, forceReRender } from '@storybook/web-components';
3-
import { html } from 'lit-html';
3+
import { html } from 'lit';
44
import './7segment-element';
55

66
class SpinnerAnimation {

src/7segment-element.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { css, customElement, html, LitElement, property, svg } from 'lit-element';
1+
import { css, html, LitElement, svg } from 'lit';
2+
import { customElement, property } from 'lit/decorators.js';
23
import { ElementPin } from './pin';
34
import { mmToPix } from './utils/units';
45

src/analog-joystick-element.stories.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { html } from 'lit-html';
1+
import { html } from 'lit';
22
import './analog-joystick-element';
33

44
export default {

src/analog-joystick-element.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { css, customElement, html, LitElement, property, query } from 'lit-element';
1+
import { css, html, LitElement } from 'lit';
2+
import { customElement, property, query } from 'lit/decorators.js';
23
import { analog, ElementPin, GND, VCC } from './pin';
34
import { SPACE_KEYS } from './utils/keys';
45

src/arduino-mega-element.stories.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { boolean, withKnobs } from '@storybook/addon-knobs';
22
import { storiesOf } from '@storybook/web-components';
3-
import { html } from 'lit-html';
3+
import { html } from 'lit';
44
import './arduino-mega-element';
55

66
storiesOf('Arduino Mega', module)

src/arduino-mega-element.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { css, customElement, html, LitElement, property, svg } from 'lit-element';
1+
import { css, html, LitElement, svg } from 'lit';
2+
import { customElement, property } from 'lit/decorators.js';
23
import { pinsFemalePattern } from './patterns/pins-female';
34
import { analog, ElementPin, i2c, spi, usart } from './pin';
45

src/arduino-nano-element.stories.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { boolean, withKnobs } from '@storybook/addon-knobs';
22
import { storiesOf } from '@storybook/web-components';
3-
import { html } from 'lit-html';
3+
import { html } from 'lit';
44
import { action } from '@storybook/addon-actions';
55
import './arduino-nano-element';
66

src/arduino-nano-element.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { customElement, html, LitElement, property, svg, query, css } from 'lit-element';
1+
import { css, html, LitElement, svg } from 'lit';
2+
import { customElement, property, query } from 'lit/decorators.js';
23
import { analog, ElementPin, i2c, spi, usart } from './pin';
34
import { SPACE_KEYS } from './utils/keys';
45

src/arduino-uno-element.stories.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { withKnobs, boolean } from '@storybook/addon-knobs';
22
import { storiesOf } from '@storybook/web-components';
3-
import { html } from 'lit-html';
3+
import { html } from 'lit';
44
import './arduino-uno-element';
55

66
storiesOf('Arduino Uno', module)

src/arduino-uno-element.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { css, customElement, html, LitElement, property, svg } from 'lit-element';
1+
import { css, html, LitElement, svg } from 'lit';
2+
import { customElement, property } from 'lit/decorators.js';
23
import { pinsFemalePattern } from './patterns/pins-female';
34
import { analog, ElementPin, i2c, spi, usart } from './pin';
45

src/big-sound-sensor-element.stories.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { html } from 'lit-html';
1+
import { html } from 'lit';
22
import './big-sound-sensor-element';
33

44
export default {

src/big-sound-sensor-element.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { customElement, html, LitElement, property, svg } from 'lit-element';
1+
import { html, LitElement, svg } from 'lit';
2+
import { customElement, property } from 'lit/decorators.js';
23
import { ElementPin } from '.';
34
import { GND, VCC } from './pin';
45

0 commit comments

Comments
 (0)