Skip to content

Commit

Permalink
Add stub package to temporarily cover non-optional prettier-plugin-so…
Browse files Browse the repository at this point in the history
…rt-imports peer dependency
  • Loading branch information
acelaya committed Feb 10, 2023
1 parent 056d62f commit 621a707
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 7 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"@types/showdown": "^2.0.0",
"@typescript-eslint/eslint-plugin": "^5.35.1",
"@typescript-eslint/parser": "^5.35.1",
"@vue/compiler-sfc": "./scripts/stub-package",
"approx-string-match": "^2.0.0",
"autoprefixer": "^10.0.1",
"aws-sdk": "^2.345.0",
Expand Down Expand Up @@ -105,8 +106,7 @@
"arrowParens": "avoid",
"singleQuote": true,
"importOrder": ["^[./]"],
"importOrderSeparation": true,
"importOrderCaseInsensitive": true
"importOrderSeparation": true
},
"main": "./build/boot.js",
"scripts": {
Expand Down
12 changes: 12 additions & 0 deletions scripts/stub-package/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "@vue/compiler-sfc",
"version": "3.0.0",
"description": "This is a workaround for a peer dependency on @trivago/prettier-plugin-sort-imports which is not properly marked as optional. To be removed once solved: https://github.com/trivago/prettier-plugin-sort-imports/issues/201",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC"
}
1 change: 1 addition & 0 deletions src/boot/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// The same boot script is used for both entry points so that the browser
// already has it cached when it encounters the reference in the sidebar
// application.
//
// @ts-ignore - This file is generated before the boot bundle is built.
import manifest from '../../build/manifest.json';
import { bootHypothesisClient, bootSidebarApp } from './boot';
Expand Down
2 changes: 1 addition & 1 deletion src/sidebar/components/AnnotationView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import { useEffect, useState } from 'preact/hooks';
import { withServices } from '../service-context';
import type { LoadAnnotationsService } from '../services/load-annotations';
import { useSidebarStore } from '../store';
import { useRootThread } from './hooks/use-root-thread';
import SidebarContentError from './SidebarContentError';
import ThreadList from './ThreadList';
import { useRootThread } from './hooks/use-root-thread';

type AnnotationViewProps = {
onLogin: () => void;
Expand Down
2 changes: 1 addition & 1 deletion src/sidebar/components/NotebookView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ import { withServices } from '../service-context';
import type { LoadAnnotationsService } from '../services/load-annotations';
import type { StreamerService } from '../services/streamer';
import { useSidebarStore } from '../store';
import { useRootThread } from './hooks/use-root-thread';
import NotebookFilters from './NotebookFilters';
import NotebookResultCount from './NotebookResultCount';
import PaginatedThreadList from './PaginatedThreadList';
import { useRootThread } from './hooks/use-root-thread';

export type NotebookViewProps = {
// injected
Expand Down
2 changes: 1 addition & 1 deletion src/sidebar/components/SidebarView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ import type { LoadAnnotationsService } from '../services/load-annotations';
import type { StreamerService } from '../services/streamer';
import { useSidebarStore } from '../store';
import FilterStatus from './FilterStatus';
import { useRootThread } from './hooks/use-root-thread';
import LoggedOutMessage from './LoggedOutMessage';
import LoginPromptPanel from './LoginPromptPanel';
import SelectionTabs from './SelectionTabs';
import SidebarContentError from './SidebarContentError';
import ThreadList from './ThreadList';
import { useRootThread } from './hooks/use-root-thread';

export type SidebarViewProps = {
onLogin: () => void;
Expand Down
2 changes: 1 addition & 1 deletion src/sidebar/components/StreamView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import type { APIService } from '../services/api';
import type { ToastMessengerService } from '../services/toast-messenger';
import { useSidebarStore } from '../store';
import * as searchFilter from '../util/search-filter';
import { useRootThread } from './hooks/use-root-thread';
import ThreadList from './ThreadList';
import { useRootThread } from './hooks/use-root-thread';

export type StreamViewProps = {
// injected
Expand Down
1 change: 0 additions & 1 deletion src/sidebar/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Load polyfill for :focus-visible pseudo-class.
import 'focus-visible';
// The entry point component for the app.
import { render } from 'preact';
// Enable debugging checks for Preact. Removed in prod builds by Rollup config.
import 'preact/debug';
Expand Down
3 changes: 3 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1987,6 +1987,9 @@
"@typescript-eslint/types" "5.50.0"
eslint-visitor-keys "^3.3.0"

"@vue/compiler-sfc@./scripts/stub-package":
version "3.0.0"

abbrev@1, abbrev@^1.0.0:
version "1.1.1"
resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8"
Expand Down

0 comments on commit 621a707

Please sign in to comment.