HackMD
在 LINE Chatbot 中串接 Google Analytics 的經驗分享 - HackMD
在 LINE Chatbot 中串接 Google Analytics 的經驗分享
small refactor, moving date range helper to util to be reused in analytics dataloader
depending on <https://github.com/cofacts/rumors-api/pull/188|#188> and <https://github.com/cofacts/rumors-api/pull/189|#189>
<https://coveralls.io/builds/32483673|Coverage Status> Coverage decreased (-0.02%) to 87.574% when pulling *<https://github.com/cofacts/rumors-api/commit/839bcd08f441b5d18d1b6e0015c6545c6a5e3b0f|839bcd0> on dateUtil* into *<https://github.com/cofacts/rumors-api/commit/7dc45064a84a9ae4e129d45dc77d1ff44270ae23|7dc4506> on fetchGA*.
Comment on #190 Analytics data loader
<https://coveralls.io/builds/32483677|Coverage Status> Coverage increased (+0.2%) to 87.78% when pulling *<https://github.com/cofacts/rumors-api/commit/095d1eaa1fad7697f9425e609889d5bd740c84fa|095d1ea> on analyticsDataLoader* into *<https://github.com/cofacts/rumors-api/commit/839bcd08f441b5d18d1b6e0015c6545c6a5e3b0f|839bcd0> on dateUtil*.
<https://coveralls.io/builds/32483773|Coverage Status> Coverage increased (+0.02%) to 87.798% when pulling *<https://github.com/cofacts/rumors-api/commit/969bc5b810aadad8c8722af076eee796e8093513|969bc5b> on articleStats* into *<https://github.com/cofacts/rumors-api/commit/095d1eaa1fad7697f9425e609889d5bd740c84fa|095d1ea> on analyticsDataLoader*.
Review on #188 script to fetch google analytics stats
Thanks for the commit! I have finished commenting on the script implementation. Going to inspect the test cases tonight.
Comment on #188 script to fetch google analytics stats
Since this try-catch statement covers the entire function, it is equivalent to doing try-catch in the call site of `upsertDocStats`. However, the latter allows the user of `upsertDocStats` to determine if they want to catch it. I would suggest removing try-catch here.
Comment on #188 script to fetch google analytics stats
I find it difficult to differentiate the use case between L291-294 and L307-315. A comment elaborating this case (edge-case handling across batches) would be helpful.
Comment on #188 script to fetch google analytics stats
dotenv variables should be string already, thus `''` can be omitted. For example, `process.env.PORT` is `5000` even without `''`.
Comment on #188 script to fetch google analytics stats
Seems that errors are all unexpected items that should be reported to Rollbar. It would be nice if we send them using `Rollbar.error(err)`.
Comment on #188 script to fetch google analytics stats
Some explanation on how to execute the script here (or in `README.md` instead) would be great. Newly introduced env vars in `.env.sample` needs some documentation in here (or in `README.md` instead).
Comment on #188 script to fetch google analytics stats
I suppose `row.metrics[0].values` are numbers in strings? If so, `parseInt(visits, 10)` or even `+visits` can convert strings to number. Use of eval is <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/eval#Never_use_eval!|highly discouraged>.
Comment on #188 script to fetch google analytics stats
Since it's <https://developers.google.com/analytics/devguides/reporting/core/v4/resource-based-quota|analytics 360 only function>, we will probably never uncomment it. Let's remove this line~
Comment on #188 script to fetch google analytics stats
Seems that errors are all unexpected items that should be reported to Rollbar. It would be nice if we send them using `Rollbar.error(err)`.
Comment on #188 script to fetch google analytics stats
I am wondering if <https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Map.html#putAll(java.util.Map)|`putAll()`> is useful here. I also like the current implementation, which explicitly lists all changed fields, this makes modifications crystal clear :gem: .
Thanks! I've added a minor suggestion regarding the use of `isValid`.
Personally I prefer throwing errors with message text for these utility functions. Pros: • removes the need to do `else` block and simplifies code structure a lot. • have the same expressiveness of error message + `isValid` • when it's invalid, only `error` field is relevant. `isValid` is derived from `error`, and `startDate` / `endDate` are simply not applicable. • in this case, an exception with message can fully express the same amount of information. Cons: • `validateOOO` functions do imply returning error instead of throwing them. • may need to rename to something like `assertOOO`
Comment on #188 script to fetch google analytics stats
Another idea that come across my mind is, processing items across batches should be pretty similar to merging different `pagePathLevel2` -- they all memorize the last row and perform update when necessary. This means that in theory we can just implement merging of different `pagePathLevel2`. When batch changes, we should put `prevLastRow` into the "last-row" memory and perform identical logic that handles `pagePathLevel2`. Another way of thinking is that we blur the boundary of "batch" and only work on one row at a time, providing last "row" (no matter it's from same batch or previous batch) during the process.
Comment on #304 Fix 262 rss function
I was thinking if we can directly convert `listQueryVars` to JSON and put them in feed URL. That should simplify `api/articles/[feed]` (because it don't need `getQueryVars`, just `JSON.parse`) and allows greater flexibility for the feed. What do you think <https://github.com/nonumpa|@nonumpa> ?
Comment on #304 Fix 262 rss function
It's brilliant that we can remove default option from `getQueryVars()`. It makes the code easier to read :+1: I am thinking if we can further simplify this to: ``` const listQueryVars = getQueryVars({ // Defaults that can be overridden by query filters: defaultFilters.join(','), orderBy: defaultOrder, // URL query ...query, // Others to join query timeRangeKey, userId: user?.id, }); ```
Review on #304 Fix 262 rss function
Thanks for the fix! I have attached 2 comments at first glance. Will look at other parts tonight.
Comment on #190 Analytics data loader
Elasticsearch <https://www.elastic.co/guide/en/elasticsearch/reference/6.8/query-dsl-range-query.html#ranges-on-dates|range query> actually supports <https://www.elastic.co/guide/en/elasticsearch/reference/6.8/common-options.html#date-math|date math> for date fields. Currently several inputs like `ListArticleFilter.createdAt`, `ListArticleFilter.repliedAt` leverages `TimeRangeInput` to achieve date range inputs that supports date math, which is essentially exposing the whole range query filter and letting Elasticsearch check the format directly. I am thinking if we can do the same for `analyticsLoader`. I am OK with open ends (For example, with `gte` given but no `lte`) query since Elasticsearch always bound its result to a certain <https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-request-from-size.html|size>.
Review on #190 Analytics data loader
Thanks for implementing the analytics data loader! I have raised some questions on the `analyticsLoaderFactory` and hope we can discuss before merge.
Comment on #190 Analytics data loader
Since the `ID` used for this data loader is not primitive, we may need to define `cacheKeyFn` so that dataloader can tell if any "id"s given are identical. This is useful for caching and batching. Example: <https://github.com/cofacts/rumors-api/blob/master/src/graphql/dataLoaders/docLoaderFactory.js#L21|https://github.com/cofacts/rumors-api/blob/master/src/graphql/dataLoaders/docLoaderFactory.js#L21> Documentation: <https://github.com/graphql/dataloader#new-dataloaderbatchloadfn--options|https://github.com/graphql/dataloader#new-dataloaderbatchloadfn--options>
Comment on #190 Analytics data loader
Elasticsearch body search by <https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-request-from-size.html|returns 10 results by default>. This may cause this dataloader never return more than 10 results. We may want to relax that using <https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-request-from-size.html|`size` param>. Personally I think we can just set a reasonable constant here (Maybe 30 / 60 / 90?). I am ok with crazy values as well -- `articleReplyFeedbackLoader` uses 10,000 lol
LGTM. Thanks for the change!
figma <https://www.figma.com/file/YikWPPauMnukDH0U2Nq4YS/Components?node-id=1%3A310|https://www.figma.com/file/YikWPPauMnukDH0U2Nq4YS/Components?node-id=1%3A310> <https://user-images.githubusercontent.com/6376572/89249900-ffbec000-d645-11ea-8880-78fbb9516f8e.gif|desktop-zh> <https://user-images.githubusercontent.com/6376572/89250032-5b894900-d646-11ea-8923-a9c532abda4b.gif|mobile-en> *Subscribe through IFTTT* <https://user-images.githubusercontent.com/6376572/89250041-62b05700-d646-11ea-8b9e-f4023ffc8d20.png|image> Not Ready: 1. Icon (currently download and search from google image) 2. Copy rss feed button is better to popup a tip 'copied to clipboard'.
Comment on #188 script to fetch google analytics stats
• nit: default
Comment on #188 script to fetch google analytics stats
It would be neat if we have comment noting that this block may (implicitly) modify entries that is pushed into `bulkUpdates` in previous loop.
Review on #188 script to fetch google analytics stats
Thanks for the fix. Please allow me to spend more time inspecting test cases. I need more time to verify if `processReport`is calling `upsertDocStats` with correct `bulk` for the given mocked `rows`.
Review on #188 script to fetch google analytics stats
Finished looking at the test cases of `processReport` and `upsertDocStats`. They look great :)
Comment on #188 script to fetch google analytics stats
If we are going to repeat the `source` of the script many many times in a batch, I think we may consider using stored scripts. <https://www.elastic.co/guide/en/elasticsearch/reference/6.8/modules-scripting-using.html#modules-scripting-stored-scripts|https://www.elastic.co/guide/en/elasticsearch/reference/6.8/modules-scripting-using.html#modules-scripting-stored-scripts> We can update the stored script everytime the cron job starts to make sure the script stored in database is the latest one.
From <https://g0v.hackmd.io/r3NK7xssSwCNPFxthlw7tA#Category-%E6%A8%99%E8%A8%98-UI-%E6%AA%A2%E8%A8%8E|20200729> We should hide obsolete categories from users, but leave their articleCategories in tact (or back it up somewhere)
From <https://g0v.hackmd.io/r3NK7xssSwCNPFxthlw7tA#Category-%E6%A8%99%E8%A8%98-UI-%E6%AA%A2%E8%A8%8E|20200729>: The add-category dialog is now too long and requires a lot of scrolling. Solution TBA.
#307 List 25 items per page in list page UIs
From <https://g0v.hackmd.io/r3NK7xssSwCNPFxthlw7tA#%E3%80%8C%E7%AD%89%E4%BD%A0%E4%BE%86%E7%AD%94%E3%80%8D%E7%9A%84%E5%95%8F%E9%A1%8C|20200729> Currently article list page only show 10 item at a time. We should increase the number to 25 to reduce the need to click "Load more".
#308 Show URL title in article list
From <https://g0v.hackmd.io/r3NK7xssSwCNPFxthlw7tA#%E3%80%8C%E7%AD%89%E4%BD%A0%E4%BE%86%E7%AD%94%E3%80%8D%E7%9A%84%E5%95%8F%E9%A1%8C|20200729> We can display URL's title text in article list. Figma: • Desktop <https://www.figma.com/file/DvmAQjMJCncuPORWKnljM1/Cofacts-website-MrOrz-s-copy?node-id=2675%3A221|https://www.figma.com/file/DvmAQjMJCncuPORWKnljM1/Cofacts-website-MrOrz-s-copy?node-id=2675%3A221> • Mobile <https://www.figma.com/file/DvmAQjMJCncuPORWKnljM1/Cofacts-website-MrOrz-s-copy?node-id=2673%3A220|https://www.figma.com/file/DvmAQjMJCncuPORWKnljM1/Cofacts-website-MrOrz-s-copy?node-id=2673%3A220>
#193 Reload preview for logged in users
From <https://g0v.hackmd.io/r3NK7xssSwCNPFxthlw7tA#%E5%A4%A7%E6%9D%BE%E6%AA%A2%E8%A8%8E|20200729> Sometimes our URL scrapper will be temporarily blocked, leaving useless URL previews like <https://cofacts.org/article/39n5zi0t4vlci|this>. During <https://g0v.hackmd.io/r3NK7xssSwCNPFxthlw7tA#Youtube-%E9%98%BB%E6%93%8B-metadata-scraping|20200729 discussion> we can provide an API for logged in editors to reload broken review. Spec TBA
#309 Show "OK" button in mobile article filter dialog
From <https://g0v.hackmd.io/r3NK7xssSwCNPFxthlw7tA#%E6%9C%AA%E7%AB%9F%E9%A0%85%E7%9B%AE1|20200729>: > 手機上 filter 按 X 會以為是 cancel,實驗之後才發現是按下去就會 apply Figma: "Apply filter" <https://www.figma.com/file/zpD45j8nqDB2XfA6m2QskO/Cofacts-website?node-id=2322%3A0|https://www.figma.com/file/zpD45j8nqDB2XfA6m2QskO/Cofacts-website?node-id=2322%3A0> We can retain the behavior that pressing filter buttons starts filter process immediately (because it's the current behavior and is easier to implement), but add an "OK" button at the bottom of filter dialog so that user can click to close filter dialog.
#310 Reply request submission button jumps around when clicking
*As-is* <https://user-images.githubusercontent.com/108608/89379879-2f92c400-d729-11ea-90f9-bcc7bcea0bbc.gif|reason-submission> 1. After inputting reason, the reason submission button jumps up and cancels the first click 2. During submission, there is no visual feedback indicating that the reply request is being sent *To-be* 1. Don't change reason input height when reason input is blurred 2. Add a loading state (or simply disable the submission button) to reason submission button when it's being submitted to server.
g0v.hackmd.io
Comment on #304 Fix 262 rss function
I also wanted to remove the dependency of `ArticlePageLayout.getQueryVars` from `api/articles/[feed]`, but it seems that it's not easy to directly convert `listQueryVars` to querystring. <https://user-images.githubusercontent.com/6376572/89401059-5102a880-d747-11ea-8185-e96c7c51b9c3.png|螢幕快照 2020-08-05 下午6 01 23> I'm afraid that I should write a `listQueryVarsToQuerystring` function and another `getQueryVars` for `api/articles/[feed]`.
Comment on #304 Fix 262 rss function
I was thinking a direct `JSON.stringify` should do the job :P Is its result too long for an URL?
Comment on #304 Fix 262 rss function
Sorry, I mean querystring, not JSON. Maybe I can encode filter and orderBy like <https://stackoverflow.com/questions/41641426/passing-objects-as-url-parameters-c-sharp|this>.
Comment on #187 Load more reply request at once
Merged because opened for 10+ days without review.
Is this file used anywhere?
Maybe <https://material-ui.com/api/list-item-text/#props|`secondaryTypographyProps`> could help? e.g. ``` <ListItemText primary={t`Email`} secondary={t`Via Feedrabbit`} secondaryTypographyProps={{variant: 'subtitle2', color: 'textSecondary'}} /> ``` Actually I think it's OK if we use Material UI's default style for `<ListItemText>`. The figma link provided by <https://github.com/LucienLee|@LucienLee> is at wireframe granularity, the font size & color is not fine tuned yet. The actual design system used in mockup is defined here: <https://www.figma.com/file/3tGoYDSrqU8Rqmstyn9NMn/Cofacts-UI-Design-Kit?node-id=0%3A5005|https://www.figma.com/file/3tGoYDSrqU8Rqmstyn9NMn/Cofacts-UI-Design-Kit?node-id=0%3A5005> We can go for Material UI's default first, and see if we need any adjustment in the future.
he figma link provided by <https://github.com/LucienLee|@LucienLee> is at wireframe granularity, the font size & color is not fine tuned yet. The actual design system used in mockup is defined here: <https://www.figma.com/file/3tGoYDSrqU8Rqmstyn9NMn/Cofacts-UI-Design-Kit?node-id=0%3A5005|https://www.figma.com/file/3tGoYDSrqU8Rqmstyn9NMn/Cofacts-UI-Design-Kit?node-id=0%3A5005> I suggest we use `<Typography variant="caption">` for all `<CustomTypography variant="subtitle2">`, and use `<Typography variant="body2">` for all `<CustomTypography variant="subtitle1">`.
The UI is beautiful <3 thanks a lot! I have some suggestions regarding using the use of `CustomTypography` and code dependencies.
We may need to add `copy-to-clipboard` to `package.json`, because it's currently a dev dependency. It won't be installed in production environment. I think `copy-to-clipboard`'s API is much simpler than the ClipboardJS we are currently using. Please consider removing `"clipboard": "^2.0.4"` and replace its usage (only in `CopyButton`) with copy-to-clipboard.
Review on #304 Fix 262 rss function
LGTM! It's beautiful. Thanks a million!
Review on #188 script to fetch google analytics stats
LGTM now! <https://github.com/ztsai|@ztsai> would you like to add <https://github.com/cofacts/rumors-api/pull/188#discussion_r465199034|stored script mechanism> in this PR or do you want to do it in another PR as an enhancement item?
Most of the PR looks good! Some final comments on `<IFTTTItem>` here.
It's not recommended to use `<table>` for something that is not a data table. I suggest using flexbox for this particular UI, which should yield much simpler DOM and CSS style.
If we use <https://material-ui.com/components/dialogs/|`Dialog`> instead of its underlying component <https://material-ui.com/components/modal/|`Modal`>, we would not need to define paper style and positioning here. Dialogs are not necessary used with `DialogTitle`, `DialogContent` etc, it can be used alone, as shown by `ListPageControls`' `Filters`.
g0v.hackmd.io
#311 ArticleReplyFeedbackControl revamp
This PR is a revamp to this component, including its popover: <https://user-images.githubusercontent.com/108608/89732120-487bdc00-da7f-11ea-9af3-06cdb1f5c13e.png|image> • Rename `ReplyFeedback` to `ArticleReplyFeedbackControl`.
#312 Upgrade to Apollo Client 3
Apollo Client 3 stable is <https://www.apollographql.com/blog/announcing-the-release-of-apollo-client-3-0/|released>. This PR <https://www.apollographql.com/docs/react/migrating/apollo-client-3-migration/|migrates Apollo Client to 3> and <https://github.com/adamsoffer/next-apollo/blob/master/CHANGELOG.md|next-apollo to latest>. `dataIdFromObject` we are currently using is deprecated in Apollo Client 3; however, in this PR I leave this intact because there are already too much code change.
Comment on #312 Upgrade to Apollo Client 3
Leaving out `{ssr: true}` in `withApollo` here will cause next.js's `useRouter` returning `{}` for `router.query` on server-side rendering & first render on client, because next.js will think the page <https://nextjs.org/docs/api-reference/next/router#router-object|does not meet data fetching requirements>. It's valid for search page because this page is not meant to be accessed directly nor by search engines.
Comment on #188 script to fetch google analytics stats
Thanks! I'll add that in a separate PR as discussed offline
follow up PR for <https://github.com/cofacts/rumors-api/pull/188#discussion_r465199034|stored script mechanism> as discussed in <https://github.com/cofacts/rumors-api/pull/188|#188>
<https://coveralls.io/builds/32649138|Coverage Status> Coverage increased (+0.5%) to 88.065% when pulling *<https://github.com/cofacts/rumors-api/commit/d2c3cd52b7a7cf5759f6ddcfbed3505328396c9c|d2c3cd5> on loadScript* into *<https://github.com/cofacts/rumors-api/commit/2ee6cc9cc8c654b25e2eaae2aa7b7558a7f1d9ee|2ee6cc9> on master*.
Comment on #126 Update all dependencies
*:warning: Artifact update problem* Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is. :recycle: Renovate will retry this branch, including artifacts, only when one of the following happens: • any of the package files in this branch needs updating, or • the branch becomes conflicted, or • you check the rebase/retry checkbox if found above, or • you rename this PR's title to start with "rebase!" to trigger it manually The artifact failure details are included below: *File name: package-lock.json*
LGTM! Lets <https://github.githubassets.com/images/icons/emoji/shipit.png|:shipit:>
LGTM! :+1: :+1: :+1:
#214 Don't ask for article source in LIFF anymore
Spec TBD • 提案&過去討論整理:<https://g0v.hackmd.io/r3NK7xssSwCNPFxthlw7tA?view#chatbot-%E4%B8%8D%E5%95%8F%E4%BE%86%E6%BA%90|https://g0v.hackmd.io/r3NK7xssSwCNPFxthlw7tA?view#chatbot-%E4%B8%8D%E5%95%8F%E4%BE%86%E6%BA%90> • 方案選擇、文案討論:<https://g0v.hackmd.io/@mrorz/cofacts-meeting-notes/%2FrEtx-47bRHeW2aM05DINDQ|https://g0v.hackmd.io/@mrorz/cofacts-meeting-notes/%2FrEtx-47bRHeW2aM05DINDQ>
It seems that doesn't need to set success at next tick
#215 Fix issue, node process won't exit automatically when running notify
Disconnect redis and mongodb at the end of `scanRepliesAndNotify`.
Comment on #215 Fix issue, node process won't exit automatically when running notify
*Pull Request Test Coverage Report for <https://coveralls.io/builds/32706266|Build 1098>* • *2* of *2* *(100.0%)* changed or added relevant lines in *1* file are covered. • No unchanged relevant lines lost coverage. • Overall coverage increased (+*0.03%*) to *84.292%* * * * * * * *:yellow_heart: - <https://coveralls.io|Coveralls>*
agree
Review on #215 Fix issue, node process won't exit automatically when running notify
LGTM! Will test it out when I have access to latop.
Review on #215 Fix issue, node process won't exit automatically when running notify
It is really working :+1: I suggest adding `.catch((e) => {console.error(e); process.exit(1)})` to the end of `scanRepliesAndNotify()` so that errors can be seen when there are exceptions.
#45 [WIP] Add migration script for analytics index
1. Add migration script for `analytics` index so that we can add the new index mapping to existing database 2. Make `db/loadSchema.js` exit with non-zero return code so that Travis can capture the error when schema is invalid Need <https://github.com/ztsai|@ztsai> 's help looking at errors inserting index to database :pray:
#195 Update rumors-db with analytics index mappings
• Update `test/rumors-db` submodule revision • Update unit test snapshot accordingly • Mostly about index name change (alias --> real index name) • Seems that elasticsearch is returning different order for indexes that has mappings. Not sure why, but I'll just accept that :P
Comment on #195 Update rumors-db with analytics index mappings
<https://coveralls.io/builds/32752094|Coverage Status> Coverage remained the same at 88.265% when pulling *<https://github.com/cofacts/rumors-api/commit/3bb554cb0d76052fc62e40b1b2ed054aec82ecdc|3bb554c> on rumors-db-update* into *<https://github.com/cofacts/rumors-api/commit/a0a43a18523b0a595b15b48bef9a03c4102b8d73|a0a43a1> on master*.
Review on #195 Update rumors-db with analytics index mappings
For the unit tests, now that I think about it, the returned order is more or less random since all _score values are 1. It would probably be better to provide sorting options in the unit tests since we are doing snapshot matches and the indeterminacy of returned order makes them unreliable. But it's outside of the scope of this PR, I can do that in a separate PR.
#196 Update dependency prettier to v1.19.1
This PR contains the following updates: * * * *Release Notes* prettier/prettier *<https://togithub.com/prettier/prettier/blob/master/CHANGELOG.md#%E2%80%8B1191|`v1.19.1`>* <https://togithub.com/prettier/prettier/compare/1.19.0...1.19.1|Compare Source> <https://togithub.com/prettier/prettier/compare/1.19.0...1.19.1|diff> *CLI* *Fix `--stdin` regression in 1.19.0 (<https://togithub.com/prettier/prettier/pull/6894|#6894> by <https://togithub.com/lydell|@lydell>)* ``` // Prettier stable $ echo "test" | prettier --stdin --parser babel [error] regeneratorRuntime is not defined // Prettier master $ echo "test" | prettier --stdin --parser babel test; ``` *TypeScript* *Fix formatting of union type as arrow function return type (<https://togithub.com/prettier/prettier/pull/6896|#6896> by <https://togithub.com/thorn0|@thorn0>)* ``` // Input export const getVehicleDescriptor = async ( vehicleId: string, ): Promise<Collections.Parts.PrintedCircuitBoardAssembly['attributes'] | undefined> => {} // Prettier stable export const getVehicleDescriptor = async ( vehicleId: string ): Promise<| Collections.Parts.PrintedCircuitBoardAssembly["attributes"] | undefined> => {}; // Prettier master export const getVehicleDescriptor = async ( vehicleId: string ): Promise< Collections.Parts.PrintedCircuitBoardAssembly["attributes"] | undefined > => {}; ``` *<https://togithub.com/prettier/prettier/blob/master/CHANGELOG.md#%E2%80%8B1190|`v1.19.0`>* <https://togithub.com/prettier/prettier/compare/1.18.2...1.19.0|Compare Source> <https://togithub.com/prettier/prettier/compare/1.18.2...1.19.0|diff> :link: <https://prettier.io/blog/2019/11/09/1.19.0.html|Release Notes> *<https://togithub.com/prettier/prettier/blob/master/CHANGELOG.md#%E2%80%8B1182|`v1.18.2`>* <https://togithub.com/prettier/prettier/compare/1.18.1...1.18.2|Compare Source> <https://togithub.com/prettier/prettier/compare/1.18.1...1.18.2|diff> • TypeScript: only add trailing commas in tuples for `--trailing-comma=all` ([#6199] by <https://togithub.com/duailibe|@duailibe>) In Prettier 1.18 we added trailing commas in tuples when `--trailing-comma=all`, but it was also adding for `--trailing-comma=es5`. [#6199]: <https://togithub.com/prettier/prettier/pull/6199|#6199> <https://togithub.com/duailibe|@duailibe>: <https://github.com/duailibe|https://github.com/duailibe> *<https://togithub.com/prettier/prettier/blob/master/CHANGELOG.md#%E2%80%8B1181|`v1.18.1`>* <https://togithub.com/prettier/prettier/compare/1.18.0...1.18.1|Compare Source> <https://togithub.com/prettier/prettier/compare/1.18.0...1.18.1|diff> • TypeScript: Add trailing comma in tsx, only for arrow function (<https://togithub.com/prettier/prettier/pull/6190|#6190> by <https://togithub.com/sosukesuzuki|@sosukesuzuki>) Prettier inserts a trailing comma to single type parameter for arrow functions in tsx, since v 1.18. But, this feature inserts a trailing comma to type parameter for besides arrow functions too (e.g, function , interface). This change fix it. ``` // Input interface Interface1<T> { one: "one"; } function function1<T>() { return "one"; } // Output (Prettier 1.18.0) interface Interface1<T,> { one: "one"; } function function1<T,>() { return "one"; } // Output (Prettier 1.18.1) interface Interface1<T> { one: "one"; } function function1<T>() { return "one"; } ``` • Config: Match dotfiles in config overrides (<https://togithub.com/prettier/prettier/pull/6194|#6194> by <https://togithub.com/duailibe|@duailibe>) When using <https://prettier.io/docs/en/configuration.html#configuration-overrides|`overrides`> in the config file, Prettier was not matching dotfiles (files that start with `.`). This was fixed in 1.18.1 *<https://togithub.com/prettier/prettier/blob/master/CHANGELOG.md#%E2%80%8B1180|`v1.18.0`>* <https://togithub.com/prettier/prettier/compare/1.17.1...1.18.0|Compare Source> <https://togithub.com/prettier/prettier/compare/1.17.1...1.18.0|diff> :link: <https://prettier.io/blog/2019/06/06/1.18.0.html|Release Notes> *<https://togithub.com/prettier/prettier/blob/master/CHANGELOG.md#%E2%80%8B1171|`v1.17.1`>* <https://togithub.com/prettier/prettier/compare/1.17.0...1.17.1|Compare Source> <https://togithub.com/prettier/prettier/compare/1.17.0...1.17.1|diff> • Range: Fix ranged formatting not using the correct line width (<https://togithub.com/prettier/prettier/pull/6050|#6050> by <https://togithub.com/mathieulj|@mathieulj>) ``` // Input function f() { if (true) { call("this line is 79 chars", "long", "it should", "stay as single line"); } } // Output (Prettier 1.17.0 run with --range-start 30 --range-end 110) function f() { if (true) { call( "this line is 79 chars", "long", "it should", "stay as single line" ); } } // Output (Prettier 1.17.0 run without range) function f() { if (true) { call("this line is 79 chars", "long", "it should", "stay as single line"); } } // Output (Prettier 1.17.1 with and without range) function f() { if (true) { call("this line is 79 chars", "long", "it should", "stay as single line"); } } ``` • JavaScript: Fix closure compiler typecasts ([#5947] by <https://togithub.com/jridgewell|@jridgewell>) If a closing parenthesis follows after a typecast in an inner expression, the typecast would wrap everything to the that following parenthesis. ``` // Input test(/** @&#8203;type {!Array} */(arrOrString).length); test(/** @&#8203;type {!Array} */((arrOrString)).length + 1); // Output (Prettier 1.17.0) test(/** @&#8203;type {!Array} */ (arrOrString.length)); test(/** @&#8203;type {!Array} */ (arrOrString.length + 1)); // Output (Prettier 1.17.1) test(/** @&#8203;type {!Array} */ (arrOrString).length); test(/** @&#8203;type {!Array} */ (arrOrString).length + 1); ``` • JavaScript: respect parenthesis around optional chaining before await (<https://togithub.com/prettier/prettier/pull/6087|#6087> by <https://togithub.com/evilebottnawi|@evilebottnawi>) ``` // Input async function myFunction() { var x = (await foo.bar.blah)?.hi; } // Output (Prettier 1.17.0) async function myFunction() { var x = await foo.bar.blah?.hi; } // Output (Prettier 1.17.1) async function myFunction() { var x = (await foo.bar.blah)?.hi; } ``` • Handlebars: Fix {{else}}{{#if}} into {{else if}} merging (<https://togithub.com/prettier/prettier/pull/6080|#6080> by <https://togithub.com/dcyriller|@dcyriller>) ``` // Input {{#if a}} a {{else}} {{#if c}} c {{/if}} e {{/if}} // Output (Prettier 1.17.0) {{#if a}} a {{else if c}} c e {{/if}} // Output (Prettier 1.17.1) Code Sample {{#if a}} a {{else}} {{#if c}} c {{/if}} e {{/if}} ``` • JavaScript: Improved multiline closure compiler typecast comment detection (<https://togithub.com/prettier/prettier/pull/6070|#6070> by <https://togithub.com/yangsu|@yangsu>) Previously, multiline closure compiler typecast comments with lines that start with * weren't flagged correctly and the subsequent parenthesis were stripped. Prettier 1.17.1 fixes this issue. ``` // Input const style =/** * @&#8203;type {{ * width: number, * }} */({ width, }); // Output (Prettier 1.17.0) const style =/** * @&#8203;type {{ * width: number, * }} */…
#197 Update docker.elastic.co/elasticsearch/elasticsearch-oss Docker tag to v6.8.11
This PR contains the following updates: * * * *Release Notes* elastic/elasticsearch *<https://togithub.com/elastic/elasticsearch/releases/v6.8.11|`v6.8.11`>* <https://togithub.com/elastic/elasticsearch/compare/v6.8.10...v6.8.11|Compare Source> Downloads: <https://elastic.co/downloads/elasticsearch|https://elastic.co/downloads/elasticsearch> Release notes: <https://www.elastic.co/guide/en/elasticsearch/reference/6.8/release-notes-6.8.11.html|https://www.elastic.co/guide/en/elasticsearch/reference/6.8/release-notes-6.8.11.html> *<https://togithub.com/elastic/elasticsearch/releases/v6.8.10|`v6.8.10`>* <https://togithub.com/elastic/elasticsearch/compare/v6.8.9...v6.8.10|Compare Source> Downloads: <https://elastic.co/downloads/elasticsearch|https://elastic.co/downloads/elasticsearch> Release notes: <https://www.elastic.co/guide/en/elasticsearch/reference/6.8/release-notes-6.8.10.html|https://www.elastic.co/guide/en/elasticsearch/reference/6.8/release-notes-6.8.10.html> *<https://togithub.com/elastic/elasticsearch/releases/v6.8.9|`v6.8.9`>* <https://togithub.com/elastic/elasticsearch/compare/v6.8.8...v6.8.9|Compare Source> Downloads: <https://elastic.co/downloads/elasticsearch|https://elastic.co/downloads/elasticsearch> Release notes: <https://www.elastic.co/guide/en/elasticsearch/reference/6.8/release-notes-6.8.9.html|https://www.elastic.co/guide/en/elasticsearch/reference/6.8/release-notes-6.8.9.html> *<https://togithub.com/elastic/elasticsearch/releases/v6.8.8|`v6.8.8`>* <https://togithub.com/elastic/elasticsearch/compare/v6.8.7...v6.8.8|Compare Source> Downloads: <https://elastic.co/downloads/elasticsearch|https://elastic.co/downloads/elasticsearch> Release notes: <https://www.elastic.co/guide/en/elasticsearch/reference/6.8/release-notes-6.8.8.html|https://www.elastic.co/guide/en/elasticsearch/reference/6.8/release-notes-6.8.8.html> *<https://togithub.com/elastic/elasticsearch/releases/v6.8.7|`v6.8.7`>* <https://togithub.com/elastic/elasticsearch/compare/v6.8.6...v6.8.7|Compare Source> Downloads: <https://elastic.co/downloads/elasticsearch|https://elastic.co/downloads/elasticsearch> Release notes: <https://www.elastic.co/guide/en/elasticsearch/reference/6.8/release-notes-6.8.7.html|https://www.elastic.co/guide/en/elasticsearch/reference/6.8/release-notes-6.8.7.html> *<https://togithub.com/elastic/elasticsearch/releases/v6.8.6|`v6.8.6`>* <https://togithub.com/elastic/elasticsearch/compare/v6.8.5...v6.8.6|Compare Source> Downloads: <https://elastic.co/downloads/elasticsearch|https://elastic.co/downloads/elasticsearch> Release notes: <https://www.elastic.co/guide/en/elasticsearch/reference/6.8/release-notes-6.8.6.html|https://www.elastic.co/guide/en/elasticsearch/reference/6.8/release-notes-6.8.6.html> *<https://togithub.com/elastic/elasticsearch/releases/v6.8.5|`v6.8.5`>* <https://togithub.com/elastic/elasticsearch/compare/v6.8.4...v6.8.5|Compare Source> Downloads: <https://elastic.co/downloads/elasticsearch|https://elastic.co/downloads/elasticsearch> Release notes: <https://www.elastic.co/guide/en/elasticsearch/reference/6.8/release-notes-6.8.5.html|https://www.elastic.co/guide/en/elasticsearch/reference/6.8/release-notes-6.8.5.html> *<https://togithub.com/elastic/elasticsearch/releases/v6.8.4|`v6.8.4`>* <https://togithub.com/elastic/elasticsearch/compare/v6.8.3...v6.8.4|Compare Source> Downloads: <https://elastic.co/downloads/elasticsearch|https://elastic.co/downloads/elasticsearch> Release notes: <https://www.elastic.co/guide/en/elasticsearch/reference/6.8/release-notes-6.8.4.html|https://www.elastic.co/guide/en/elasticsearch/reference/6.8/release-notes-6.8.4.html> *<https://togithub.com/elastic/elasticsearch/releases/v6.8.3|`v6.8.3`>* <https://togithub.com/elastic/elasticsearch/compare/v6.8.2...v6.8.3|Compare Source> Downloads: <https://elastic.co/downloads/elasticsearch|https://elastic.co/downloads/elasticsearch> Release notes: <https://www.elastic.co/guide/en/elasticsearch/reference/6.8/release-notes-6.8.3.html|https://www.elastic.co/guide/en/elasticsearch/reference/6.8/release-notes-6.8.3.html> *<https://togithub.com/elastic/elasticsearch/releases/v6.8.2|`v6.8.2`>* <https://togithub.com/elastic/elasticsearch/compare/v6.8.1...v6.8.2|Compare Source> Downloads: <https://elastic.co/downloads/elasticsearch|https://elastic.co/downloads/elasticsearch> Release notes: <https://www.elastic.co/guide/en/elasticsearch/reference/6.8/release-notes-6.8.2.html|https://www.elastic.co/guide/en/elasticsearch/reference/6.8/release-notes-6.8.2.html> *<https://togithub.com/elastic/elasticsearch/releases/v6.8.1|`v6.8.1`>* <https://togithub.com/elastic/elasticsearch/compare/v6.8.0...v6.8.1|Compare Source> Downloads: <https://elastic.co/downloads/elasticsearch|https://elastic.co/downloads/elasticsearch> Release notes: <https://www.elastic.co/guide/en/elasticsearch/reference/6.8/release-notes-6.8.1.html|https://www.elastic.co/guide/en/elasticsearch/reference/6.8/release-notes-6.8.1.html> *<https://togithub.com/elastic/elasticsearch/compare/v6.7.2...v6.8.0|`v6.8.0`>* <https://togithub.com/elastic/elasticsearch/compare/v6.7.2...v6.8.0|Compare Source> *<https://togithub.com/elastic/elasticsearch/compare/v6.7.1...v6.7.2|`v6.7.2`>* <https://togithub.com/elastic/elasticsearch/compare/v6.7.1...v6.7.2|Compare Source> *<https://togithub.com/elastic/elasticsearch/compare/v6.7.0...v6.7.1|`v6.7.1`>* <https://togithub.com/elastic/elasticsearch/compare/v6.7.0...v6.7.1|Compare Source> *<https://togithub.com/elastic/elasticsearch/compare/v6.6.2...v6.7.0|`v6.7.0`>* <https://togithub.com/elastic/elasticsearch/compare/v6.6.2...v6.7.0|Compare Source> *<https://togithub.com/elastic/elasticsearch/compare/v6.6.1...v6.6.2|`v6.6.2`>* <https://togithub.com/elastic/elasticsearch/compare/v6.6.1...v6.6.2|Compare Source> *<https://togithub.com/elastic/elasticsearch/compare/v6.6.0...v6.6.1|`v6.6.1`>* <https://togithub.com/elastic/elasticsearch/compare/v6.6.0...v6.6.1|Compare Source> *<https://togithub.com/elastic/elasticsearch/compare/v6.5.4...v6.6.0|`v6.6.0`>* <https://togithub.com/elastic/elasticsearch/compare/v6.5.4...v6.6.0|Compare Source> *<https://togithub.com/elastic/elasticsearch/compare/v6.5.3...v6.5.4|`v6.5.4`>* <https://togithub.com/elastic/elasticsearch/compare/v6.5.3...v6.5.4|Compare Source> *<https://togithub.com/elastic/elasticsearch/compare/v6.5.2...v6.5.3|`v6.5.3`>* <https://togithub.com/elastic/elasticsearch/compare/v6.5.2...v6.5.3|Compare Source> *<https://togithub.com/elastic/elasticsearch/compare/v6.5.1...v6.5.2|`v6.5.2`>* <https://togithub.com/elastic/elasticsearch/compare/v6.5.1...v6.5.2|Compare Source> *<https://togithub.com/elastic/elasticsearch/compare/v6.5.0...v6.5.1|`v6.5.1`>* <https://togithub.com/elastic/elasticsearch/compare/v6.5.0...v6.5.1|Compare Source> *<https://togithub.com/elastic/elasticsearch/compare/v6.4.3...v6.5.0|`v6.5.0`>* <https://togithub.com/elastic/elasticsearch/compare/v6.4.3...v6.5.0|Compare Source> *<https://togithub.com/elastic/elasticsearch/compare/v6.4.2...v6.4.3|`v6.4.3`>* <https://togithub.com/elastic/elasticsearch/compare/v6.4.2...v6.4.3|Compare Source> *<https://togithub.com/elastic/elasticsearch/compare/v6.4.1...v6.4.2|`v6.4.2`>* <https://togithub.com/elastic/elasticsearch/compare/v6.4.1...v6.4.2|Compare Source> *<https://togithub.com/elastic/elasticsearch/compare/v6.4.0...v6.4.1|`v6.4.1`>* <https://togithub.com/elastic/elasticsearch/compare/v6.4.0...v6.4.1|Compare Source> *<https://togithub.com/elastic/elasticsearch/compare/v6.3.2...v6.4.0|`v6.4.0`>* <https://togithub.com/elastic/elasticsearch/compare/v6.3.2...v6.4.0|Compare Source> * * * *Renovate configuration* :date: *Schedule*: At any time (no schedule defined). :vertical_traffic_light: *Automerge*: Disabled by config. Please merge this manually once you are satisfied. :recycle: *Rebasing*: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: *Ignore*: Close this PR and …
#198 Update docker.elastic.co/kibana/kibana-oss Docker tag to v6.8.11
This PR contains the following updates: * * * *Renovate configuration* :date: *Schedule*: At any time (no schedule defined). :vertical_traffic_light: *Automerge*: Disabled by config. Please merge this manually once you are satisfied. :recycle: *Rebasing*: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: *Ignore*: Close this PR and you won't be reminded about this update again. * * * ☐ If you want to rebase/retry this PR, check this box * * * This PR has been generated by <https://renovate.whitesourcesoftware.com|WhiteSource Renovate>. View repository job log <https://app.renovatebot.com/dashboard#cofacts/rumors-api|here>.
#199 Update dependency @elastic/elasticsearch to v7
This PR contains the following updates: * * * *Release Notes* elastic/elasticsearch-js *<https://togithub.com/elastic/elasticsearch-js/releases/v7.8.0|`v7.8.0`>* <https://togithub.com/elastic/elasticsearch-js/compare/v7.7.1...v7.8.0|Compare Source> Support for Elasticsearch `v7.8` <https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/7.x/changelog-client.html|Changelog> *<https://togithub.com/elastic/elasticsearch-js/releases/v7.7.1|`v7.7.1`>* <https://togithub.com/elastic/elasticsearch-js/compare/v7.7.0...v7.7.1|Compare Source> <https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/changelog-client.html|Changelog> *<https://togithub.com/elastic/elasticsearch-js/releases/v7.7.0|`v7.7.0`>* <https://togithub.com/elastic/elasticsearch-js/compare/v7.6.1...v7.7.0|Compare Source> Support for Elasticsearch `v7.7` <https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/7.x/changelog-client.html|Changelog> *<https://togithub.com/elastic/elasticsearch-js/releases/v7.6.1|`v7.6.1`>* <https://togithub.com/elastic/elasticsearch-js/compare/v7.6.0...v7.6.1|Compare Source> *Fixes:* • Secure json parsing - <https://togithub.com/elastic/elasticsearch-js/issues/1110|#1110> • ApiKey should take precedence over basic auth - <https://togithub.com/elastic/elasticsearch-js/issues/1115|#1115> *Documentation:* • Fix typo in api reference - <https://togithub.com/elastic/elasticsearch-js/issues/1109|#1109> *<https://togithub.com/elastic/elasticsearch-js/releases/v7.6.0|`v7.6.0`>* <https://togithub.com/elastic/elasticsearch-js/compare/v7.5.1...v7.6.0|Compare Source> Support for Elasticsearch `v7.6`. *<https://togithub.com/elastic/elasticsearch-js/releases/v7.5.1|`v7.5.1`>* <https://togithub.com/elastic/elasticsearch-js/compare/v7.5.0...v7.5.1|Compare Source> *Fixes:* • Skip compression in case of empty string body - <https://togithub.com/elastic/elasticsearch-js/issues/1080|#1080> • Fix typo in NoLivingConnectionsError - <https://togithub.com/elastic/elasticsearch-js/issues/1045|#1045> • Change TransportRequestOptions.ignore to number[] - <https://togithub.com/elastic/elasticsearch-js/issues/1053|#1053> • ClientOptions["cloud"] should have optional auth fields - <https://togithub.com/elastic/elasticsearch-js/issues/1032|#1032> *Documentation:* • Docs: Return super in example Transport subclass - <https://togithub.com/elastic/elasticsearch-js/issues/980|#980> • Add examples to reference - <https://togithub.com/elastic/elasticsearch-js/issues/1076|#1076> • Added new examples - <https://togithub.com/elastic/elasticsearch-js/issues/1031|#1031> *<https://togithub.com/elastic/elasticsearch-js/releases/v7.5.0|`v7.5.0`>* <https://togithub.com/elastic/elasticsearch-js/compare/v7.4.0...v7.5.0|Compare Source> Support for Elasticsearch `v7.5`. *Features* • X-Opaque-Id support <https://togithub.com/elastic/elasticsearch-js/issues/997|#997> *<https://togithub.com/elastic/elasticsearch-js/releases/v7.4.0|`v7.4.0`>* <https://togithub.com/elastic/elasticsearch-js/compare/v7.3.0...v7.4.0|Compare Source> Support for Elasticsearch `v7.4`. *Fixes:* • Fix issue; node roles are defaulting to true when undefined is breaking usage of nodeFilter option - <https://togithub.com/elastic/elasticsearch-js/issues/967|#967> *Documentation:* • Updated API reference doc - <https://togithub.com/elastic/elasticsearch-js/issues/945|#945> <https://togithub.com/elastic/elasticsearch-js/issues/969|#969> • Fix inaccurate description sniffEndpoint - <https://togithub.com/elastic/elasticsearch-js/issues/959|#959> *Internals:* • Update code generation <https://togithub.com/elastic/elasticsearch-js/issues/969|#969> *<https://togithub.com/elastic/elasticsearch-js/releases/v7.3.0|`v7.3.0`>* <https://togithub.com/elastic/elasticsearch-js/compare/v7.2.0...v7.3.0|Compare Source> Support for Elasticsearch `v7.3`. *Features:* • Added `auth` option - <https://togithub.com/elastic/elasticsearch-js/issues/908|#908> • Added support for `ApiKey` authentication - <https://togithub.com/elastic/elasticsearch-js/issues/908|#908> *Fixes:* • fix(Typings): sniffInterval can also be boolean - <https://togithub.com/elastic/elasticsearch-js/issues/914|#914> *Internals:* • Refactored connection pool - <https://togithub.com/elastic/elasticsearch-js/issues/913|#913> *Documentation:* • Better reference code examples - <https://togithub.com/elastic/elasticsearch-js/issues/920|#920> • Improve README - <https://togithub.com/elastic/elasticsearch-js/issues/909|#909> *<https://togithub.com/elastic/elasticsearch-js/releases/v7.2.0|`v7.2.0`>* <https://togithub.com/elastic/elasticsearch-js/compare/v7.1.0...v7.2.0|Compare Source> Support for Elasticsearch `v7.2` *Fixes:* • Remove auth data from inspect and toJSON in connection class - <https://togithub.com/elastic/elasticsearch-js/issues/887|#887> *<https://togithub.com/elastic/elasticsearch-js/releases/v7.1.0|`v7.1.0`>* <https://togithub.com/elastic/elasticsearch-js/compare/v7.0.1...v7.1.0|Compare Source> Support for Elasticsearch `v7.1` *Fixes:* • Support for non-friendly chars in url username and password - <https://togithub.com/elastic/elasticsearch-js/issues/858|#858> • Patch deprecated parameters - <https://togithub.com/elastic/elasticsearch-js/issues/851|#851> *<https://togithub.com/elastic/elasticsearch-js/releases/v7.0.1|`v7.0.1`>* <https://togithub.com/elastic/elasticsearch-js/compare/v7.0.0...v7.0.1|Compare Source> *Fixes:* • Fix TypeScript export _(issue <https://togithub.com/elastic/elasticsearch-js/issues/841|#841>)_ - <https://togithub.com/elastic/elasticsearch-js/issues/842|#842> • Fix http and https port handling _(issue <https://togithub.com/elastic/elasticsearch-js/issues/843|#843>)_ - <https://togithub.com/elastic/elasticsearch-js/issues/845|#845> • Fix TypeScript definiton _(issue <https://togithub.com/elastic/elasticsearch-js/issues/803|#803>)_ - <https://togithub.com/elastic/elasticsearch-js/issues/846|#846> • Added toJSON method to Connection class _(issue <https://togithub.com/elastic/elasticsearch-js/issues/848|#848>)_ - <https://togithub.com/elastic/elasticsearch-js/issues/849|#849> *<https://togithub.com/elastic/elasticsearch-js/releases/v7.0.0|`v7.0.0`>* <https://togithub.com/elastic/elasticsearch-js/compare/231cfade24657ce2d8cdcac293e142b3e1b0a07b...v7.0.0|Compare Source> • Stable release. * * * *Renovate configuration* :date: *Schedule*: At any time (no schedule defined). :vertical_traffic_light: *Automerge*: Disabled by config. Please merge this manually once you are satisfied. :recycle: *Rebasing*: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: *Ignore*: Close this PR and you won't be reminded about this update again. * * * ☐ If you want to rebase/retry this PR, check this box * * * This PR has been generated by <https://renovate.whitesourcesoftware.com|WhiteSource Renovate>. View repository job log <https://app.renovatebot.com/dashboard#cofacts/rumors-api|here>.
#200 Update dependency babel-jest to v26
This PR contains the following updates: * * * *Release Notes* facebook/jest *<https://togithub.com/facebook/jest/blob/master/CHANGELOG.md#%E2%80%8B2630|`v26.3.0`>* <https://togithub.com/facebook/jest/compare/v26.2.2...v26.3.0|Compare Source> *Features* • `[jest-circus, jest-jasmine2]` Include `failureDetails` property in test results (<https://togithub.com/facebook/jest/pull/9496|#9496>) • `[jest-each, jest-jasmine, jest-circus]` Add support for `.concurrent.each` (<https://togithub.com/facebook/jest/pull/9326|#9326>) *Fixes* • `[jest-config]` Add `.pnp.js` to `transformIgnorePatterns` defaults (<https://togithub.com/facebook/jest/pull/10383|#10383>) • `[jest-leak-detector]` Wait properly for GC runs due to changes in Node 14.7 (<https://togithub.com/facebook/jest/pull/10366|#10366>) • `[jest-worker]` Downgrade minimum node version to 10.13 (<https://togithub.com/facebook/jest/pull/10352|#10352>) • `[docs]` Update snapshot testing documentation(<https://togithub.com/facebook/jest/pull/10359|#10359>) *<https://togithub.com/facebook/jest/blob/master/CHANGELOG.md#%E2%80%8B2622|`v26.2.2`>* <https://togithub.com/facebook/jest/compare/v26.2.1...v26.2.2|Compare Source> *Fixes* • `[jest-cli]` Use correct file name to override existing jest config on init (<https://togithub.com/facebook/jest/pull/10337|#10337>) • `[jest-haste-map]` Properly detect support for native `find` (<https://togithub.com/facebook/jest/pull/10346|#10346>) *<https://togithub.com/facebook/jest/blob/master/CHANGELOG.md#%E2%80%8B2621|`v26.2.1`>* <https://togithub.com/facebook/jest/compare/v26.2.0...v26.2.1|Compare Source> *Fixes* • `[jest-worker]` Make sure to work with Node TS typings v12 (<https://togithub.com/facebook/jest/pull/10336|#10336>) *<https://togithub.com/facebook/jest/blob/master/CHANGELOG.md#%E2%80%8B2620|`v26.2.0`>* <https://togithub.com/facebook/jest/compare/v26.1.0...v26.2.0|Compare Source> *Features* • `[jest-core, jest-circus, jest-reporter, jest-runner]` Added support for reporting individual test cases using jest-circus (<https://togithub.com/facebook/jest/pull/10227|#10227>) • `[jest-config, jest-reporter, jest-runner, jest-test-sequencer]` Add `slowTestThreshold` configuration option (<https://togithub.com/facebook/jest/pull/9366|#9366>) • `[jest-haste-map]` Watchman crawler now includes dotfiles (<https://togithub.com/facebook/jest/pull/10075|#10075>) • `[jest-worker]` Added support for workers to send custom messages to parent in jest-worker (<https://togithub.com/facebook/jest/pull/10293|#10293>) • `[jest-worker]` Support passing `resourceLimits` (<https://togithub.com/facebook/jest/pull/10335|#10335>) • `[pretty-format]` Added support for serializing custom elements (web components) (<https://togithub.com/facebook/jest/pull/10237|#10217>) *Fixes* • `[expect]` Match symbols and bigints in `any()` (<https://togithub.com/facebook/jest/pull/10223|#10223>) • `[jest-changed-files]` Use `git diff` instead of `git log` for `--changedSince` (<https://togithub.com/facebook/jest/pull/10155|#10155>) • `[jest-console]` Add missing `console.timeLog` for compatibility with Node (<https://togithub.com/facebook/jest/pull/10209|#10209>) • `[jest-haste-map]` Check `find` binary supports the `-iname` parameter (<https://togithub.com/facebook/jest/pull/10308|#10308>) • `[jest-snapshot]` Strip added indentation for inline error snapshots (<https://togithub.com/facebook/jest/pull/10217|#10217>) *Chore & Maintenance* • `[*]` Add missing dependency on `@types/node` (<https://togithub.com/facebook/jest/pull/10248|#10248>) • `[jest-jasmine2]` Convert `PCancelable` to TypeScript (<https://togithub.com/facebook/jest/pull/10215|#10215>) • `[jest-jasmine2]` Refine typings of `queueRunner` (<https://togithub.com/facebook/jest/pull/10215|#10215>) • `[jest-jasmine2]` Remove usage of `Function` type (<https://togithub.com/facebook/jest/pull/10216|#10216>) • `[jest-resolve]` Improve types (<https://togithub.com/facebook/jest/pull/10239|#10239>) • `[docs]` Clarify the <https://jestjs.io/docs/en/jest-object#jestrequireactualmodulename|`jest.requireActual(moduleName)`> example • `[jest-types]` Refine typings of `coverageReporters` (<https://togithub.com/facebook/jest/pull/10275|#10275>) *<https://togithub.com/facebook/jest/blob/master/CHANGELOG.md#%E2%80%8B2610|`v26.1.0`>* <https://togithub.com/facebook/jest/compare/v26.0.1...v26.1.0|Compare Source> *Features* • `[jest-mock]` Export `Mock`, `MockInstance`, `SpyInstance` types (<https://togithub.com/facebook/jest/pull/10138|#10138>) • `[jest-config]` Support config files exporting (`async`) `function`s (<https://togithub.com/facebook/jest/pull/10001|#10001>) • `[jest-cli, jest-core]` Add `--selectProjects` CLI argument to filter test suites by project name (<https://togithub.com/facebook/jest/pull/8612|#8612>) • `[jest-cli, jest-init]` Add `coverageProvider` to `jest --init` prompts (<https://togithub.com/facebook/jest/pull/10044|#10044>) *Fixes* • `[jest-console]` `getConsoleOutput` to receive global stack trace config and use it to format stack trace (<https://togithub.com/facebook/jest/pull/10081|#10081>) • `[jest-jasmine2]` Stop adding `:` after an error that has no message (<https://togithub.com/facebook/jest/pull/9990|#9990>) • `[jest-diff]` Control no diff message color with `commonColor` in diff options (<https://togithub.com/facebook/jest/pull/9997|#9997>) • `[jest-snapshot]` Fix TypeScript compilation (<https://togithub.com/facebook/jest/pull/10008|#10008>) *Chore & Maintenance* • `[docs]` Correct confusing filename in `enableAutomock` example (<https://togithub.com/facebook/jest/pull/10055|#10055>) • `[jest-core]` :tada::tada::tada::tada::tada::tada::tada::tada::tada::tada::tada::tada::tada::tada::tada::tada::tada::tada::tada::tada::tada::tada::tada::tada::tada: (<https://togithub.com/facebook/jest/pull/10000|#10000>) • `[jest-core, jest-reporters, jest-test-result, jest-types]` Cleanup `displayName` type (<https://togithub.com/facebook/jest/pull/10049|#10049>) • `[jest-runtime]` Jest-internal sandbox escape hatch (<https://togithub.com/facebook/jest/pull/9907|#9907>) • `[jest-fake-timers]` Update `now` param type to support `Date` in addition to `number`. (<https://togithub.com/facebook/jest/pull/10169|#10169>) • `[docs]` Add param to `setSystemTime` docs and remove preceding period from it and `getRealSystemTime` (<https://togithub.com/facebook/jest/pull/10169|#10169>) • `[jest-snapshot, jest-util]` Replace `make-dir` with `fs.mkdir` (<https://togithub.com/facebook/jest/pull/10136|#10136>) • `[docs]` Added parcel-bundler documentation inside readme.md file *Performance* • `[jest-core, jest-transform, jest-haste-map]` Improve Jest startup time and test runtime, particularly when running with coverage, by caching micromatch and avoiding recreating RegExp instances (<https://togithub.com/facebook/jest/pull/10131|#10131>) *<https://togithub.com/facebook/jest/blob/master/CHANGELOG.md#%E2%80%8B2601|`v26.0.1`>* <https://togithub.com/facebook/jest/compare/v26.0.0...v26.0.1|Compare Source> *Fixes* • `[jest-circus]` Backward compatibility for deprecated `DescribeBlock.tests` to not break e.g. Detox reporter *<https://togithub.com/facebook/jest/blob/master/CHANGELOG.md#%E2%80%8B2600|`v26.0.0`>* <https://togithub.com/facebook/jest/compare/v25.5.1...v26.0.0|Compare Source> *Features* • `[jest-environment-jsdom]` [*BREAKING*] Upgrade `jsdom` to v16 (<https://togithub.com/facebook/jest/pull/9606|#9606>) • `[@jest/fake-timers]` Add possibility to use a modern implementation of fake timers, backed by `@sinonjs/fake-timers` (<https://togithub.com/facebook/jest/pull/7776|#7776>) • `[jest-runtime]` Add `createMockFromModule` as an alias for `genMockFromModule` (<https://togithub.com/facebook/jest/pull/9962|#9962>) *Fixes* • `[babel-jest]` Handle `null` being passed to `createTransformer` (<https://togithub.com/facebook/jest/pull/9955|#9955>) • `[jest-circus, je…
#201 Update dependency eslint to v7
This PR contains the following updates: * * * *Release Notes* eslint/eslint *<https://togithub.com/eslint/eslint/releases/v7.6.0|`v7.6.0`>* <https://togithub.com/eslint/eslint/compare/v7.5.0...v7.6.0|Compare Source> • <https://togithub.com/eslint/eslint/commit/ecb2b7343a0d14fb57d297a16be6c1b176fb3dbf|`ecb2b73`> Update: require `meta` for fixable rules in RuleTester (refs <https://togithub.com/eslint/eslint/issues/13349|#13349>) (<https://togithub.com/eslint/eslint/issues/13489|#13489>) (Milos Djermanovic) • <https://togithub.com/eslint/eslint/commit/6fb4edde3b7a7ae2faf8ac956a7342fbf80865fc|`6fb4edd`> Docs: fix broken links in developer guide (<https://togithub.com/eslint/eslint/issues/13518|#13518>) (Sam Chen) • <https://togithub.com/eslint/eslint/commit/318fe103dbf2548eee293ff456ef0b829dbe3db3|`318fe10`> Fix: Do not output `undefined` as line and column when it's unavailable (<https://togithub.com/eslint/eslint/issues/13519|#13519>) (haya14busa) • <https://togithub.com/eslint/eslint/commit/493b5b40cae7a076fdeb19740f8c88fb4ae9c1fb|`493b5b4`> Sponsors: Sync README with website (ESLint Jenkins) • <https://togithub.com/eslint/eslint/commit/f100143fa5f529aacb2b50e650a00d2697ca4c54|`f100143`> Sponsors: Sync README with website (ESLint Jenkins) • <https://togithub.com/eslint/eslint/commit/16b10fe8ba3c78939d5ada4a25caf2f0c9e6a058|`16b10fe`> Fix: Update the chatroom link to go directly to help channel (<https://togithub.com/eslint/eslint/issues/13536|#13536>) (Nicholas C. Zakas) • <https://togithub.com/eslint/eslint/commit/f937eb95407f60d3772bcb956e227aaf99e48777|`f937eb9`> Sponsors: Sync README with website (ESLint Jenkins) • <https://togithub.com/eslint/eslint/commit/e71e2980cd2e319afc70d8c859c7ffd59cf4157b|`e71e298`> Update: Change no-duplicate-case to comparing tokens (fixes <https://togithub.com/eslint/eslint/issues/13485|#13485>) (<https://togithub.com/eslint/eslint/issues/13494|#13494>) (Yosuke Ota) • <https://togithub.com/eslint/eslint/commit/6c4aea44fd78e1eecea5fe3c37e1921e3b1e98a6|`6c4aea4`> Docs: add ECMAScript 2020 to README (<https://togithub.com/eslint/eslint/issues/13510|#13510>) (Milos Djermanovic) *<https://togithub.com/eslint/eslint/releases/v7.5.0|`v7.5.0`>* <https://togithub.com/eslint/eslint/compare/v7.4.0...v7.5.0|Compare Source> • <https://togithub.com/eslint/eslint/commit/6ea3178776eae0e40c3f5498893e8aab0e23686b|`6ea3178`> Update: optional chaining support (fixes <https://togithub.com/eslint/eslint/issues/12642|#12642>) (<https://togithub.com/eslint/eslint/issues/13416|#13416>) (Toru Nagashima) • <https://togithub.com/eslint/eslint/commit/540b1af77278ae649b621aa8d4bf8d6de03c3155|`540b1af`> Chore: enable consistent-meta-messages internal rule (<https://togithub.com/eslint/eslint/issues/13487|#13487>) (Milos Djermanovic) • <https://togithub.com/eslint/eslint/commit/885a1455691265db88dc0befe9b48a69d69e8b9c|`885a145`> Docs: clarify behavior if `meta.fixable` is omitted (refs <https://togithub.com/eslint/eslint/issues/13349|#13349>) (<https://togithub.com/eslint/eslint/issues/13493|#13493>) (Milos Djermanovic) • <https://togithub.com/eslint/eslint/commit/1a01b420eaab0de03dab5cc190a9f2a860c21a84|`1a01b42`> Docs: Update technology sponsors in README (<https://togithub.com/eslint/eslint/issues/13478|#13478>) (Nicholas C. Zakas) • <https://togithub.com/eslint/eslint/commit/6ed9e8e4ff038c0259b0e7fe7ab7f4fd4ec55801|`6ed9e8e`> Upgrade: lodash@4.17.19 (<https://togithub.com/eslint/eslint/issues/13499|#13499>) (Yohan Siguret) • <https://togithub.com/eslint/eslint/commit/45cdf00da6aeff3d584d37b0710fc8d6ad9456d6|`45cdf00`> Sponsors: Sync README with website (ESLint Jenkins) • <https://togithub.com/eslint/eslint/commit/f1cc725ba1b8646dcf06a83716d96ad9bb726172|`f1cc725`> Docs: fix linebreaks between versions in changelog (<https://togithub.com/eslint/eslint/issues/13488|#13488>) (Milos Djermanovic) • <https://togithub.com/eslint/eslint/commit/f4d7b9e1a599346b2f21ff9de003b311b51411e6|`f4d7b9e`> Update: deprecate id-blacklist rule (<https://togithub.com/eslint/eslint/issues/13465|#13465>) (Dimitri Mitropoulos) • <https://togithub.com/eslint/eslint/commit/e14a645aa495558081490f990ba221e21aa6b27c|`e14a645`> Chore: use espree.latestEcmaVersion in fuzzer (<https://togithub.com/eslint/eslint/issues/13484|#13484>) (Milos Djermanovic) • <https://togithub.com/eslint/eslint/commit/61097fe5cc275d414a0c8e19b31c6060cb5568b7|`61097fe`> Docs: Update int rule level to string (<https://togithub.com/eslint/eslint/issues/13483|#13483>) (Brandon Mills) • <https://togithub.com/eslint/eslint/commit/c8f9c8210cf4b9da8f07922093d7b219abad9f10|`c8f9c82`> Update: Improve report location no-irregular-whitespace (refs <https://togithub.com/eslint/eslint/issues/12334|#12334>) (<https://togithub.com/eslint/eslint/issues/13462|#13462>) (Milos Djermanovic) • <https://togithub.com/eslint/eslint/commit/f2e68ec1d6cee6299e8a5cdf76c522c11d3008dd|`f2e68ec`> Build: update webpack resolve.mainFields to match website config (<https://togithub.com/eslint/eslint/issues/13457|#13457>) (Milos Djermanovic) • <https://togithub.com/eslint/eslint/commit/a96bc5ec06f3a48bfe458bccd68d4d3b2a280ed9|`a96bc5e`> Fix: arrow-body-style fixer for `in` wrap (fixes <https://togithub.com/eslint/eslint/issues/11849|#11849>) (<https://togithub.com/eslint/eslint/issues/13228|#13228>) (Anix) • <https://togithub.com/eslint/eslint/commit/748734fdd497fbf61f3a616ff4a09169135b9396|`748734f`> Upgrade: Updated puppeteer version to v4.0.0 (<https://togithub.com/eslint/eslint/issues/13444|#13444>) (odidev) • <https://togithub.com/eslint/eslint/commit/e951457b7aaa1b12b135588d36e3f4db4d7b8463|`e951457`> Docs: fix wording in configuring.md (<https://togithub.com/eslint/eslint/issues/13469|#13469>) (Piper) • <https://togithub.com/eslint/eslint/commit/0af1d2828d27885483737867653ba1659af72005|`0af1d28`> Update: add allowSeparatedGroups option to sort-imports (fixes <https://togithub.com/eslint/eslint/issues/12951|#12951>) (<https://togithub.com/eslint/eslint/issues/13455|#13455>) (Milos Djermanovic) • <https://togithub.com/eslint/eslint/commit/1050ee78a95da9484ff333dc1c74dac64c05da6f|`1050ee7`> Update: Improve report location for no-unneeded-ternary (refs <https://togithub.com/eslint/eslint/issues/12334|#12334>) (<https://togithub.com/eslint/eslint/issues/13456|#13456>) (Milos Djermanovic) • <https://togithub.com/eslint/eslint/commit/b77b4202bd1d5d1306f6f645e88d7a41a51715db|`b77b420`> Update: Improve report location for max-len (refs <https://togithub.com/eslint/eslint/issues/12334|#12334>) (<https://togithub.com/eslint/eslint/issues/13458|#13458>) (Milos Djermanovic) • <https://togithub.com/eslint/eslint/commit/095194c0fc0eb02aa69fde6b4280696e0e4de214|`095194c`> Fix: add end location to reports in object-curly-newline (refs <https://togithub.com/eslint/eslint/issues/12334|#12334>) (<https://togithub.com/eslint/eslint/issues/13460|#13460>) (Milos Djermanovic) • <https://togithub.com/eslint/eslint/commit/10251bbaeba80ac15244f385fc42cf2f2a30e5d2|`10251bb`> Fix: add end location to reports in keyword-spacing (refs <https://togithub.com/eslint/eslint/issues/12334|#12334>) (<https://togithub.com/eslint/eslint/issues/13461|#13461>) (Milos Djermanovic) • <https://togithub.com/eslint/eslint/commit/2ea7ee51a4e05ee76a6dae5954c3b6263b0970a3|`2ea7ee5`> Sponsors: Sync README with website (ESLint Jenkins) • <https://togithub.com/eslint/eslint/commit/b55fd3b8c05a29a465a794a524b06c1a28cddf0c|`b55fd3b`> Sponsors: Sync README with website (ESLint Jenkins) *<https://togithub.com/eslint/eslint/releases/v7.4.0|`v7.4.0`>* <https://togithub.com/eslint/eslint/compare/v7.3.1...v7.4.0|Compare Source> • <https://togithub.com/eslint/eslint/commit/f21bad2680406a2671b877f8dba47f4475d0cc64|`f21bad2`> Docs: fix description for `never` in multiline-ternary (fixes <https://togithub.com/eslint/eslint/issues/13368|#13368>) (<https://togithub.com/eslint/eslint/issues/13452|#13452>) (Milos Djermanovic) • <https://togithub.c…
Comment on #197 Update docker.elastic.co/elasticsearch/elasticsearch-oss Docker tag to v6.8.11
<https://coveralls.io/builds/32762122|Coverage Status> Coverage remained the same at 88.265% when pulling *<https://github.com/cofacts/rumors-api/commit/ac4b4c150dde626f9621b2f303d78aec6bbd29d9|ac4b4c1> on renovate/docker-docker.elastic.co-elasticsearch-elasticsearch-oss-6.x* into *<https://github.com/cofacts/rumors-api/commit/a0a43a18523b0a595b15b48bef9a03c4102b8d73|a0a43a1> on master*.
#202 Update dependency googleapis to v59
This PR contains the following updates: * * * *Release Notes* googleapis/google-api-nodejs-client *<https://togithub.com/googleapis/google-api-nodejs-client/blob/master/CHANGELOG.md#%E2%80%8B5900-httpswwwgithubcomgoogleapisgoogle-api-nodejs-clientcomparev5800v5900-2020-08-11|`v59.0.0`>* <https://togithub.com/googleapis/google-api-nodejs-client/compare/v58.0.0...v59.0.0|Compare Source> *:warning: BREAKING CHANGES* • This release has breaking changes. • This release has breaking changes. • This release has breaking changes. • This release has breaking changes. • *doubleclickbidmanager:* This release has breaking changes. • *realtimebidding:* This release has breaking changes. • *memcache:* This release has breaking changes. • *datacatalog:* This release has breaking changes. *Features* • *accessapproval:* update the API (<https://www.github.com/googleapis/google-api-nodejs-client/commit/ae90a50b28eb531743329e4c06ecdb9b7ece71c6|ae90a50>) • *adexchangebuyer2:* update the API (<https://www.github.com/googleapis/google-api-nodejs-client/commit/330dee0bd2d15626f6bba5c489ec97cb35462cf3|330dee0>) • *adexperiencereport:* update the API (<https://www.github.com/googleapis/google-api-nodejs-client/commit/32bddd1364b24a30e406037f2e21e5b7eed338e3|32bddd1>) • *admob:* update the API (<https://www.github.com/googleapis/google-api-nodejs-client/commit/6aaf2d9855c2330adbec88c6f00bac1166ebf982|6aaf2d9>) • *alertcenter:* update the API (<https://www.github.com/googleapis/google-api-nodejs-client/commit/af9c91b8dc931ed1c53b8398843a6e8df479e768|af9c91b>) • *analyticsreporting:* update the API (<https://www.github.com/googleapis/google-api-nodejs-client/commit/2c0a6b68418dab66c0b644d49bb6acea2f80a7a9|2c0a6b6>) • *androiddeviceprovisioning:* update the API (<https://www.github.com/googleapis/google-api-nodejs-client/commit/51aa72d50e1ee32b041ab243035e834f0d436815|51aa72d>) • *androidenterprise:* update the API (<https://www.github.com/googleapis/google-api-nodejs-client/commit/b3f2a14e4d0ef3331c07d3f02e31fb28a55ae015|b3f2a14>) • *androidpublisher:* update the API (<https://www.github.com/googleapis/google-api-nodejs-client/commit/828cd89c4871ea00379ab81058d3ab7c0e6b2614|828cd89>) • *appengine:* update the API (<https://www.github.com/googleapis/google-api-nodejs-client/commit/c801b30be4e24563dadf7b30a382e105c9a0b293|c801b30>) • *billingbudgets:* update the API (<https://www.github.com/googleapis/google-api-nodejs-client/commit/20564396d3a005d846609ec84703771923c8dd84|2056439>) • *blogger:* update the API (<https://www.github.com/googleapis/google-api-nodejs-client/commit/ee9878d98d72c530145260ad14811a07d1d3a503|ee9878d>) • *classroom:* update the API (<https://www.github.com/googleapis/google-api-nodejs-client/commit/cdf48944867475f9195a8c0acec605250ab66d21|cdf4894>) • *customsearch:* update the API (<https://www.github.com/googleapis/google-api-nodejs-client/commit/9a57c25a9c9a0fcc7cd998365b2f740c84c441ba|9a57c25>) • *datacatalog:* update the API (<https://www.github.com/googleapis/google-api-nodejs-client/commit/abf359c7da8f0c85c31b485a98983296432f2db1|abf359c>) • *datafusion:* update the API (<https://www.github.com/googleapis/google-api-nodejs-client/commit/6316d04a4d34ccf60ddbab00fb71364531bb6af4|6316d04>) • *dataproc:* update the API (<https://www.github.com/googleapis/google-api-nodejs-client/commit/e400b20c5b021663f9c5ab19695e15c4876df8d8|e400b20>) • *dfareporting:* update the API (<https://www.github.com/googleapis/google-api-nodejs-client/commit/6420be988ff8741ee7e90e4336c931af6ce20f74|6420be9>) • *dialogflow:* update the API (<https://www.github.com/googleapis/google-api-nodejs-client/commit/1ec8d2bd8e1ba7acbb22998d922ecf210ac3436a|1ec8d2b>) • *doubleclickbidmanager:* update the API (<https://www.github.com/googleapis/google-api-nodejs-client/commit/9f0c8a2de89cb2fd33bb57cb5d1694cafe5e793b|9f0c8a2>) • *drive:* update the API (<https://www.github.com/googleapis/google-api-nodejs-client/commit/ee489ccdc086fe913ea6adf095858d0fbb7c263b|ee489cc>) • *firebase:* update the API (<https://www.github.com/googleapis/google-api-nodejs-client/commit/e43c59cee027da24960ae0cf2190643f296db2f1|e43c59c>) • *firebasedynamiclinks:* update the API (<https://www.github.com/googleapis/google-api-nodejs-client/commit/6538587f6300ce22987d62503941e243398683e8|6538587>) • *firebasehosting:* update the API (<https://www.github.com/googleapis/google-api-nodejs-client/commit/9408f89661ebbef43d1050119896bfecfd4c2aec|9408f89>) • *firebaseml:* update the API (<https://www.github.com/googleapis/google-api-nodejs-client/commit/900d029936347a04dc5b4969baf306d3e190ed2c|900d029>) • *healthcare:* update the API (<https://www.github.com/googleapis/google-api-nodejs-client/commit/a25ff328826038a166e1a3fae5e6cca594b14f31|a25ff32>) • *managedidentities:* update the API (<https://www.github.com/googleapis/google-api-nodejs-client/commit/120d84bcd6c6f6d024336cd3b16b08d2170997ac|120d84b>) • *memcache:* update the API (<https://www.github.com/googleapis/google-api-nodejs-client/commit/09f1d0c292777fa3175fdb3404378374c38fd7d0|09f1d0c>) • *monitoring:* update the API (<https://www.github.com/googleapis/google-api-nodejs-client/commit/b1af31ad603f6831089896811985ca709202dc8c|b1af31a>) • *people:* update the API (<https://www.github.com/googleapis/google-api-nodejs-client/commit/25508d01c99dacd7ed32a3466159093e56957948|25508d0>) • *prod_tt_sasportal:* update the API (<https://www.github.com/googleapis/google-api-nodejs-client/commit/5ef698d39d91fa89d8d84ce76cbbf80d68e6c0f2|5ef698d>) • regenerate index files (<https://www.github.com/googleapis/google-api-nodejs-client/commit/45d147934f49ad5de1d0229a8f8cea35d0417288|45d1479>) • regenerate index files (<https://www.github.com/googleapis/google-api-nodejs-client/commit/1caf0869bdb97ddd1d2c14b3c6042b79526a2674|1caf086>) • regenerate index files (<https://www.github.com/googleapis/google-api-nodejs-client/commit/21a492b6580ce827b7c41bd1a69712e869232bcb|21a492b>) • run the generator (<https://www.github.com/googleapis/google-api-nodejs-client/issues/2319|#2319>) (<https://www.github.com/googleapis/google-api-nodejs-client/commit/2d578ca2e3e6778d31a29902a46f8d399289e089|2d578ca>) • *serviceusage:* update the API (<https://www.github.com/googleapis/google-api-nodejs-client/commit/e82f2f221e698737aeb1d0d83ea741a8b44eb454|e82f2f2>) • run the generator (<https://www.github.com/googleapis/google-api-nodejs-client/issues/2320|#2320>) (<https://www.github.com/googleapis/google-api-nodejs-client/commit/424ced71c0e2ec24457ba247d21ee12425f1a382|424ced7>) • *safebrowsing:* update the API (<https://www.github.com/googleapis/google-api-nodejs-client/commit/29960c64969329a4e23f80e87e589ecebf756e37|29960c6>) • run the generator (<https://www.github.com/googleapis/google-api-nodejs-client/issues/2321|#2321>) (<https://www.github.com/googleapis/google-api-nodejs-client/commit/701edf301c4fd910f335774cc6f4d4f1d62c5436|701edf3>) • *realtimebidding:* update the API (<https://www.github.com/googleapis/google-api-nodejs-client/commit/ed6f4b3d924f2b16b40763f9c4e5eb3741cad5b4|ed6f4b3>) • *realtimebidding:* update the API (<https://www.github.com/googleapis/google-api-nodejs-client/commit/e0c047f37329261cae48bcbd110431465a62c0aa|e0c047f>) • *run:* update the API (<https://www.github.com/googleapis/google-api-nodejs-client/commit/1cece79a990ae3b47b0d9f21c54de6acd3b516b8|1cece79>) • *sasportal:* update the API (<https://www.github.com/googleapis/google-api-nodejs-client/commit/f8e2f34c487dd22081b07ab44cdc156931e66149|f8e2f34>) • *securitycenter:* update the API (<https://www.github.com/googleapis/google-api-nodejs-client/commit/401e676f406c5ce6abbd778831a59d66b4522553|401e676>) • *serviceconsumermanagement:* update the API (<https://www.github.com/googleapis/google-api-nodejs-client/commit/73ad4be79d7aad8c3fed0e28b2c3e538bad4a748|73ad4be>) • *servicenetworking:* update the API (<https://www.github.com/googleapis/google-api-nodejs-client/commit/e6f3fd356b3d43c009d21ca72f3aa0100a9d4d14|e6…
#203 Update dependency jest to v26
This PR contains the following updates: * * * *Release Notes* facebook/jest *<https://togithub.com/facebook/jest/blob/master/CHANGELOG.md#%E2%80%8B2640|`v26.4.0`>* <https://togithub.com/facebook/jest/compare/v26.3.0...v26.4.0|Compare Source> *Features* • `[jest-resolve]` Add support for `packageFilter` on custom resolver (<https://togithub.com/facebook/jest/pull/10393|#10393>) *Fixes* • `[pretty-format]` Handle `tagName` not being a string (<https://togithub.com/facebook/jest/pull/10397|#10397>) *<https://togithub.com/facebook/jest/blob/master/CHANGELOG.md#%E2%80%8B2630|`v26.3.0`>* <https://togithub.com/facebook/jest/compare/v26.2.2...v26.3.0|Compare Source> *Features* • `[jest-circus, jest-jasmine2]` Include `failureDetails` property in test results (<https://togithub.com/facebook/jest/pull/9496|#9496>) • `[jest-each, jest-jasmine, jest-circus]` Add support for `.concurrent.each` (<https://togithub.com/facebook/jest/pull/9326|#9326>) *Fixes* • `[jest-config]` Add `.pnp.js` to `transformIgnorePatterns` defaults (<https://togithub.com/facebook/jest/pull/10383|#10383>) • `[jest-leak-detector]` Wait properly for GC runs due to changes in Node 14.7 (<https://togithub.com/facebook/jest/pull/10366|#10366>) • `[jest-worker]` Downgrade minimum node version to 10.13 (<https://togithub.com/facebook/jest/pull/10352|#10352>) • `[docs]` Update snapshot testing documentation(<https://togithub.com/facebook/jest/pull/10359|#10359>) *<https://togithub.com/facebook/jest/blob/master/CHANGELOG.md#%E2%80%8B2622|`v26.2.2`>* <https://togithub.com/facebook/jest/compare/v26.2.1...v26.2.2|Compare Source> *Fixes* • `[jest-cli]` Use correct file name to override existing jest config on init (<https://togithub.com/facebook/jest/pull/10337|#10337>) • `[jest-haste-map]` Properly detect support for native `find` (<https://togithub.com/facebook/jest/pull/10346|#10346>) *<https://togithub.com/facebook/jest/blob/master/CHANGELOG.md#%E2%80%8B2621|`v26.2.1`>* <https://togithub.com/facebook/jest/compare/v26.2.0...v26.2.1|Compare Source> *Fixes* • `[jest-worker]` Make sure to work with Node TS typings v12 (<https://togithub.com/facebook/jest/pull/10336|#10336>) *<https://togithub.com/facebook/jest/blob/master/CHANGELOG.md#%E2%80%8B2620|`v26.2.0`>* <https://togithub.com/facebook/jest/compare/v26.1.0...v26.2.0|Compare Source> *Features* • `[jest-core, jest-circus, jest-reporter, jest-runner]` Added support for reporting individual test cases using jest-circus (<https://togithub.com/facebook/jest/pull/10227|#10227>) • `[jest-config, jest-reporter, jest-runner, jest-test-sequencer]` Add `slowTestThreshold` configuration option (<https://togithub.com/facebook/jest/pull/9366|#9366>) • `[jest-haste-map]` Watchman crawler now includes dotfiles (<https://togithub.com/facebook/jest/pull/10075|#10075>) • `[jest-worker]` Added support for workers to send custom messages to parent in jest-worker (<https://togithub.com/facebook/jest/pull/10293|#10293>) • `[jest-worker]` Support passing `resourceLimits` (<https://togithub.com/facebook/jest/pull/10335|#10335>) • `[pretty-format]` Added support for serializing custom elements (web components) (<https://togithub.com/facebook/jest/pull/10237|#10217>) *Fixes* • `[expect]` Match symbols and bigints in `any()` (<https://togithub.com/facebook/jest/pull/10223|#10223>) • `[jest-changed-files]` Use `git diff` instead of `git log` for `--changedSince` (<https://togithub.com/facebook/jest/pull/10155|#10155>) • `[jest-console]` Add missing `console.timeLog` for compatibility with Node (<https://togithub.com/facebook/jest/pull/10209|#10209>) • `[jest-haste-map]` Check `find` binary supports the `-iname` parameter (<https://togithub.com/facebook/jest/pull/10308|#10308>) • `[jest-snapshot]` Strip added indentation for inline error snapshots (<https://togithub.com/facebook/jest/pull/10217|#10217>) *Chore & Maintenance* • `[*]` Add missing dependency on `@types/node` (<https://togithub.com/facebook/jest/pull/10248|#10248>) • `[jest-jasmine2]` Convert `PCancelable` to TypeScript (<https://togithub.com/facebook/jest/pull/10215|#10215>) • `[jest-jasmine2]` Refine typings of `queueRunner` (<https://togithub.com/facebook/jest/pull/10215|#10215>) • `[jest-jasmine2]` Remove usage of `Function` type (<https://togithub.com/facebook/jest/pull/10216|#10216>) • `[jest-resolve]` Improve types (<https://togithub.com/facebook/jest/pull/10239|#10239>) • `[docs]` Clarify the <https://jestjs.io/docs/en/jest-object#jestrequireactualmodulename|`jest.requireActual(moduleName)`> example • `[jest-types]` Refine typings of `coverageReporters` (<https://togithub.com/facebook/jest/pull/10275|#10275>) *<https://togithub.com/facebook/jest/blob/master/CHANGELOG.md#%E2%80%8B2610|`v26.1.0`>* <https://togithub.com/facebook/jest/compare/v26.0.1...v26.1.0|Compare Source> *Features* • `[jest-mock]` Export `Mock`, `MockInstance`, `SpyInstance` types (<https://togithub.com/facebook/jest/pull/10138|#10138>) • `[jest-config]` Support config files exporting (`async`) `function`s (<https://togithub.com/facebook/jest/pull/10001|#10001>) • `[jest-cli, jest-core]` Add `--selectProjects` CLI argument to filter test suites by project name (<https://togithub.com/facebook/jest/pull/8612|#8612>) • `[jest-cli, jest-init]` Add `coverageProvider` to `jest --init` prompts (<https://togithub.com/facebook/jest/pull/10044|#10044>) *Fixes* • `[jest-console]` `getConsoleOutput` to receive global stack trace config and use it to format stack trace (<https://togithub.com/facebook/jest/pull/10081|#10081>) • `[jest-jasmine2]` Stop adding `:` after an error that has no message (<https://togithub.com/facebook/jest/pull/9990|#9990>) • `[jest-diff]` Control no diff message color with `commonColor` in diff options (<https://togithub.com/facebook/jest/pull/9997|#9997>) • `[jest-snapshot]` Fix TypeScript compilation (<https://togithub.com/facebook/jest/pull/10008|#10008>) *Chore & Maintenance* • `[docs]` Correct confusing filename in `enableAutomock` example (<https://togithub.com/facebook/jest/pull/10055|#10055>) • `[jest-core]` :tada::tada::tada::tada::tada::tada::tada::tada::tada::tada::tada::tada::tada::tada::tada::tada::tada::tada::tada::tada::tada::tada::tada::tada::tada: (<https://togithub.com/facebook/jest/pull/10000|#10000>) • `[jest-core, jest-reporters, jest-test-result, jest-types]` Cleanup `displayName` type (<https://togithub.com/facebook/jest/pull/10049|#10049>) • `[jest-runtime]` Jest-internal sandbox escape hatch (<https://togithub.com/facebook/jest/pull/9907|#9907>) • `[jest-fake-timers]` Update `now` param type to support `Date` in addition to `number`. (<https://togithub.com/facebook/jest/pull/10169|#10169>) • `[docs]` Add param to `setSystemTime` docs and remove preceding period from it and `getRealSystemTime` (<https://togithub.com/facebook/jest/pull/10169|#10169>) • `[jest-snapshot, jest-util]` Replace `make-dir` with `fs.mkdir` (<https://togithub.com/facebook/jest/pull/10136|#10136>) • `[docs]` Added parcel-bundler documentation inside readme.md file *Performance* • `[jest-core, jest-transform, jest-haste-map]` Improve Jest startup time and test runtime, particularly when running with coverage, by caching micromatch and avoiding recreating RegExp instances (<https://togithub.com/facebook/jest/pull/10131|#10131>) *<https://togithub.com/facebook/jest/blob/master/CHANGELOG.md#%E2%80%8B2601|`v26.0.1`>* <https://togithub.com/facebook/jest/compare/v26.0.0...v26.0.1|Compare Source> *Fixes* • `[jest-circus]` Backward compatibility for deprecated `DescribeBlock.tests` to not break e.g. Detox reporter *<https://togithub.com/facebook/jest/blob/master/CHANGELOG.md#%E2%80%8B2600|`v26.0.0`>* <https://togithub.com/facebook/jest/compare/v25.5.4...v26.0.0|Compare Source> *Features* • `[jest-environment-jsdom]` [*BREAKING*] Upgrade `jsdom` to v16 (<https://togithub.com/facebook/jest/pull/9606|#9606>) • `[@jest/fake-timers]` Add possi…
Comment on #199 Update dependency @elastic/elasticsearch to v7
<https://coveralls.io/builds/32762200|Coverage Status> Coverage remained the same at 88.265% when pulling *<https://github.com/cofacts/rumors-api/commit/6873b0c5653ad6ec333926a0afd7e2812ce97483|6873b0c> on renovate/elastic-elasticsearch-7.x* into *<https://github.com/cofacts/rumors-api/commit/a0a43a18523b0a595b15b48bef9a03c4102b8d73|a0a43a1> on master*.
Comment on #198 Update docker.elastic.co/kibana/kibana-oss Docker tag to v6.8.11
<https://coveralls.io/builds/32762206|Coverage Status> Coverage remained the same at 88.265% when pulling *<https://github.com/cofacts/rumors-api/commit/039fa2bdb0901de3a1a51a87cb678898c68739e8|039fa2b> on renovate/docker-docker.elastic.co-kibana-kibana-oss-6.x* into *<https://github.com/cofacts/rumors-api/commit/a0a43a18523b0a595b15b48bef9a03c4102b8d73|a0a43a1> on master*.
#204 Update dependency koa-router to v9
This PR contains the following updates: * * * *Release Notes* koajs/router *<https://togithub.com/koajs/router/releases/v9.4.0|`v9.4.0`>* <https://togithub.com/koajs/router/compare/v9.1.0...v9.4.0|Compare Source> • 99 params request ctx (<https://togithub.com/koajs/router/issues/100|#100>) <https://togithub.com/koajs/router/commit/92200d4|`92200d4`> *<https://togithub.com/koajs/router/releases/v9.1.0|`v9.1.0`>* <https://togithub.com/koajs/router/compare/v9.0.1...v9.1.0|Compare Source> • Fix current ctx._matchedRoute (<https://togithub.com/koajs/router/issues/93|#93>) <https://togithub.com/koajs/router/commit/7030524|`7030524`> • Add test for optional route parameter (<https://togithub.com/koajs/router/issues/43|#43>) <https://togithub.com/koajs/router/commit/bb74b12|`bb74b12`> *<https://togithub.com/koajs/router/releases/v9.0.1|`v9.0.1`>* <https://togithub.com/koajs/router/compare/v8.0.8...v9.0.1|Compare Source> • To v9.x.x :rocket: (<https://togithub.com/koajs/router/issues/87|#87>) <https://togithub.com/koajs/router/commit/e3d5870|`e3d5870`> • disable package-lock.json (<https://togithub.com/koajs/router/issues/83|#83>) <https://togithub.com/koajs/router/commit/53a6e0d|`53a6e0d`> • fix conflict accident per <https://togithub.com/koajs/router/issues/75|#75> and <https://togithub.com/koajs/router/pull/75/commits/11306e1c69bfe9029afbd1318c5278e713a041e0|#75> <https://togithub.com/koajs/router/commit/6131069|`6131069`> • refactor(dependencies): remove urijs dependency (<https://togithub.com/koajs/router/issues/75|#75>) <https://togithub.com/koajs/router/commit/5660b68|`5660b68`> • feat: replace var with const and let (<https://togithub.com/koajs/router/issues/80|#80>) <https://togithub.com/koajs/router/commit/4e44c08|`4e44c08`> • doc: be more precise about the behavior of middleware on the router (<https://togithub.com/koajs/router/issues/82|#82>) <https://togithub.com/koajs/router/commit/90ef8a7|`90ef8a7`> • Fix typo in layer.js (<https://togithub.com/koajs/router/issues/28|#28>) <https://togithub.com/koajs/router/commit/edb24b4|`edb24b4`> • Update changelog for wildcard change (<https://togithub.com/koajs/router/issues/77|#77>) <https://togithub.com/koajs/router/commit/2e69eca|`2e69eca`> * * * *Renovate configuration* :date: *Schedule*: At any time (no schedule defined). :vertical_traffic_light: *Automerge*: Disabled by config. Please merge this manually once you are satisfied. :recycle: *Rebasing*: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: *Ignore*: Close this PR and you won't be reminded about this update again. * * * ☐ If you want to rebase/retry this PR, check this box * * * This PR has been generated by <https://renovate.whitesourcesoftware.com|WhiteSource Renovate>. View repository job log <https://app.renovatebot.com/dashboard#cofacts/rumors-api|here>.
#205 Update dependency mockdate to v3
This PR contains the following updates: * * * *Release Notes* boblauer/MockDate *<https://togithub.com/boblauer/MockDate/compare/v3.0.1...v3.0.2|`v3.0.2`>* <https://togithub.com/boblauer/MockDate/compare/v3.0.1...v3.0.2|Compare Source> *<https://togithub.com/boblauer/MockDate/compare/v3.0.0...v3.0.1|`v3.0.1`>* <https://togithub.com/boblauer/MockDate/compare/v3.0.0...v3.0.1|Compare Source> *<https://togithub.com/boblauer/MockDate/blob/master/CHANGELOG.md#%E2%80%8B300|`v3.0.0`>* <https://togithub.com/boblauer/MockDate/compare/v2.0.5...v3.0.0|Compare Source> *Breaking Changes:* Support for `timezoneOffset` parameter was removed. It was a foot gun and caused many issues because it was only half-implemented. Implementing full timezone support is outside the scope of this library. * * * *Renovate configuration* :date: *Schedule*: At any time (no schedule defined). :vertical_traffic_light: *Automerge*: Disabled by config. Please merge this manually once you are satisfied. :recycle: *Rebasing*: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: *Ignore*: Close this PR and you won't be reminded about this update again. * * * ☐ If you want to rebase/retry this PR, check this box * * * This PR has been generated by <https://renovate.whitesourcesoftware.com|WhiteSource Renovate>. View repository job log <https://app.renovatebot.com/dashboard#cofacts/rumors-api|here>.
Comment on #201 Update dependency eslint to v7
<https://coveralls.io/builds/32762285|Coverage Status> Coverage remained the same at 88.265% when pulling *<https://github.com/cofacts/rumors-api/commit/9832b93be54bd59bf0f579b1f3dcc60e651b128b|9832b93> on renovate/eslint-7.x* into *<https://github.com/cofacts/rumors-api/commit/a0a43a18523b0a595b15b48bef9a03c4102b8d73|a0a43a1> on master*.
Comment on #202 Update dependency googleapis to v59
<https://coveralls.io/builds/32762290|Coverage Status> Coverage remained the same at 88.265% when pulling *<https://github.com/cofacts/rumors-api/commit/79faa3ae8ddc9e722f70d3e45619650afebe5bed|79faa3a> on renovate/googleapis-59.x* into *<https://github.com/cofacts/rumors-api/commit/a0a43a18523b0a595b15b48bef9a03c4102b8d73|a0a43a1> on master*.
Comment on #203 Update dependency jest to v26
<https://coveralls.io/builds/32762366|Coverage Status> Coverage remained the same at 88.265% when pulling *<https://github.com/cofacts/rumors-api/commit/84420bf9dcb005ce8aa0f04d518174cddb5f2fc4|84420bf> on renovate/jest-26.x* into *<https://github.com/cofacts/rumors-api/commit/a0a43a18523b0a595b15b48bef9a03c4102b8d73|a0a43a1> on master*.
Comment on #204 Update dependency koa-router to v9
<https://coveralls.io/builds/32762374|Coverage Status> Coverage remained the same at 88.265% when pulling *<https://github.com/cofacts/rumors-api/commit/fcb6df464ddfcc5136da352202e131c7d7b860b0|fcb6df4> on renovate/koa-router-9.x* into *<https://github.com/cofacts/rumors-api/commit/a0a43a18523b0a595b15b48bef9a03c4102b8d73|a0a43a1> on master*.
Comment on #205 Update dependency mockdate to v3
<https://coveralls.io/builds/32762392|Coverage Status> Coverage remained the same at 88.265% when pulling *<https://github.com/cofacts/rumors-api/commit/c257378bc3f793889f4fdd081f19f5cd3f1d9c82|c257378> on renovate/mockdate-3.x* into *<https://github.com/cofacts/rumors-api/commit/a0a43a18523b0a595b15b48bef9a03c4102b8d73|a0a43a1> on master*.
Comment on #45 Add migration script for analytics index
Thanks for the review! I was also considering extracting the logic -- there is indeed a duplication, but migration scripts should be one-off and highly customized. Maybe we can leave it as-is for now and see if future occurrences suggest a more solid common pattern.
Comment on #195 Update rumors-db with analytics index mappings
Thanks for the review! Agree that we can add sorting in unit test to have more determinate snapshots. If no other suggestions, I would like to merge this PR and deploy during midnights. Having these changes on staging and even production could benefit <https://moe.kktix.cc/events/moed23ct-20200815|moedict hackathon> tomorrow.
Comment on #206 make fetchStatsFromGA tests deterministic
<https://coveralls.io/builds/32766217|Coverage Status> Coverage remained the same at 88.265% when pulling *<https://github.com/cofacts/rumors-api/commit/88d128aa8ba9331960fa6592179a7f21c7a3c512|88d128a> on sort-analytics* into *<https://github.com/cofacts/rumors-api/commit/a0a43a18523b0a595b15b48bef9a03c4102b8d73|a0a43a1> on master*.
Review on #206 make fetchStatsFromGA tests deterministic
Thanks for organizing the test files in an orderly manner! I am going to rebase this PR to latest and merge if CI passes.
Comment on #187 Load more reply request at once
20200815 released to production.
Current Cofacts's use of `Object.fromEntries` breaks iOS 11.1 / Safari 11 <https://user-images.githubusercontent.com/108608/90306053-d29ec700-defb-11ea-9798-9d8ffacb9cdc.png|image> It even doesn't work on iOS 12 / Google Chrome: <https://user-images.githubusercontent.com/108608/90306179-2c53c100-defd-11ea-87d4-7e6df367f665.png|image> Previous analysis of mobile browser versions: <https://g0v.hackmd.io/@mrorz/rksKX45D8#LIFF-compatibility|https://g0v.hackmd.io/@mrorz/rksKX45D8#LIFF-compatibility> Compatibility: <https://caniuse.com/#feat=mdn-javascript_builtins_object_fromentries|https://caniuse.com/#feat=mdn-javascript_builtins_object_fromentries> We should target the following versions: • Android: Chrome mobile 52.0.2743.98 to cover 99% of sessions • iOS: iOS version 10.3 to cover 99% of sessions
chrome.google.com
Add zhuyin fuhao next to Chinese characters.
Comment on #207 handle the case where there's no user activities
<https://coveralls.io/builds/32775333|Coverage Status> Coverage increased (+0.06%) to 88.325% when pulling *<https://github.com/cofacts/rumors-api/commit/ed9799353bad3e6a796047bda78ad96b2061c869|ed97993> on emptyRows* into *<https://github.com/cofacts/rumors-api/commit/083920b92160a9d56c6f1a144504abe143ad718a|083920b> on master*.
Review on #207 handle the case where there's no user activities
LGTM! Thanks for the fix.
Figma
Created with Figma
#12 Add GA related env vars and volume mount
1. Add google analytics related env vars in docker-compose sample files 2. Mount `/volumes/api` to `/data` in API server container
#314 implement line chart for Google analytics stats on Article page
parent issue: <https://github.com/cofacts/rumors-api/issues/166|cofacts/rumors-api#166> spec: <https://g0v.hackmd.io/0kjaVlFASSyddkltqGR6Nw|https://g0v.hackmd.io/0kjaVlFASSyddkltqGR6Nw> this would also fix <https://github.com/cofacts/rumors-site/issues/211|#211> since `<TrendLine>` would be removed
#315 Initial implementation of LineChart
Merging this PR to feature branch instead of dev because it's still a work in progress, and blocked by designs. However, I would like to check with you and see if the current implementation aligns with the current coding style/standard before moving further, as we have discussed a few times about how to integrate d3 with React.
Comment on #313 iOS compatibility issue
Related xpress polyfill: <https://github.com/zloirock/core-js/blob/v3.6.5/packages/core-js/modules/es.object.from-entries.js|https://github.com/zloirock/core-js/blob/v3.6.5/packages/core-js/modules/es.object.from-entries.js>
#208 modify command line options for fetchStatsFromGA script.
• remove date validation to allow relative date pattern • add useContentGroup option instead of guessing from start/end dates
Comment on #208 modify command line options for fetchStatsFromGA script.
<https://coveralls.io/builds/32776997|Coverage Status> Coverage decreased (-0.2%) to 88.158% when pulling *<https://github.com/cofacts/rumors-api/commit/0fbf65b5cb9f49dcc1b245b30cad2e5e63c3c110|0fbf65b> on contentGroupFlag* into *<https://github.com/cofacts/rumors-api/commit/800758e959c96ff4b6ed624d419e66c84ad5789f|800758e> on master*.
#316 Add Object.fromEntries polyfill to support iOS Safari 11
According to <https://github.com/cofacts/rumors-site/issues/313|#313> we should support Safari >= 10.3; however, currently our usage of `Object.fromEntries` breaks iOS safari. This PR: • Removes unused babel preset (they are already <https://nextjs.org/blog/next-9-3#32-kb-smaller-runtime-15-kb-gzip|included in Next.js 9.3>) • Adds `core-js/features/object/from-entries` to `_app.js` • putting polyfill in `_app` is the suggested way of adding custom polyfills in <https://nextjs.org/docs/basic-features/supported-browsers-features#custom-polyfills|official doc> • <https://3perf.com/blog/polyfills/|`nomodule` trick> can't be used because iOS 11 supports nomodule (don't load nomodule scripts) but still does not support `Object.fromEntries` and needs to be polyfilled. Fixes <https://github.com/cofacts/rumors-site/issues/313|#313> . *iOS 10, iPhone 7* <https://user-images.githubusercontent.com/108608/90317358-74a1cc00-df5b-11ea-8b90-f565ae2f2939.png|image> *iOS 11, iPhone 6* <https://user-images.githubusercontent.com/108608/90317334-4623f100-df5b-11ea-8158-ae8a39cf825e.png|image>
#317 Remove Google translate toolbar by loading Google site translate after click
Currently in iOS system, Google translate will show toolbar no matter user has interacted with Translate widget or not, which covers up screen, especially for create reply dialog. <https://user-images.githubusercontent.com/108608/90317436-24773980-df5c-11ea-8f3a-a8e7f4440a91.png|image> This PR: • Initiates Google translate setup only after the user clicks "Google translate" button • Fixes hover & ripple effect of button / list item by providing a <https://material-ui.com/customization/palette/#dark-mode|dark theme> • Adjust sidebar style <https://user-images.githubusercontent.com/108608/90317600-3a392e80-df5d-11ea-8b3e-5ad3705ec848.gif|activate> • No translate toolbar at first; translate widget replaced with a "Google translate" button. • As soon as the user clicks "Google translate" button, Google site translate loads and toolbar is added The dark theme turns hover effect brighter (currently in production it darkens on hover, which is incorrect). The dark theme is required for `<Button variant="outlined">` to render in bright border and text. <https://user-images.githubusercontent.com/108608/90317665-9dc35c00-df5d-11ea-9985-f6254baa1707.gif|ripple>
YouTube
g0v.hackmd.io
Review on #208 modify command line options for fetchStatsFromGA script.
LGTM! Thanks for the fix.
Comment on #209 set boolean args to boolean type
<https://coveralls.io/builds/32792042|Coverage Status> Coverage remained the same at 88.158% when pulling *<https://github.com/cofacts/rumors-api/commit/023ba03fed85a7c1843b441d6c5eff6663e0c942|023ba03> on contentGroupFlag* into *<https://github.com/cofacts/rumors-api/commit/18c26689b069e25fe7c7d0e3440e0b7421b801b4|18c2668> on master*.
Review on #209 set boolean args to boolean type
Is `--useContentGroup=false` valid for boolean args? If not, we should update the comments at the top of this script.
Comment on #209 set boolean args to boolean type
it is valid. I've verified that. Any values other than 'true', `--useContentGroup=anything_other_than_true`, would also be evaluated as `false` :p
Comment on #315 Initial implementation of LineChart
I am curious how `LineChart` would behave if 1. there are holes in time (i.e. skipped date) 2. contains data with less than 30 days Is it going to be handled in `LineChart` or is it going to be handled in some wrapper component?
Review on #315 Initial implementation of LineChart
The implementation looks lean and beautiful. Thanks! I have added some comments regarding imports and edge case of input data.
Comment on #315 Initial implementation of LineChart
I think this would import the whole `d3`, including things that we don't use at all, such as <https://github.com/d3/d3-selection|d3.selection>. I suggest importing individual packages and functions (i.e. `import {scaleLinear} from 'd3-scale';`).
Comment on #315 Initial implementation of LineChart
I believe we discussed this briefly at moed23ct, the ultimate solution is to populate data for all missing dates for the last 30 days. The plan is to move the dataset handling part inside `getChartData` to the parent component and we can handle missing data there as well. (`getChartData` is probably not a good name, will probably change to `computeChartData` or something along the line.) I think this component should just plot the charts with given data and layout
Comment on #315 Initial implementation of LineChart
Thanks a lot for the feedback! I'm marking this as WIP and will hold off until we get confirmation on the design.
Comment on #315 Initial implementation of LineChart
Got it, agree that we can just plot the data given to `<LineChart>` and keep it simple. Thanks for the clarification!
#210 cleanupUrls errors on production cron job
In cron.log: ``` 100 / 1742783 Processed Possibly Unhandled Rejection at: Promise Promise { <rejected> TypeError: Cannot read property 'hits' of undefined at processUrls (/srv/www/build/scripts/cleanupUrls.js:77:26) at processTicksAndRejections (internal/process/task_queues.js:97:5) at async main (/srv/www/build/scripts/cleanupUrls.js:176:3) } reason: TypeError: Cannot read property 'hits' of undefined at processUrls (/srv/www/build/scripts/cleanupUrls.js:77:26) at processTicksAndRejections (internal/process/task_queues.js:97:5) at async main (/srv/www/build/scripts/cleanupUrls.js:176:3) ``` Seems that there are some error handling issue, or query does not return expected results. It has been there for a few days, current disk level is at 30% full. Will need to mitigate this before all our disk space is eaten up by useless URLs.
Comment on #186 Cannot login to local dev server
<https://www.chromium.org/updates/same-site|https://www.chromium.org/updates/same-site> 1. `rumors-api` has not add `SameSite: none; secure` to its cookie 2. Google says "We have begun enforcing the new behavior for Chrome 80 stable, just not for 100% of users. ". This means that _some_ users are *already blocked* from Cofacts due to this issue, while others can still proceed with a warning message: > A cookie associated with a cross-site resource at <http://cofacts-api.g0v.tw/|http://cofacts-api.g0v.tw/> was set without the `SameSite` attribute. _A future release of Chrome will only deliver cookies with cross-site requests if they are set with `SameSite=None` and `Secure`_. You can review cookies in developer tools under Application>Storage>Cookies and see more details at <https://www.chromestatus.com/feature/5088147346030592|https://www.chromestatus.com/feature/5088147346030592> and <https://www.chromestatus.com/feature/5633521622188032|https://www.chromestatus.com/feature/5633521622188032>. The message is different from the one <https://github.com/Stimim|@Stimim> received. The difference is marked italic, stating that the browser has not blocked the cookie yet; while Stimim's browser is _chosen_ by Google and blocked cookies according to SameSite rules. *Impact range* For users with a browser that enforces same-site, they will have issue when • visiting <http://localhost:3000|http://localhost:3000>: requests to <https://cofacts-api.hacktabl.org|https://cofacts-api.hacktabl.org> will have no cookie set • visiting <https://dev.cofacts.org|https://dev.cofacts.org>: requests to <https://cofacts-api.hacktabl.org|https://cofacts-api.hacktabl.org> will have no cookie set • visiting <https://cofacts.org|https://cofacts.org> : requests to <https://cofacts-api.g0v.tw|https://cofacts-api.g0v.tw> will have no cookie set However, `<http://cofacts.g0v.tw|cofacts.g0v.tw>` and `<http://cofacts-api.g0v.tw|cofacts-api.g0v.tw>` are considered same-site, `<http://cofacts.hacktabl.org|cofacts.hacktabl.org>` and `<http://cofacts-api.hacktabl.org|cofacts-api.hacktabl.org>` are also considered same-site, thus these are already "same-site" and can still work under the default `SameSite: Lax` behavior. *References* Definition of "same-site": <https://web.dev/samesite-cookies-explained/#explicitly-state-cookie-usage-with-the-samesite-attribute|https://web.dev/samesite-cookies-explained/#explicitly-state-cookie-usage-with-the-samesite-attribute> *Mitigation* There are 3 ways to mitigate the same-site change: *Method 1: relax samesite* Since rumors-api acts as an authentication service, its cookie should be sent in third party context. We should set `SameSite: none; secure` on the login cookies set by `rumors-api`. After enforcing samesite on rumors-api, we may encounter issue developing using `<http://localhost:3000>`. Need to investigate workarounds, or provide documentation for devs to setup https on localhost. *References* • <https://auth0.com/docs/sessions/concepts/cookie-attributes|Auth0's mitigation> • <https://docs.microsoft.com/en-us/azure/active-directory/develop/howto-handle-samesite-cookie-changes-chrome-browser?tabs=python#mitigation-and-samples|Microsoft's mitigation> • <https://blog.heroku.com/chrome-changes-samesite-cookie|Heroku's post> • <https://www.chromium.org/updates/same-site|Chromium SameSite latest updates> *Method 2: use same-site APIs whenever possible* Another way to mitigate is to keep API endpoints always same-site, so that same-site cookie rules never need to apply. • When connecting to `*.<http://cofacts.org|cofacts.org>`, use `<http://api.cofacts.org|api.cofacts.org>` as API endpoint • Problem: need to determine API endpoint using host, and need carefully handle OAuth2 login redirect domains • Proxy requests to `/api/` to API servers instead • On production, this can be achieved using path matching and `proxy_pass` • On localhost dev environments, it should be achievable using <https://github.com/vercel/next.js/tree/master/examples/with-custom-reverse-proxy|dev server proxy> • This is not only same-site but also *same-origin*. Can switch to simpler CORS setup (but some CORS may be still needed for chatbot LIFF), or remove CORS support completely (require chatbot LIFF to implement its own proxy as well). • When using proxy under each domain, we may need to take care of session cookie key collision (need to pick a different cookie name) and a problem that the login session cannot cross-domain (SSO). *Method 3: Use token & authentication header to replace cookie* No cookie, no headache! In this way, there is nothing that will "automatically" sent to server, thus no CSRF risks -- as long as the token is not intercepted :P However, this requires clients like rumors-site to remember the token in other means (such as `localStorage`) if we don't want users to login after reloading the website / opening a new tab. Other things are: • We may need to design our own token expire check (or use JWT) to replace cookie max-age mechanism. • We may need token exchange mechanism so that the server can safely (i.e. not through redirect URLs!) send real session token (JWT) to client after the user authenticates. Usually it is achieved by server attaching a temporary `code` in URL after successful authentication, and the client uses the `code` to exchange for `token` and store it in client side.
Related discussion: <https://g0v.hackmd.io/eitM7s0bSSeS3kg-MAcpDw#LINE-bot-onboarding-UX|https://g0v.hackmd.io/eitM7s0bSSeS3kg-MAcpDw#LINE-bot-onboarding-UX> *Target* 1. Provide basic usage instruction 2. Experience lookup interaction 3. Setup LIFF permissions *Trigger* • Join event • Rich menu *Interactions* *1. Welcome* > This is a chatbot that looks up suspicious forwarded messages for you. Here is how to use me: > 我是幫你查轉傳訊息的機器人。用法像這樣 Flex message carousel: 1. When receiving message from elsewhere / 在他處收到訊息 2. Long press and share / 長按後分享 3. Select Cofacts to share / 指名 Cofacts 4. Cofacts replies with crowd-sourced fact-check or replies / Cofacts 回傳網撰寫的的查證或回應 > Wanna try it out? Just forward a message to me! > 是不是躍躍欲試呢?試試把訊息傳進來吧! > > [按鈕] Simulate forwarding message / 模擬傳訊息進 Cofacts *2. Show mock reply* (Reply content without voting) > [Quick reply] :bulb: Cool, I got it! 酷,我懂了! > [Quick reply] :thinking_face: What happened? 發生什麼事? *3. Provide setup* "Cool, I got it!" --> > You are smart :blush: 你很聰明 :blush: "What happened?" --> > :arrow_up: What you see above is a simulation of what you may see after you forward a message to Cofacts. 上面在模擬你傳訊息給我時,會得到的回應。 > :books: Cofacts has a database of hoax messages and replies. Cofacts 有一個謠言與回應的資料庫。 > :calling: When you send message to me, I look the message up in the database and return found results. 當你傳訊息給我的時候,我會搜尋資料庫然後回傳找到的結果。 > :new: If I cannot find anything, I will ask you about sending it to the database. 如果我找不到的話,會徵求你的同意,看看要不要把這個訊息送進資料庫唷。 > To wrap up, please finish permission settings so that can provide smoother experience. > [按鈕] Setup permission / 權限設定 > [Quick reply]:ok_hand: Done! / 我設好了! > [Quick reply] :stopwatch: Later / 之後再設吧 > [Quick reply] :question: Why setup permission? / 為什麼要設這個? *3.5 Explaination* “:question: Why setup permission?” --> > When I provide hoax-busting replies to you, I would like to ask for any feedback on the crowd-sourced reply. > In order to achieve that, I need to ask for your permission to "send message to chatroom". > The permission will only be used to send message back to this particular chatroom. > You can still use Cofacts without granting me permissions. When we ask feedback from you, the permission dialog will pop-up again. *4. Thank-you* ":stopwatch: Later" --> > OK. When we ask feedback from you, the permission dialog will pop-up again. > This is the end of the tutorial. Next time when you receive suspicious message, don't hesitate to forward it to me! :hugging_face:
Comment on #312 Upgrade to Apollo Client 3
Merged due to inactivity.
Comment on #311 ArticleReplyFeedbackControl revamp
Merged due to inactivity
Task API (For model instance (VM)) 至多回傳 100 則 article `GET /v1/tasks?modelId=mid-c` • sample response ``` [ { "id": "this-is-task-id-1", "modelId": "mid-c", "content": "sample-1", "source": "LINE" }, { "id": "this-is-task-id-2", "modelId": "mid-c", "content": "sample-2", "source": "LINE" } ] ``` `POST /v1/tasks` • sample request ``` [ { "id": "this-is-task-id-1", "result": { "prediction": { "confidence": { "c1": 0.9, "c2": 0.3 } }, "time": 1500000, } }, { "id": "this-is-task-id-2", "result": { "prediction": { "confidence": { "c1": 0.9, "c2": 0.3 } }, "time": 1500000, } } ] ``` • sample response ``` [ { "id": "this-is-task-id-1", "result": { "ok": true } }, { "id": "this-is-task-id-2", "error": { "message": "task id not found..." } } ] ```
LGTM! Thanks for the fix. Let's merge this :D
#318 Make production build works by opt-out static build for search pages
Currently staging build fail because `/search` page is using a runtime config. According to <https://nextjs.org/docs/api-reference/next.config.js/runtime-configuration|next.js doc>: > A page that relies on publicRuntimeConfig must use getInitialProps to opt-out of Automatic Static Optimization. Runtime configuration won't be available to any page (or component in a page) without getInitialProps. We should pass `{ssr: true}` to `withApollo` so that next-apollo attaches <https://github.com/adamsoffer/next-apollo/blob/master/src/withApollo.js#L108|`getInitialProps`> to search page and thus opt-out Automatic Static Optimization for `/search` page. Result: <https://user-images.githubusercontent.com/108608/90662601-25b9a680-e27b-11ea-94c3-4fe8f5f03bfb.png|image>
#318 Make production build works by opt-out static build for search pages
Currently staging build fail because `/search` page is using a runtime config. <https://user-images.githubusercontent.com/108608/90665713-06bd1380-e27f-11ea-830c-80df5f9e118b.png|image> According to <https://nextjs.org/docs/api-reference/next.config.js/runtime-configuration|next.js doc>: > A page that relies on publicRuntimeConfig must use getInitialProps to opt-out of Automatic Static Optimization. Runtime configuration won't be available to any page (or component in a page) without getInitialProps. We should pass `{ssr: true}` to `withApollo` so that next-apollo attaches <https://github.com/adamsoffer/next-apollo/blob/master/src/withApollo.js#L108|`getInitialProps`> to search page and thus opt-out Automatic Static Optimization for `/search` page. *Result* <https://user-images.githubusercontent.com/108608/90662601-25b9a680-e27b-11ea-94c3-4fe8f5f03bfb.png|image>
#211 Enable Samesite cookie on API server
<https://user-images.githubusercontent.com/108608/90677503-09743480-e290-11ea-950f-a14136eebffb.png|截圖 2020-08-20 上午2 50 54> This PR fixes <https://github.com/cofacts/rumors-api/issues/186|#186> via: • Upgrades koa and koa-session2 for `SameSite` support • Turn on `samesite` and `secure` for session cookies • If `secure` is not set, session cookies (`koa:sess` and `koa:sess.sig`) won't have Secure flag, and the browser does not apply SameSite=None • Adds env var `COOKIE_SAMESITE_NONE` to toggle it. In some case `samesite` may be not required. • Trust proxy headers • This allows Koa to recognize `x-forwarded-proto` and send `secure: true` when initializing cookies. • Related code analysis: <https://github.com/koajs/koa/issues/974#issuecomment-307232498|koajs/koa#974 (comment)> • If `secure: true` is not set on cookie constructor, cookie middleware will throw exception saying that `secure` flag is only available under secure connections. • Add env var `TRUST_PROXY_HEADERS` to toggle it. This is because in some configuration there may be no proxies in front of koa. In that scenario we had better not trust proxy headers.
#212 store date with timezone for analytics
<https://app.slack.com/client/T02G2SXKM/C2PPMRQGP|https://app.slack.com/client/T02G2SXKM/C2PPMRQGP>
Comment on #211 Enable Samesite cookie on API server
<https://coveralls.io/builds/32867691|Coverage Status> Coverage remained the same at 88.158% when pulling *<https://github.com/cofacts/rumors-api/commit/779536d30a26e5ffcfd62fd02d53ed936e225fd6|779536d> on samesite* into *<https://github.com/cofacts/rumors-api/commit/60d671509d2fa70e0a2bd733742818c34ba2dc44|60d6715> on master*.
#13 Setup x-forwarded-proto header
Related to <https://github.com/cofacts/rumors-api/pull/211|cofacts/rumors-api#211>. Koa relies on `X-Forarded-Proto` when setting up secuire cookies. This PR: • Sets required env variable to enable samesite cookie in API servers • Sets `X-Forwarded-Proto` on nginx reverse proxy so that Koa can get it • `<http://cofacts-api.g0v.tw|cofacts-api.g0v.tw>`: SSL terminates on nginx server itself, thus we can directly set `X-Forwarded-Proto` to `https` for HTTPS servers. • `<http://api.cofacts.org|api.cofacts.org>`, `<http://cofacts-api.hacktabl.org|cofacts-api.hacktabl.org>`, `<http://dev-api.cofacts.org|dev-api.cofacts.org>`: SSL terminates at Cloudflare. Cloudflare <> nginx uses https, and so is nginx <> koa • Cloudflare <https://support.cloudflare.com/hc/en-us/articles/200170986-How-does-Cloudflare-handle-HTTP-Request-headers-|do send `X-Forwarded-Proto`> • We forward Cloudflare's `X-Forwarded-Proto` to koa server in this case.
Comment on #211 Enable Samesite cookie on API server
should we add trust proxy check? <https://github.com/SagePtr/koa-trust-proxy|https://github.com/SagePtr/koa-trust-proxy>
#213 Feature highlight searched text
Add highlight support for ListArticles and ListReplies Fixes <https://github.com/cofacts/rumors-api/issues/51|#51>
Comment on #213 Feature highlight searched text
<https://coveralls.io/builds/32879061|Coverage Status> Coverage increased (+0.09%) to 88.252% when pulling *<https://github.com/cofacts/rumors-api/commit/83fd71b9d543940b389beb301f7f123c96af9c8c|83fd71b> on features/51-highlight* into *<https://github.com/cofacts/rumors-api/commit/60d671509d2fa70e0a2bd733742818c34ba2dc44|60d6715> on master*.
Comment on #211 Enable Samesite cookie on API server
Sounds cool! But what is the IP address of nginx, as perceived by rumors-api container? Another thing is, koa has <https://github.com/koajs/koa/issues/974#issuecomment-307232498|hard-coded its cookie initialization> to look for `app.proxy` before accessing `X-Forwarded-Proto`. Not sure if SagePtr/koa-trust-proxy could help with that.
Comment on #214 store timestamp for analytics and add timezone setting in .env
<https://coveralls.io/builds/32882865|Coverage Status> Coverage increased (+0.03%) to 88.184% when pulling *<https://github.com/cofacts/rumors-api/commit/ee2efb301caedc7a810ccb50db88bcd21252971b|ee2efb3> on timezone* into *<https://github.com/cofacts/rumors-api/commit/60d671509d2fa70e0a2bd733742818c34ba2dc44|60d6715> on master*.
Comment on #213 Feature highlight searched text
From <https://www.figma.com/file/zpD45j8nqDB2XfA6m2QskO/Cofacts-website?node-id=585%3A168|Figma> we will need to highlight hyperlink title & hyperlink descriptions as well: <https://user-images.githubusercontent.com/108608/90856001-83510e80-e3b3-11ea-83b6-690527ba1601.png|image> <https://user-images.githubusercontent.com/108608/90855697-cf4f8380-e3b2-11ea-934f-a0ae8001b240.png|image> • We will need highlight on `text`, `hyperlinks.title` and `hyperlinks.summary` • `highlight` output may be more complex than a simple string. We may need a structure like `[{field: 'text', highlight: 'OOOOOOO'}]` to tell UI to highlight specific parts.
Review on #213 Feature highlight searched text
Sorry that the original API ticket did not clarify the spec. Here are some aspect to consider regarding where to put `highlight` and how `highlight` field should be structured. Discussions are welcomed.
Comment on #213 Feature highlight searched text
I think `highlight` should be added to `ArticleEdge` and `ReplyEdge` instead. • `highlight` is only meaningful for listing APIs such as `ListArticles` and `ListReplies`. Like `score` and `cursor`, it is an attribute that is related to the relation of the filter operation, thus the properly should belong to edge object. • In answerfamily I added `_highlight` and `_score` to entities because answerfamily APIs don't do relay-style pagination, I had no choice but adding the field to entity itself. Please consult `graphql/util/createConnectionType` for definition of edge objects: • modify `createConnectionType` to add `highlight` to XXXEdges • modify `defaultResolveEdges` to include _highlight
Comment on #186 Cannot login to local dev server
As secure cookie & SameSite: none being set, this issue should be resolved on staging. Visitors of `localhost:3000` should be able to login staging server with no problem If Google Chrome still complains about cross-site cookie, try clearing the cookie stored for localhost:3000 and try again. Safari login should also work as expected. cc/ <https://github.com/Stimim|@Stimim>
• extract reasons dialog • load reply & feedbacks in popover • loads 100 feedbacks on popover open • removes `reply` prop
Review on #214 store timestamp for analytics and add timezone setting in .env
Thanks for the fix! It's looking good :D I suggest modify `README.md` (or `.env.sample`) to mention that `GA_TIMEZONE` should match the time zone of <https://support.google.com/analytics/answer/1010249|Google analytics views>.
Review on #214 store timestamp for analytics and add timezone setting in .env
Thanks a lot, let's ship it!
Comment on #8 Remove staging site from Google
Done in <https://github.com/cofacts/rumors-deploy/commit/8b9f085a4ff90042284c2a858c8fd7cbc9930031|8b9f085>
Fixes <https://github.com/cofacts/rumors-api/issues/210|#210>. As described in <https://github.com/cofacts/rumors-api/issues/210|#210>, the URL cleaning cronjob always fails on production. *Root cause* When we bump elasticsearch client in <https://github.com/cofacts/rumors-api/pull/153|#153>, there was a breaking change that wraps return value of elasticsearch client with an extra `{body: }`. At that time we updated all elasticsearch client return values that unit test covered; unfortunately, there is one call-site of elasticsearch client not updated. The call site will not be executed until there are more than 100 `urls` to scan and delete. *Proposed fix* 1. Add 100 more fixture for `cleanupUrls` so that it fails unit test 2. Fix `cleanupUrls` to make test pass
Comment on #215 Fix cleanupUrls script
<https://coveralls.io/builds/32918158|Coverage Status> Coverage increased (+0.4%) to 88.582% when pulling *<https://github.com/cofacts/rumors-api/commit/f7f59ca8aa602bd990831912844ee06ace755da6|f7f59ca> on fix-cleanup-url* into *<https://github.com/cofacts/rumors-api/commit/a437fae1a9b9ae9339e1fed8e847bc6faf054642|a437fae> on master*.
#317 Remove Google translate toolbar by loading Google site translate after click
Currently in iOS system, Google translate will show toolbar no matter user has interacted with Translate widget or not, which covers up screen, especially for create reply dialog. <https://user-images.githubusercontent.com/108608/90317436-24773980-df5c-11ea-8f3a-a8e7f4440a91.png|image> This PR: • Initiates Google translate setup only after the user clicks "Google translate" button • Fixes hover & ripple effect of button / list item by providing a <https://material-ui.com/customization/palette/#dark-mode|dark theme> • Adjust sidebar style <https://user-images.githubusercontent.com/108608/90317600-3a392e80-df5d-11ea-8b3e-5ad3705ec848.gif|activate> • No translate toolbar at first; translate widget replaced with a "Google translate" button. • As soon as the user clicks "Google translate" button, Google site translate loads and toolbar is added The dark theme turns hover effect brighter (currently in production it darkens on hover, which is incorrect). The dark theme is required for `<Button variant="outlined">` to render in bright border and text. <https://user-images.githubusercontent.com/108608/90317665-9dc35c00-df5d-11ea-9985-f6254baa1707.gif|ripple>
components/ArticlePageLayout.js:140
``` filterObj.replyRequestCount = { GTE: replyRequestCount }; ```
#320 Remove weird replyRequestCount setup
Removes weird `replyRequestCount` setup because it is causing errors if an user is visiting Cofacts with legacy URL (with `replyRequestCount` in its URL, such as `<https://cofacts.org/articles?before=&after=&replyRequestCount=1`>) Also, it does not make sense to set `filterObj` without any condition. The line overrides the `replyRequestCount` filter set by `FILTERS.ASKED_MANY_TIMES`, thus it must be removed for `ASKED_MANY_TIMES` to work properly.
#321 Track rss, and add utm_source to each url that generated from feed.js
Fixes <https://github.com/cofacts/rumors-site/issues/222|#222>
#322 Excessive GraphQL calls on server side rendering
Although we have set `{ssr: false}` to some query, it's still invoked in server-side rendering. This puts extra load to SSR server. <https://user-images.githubusercontent.com/108608/91289900-85590a00-e7c5-11ea-8d2b-6027de59d3f7.png|image> Logger added to `BatchHttpLink`: ``` fetch: (uri, options) => { console.log( 'FETCH', options.body && (JSON.parse(options.body) || []).map( ({ operationName }) => operationName ) ); return fetch(uri, options); } ``` Related issue: <https://github.com/apollographql/react-apollo/issues/3130|apollographql/react-apollo#3130>, <https://github.com/apollographql/react-apollo/issues/3500|apollographql/react-apollo#3500>
YouTube
#324 DEV storybook docker build is broken
See: <https://dev.cofacts.org/storybook/index.html?path=/story/|https://dev.cofacts.org/storybook/index.html?path=/story/>* *Root cause* • In <https://github.com/cofacts/rumors-site/pull/323|#323> we are adding new components like `TimeInfo` to the storybook. It requires `process.env.LOCALE`. • Storybook only support custom variables <https://storybook.js.org/docs/react/configure/environment-variables|with `STORYBOOK_` prefix> • It is not practical to use such prefix because it requires us to change everywhere using the environment variable • Storybook actually loads `.env` file during build • Related code: <https://github.com/storybookjs/storybook/blob/c831408b26bc1faabe44ab4b09ed13d953a18f84/lib/core/src/server/manager/manager-webpack.config.js#L99-L104|https://github.com/storybookjs/storybook/blob/c831408b26bc1faabe44ab4b09ed13d953a18f84/lib/core/src/server/manager/manager-webpack.config.js#L99-L104> • It is using `dotenv-webpack` without reading env vars (not setting `systemvars` flag) to add `<http://process.env.xxx|process.env.xxx>` to `DefinePlugin` • It is also using its <https://github.com/storybookjs/storybook/blob/v5.3.17/lib/core/src/server/config/utils.js#L15|own mechanism> to load env from `.env` and `process.env` and populate `process.env` using `DefinePlugin` • 貴圈真亂 • This is why it's not breaking local storybook build, only occurs in Docker builds, where there is no .env file. *Proposed fix* There are multiple ways to fix: 1. Copy `.env.sample` to `.env` in Dockerfile before `build-storybook` • Pros: easy to achieve • Cons: due to how storybook handles `process.env` and `<http://process.env.XXX|process.env.XXX>`, this may cause weird inconsistency in the two `DefinePlugin`. • Result webpack config (using `--debug-webpack` flag): <https://user-images.githubusercontent.com/108608/91655981-83ee5100-eae7-11ea-89b3-7afa2ca67808.png|截圖 2020-08-30 下午5 35 04> 2. Write `LOCALE` to `.env` file in Dockerfile before `build-storybook` - Pros: contents of both `process.env` and `<http://process.env.XXX|process.env.XXX>` will be consistent, since they are all reading from .env file - Cons: we must add manually for each env vars to add to storybook build
#325 Convert IFTTT env vars to public runtime config
As discussed in slack: <https://user-images.githubusercontent.com/108608/91657109-20692100-eaf1-11ea-9789-2651bed4e572.png|image> This PR converts config to public runtime config
Comment on #315 Initial implementation of LineChart
<https://user-images.githubusercontent.com/1817638/91658891-a344a880-eafe-11ea-9526-dc81860cb3ce.png|Screen Shot 2020-08-30 at 8 18 31 PM> <https://user-images.githubusercontent.com/1817638/91658894-a50e6c00-eafe-11ea-83d2-d158a22bf5be.png|Screen Shot 2020-08-30 at 8 18 52 PM> <https://user-images.githubusercontent.com/1817638/91658892-a475d580-eafe-11ea-9811-d21892d15af3.png|Screen Shot 2020-08-30 at 8 18 43 PM> <https://user-images.githubusercontent.com/1817638/91658895-a5a70280-eafe-11ea-8a23-e3cd296bfe4d.png|Screen Shot 2020-08-30 at 8 21 08 PM>