Skip to content

Commit

Permalink
Upgrade TypeScript and everything else, and switch to nodenext and es…
Browse files Browse the repository at this point in the history
…2021 (#347)

- Upgrade TypeScript, codemirror, and everything else too.

- Switches to `moduleResolution: nodenext`. This makes TypeScript follow `export` conditions. For Lit, that means we'll now see an error when the `.js` extension is missing from an import.

- Because the `type` and `imports/exports` fields are now significant, we now pass the `package.json` to TypeScript. In addition, because the default `type` is `commonjs`, we force the default to be `module` instead, so that we get module semantics by default.

- Switches `target` from `es2017` to `es2021`, which is supported in all modern browsers.

- Upgrades to the latest Wireit to get services, and configured for the `serve` command.
  • Loading branch information
aomarks authored Nov 11, 2022
1 parent 230b147 commit 9718403
Show file tree
Hide file tree
Showing 22 changed files with 4,201 additions and 17,130 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/deploy-demo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 19
cache: npm
- uses: google/wireit@setup-github-actions-caching/v1

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 19
cache: npm
- uses: google/wireit@setup-github-actions-caching/v1

Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 19
cache: npm
- uses: google/wireit@setup-github-actions-caching/v1

- run: npm ci
- run: npx playwright install-deps
- run: npm test
env:
WIREIT_FAILURES: continue
6 changes: 3 additions & 3 deletions .github/workflows/version-module.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 19
cache: npm
- uses: google/wireit@setup-github-actions-caching/v1

Expand Down
11 changes: 9 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,16 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

### Changed

- Removed `vscode-languageserver` dependency.
- TypeScript version upgraded from `4.4.4` to `4.7.4`.
- Replaced `vscode-languageserver` dependency with smaller
`vscode-languageserver-protocol`.
- TypeScript version upgraded from `4.4.4` to `4.8.4`.
- `PlaygroundConnectedElement` `project` is now permitted to be `undefined` according to TypeScript.
- Upgrade `codemirror` from `5.63.0` to `5.65.9`.
- **BREAKING** Switched TypeScript `moduleResolution` from `esnext` to `nodenext`.
- **BREAKING** Bumped TypeScript `target` from `es2017` to `es2021`.
- **BREAKING** The local `package.json` is now passed to TypeScript for
compilation, and the default value of the `type` field is modified to
`module`.

## [0.16.3] - 2022-08-02

Expand Down
10 changes: 2 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -980,16 +980,10 @@ npm i
npm run build
```

Build continuously:
Launch the configurator/demo locally and build continuously:

```sh
npm run watch
```

Launch the configurator/demo locally:

```sh
npm run serve
npm run serve --watch
```

## FAQ
Expand Down
Loading

0 comments on commit 9718403

Please sign in to comment.