-
Notifications
You must be signed in to change notification settings - Fork 1
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
Upgrade typescript to ^4.2.0 and fix lint issues #1156
Conversation
@@ -0,0 +1,122 @@ | |||
/// <reference lib="webworker" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
content of the previous service worker can be found here: http://rex-web.herokuapp.com/books/service-worker.js
function abs_path { | ||
(cd "$(dirname '$1')" &>/dev/null && printf "%s/%s" "$PWD" "${1##*/}") | ||
} | ||
|
||
build=$(abs_path "${BASH_SOURCE%/*}/../build") | ||
worker="$build"/service-worker.js | ||
|
||
# add cache behaviors for 100% offline load |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've moved it to src/service-worker.ts
…fter updating @opesntax/types
needs conflicts resolved |
@@ -6,7 +6,7 @@ import { assertNotNull } from '../../utils'; | |||
describe('setHead hook', () => { | |||
let hookBody: ActionHookBody<typeof locationChange>; | |||
const helpers = {} as MiddlewareAPI & AppServices; | |||
const action = locationChange({location: new URL('http://localhost/'), action: 'PUSH'}); | |||
const action = locationChange({location: new URL('http://localhost/') as any, action: 'PUSH'}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same deal with the location/url situation
src/app/navigation/types.ts
Outdated
@@ -59,7 +59,7 @@ export interface LocationChange<M = AnyMatch> { | |||
action: Action; | |||
} | |||
|
|||
export type AnyRoute = typeof routes[number]; | |||
export type AnyRoute = NonNullable<typeof routes[number]>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this isn't necessary anymore right?
for: https://github.com/openstax/unified/issues/1469
For adding support for SW I've followed instructions from this comment: facebook/create-react-app#10032 (comment)