Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WEBDEV-7253 Update Dependencies #20

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,20 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 16.x
node-version: latest

- name: Install dependencies
run: yarn install
run: npm install

- name: Run tests
run: yarn run test
run: npm run test

- name: Upload reports
run: npx codecov
- name: Upload Codecov reports
uses: codecov/codecov-action@main
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
6 changes: 3 additions & 3 deletions .github/workflows/gh-pages-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ jobs:
node-version: 16.x

- name: Install dependencies
run: yarn install
run: npm install

- name: Create build files for gh-pages deploy
run: yarn ghpages:build
run: npm run ghpages:build

# Reference: https://github.com/JamesIves/github-pages-deploy-action
- name: Deploy 🚀
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pr-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ jobs:

- name: Install and Build
run: |
yarn install
yarn ghpages:build
npm install
npm run ghpages:build

# Reference: https://github.com/rossjrw/pr-preview-action
- name: Deploy preview
Expand Down
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,45 +24,45 @@ const iaItem = <MetadataResponse>;

## Local Demo with `web-dev-server`
```bash
yarn start
npm run start
```
To run a local development server that serves the basic demo located in `demo/index.html`

## Testing with Web Test Runner
To run the suite of Web Test Runner tests, run
```bash
yarn run test
npm run test
```

To run the tests in watch mode (for &lt;abbr title=&#34;test driven development&#34;&gt;TDD&lt;/abbr&gt;, for example), run

```bash
yarn run test:watch
npm run test:watch
```

## Linting with ESLint, Prettier, and Types
To scan the project for linting errors, run
```bash
yarn run lint
npm run lint
```

You can lint with ESLint and Prettier individually as well
```bash
yarn run lint:eslint
npm run lint:eslint
```
```bash
yarn run lint:prettier
npm run lint:prettier
```

To automatically fix many linting errors, run
```bash
yarn run format
npm run format
```

You can format using ESLint and Prettier individually as well
```bash
yarn run format:eslint
npm run format:eslint
```
```bash
yarn run format:prettier
npm run format:prettier
```
16 changes: 8 additions & 8 deletions demo/app-root.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
/* eslint-disable no-restricted-globals */
import { html, css, LitElement, TemplateResult } from 'lit';
import { customElement, property, query } from 'lit/decorators.js';
import {
MetadataResponse,
SearchService,
} from '@internetarchive/search-service';
import { SharedResizeObserver } from '@internetarchive/shared-resize-observer';
import { ModalManager } from '@internetarchive/modal-manager';
import '@internetarchive/modal-manager';
import {
MetadataResponse,
MetadataService,
} from '@internetarchive/metadata-service';
import type { ItemNavigator } from '../src/iaux-item-navigator';
import '../src/iaux-item-navigator';
import '../src/menus/share-panel';
Expand Down Expand Up @@ -147,7 +147,7 @@ export class AppRoot extends LitElement {

@property({ type: String }) encodedManifest = '';

@property({ attribute: false }) sharedObserver = new SharedResizeObserver();
sharedObserver = new SharedResizeObserver();

@property({ type: Array, attribute: false })
menuContents: MenuProviderInterface[] = [];
Expand Down Expand Up @@ -203,11 +203,11 @@ export class AppRoot extends LitElement {
}

async fetchItemMD() {
const searchService = SearchService.default;
const metadataService = MetadataService.default;

// masterbookofamericanfolksong00shep => multiple files
// ux-team-books => item
const mdResponse = await searchService.fetchMetadata(
const mdResponse = await metadataService.fetchMetadata(
'masterbookofamericanfolksong00shep',
);

Expand Down Expand Up @@ -441,7 +441,7 @@ export class AppRoot extends LitElement {
.item=${this.itemMD}
.modal=${this.modalMgr}
.sharedObserver=${this.sharedObserver}
.loaded=${this.loaded}
?loaded=${this.loaded}
?viewAvailable=${!!this.showTheaterExample}
.menuContents=${this.menuContents}
.menuShortcuts=${this.menuShortcuts}
Expand Down
3 changes: 0 additions & 3 deletions demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
<html lang="en-GB">
<head>
<meta charset="utf-8">
<script type="text/javascript" src="https://polyfill.io/v3/polyfill.min.js?features=es2015%2Ces5%2CglobalThis"></script>
<script type="text/javascript" src="https://unpkg.com/[email protected]/polyfill-support.js"></script>
<script type="text/javascript" src="https://unpkg.com/@webcomponents/[email protected]/webcomponents-bundle.js"></script>

<style>
html, app-root {
Expand Down
Loading
Loading