Skip to content

Commit

Permalink
Fix hb import for media provider
Browse files Browse the repository at this point in the history
  • Loading branch information
web-flow committed Nov 9, 2023
1 parent c25e4c9 commit b176a8e
Show file tree
Hide file tree
Showing 11 changed files with 48 additions and 58 deletions.
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
PW_EXPERIMENTAL_SERVICE_WORKER_NETWORK_EVENTS=1
2 changes: 0 additions & 2 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ jobs:
playwright:
timeout-minutes: 60
runs-on: ubuntu-latest
env:
PW_EXPERIMENTAL_SERVICE_WORKER_NETWORK_EVENTS: 1
steps:
- name: Remove all fonts
run: rm -rf /usr/share/fonts
Expand Down
3 changes: 0 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,5 @@
"source.fixAll.eslint": true,
},
"eslint.format.enable": true,
"playwright.env": {
"PW_EXPERIMENTAL_SERVICE_WORKER_NETWORK_EVENTS": 1
},
"javascript.preferences.importModuleSpecifierEnding": "js",
}
13 changes: 4 additions & 9 deletions ext/js/display/display-audio.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,10 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

import {EventListenerCollection} from '../core.js';
import {PopupMenu} from '../dom/popup-menu.js';
import {AudioSystem} from '../media/audio-system.js';
import {yomichan} from '../yomichan.js';

/* global
* AudioSystem
* PopupMenu
*/
import { EventListenerCollection } from '../core.js';

Check failure on line 19 in ext/js/display/display-audio.js

View workflow job for this annotation

GitHub Actions / test

There should be no space after '{'

Check failure on line 19 in ext/js/display/display-audio.js

View workflow job for this annotation

GitHub Actions / test

There should be no space before '}'
import { PopupMenu } from '../dom/popup-menu.js';

Check failure on line 20 in ext/js/display/display-audio.js

View workflow job for this annotation

GitHub Actions / test

There should be no space after '{'

Check failure on line 20 in ext/js/display/display-audio.js

View workflow job for this annotation

GitHub Actions / test

There should be no space before '}'
import { AudioSystem } from '../media/audio-system.js';

Check failure on line 21 in ext/js/display/display-audio.js

View workflow job for this annotation

GitHub Actions / test

There should be no space after '{'

Check failure on line 21 in ext/js/display/display-audio.js

View workflow job for this annotation

GitHub Actions / test

There should be no space before '}'
import { yomichan } from '../yomichan.js';

Check failure on line 22 in ext/js/display/display-audio.js

View workflow job for this annotation

GitHub Actions / test

There should be no space after '{'

Check failure on line 22 in ext/js/display/display-audio.js

View workflow job for this annotation

GitHub Actions / test

There should be no space before '}'

export class DisplayAudio {
constructor(display) {
Expand Down
31 changes: 10 additions & 21 deletions ext/js/display/popup-main.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,16 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

import {log} from '../core.js';
import {DocumentFocusController} from '../dom/document-focus-controller.js';
import {HotkeyHandler} from '../input/hotkey-handler.js';
import {JapaneseUtil} from '../language/sandbox/japanese-util.js';
import {yomichan} from '../yomichan.js';
import {DisplayAnki} from './display-anki.js';
import {DisplayAudio} from './display-audio.js';
import {DisplayProfileSelection} from './display-profile-selection.js';
import {DisplayResizer} from './display-resizer.js';
import {Display} from './display.js';

/* global
* Display
* DisplayAnki
* DisplayAudio
* DisplayProfileSelection
* DisplayResizer
* DocumentFocusController
* HotkeyHandler
* JapaneseUtil
*/
import { log } from '../core.js';

Check failure on line 19 in ext/js/display/popup-main.js

View workflow job for this annotation

GitHub Actions / test

There should be no space after '{'

Check failure on line 19 in ext/js/display/popup-main.js

View workflow job for this annotation

GitHub Actions / test

There should be no space before '}'
import { DocumentFocusController } from '../dom/document-focus-controller.js';
import { HotkeyHandler } from '../input/hotkey-handler.js';
import { JapaneseUtil } from '../language/sandbox/japanese-util.js';
import { yomichan } from '../yomichan.js';
import { DisplayAnki } from './display-anki.js';
import { DisplayAudio } from './display-audio.js';
import { DisplayProfileSelection } from './display-profile-selection.js';
import { DisplayResizer } from './display-resizer.js';
import { Display } from './display.js';

(async () => {
try {
Expand Down
10 changes: 3 additions & 7 deletions ext/js/pages/settings/dictionary-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

import {EventListenerCollection, log} from '../../core.js';
import {DictionaryWorker} from '../../language/dictionary-worker.js';
import {yomichan} from '../../yomichan.js';

/* global
* DictionaryWorker
*/
import { EventListenerCollection, log } from '../../core.js';
import { DictionaryWorker } from '../../language/dictionary-worker.js';
import { yomichan } from '../../yomichan.js';

class DictionaryEntry {
constructor(dictionaryController, fragment, index, dictionaryInfo) {
Expand Down
16 changes: 5 additions & 11 deletions ext/js/pages/settings/popup-preview-frame-main.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,11 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

import {PopupFactory} from '../../app/popup-factory.js';
import {log} from '../../core.js';
import {HotkeyHandler} from '../../input/hotkey-handler.js';
import {yomichan} from '../../yomichan.js';
import {PopupPreviewFrame} from './popup-preview-frame.js';

/* global
* HotkeyHandler
* PopupFactory
* PopupPreviewFrame
*/
import { PopupFactory } from '../../app/popup-factory.js';
import { log } from '../../core.js';
import { HotkeyHandler } from '../../input/hotkey-handler.js';
import { yomichan } from '../../yomichan.js';
import { PopupPreviewFrame } from './popup-preview-frame.js';

(async () => {
try {
Expand Down
4 changes: 1 addition & 3 deletions ext/js/templates/sandbox/template-renderer-media-provider.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

/* global
* Handlebars
*/
import { Handlebars } from '../../../lib/handlebars.js';

export class TemplateRendererMediaProvider {
constructor() {
Expand Down
19 changes: 19 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,8 @@
"stylelint-config-recommended": "^13.0.0",
"vitest": "^0.34.6",
"wanakana": "^5.2.0"
},
"dependencies": {
"dotenv": "^16.3.1"
}
}
4 changes: 2 additions & 2 deletions playwright.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
// @ts-check
import {defineConfig, devices} from '@playwright/test';
import { defineConfig, devices } from '@playwright/test';

/**
* Read environment variables from file.
* https://github.com/motdotla/dotenv
*/
// require('dotenv').config();
import 'dotenv/config';

/**
* @see https://playwright.dev/docs/test-configuration
Expand Down

0 comments on commit b176a8e

Please sign in to comment.