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

Upgrade typescript to ^4.2.0 and fix lint issues #1156

Merged
merged 45 commits into from
May 13, 2021
Merged

Conversation

PiotrKozlowski
Copy link
Contributor

@PiotrKozlowski PiotrKozlowski commented Apr 28, 2021

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)

@TomWoodward TomWoodward temporarily deployed to rex-web-issue-1469-awstlay4kif April 28, 2021 09:34 Inactive
@TomWoodward TomWoodward temporarily deployed to rex-web-issue-1469-u9gjm2xnq9y April 28, 2021 10:20 Inactive
@TomWoodward TomWoodward temporarily deployed to rex-web-issue-1469-nwcekjuwklp April 28, 2021 12:05 Inactive
@TomWoodward TomWoodward temporarily deployed to rex-web-issue-1469-sk5v4wt7zby April 28, 2021 13:16 Inactive
@TomWoodward TomWoodward temporarily deployed to rex-web-issue-1469-xfrdnluwets April 29, 2021 13:21 Inactive
@TomWoodward TomWoodward temporarily deployed to rex-web-issue-1469-yu7vigrs3wh April 29, 2021 13:53 Inactive
@@ -0,0 +1,122 @@
/// <reference lib="webworker" />
Copy link
Contributor Author

@PiotrKozlowski PiotrKozlowski Apr 29, 2021

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
Copy link
Contributor Author

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

@TomWoodward TomWoodward temporarily deployed to rex-web-issue-1469-yu7vigrs3wh April 29, 2021 14:06 Inactive
@TomWoodward TomWoodward temporarily deployed to rex-web-issue-1469-yu7vigrs3wh April 29, 2021 14:18 Inactive
@TomWoodward TomWoodward temporarily deployed to rex-web-issue-1469-yu7vigrs3wh April 29, 2021 14:22 Inactive
@TomWoodward TomWoodward temporarily deployed to rex-web-issue-1469-yu7vigrs3wh April 29, 2021 15:20 Inactive
@PiotrKozlowski PiotrKozlowski marked this pull request as ready for review April 29, 2021 15:28
@PiotrKozlowski PiotrKozlowski requested a review from a team as a code owner April 29, 2021 15:28
@TomWoodward TomWoodward temporarily deployed to rex-web-issue-1469-yu7vigrs3wh April 29, 2021 16:25 Inactive
@TomWoodward TomWoodward temporarily deployed to rex-web-issue-1469-yu7vigrs3wh May 10, 2021 14:15 Inactive
@TomWoodward
Copy link
Member

needs conflicts resolved

@TomWoodward TomWoodward temporarily deployed to rex-web-issue-1469-yu7vigrs3wh May 11, 2021 14:15 Inactive
@TomWoodward TomWoodward temporarily deployed to rex-web-issue-1469-yu7vigrs3wh May 11, 2021 15:36 Inactive
@TomWoodward TomWoodward temporarily deployed to rex-web-issue-1469-yu7vigrs3wh May 12, 2021 11:55 Inactive
@TomWoodward TomWoodward temporarily deployed to rex-web-issue-1469-yu7vigrs3wh May 12, 2021 12:26 Inactive
@TomWoodward TomWoodward temporarily deployed to rex-web-issue-1469-yu7vigrs3wh May 12, 2021 12:31 Inactive
@TomWoodward TomWoodward temporarily deployed to rex-web-issue-1469-yu7vigrs3wh May 12, 2021 12:50 Inactive
@@ -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'});
Copy link
Member

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

@@ -59,7 +59,7 @@ export interface LocationChange<M = AnyMatch> {
action: Action;
}

export type AnyRoute = typeof routes[number];
export type AnyRoute = NonNullable<typeof routes[number]>;
Copy link
Member

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?

@TomWoodward TomWoodward temporarily deployed to rex-web-issue-1469-yu7vigrs3wh May 13, 2021 11:58 Inactive
@TomWoodward TomWoodward merged commit b577de6 into master May 13, 2021
@TomWoodward TomWoodward deleted the issue-1469 branch May 13, 2021 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants