niieani
Repos
183
Followers
320
Following
5

Log, test, intercept and modify Apollo Client's operations

100
8

Differences between Flowtype and TypeScript -- syntax and usability

1712
76

A small JavaScript library to generate YouTube-like ids from numbers.

3834
198

Bash Infinity is a modern standard library / framework / boilerplate for Bash

5388
230

SARS-CoV-2 BioNTech/Pfizer vaccine as MIDI

A template repository for creating Google Sheets scripts utilizing full potential of JavaScript ecosystem

31
1

Events

issue comment
Data loss when adding a note through the "share" option on mobile (or when adding a note before the plugin fully initializes)

Thank you for such a fast response and fix @vrtmrz! I will try it out. I'll do some testing, though since the problem was intermittent, I'll let you know if I still observe the issue in the future. If you don't hear back from me in a month in this thread you can consider it fixed. 🤞

Created at 1 week ago
Data loss when adding a note through the "share" option on mobile or when adding a note before a replication occurs

Steps to reproduce:

  1. device A: create a note "xyz"
  2. device A: add content "testing"
  3. device A: make sure the data is replicated to the backend
  4. device B: make sure the data is replicated from the backend
  5. device B: open the note "xyz", you should correctly see content "testing"
  6. device B: close the app
  7. device A: add more words to "xyz": " - some change"
  8. device B: using another app, e.g. Instagram, use the Share link to Obsidian, and select "choose file to add to", choosing "xyz"
  9. device B: the contents will now say: "testing - https://instagram.com/..."

What happens is that LiveSync will not try to resolve conflict here, and once it's synced it will just overwrite the file with the content from Device B. The new content from Device A (" - some change") is now lost.

This happened to me a few times, but thankfully I had been able to use the Snapshots feature to recover my notes. Now I started using Obsidian Git to just sync everything to git. But ideally I'd like LiveSync to present me with the "conflict resolution" box.

I think this happens because LiveSync plugin sometimes a long time to initialize on mobile devices (especially on Android, my iPad is much faster), so when you use the "Share" option the plugin is still initializing. LiveSync thinks the contents are newer (cause by date, they are), and it discards the content of the file from replication.

This also makes is impossible to use the "Open daily note on startup" feature of the built-in "Daily notes" plugin on more than one device, because it essentially will create a blank new file before the replication has started, so if you had the same file already create on another device, it would be overwritten. It would be great if there was logic to handle these cases.

Created at 1 week ago
Created at 1 week ago
opened issue
Add jest GH Actions reporter

https://jestjs.io/blog/2022/04/25/jest-28#github-actions-reporter

Created at 1 week ago
Created at 1 week ago
Created at 1 week ago
Created at 1 week ago
Created at 2 weeks ago
issue comment
Unsupported video formats still end up with <video> tag but never load

Hi @ramiresviana, I provided the sample file in the original post.

Created at 2 weeks ago
Created at 2 weeks ago
started
Created at 3 weeks ago
Created at 3 weeks ago
Created at 3 weeks ago
Created at 3 weeks ago
Created at 3 weeks ago
Created at 4 weeks ago
Created at 4 weeks ago
Created at 4 weeks ago
Created at 4 weeks ago
started
Created at 1 month ago
Created at 1 month ago
Created at 1 month ago
Created at 1 month ago
Created at 1 month ago
issue comment
Add an overload to `Object.fromEntries` when called with const tuples

@RyanCavanaugh thanks for taking a look. I can make an NPM library for that, sounds like the way to go, unfortunately.

It would be possible to make this much simpler, if we had these two things built-in in TypeScript:

  • When doing a mapped type, ability to conditionally set optionality. Right now, one can set the value using the X extends Y ? ... : ... pattern, but one cannot do it to add in or remove ? conditionally. Perhaps a special type like +? or -? to add or remove optionality in mapped types, and similarly to add or remove readonly property +readonly could be added? E.g. { [K in keyof O]: O[K] extends X ? X & +? : X & -? }
  • Ability to refine based on negation. E.g. only const tuples: T extends readonly [...unknown] & not [...unknown]

@webstrand the failing test case you mentioned is failing for a good reason - there's no way to create a predictable object from that type, so it should be handled by another overload and fallback to a less strictly typed type. And as you notice, your simplified version unfortunately isn't sound. Believe me I've spent hours trying to figure it out.

Created at 1 month ago
opened issue
The new NonNullable type doesn't work the same when combined with index types

Bug Report

🔎 Search Terms

NonNullable index

🕗 Version & Regression Information

  • This changed between versions 3.7.4 and 3.8.0

⏯ Playground Link

Playground link with relevant code

💻 Code

type EdgeWithEventsLike<Typename extends string = string> = {
  readonly events: ReadonlyArray<{ readonly __typename: Typename } | null>;
};

export type InnerEventTypename<EdgeWithEvents extends EdgeWithEventsLike> = NonNullable<
  EdgeWithEvents['events'][number]
>['__typename'];

🙁 Actual behavior

Type '"__typename"' cannot be used to index type 'NonNullable<EdgeWithEvents["events"][number]>'.

🙂 Expected behavior

No error.

Created at 1 month ago
Created at 1 month ago
Created at 1 month ago
Created at 1 month ago
Created at 1 month ago