text:
Babel-plugin-styled-components is not compiling my external library

Hello,
I am having issues using babel-plugin-styled-components for a specific use case.
I have two folders in a monorepo, that I run using yarn workspaces :

app, with my next.js app
ui , with my 'ui library' using styled-components

I created a git repo that reproduces the bug : https://github.com/lucleray/ssr-ui-library
To reproduce :

clone the repo
yarn install in the base folder
yarn run dev in app folder, yarn run dev in ui folder
Open http://localhost:3000 : the app render properly, without error
Go to ui/main.js and change background: yellow; to background: blue;
The browser updates properly (the background is blue!)
I refresh the browser, the background is back to yellow. I also get this error : Prop className did not match : Server: "sc-bdVaJa hZSvfd" Client: "sc-bdVaJa clQEcn"

I expect no error.
I would like to be able to build/watch my 'UI library' and see the updates directly in my app.
I have searched for solutions in the docs, but each of them didn't work :

declare styled-components as external (it's done in ui/rollup.config.js)
make styled-components a peer dependency

I don't think I'm running two instances of styled-components.
My guess would be that my UI files are not going through babel-plugin-styled-components, but I don't know how to force the plugin to transform them.
Thanks for your help 🙂

You probably need to add the plugin here? https://github.com/lucleray/ssr-ui-library/blob/master/ui/.babelrc

I just tried to do that, but I still have the same error :
Prop className did not match. Server: "main__UiButton-s1vypnr9-0 itDLCI" Client: "main__UiButton-s1vypnr9-0 jzgARf"
The names are matching for the first part, but not the second, i wonder why 🤔
Also, that's the css code generated (after reloading the page) :
/* sc-component-id: main__UiButton-s1vypnr9-0 */
.itDLCI{background:yellow;}.jzgARf{background:green;}

When I don't see any error, usually, it looks more like this :
/* sc-component-id: main__UiButton-s1vypnr9-0 */
.main__UiButton-s1vypnr9-0 {} .itDLCI{background:yellow;}

Not sure if it's relevant.

@lucleray I don't know about your issue but you should not use styled-components as a peer dependency but dependency.
styled-components is not a singleton so there is not reason to have it as a peer.

@lucleray I’ll f the first class matches and contains a component name that’s a good sign that the plugin is working as intended.
The second part hints at different CSS in your server and client code. In this case it looks like you might be applying a different background colour before or during React’s hydration.
I’d be happy to help you more but I’d need some code snippets to point this out 😬

@kopax I am making styled-components a peer dependency of my UI library only, like recommended here : https://www.styled-components.com/docs/faqs#i-am-a-library-author-should-i-bundle-styledcomponents-with-my-library
@kitten Here is the code : https://github.com/lucleray/ssr-ui-library 🙂

@lucleray see my edit :)
@kopax yea, that’s not quite factually correct. We do have singletons in terms of rehydration and accidentally adding SC to your app twice—which is also unnecessary either way—will trigger one instance of SC to “rehydrate” the other ones styles, which will lead to a confusing error

@kitten The repo contains a component that has background: yellow;
If you change it (for example to background: green;) and refresh the browser, you should see the error.
It seems like in this case, the client gets the new code, but not the server. Could this be related to my webpack server config ?

@lucleray yes, that might be the case. From what I can tell everything is working correctly :+1: So this is probably a (hot) reloading issue, I suppose.

@kitten You didn't see any error message in console ?
After you refresh the page, the background color was correct ?
On my side, the color is correct when the hot-reloader updates the page (the hot reloading seem to work fine).
But, once I refresh the page, then I see the error and the color is not correct.

@lucleray Sorry, I didn't have time to actually test it, but I'm confident that it's not an issue with this plugin or styled-components itself.
I'd suggest you visit some next.js docs. It might not be reloading your dependencies as expected, assuming that the external dependencies are treated differently 😅

Hi @lucleray, did you end up solving this. I am having the same issue as here/https://github.com/styled-components/babel-plugin-styled-components/issues/218: I have yarn workspaces, with a shared workspace for common code between two next.js projects. Styled components in the shared workspace are not properly being handled by babel-plugin-styled-components.

Solved this issue with https://stackoverflow.com/a/55748411/741970 (ie. https://github.com/josephluck/next-plugin-custom-babel-config)

authors: dminkovsky kitten kopax lucleray mxstbr


text:
Add Hack Club Design System to Ecosystem

🥰

Thanks! I might move this over to a showcase page if I ever put that together, but this is a good place for now :)

source: gharchive/pull-request

authors: jxnblk lachlanjc

repo: styled-system/styled-system

license: MIT

license_type: permissive

license_source: github-api


text:
Can't run Faker::Date.birthday

Looks like I can't run Faker::Date.birthday in Rails 4.2.5, Ruby 2.2.3
Do you need anymore info to reproduce this?
pry(main)> Faker::Date.birthday
ArgumentError: invalid date
0: /Users/kg/.rvm/gems/ruby-2.2.3/gems/faker-1.6.3/lib/faker/date.rb:35:in `new'
1: /Users/kg/.rvm/gems/ruby-2.2.3/gems/faker-1.6.3/lib/faker/date.rb:35:in `birthday'

https://github.com/ducthanh/faker/commit/7f8ed857bd0a228456baf864341ef32924824396 the issue was already raised. The issue happen because there is no 29 Feb in the some years ago. You can edit to work around like this code.

Thanks. Just figured that out too :)

I commented on https://github.com/ducthanh/faker/commit/7f8ed857bd0a228456baf864341ef32924824396, and I think better approach is something of sort:
      def last_day_of_past_february(today, years_ago)
        if today.day == 29 && today.month == 2 && !::Date.leap?(today.year - years_ago)
          today.day - 1
        else
          today.day
        end
      end

This way you will actually have a leap day birthday, when coming from a leap day, as today.

:+1:

This works in faker-1.6.3.
>> Faker::Date.birthday
=> #<Date: 1991-04-13 ((2448360j,0s,0n),+0s,2299161j)>

@vishaltelangre I've tested with freezed time in "2016/02/29" it doesn't work.

I've created pull request https://github.com/stympy/faker/pull/580. I think, it would be better increase or reduce the year instead day. Also change of year should be in range of min_age and max_age.

I've created pull request for this issue #580. I think, it would be better increase or reduce the year instead day. Also change of year should be in range of min_age and max_age.

source: gharchive/issue

authors: Bojole DelmerGA IlkhamGaysin KarlGl g-ilham lxhoang vishaltelangre

repo: stympy/faker

license: mit

license_source: bigquery


text:
Add threatminer

This PR aims to fix https://github.com/subfinder/research/issues/33

$ go test -run=Threatminer -v -bench=Threatminer

=== RUN   TestThreatminer
--- PASS: TestThreatminer (0.73s)
=== RUN   TestThreatminerMultiThreaded
--- PASS: TestThreatminerMultiThreaded (0.66s)
=== RUN   ExampleThreatminer
--- PASS: ExampleThreatminer (0.57s)
=== RUN   ExampleThreatminerMultiThreaded
--- PASS: ExampleThreatminerMultiThreaded (0.48s)

goos: darwin
goarch: amd64

BenchmarkThreatminerSingleThreaded-8   	       2	 645369760 ns/op
BenchmarkThreatminerMultiThreaded-8    	       2	 546720016 ns/op

PASS
ok  	_/research/core/sources	5.714s

repo: subfinder/research


text:
Feat: Showing all team members list

Describe the feature
As we are facilitating the feature of inviting more members to the team. It would be a good feature to show a list of them all.
Add ScreenShots
NA
Record

[X] I agree to follow this project's Code of Conduct
[X] I'm a GSSOC'24 contributor
[X] I want to work on this issue

Yes alryt ! @PranotiPD

This is being done by @Sid-80


text:
🛑 Cubari (MangaDex) is down

In 17123bf, Cubari (MangaDex) (https://cubari.moe/read/mangadex/d86cf65b-5f6c-437d-a0af-19a31f94ec55/?cache_buster=$GITHUB_RUN_NUMBER) was down:

HTTP code: 500
Response time: 170 ms

Resolved: Cubari (MangaDex) is back up in 4e43c55 after 6 minutes.

repo: subject-f/cubari-status-page


text:
🛑 Guya.moe Proxied is down

In 4337709, Guya.moe Proxied (https://ice.guya.moe/) was down:

HTTP code: 521
Response time: 118 ms

Resolved: Guya.moe Proxied is back up in 0da9c96 after 11 minutes.

repo: subject-f/guya-status-page


text:
Don't register folding ranges

Not supported by ST.

It's supported on LSP main but not released yet.

authors: deathaxe rchl

repo: sublimelsp/LSP-PowerShellEditorServices


text:
Migrate cluster creation & deployment logic to shipyard

Extracted the cluster creation and submariner deployment logic to shipyard so it can be reused by consuming projects.

Seems like @mkolesnik addressed all the feedback. Going ahead and merging so we can push on.

repo: submariner-io/shipyard


text:
[Docs] Libreswan by default

The following need to be updated to reflect that libreswan is now the default driver:

https://submariner.io/getting_started/architecture/gateway-engine/
https://submariner.io/operations/deployment/subctl/

Libreswan isn’t the default yet!

Libreswan isn’t the default yet!

Correct, this was done as a preparation for v0.8-rc. We can merge when the time is right

authors: nyechiel skitt

repo: submariner-io/submariner-website


text:
GW->Worker traffic is filtered by clouds sometimes (AKS & CIVO so far)

What happened:
In some cloud hosted k8s networks the traffic from remote clusters is filtered on it's way to worker nodes when there is no encapsulation packet between nodes (IP packets directly on wire) the clouds seem to filter based on the SRC of the IP packet and drop it before it arrives the worker node.
Sometimes, like the case of AKS or CIVO cloud, there is no way of tunning such firewall rules because they are internal to the cloud or auto-generated.
What you expected to happen:
That packets can always arrive from GW to worker node regardless of the cloud infrastructure or peculiarities.
How to reproduce it (as minimally and precisely as possible):
Connect two clusters on AKS with the AKS CNI, or on CIVO.
Anything else we need to know?:
Traffic captured on the GW node host network:
We can observe that the DNS requests
07:25:53.689591 c2:28:e8:06:5a:aa > 16:ad:76:7f:c8:94, ethertype IPv4 (0x0800), length 95: 10.42.2.5.60769 > 10.42.0.2.53: 59637+ A? whoami.default.svc.clusterset.local. (53)
07:25:53.689592 c2:28:e8:06:5a:aa > 16:ad:76:7f:c8:94, ethertype IPv4 (0x0800), length 95: 10.42.2.5.60769 > 10.42.0.2.53: 60079+ AAAA? whoami.default.svc.clusterset.local. (53)
07:25:53.692607 16:ad:76:7f:c8:94 > c2:28:e8:06:5a:aa, ethertype IPv4 (0x0800), length 95: 10.42.0.2.53 > 10.42.2.5.60769: 60079*- 0/0/0 (53)
07:25:53.692893 16:ad:76:7f:c8:94 > c2:28:e8:06:5a:aa, ethertype IPv4 (0x0800), length 146: 10.42.0.2.53 > 10.42.2.5.60769: 59637*- 1/0/0 A 10.254.7.33 (104)

That traffic from 16:ad:76:7f:c8:94  (10.42.0.2) to c2:28:e8:06:5a:aa  (10.42.2.5) seems to arrive correctly, because next we can see the response to the TCP open request on 10.254.7.33:
07:25:53.697643 16:ad:76:7f:c8:94 > c2:28:e8:06:5a:aa, ethertype IPv4 (0x0800), length 74: **10.254.7.33.**80 > 10.42.2.5.58608: Flags [S.], seq 1316000996, ack 2493336445, win 65160, options [mss 1460,sackOK,TS val 4206033920 ecr 535713345,nop,wscale 7], length 0
Which then repeats (because it never arrived to the worker node) because the 10.254.7.33 is probably filtered by the cloud network:
07:25:54.707999 16:ad:76:7f:c8:94 > c2:28:e8:06:5a:aa, ethertype IPv4 (0x0800), length 74: 10.254.7.33.80 > 10.42.2.5.58608: Flags [S.], seq 1316000996, ack 2493336445, win 65160, options [mss 1460,sackOK,TS val 4206034931 ecr 535713345,nop,wscale 7], length 0
We can see the worker node side of the TCP requests here:
W-HOST>tcpdump -i any port 80 -n -n
tcpdump: data link type LINUX_SLL2
tcpdump: verbose output suppressed, use -v[v]... for full protocol decode
listening on any, link-type LINUX_SLL2 (Linux cooked v2), snapshot length 262144 bytes
07:23:12.456769 vethb3dd092d P   IP 10.42.2.5.55892 > 10.254.7.33.80: Flags [S], seq 2884442205, win 64240, options [mss 1460,sackOK,TS val 535552114 ecr 0,nop,wscale 7], length 0
07:23:12.456769 cni0  In  IP 10.42.2.5.55892 > 10.254.7.33.80: Flags [S], seq 2884442205, win 64240, options [mss 1460,sackOK,TS val 535552114 ecr 0,nop,wscale 7], length 0
07:23:12.456796 vx-submariner Out IP 10.42.2.5.55892 > 10.254.7.33.80: Flags [S], seq 2884442205, win 64240, options [mss 1460,sackOK,TS val 535552114 ecr 0,nop,wscale 7], length 0
07:23:13.478504 vethb3dd092d P   IP 10.42.2.5.55892 > 10.254.7.33.80: Flags [S], seq 2884442205, win 64240, options [mss 1460,sackOK,TS val 535553136 ecr 0,nop,wscale 7], length 0
07:23:13.478504 cni0  In  IP 10.42.2.5.55892 > 10.254.7.33.80: Flags [S], seq 2884442205, win 64240, options [mss 1460,sackOK,TS val 535553136 ecr 0,nop,wscale 7], length 0
07:23:13.478540 vx-submariner Out IP 10.42.2.5.55892 > 10.254.7.33.80: Flags [S], seq 2884442205, win 64240, options [mss 1460,sackOK,TS val 535553136 ecr 0,nop,wscale 7], length 0

Environment:

Submariner version (use subctl version): 0.9.0
Kubernetes version (use kubectl version): N/A
Diagnose information (use subctl diagnose all):
Gather information (use subctl gather)
Cloud provider or hardware configuration:
OS (e.g cat /etc/os-release):
Kernel (e.g uname -a):
Install tools:
Others:

I was hit with these issue and was able to confirm with multiple configurations.

Set up 2 clusters on civo, one in LON1 and another in NYC1 region.
Deploy submariner

On eu-lon
subctl deploy-broker --globalnet --globalnet-cidr-range 10.254.0.0.0/16
> Label one node as gateway
subctl join broker-info.subm --cable-driver wireguard --label-gateway=false --clusterid=eu-lon --clustercidr 10.42.0.0/16 --natt=true
On us-nyc
> Label one node as gateway
subctl join broker-info.subm --cable-driver wireguard --label-gateway=false --clusterid=us-nyc --clustercidr 10.42.0.0/16 --natt=true

Verify tunnel connectivity

$ subctl diagnose firewall tunnel civo-us-nyc-kubeconfig civo-eu-lon-kubeconfig --verbose
 • Checking if tunnels can be setup on Gateway node of cluster "us-nyc".  ...
 ✓ Checking if tunnels can be setup on Gateway node of cluster "us-nyc".
 ✓ tcpdump output from Sniffer Pod on Gateway node
 ✓ 526dd806
526dd806
526dd806
526dd806
526dd806
E....& .>.H............. ..N526dd806
526dd806
526dd806
526dd806
526dd806

 ✓ Tunnels can be successfully established on the Gateway node.

Deploy and export a service on eu-lon

---
kind: Deployment
apiVersion: apps/v1
metadata:
  name: whoami
  namespace: default
spec:
  replicas: 2
  selector:
    matchLabels:
      app: whoami
  template:
    metadata:
      labels:
        app: whoami
    spec:
      containers:
        - name: whoami
          image: containous/whoami
---
apiVersion: v1
kind: Service
metadata:
  name: whoami
  namespace: default
  labels:
    app: whoami
spec:
  type: ClusterIP
  ports:
    - port: 80
      name: whoami
  selector:
    app: whoami
---
apiVersion: multicluster.x-k8s.io/v1alpha1
kind: ServiceExport
metadata:
  name: whoami
  namespace: default

Verify DNS

kubectl exec -it po -n kube-system  local-path-provisioner-xxx
/ # nslookup whoami.default.svc.clusterset.local
Server:         10.43.0.10
Address:        10.43.0.10:53

Name:   whoami.default.svc.clusterset.local
Address: 10.254.7.33

Connect to service (Error)

/ # wget -SO- whoami.default.svc.clusterset.local
Connecting to whoami.default.svc.clusterset.local (10.254.7.33:80)

A solution which would avoid this in AKS & CIVO clouds, would be using also vx-submariner to encapsulate the GW->worker traffic also in vx-submariner for any traffic that belongs to remote routes, a POC was performed manually with:
# ip r
default via 192.168.1.1 dev enp1s0 proto dhcp src 192.168.1.6 metric 100
10.42.0.0/24 dev cni0 proto kernel scope link src 10.42.0.1
10.42.1.0/24 via 192.168.1.8 dev enp1s0
10.42.2.0/24 via 192.168.1.9 dev enp1s0
192.168.1.0/24 dev enp1s0 proto kernel scope link src 192.168.1.6
240.0.0.0/8 dev vx-submariner proto kernel scope link src 240.168.1.6

# ip rule add from 10.254.0.0/19 lookup 149
# ip route add 10.42.1.0/24 via 240.168.1.8 dev vx-submariner table 149
# ip route add 10.42.2.0/24 via 240.168.1.9 dev vx-submariner table 149

please note that in this case 10.254.0.0/19 is a globalnet range.
Also, from the bridge fdb tables, we had to remove the self-host on the gateway to avoid
packet looping through vx-submariner when the destination of a packet is still not known.
bridge fdb del 00:00:00:00:00:00 dev vx-submariner dst 192.168.1.3 self permanent

I have also seen instances of this happening in GKE if the firewall config didn't work for some reason.
I strongly believe we should tackle this during 0.11

i am seeing issue in GKE as well, subctl version 0.9.1 , dns name nginx.nginx-test.svc.clusterset.local is resolving to correct ip , but curl to that address and port 8080 is timing out. used the correct firwall rules mentioned in https://submariner.io/getting-started/quickstart/managed-kubernetes/gke/

A solution which would avoid this in AKS & CIVO clouds, would be using also vx-submariner to encapsulate the GW->worker traffic also in vx-submariner for any traffic that belongs to remote routes, a POC was performed manually with:

The problem (and reason for not doing this initially) is that you don't know on which node the dest ip resides, and we were counting on the CNI to deliver the packets properly (which is should do similarly to traffic arriving from the internet AFAIK unless K8s does NAT-ing on incoming traffic as well?).
We could theoretically handle this via cloud prepare, eg if we know the underlying cloud provider then some engine (operator? gateway? new one?) can make sure to open internal firewall rules for remote clusters.
Another option is, since in GN 2.0 we switched to "squatting" a reserved CIDR it should not be filtered (AFAICT this problem happens due to private CIDR subnets being used but I might be wrong). In such a case using GN this problem shouldn't manifest I guess.

I have also seen this in Oracle OKE.
The limitation with 'cloud prepare' is that not all managed providers allow this inter-node firewall modifications.

Cloud-prepare alone will not help for what I've seen, in some environments
it's not even possible, in GKE for example it is, but not in azure or
amazon's kubernetes.
So I think we should encapsulate also the GW->worker traffic via
vx-submariner, then it also makes it all more symmetric and easier to debug.
On Wed, Jul 28, 2021 at 2:48 PM jawabuu @.***> wrote:

I have also seen this in Oracle OKE.
The limitation with 'cloud prepare' is that not all managed providers
allow this inter-node firewall modifications.
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
https://github.com/submariner-io/submariner/issues/1336#issuecomment-888280996,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAI7G4QTORRXWOJWZRGFSHTTZ74DHANCNFSM4475N5GA
.

--
Miguel Ángel Ajo  @mangel_ajo https://twitter.com/mangel_ajo
OpenShift / Kubernetes / Multi-cluster Networking team.
ex OSP / Networking DFG, OVN Squad Engineering

authors: gopaljayanthi jawabuu mangelajo mkolesnik

repo: submariner-io/submariner


text:
Re-label menu "Manuscript | Metadata" into "Manuscript | Details" or "Manuscript | Advanced" or something like that to avoid using the word "metadata" which is confusing in the context of a figure/data/metadata authoring tool:

I think "Details" is a good suggestion. @Melissa37 would that work for eLife as well?

Yes! Good idea

Done via #1184

authors: Melissa37 evabenitoembo michael oliver----

repo: substance/texture


text:
Implement glossary

This can be used for definitions which can then be referenced in the manuscript.

(Hi, only comments to check if I am in the right direction)
At this moment <glossary> element is not at the "Simple JATS" of docs/TextureArticle. Yes, is an useful element in my opinion... But let's check in deep:

There are no simpler alternative as <p> staring with terms in bold, because lack of glossary-semantic. The <list list-type="simple"> is simpler but the adaptations may be complex...

There are similar-semantic element, <def-list> that can generate some confusion... Perhaps this discussion is about both, glossary and def-list.

Is useful and a "in use" documental structure:

Generic glossaries are in use in nowadays, the analog tag in HTML was porpused in ~1995 as <dl> element... And was preserved  as it, in HTML3, HTML4 and HTML5.

Scientific literature use it in nowdays. (need sources to assertion?)

...?  ... Substance JATS corpus statiscs (exist?) show some significative  frequence of use of  glossary or def-list tags?

...?  ... Substance Manuscript corpus statiscs (exist?) show some significative "intention of use"? Perhaps the HTML Manuscripts have some occurences of dl.

authors: michael ppKrauss


text:
Pre-2.0 cut and version page fixes

I am building on top of Joshy branch (joshy-toc).

made a pre-2.0 cut
move the getting-started.md doc page into overview. There is some kind of name clashing, and rendering the wrong page before
Some enhancement on version.js page
In my machine (macOS), those .js extensions give me error. I also wonder why they didn't before. So they are removed.

View the staging site at https://staging.substrate.dev/  (clear your cache, or use incognito mode to open it)

Awesome job @jimmychu0807 The getting-started clash is what tripped me up.
@riusricardo already approved my commits in #403 and I'm approving Jimmy's here.


text:
Would be nice to see 'create date' of uploaded files

When we look at list of files & templates, if same file was uploaded twice, it's not possible to detect which one is old, which is newer (only by md5 of sha hash, but that's not convenient). So, for such cases 'create date' field will be helpful. Please, add 'create date' to both list and info REST endpoints.

authors: emli samsonbek

repo: subutai-io/gorjun


text:
Apt repository panic

Uploading non-deb file to gorjun's apt repository causes daemon panic:

Need to add initial check before trying to unpack and parse uploaded file

Fix merged


text:
Great repo

Anyone knows if there's a repo for awesome cross-platform apps that aren't web based (e.g., Qt, GTK, Flutter, native, etc)?

if you wana make great gui apps without web based use QT its modern allow you to code styles in css ans its supports python and c++ and more.

why don't we create an  awesome-cross-platform-apps-that-aren't-web-based project for this?

I guess there are non-web-based alternatives also listed here. Right?

I guess there are non-web-based alternatives also listed here. Right?

This repo is for frameworks, it will be cool to have one for applications that are cross-platform but not web based.

This repo is for frameworks, it will be cool to have one for applications that are cross-platform but not web based.

I think it makes sense what you're saying and requesting here

Check out Sciter

Guys, please follow my project: awesome-strategies-crossplataform-apps. Here I describe how to make crossplatform apps the right way.  I'm writing about cross-platform creation strategies.  Maybe this contributes a lot here.

@sudhakar3697 Close issue

authors: arjunmenon lucasnuic nuttyartist sudhakar3697 wesamdev


text:
Update 129 TOC and Question README.md

Minor modifications

Thanks @Benappiahpoku

authors: Benappiahpoku sudheerj

repo: sudheerj/reactjs-interview-questions


text:
🛑 Sudo API (/health) is down

In 55c938e, Sudo API (/health) (https://sudoapi.xyz/v1/health) was down:

HTTP code: 502
Response time: 6108 ms

Resolved: Sudo API (/health) is back up in a678e32.

repo: sudoswap/upptime


text:
Highlight current nav-item in sidebar-menu to improve overview

https://sumcumo.github.io/nuxt-styleguide/docs/configuration/

Here Configuration in the left sidebar should be highlighted in a way.
If navigating through a long list of components it's easy to get lost where you actually are.

released with @sum.cumo/nuxt-styleguide@5.2.1

authors: Xiphe escapedcat

repo: sumcumo/nuxt-styleguide


text:
otp verification is getting failed

starting with +91. as i put my number, it shows as verification failed. I tried using other numbers as well but still could not help

Varification failed

kya kisi ka solve hua

same issue

same issue

Same issue

repo: sumithemmadi/truecallerjs


text:
🛑 SISTEMA ROYAL-HOLIDAY is down

In c44637f, SISTEMA ROYAL-HOLIDAY (https://www.royalholiday.com.ar/reservas/admin/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: SISTEMA ROYAL-HOLIDAY is back up in 77a5bfa.


text:
timing issue with summernote 0.7.3

I don't know why this doesn't affect 0.7.2, but it doesn't.
A-S code inside this.active:
     var updateNgModel = function() {
        var newValue = element.summernote('code');
        if (element.summernote('isEmpty')) { newValue = ''; }
        if (ngModel && ngModel.$viewValue !== newValue) {
          $timeout(function() {   //<<<<<<<<<Timeout 2
            ngModel.$setViewValue(newValue);
          }, 0);
        }
      };
     callbacks.onChange = function(contents) {
        $timeout(function() {   //<<<<<<<Timeout1
          if (element.summernote('isEmpty')) { contents = ''; }
          updateNgModel();
        }, 0);
        $scope.change({contents:contents, editable: $scope.editable});
      };

In this order (this is on init):

Model set to Value1
onChange is called with Value1, Timeout1 calls updateNgModel, which makes Timeout2.
Model is set to Value2
onChange is called again with Value2, which Triggers Timeout1, which calls updateNgModel, but does not create another Timeout 2.
Timeout2 is now run, overwriting the up-to-date Value2, with the old Value1, on the Model.

Expected: Value2
Got: Value1
Fix: Would be for Timeout2 to check to see if 'updateNgModel' has been called again since it was created, and if so, do nothing.

Could you check it in v0.8?

authors: outsideris shadybones

repo: summernote/angular-summernote


text:
setmetatable shadowes initialized fields while using a class definition

How are you using the lua-language-server?
Visual Studio Code Extension (sumneko.lua)
Which OS are you using?
Windows
What is the issue affecting?
Diagnostics/Syntax Checking
Expected Behaviour
initialField should be recognized as boolean.
Actual Behaviour
initialField is not recognized.
Reproduction steps

---@class MyClass
local MyClass = {}

function MyClass:new()
	---@class MyClass
	local myObject = setmetatable({
		initialField = true
	}, self)

	if myObject.initialField then
		-- q.e.d.
	end
end

Additional Notes
No response
Log File
No response

I'm not sure what you are trying to do here. Are you trying to get the initialField field to show up under MyClass using setmetatable? You can remove the @class annotation to get the inferred type from setmetatable.
If you are trying to assign myObject the MyClass type, add a @field to your MyClass and use @type:

---@class MyClass
---@field initialField boolean
local MyClass = {}

function MyClass:new()
    ---@type MyClass
    local myObject = setmetatable({
        initialField = true
    }, self)

    if myObject.initialField then
        -- q.e.d.
    end
end

I'm trying to avoid annotation duplication. For instance this works and adds those fields in the class itself, rather than in just the instance inside new:
---@class functional
local fun = { }

function fun:new(state, func, init)
    ---@class functional
    return setmetatable({
        _state = state,
        _func = func,
        _init = init
    }, self)
end

return fun

Originally posted by @sumneko in https://github.com/sumneko/lua-language-server/issues/1564#issuecomment-1251882449
So I would expect, that my example would work equivalently.

authors: carsakiller sewbacca

repo: sumneko/lua-language-server


text:
Support web

Hello there
First of all thank you and all contributors for this awesome package.
I just seen that it does not support web due to a dart:io dependency in package:pixel_snap/src/generated/widgets.dart.
Is there a plan or aim to support web by fixing or replacing pixel_snap ?

Ignore the automatic tagging, it already supports the web. The web docs itself built on top of Flutter. Plan to remove pixel_snap? after this bug is resolved.


text:
Is PMS still maintained or has been abandoned?

As of now, it doesn't work.

Right click and click open instead of double clicking. If that doesn't work it's probably in quarantine. Take it out by running this command in terminal: xattr -c /Applications/PimpMyStremio

authors: carsuki lothar-cell

repo: sungshon/PimpMyStremio


text:
第一章: 单例模式 - 孙半仙人的博客

https://www.xiaoquanya.com/#/md/idea-plugin/设计模式/2022-03-08-单例模式
Description

111


text:
Issue using history_prompt

I'm getting an issue when trying to generate audio with this code:
from bark import SAMPLE_RATE, generate_audio, preload_models
from scipy.io.wavfile import write as write_wav
import sounddevice as sd
preload_models()
prompt = "Hello, my name is Suno. And, uh — and I like pizza. [laughs] But I also have other interests such as playing tic tac toe."
history_prompt = "P:/AI-Audio/bark/bark/bark/assets/prompts/v2/en_speaker_9.npz"
audio_array = generate_audio(prompt, history_prompt=history_prompt)
Play audio
print("Playing audio...")
sd.play(audio_array, SAMPLE_RATE)
sd.wait()
print("Audio playback complete.")
If I use no history prompt I get no issue and it generates and plays fine, however when adding the prompt it errors out with:
Traceback (most recent call last):
File "p:\AI-Audio\bark\Barktest.py", line 11, in
audio_array = generate_audio(prompt, history_prompt=history_prompt)
File "C:\Users\Yoko\AppData\Local\Programs\Python\Python310\lib\site-packages\bark\api.py", line 77, in generate_audio
x_semantic = text_to_semantic(text, history_prompt=history_prompt, temp=text_temp)
File "C:\Users\Yoko\AppData\Local\Programs\Python\Python310\lib\site-packages\bark\api.py", line 23, in text_to_semantic
x_semantic = generate_text_semantic(
File "C:\Users\Yoko\AppData\Local\Programs\Python\Python310\lib\site-packages\bark\generation.py", line 351, in generate_text_semantic
assert (history_prompt in ALLOWED_PROMPTS)
AssertionError
I am still new to coding and python so go easy on me if I'm overlooking something. Thanks!

It is interpreting the way you called that as the name of a default Bark voice instead. Or maybe it can't find your history prompt .npz file. But either way it's basically just not finding the voice. Try using a relative path, or if it's a default voice 'en_speaker_9' by itself. Or use no voice just to test that it works.

authors: JonathanFly Yokopops

repo: suno-ai/bark


text:
Release/0.8.8

What kind of change does this PR introduce?
Fixes to support the auth 4.0 release
What is the current behavior?
Currently relies on the auth 3.x release
Additional context
Probably should rely on a 4.0.1 cut of auth, if the bug fixes from https://github.com/supabase-community/gotrue-csharp/pull/60 are released this PR probably should be updated to that 4.0.1

Waiting to merge gotrue-csharp@4.x until I get a releases for postgrest-csharp@3.2.x and realtime-csharp@6.x done!

Anything I can do to help?  :)

I wound up writing this script to help me sort things out. https://gist.github.com/wiverson/45a370ead1919e9f44ad78ec90a9b8c2
I think I may need to tweak it to use git sparseCheckout so I can get source all in one Unity project w/o pulling in the rest of the repos (e.g. base project modules, examples, etc). Hmm.

Sure! You're welcome to look at supabase-community/postgrest-csharp#65 or supabase-community/realtime-csharp#28!
That script is really cool - agreed on the sparse checkout, you probably don't want all that extra stuff in there!

FYI took some time to look at postgrest-csharp#65 and looks like it's got two open broken tests. LMK when you get that sorted. I'll take a look at realtime next.

It looks like realtime doesn't have a docker config, the test version is pointed at a live supabase instance is my guess?

Indeed - I'm working on realtime channels/presence/broadcast right now. The docker setup was unfortunately rather convoluted the last time I tried, so I moved it to a live "testing" instance that's whitelisted for that purpose on supabase's hosted service. Moving it back to local testing is part of this cleanup/refactor!

Cool. I don't know enough about linq to sort out those two broken tests in postgrest w/o a bunch of research (linq isn't used in Unity dev much for a variety of reasons). I really don't want to send in PRs w/o a test suite for realtime. :)
FWIW the changes for the updated auth in the parent supabase client are pretty minor. If you want to kick out an updated version of the parent client that just includes the new auth that would be awesome. Do you think it'll be more than a few days for the postgrest & realtime?

lol totally understood! I'll take a gander.
It's a breaking API change on how events work, even if they are minor. I suppose they still have essentially the same signatures (at least pretty close)... I could do a v0.10.0 release on these?

Available in v0.10.0!

authors: acupofjose wiverson

repo: supabase-community/supabase-csharp


text:
test db process gets killed while installing pgTAP

Describe the bug
Running supabase test db dies while installing pgTAP from CPAN.
To Reproduce
Steps to reproduce the behavior:

create a trivial test script that just check is auth.users is defined (not sure this is even necessary)
run npx supabase test db

The test script:
BEGIN;
SELECT plan(1); -- only one statement to run
SELECT has_column('auth', 'users', 'id', 'id should exist');
SELECT * FROM finish();
ROLLBACK;

Expected behavior
The test should run and pass.
Screenshots
[Vicks-M1-Air]% npx supabase test db --debug
Supabase CLI 1.106.1
2023/10/24 17:19:59 Sent Header: Host [api.moby.localhost]
2023/10/24 17:19:59 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/10/24 17:19:59 Sent Header: Content-Length [2048]
2023/10/24 17:19:59 Sent Header: Content-Type [text/plain]
2023/10/24 17:19:59 Send Done
2023/10/24 17:19:59 Recv First Byte
2023/10/24 17:19:59 Sent Header: Host [api.moby.localhost]
2023/10/24 17:19:59 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/10/24 17:19:59 Sent Header: Content-Length [1225]
2023/10/24 17:19:59 Sent Header: Content-Type [application/json]
2023/10/24 17:19:59 Send Done
2023/10/24 17:19:59 Recv First Byte
/bin/bash: line 8:  7335 Done                    echo
      7336 Killed                  | cpan -T TAP::Parser::SourceHandler::pgTAP &> /dev/null
2023/10/24 17:20:07 Sent Header: Host [api.moby.localhost]
2023/10/24 17:20:07 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2023/10/24 17:20:07 Send Done
2023/10/24 17:20:07 Recv First Byte
error executing command

Desktop (please complete the following information):

OS: macOS 14.0 on M1 Macbook Air
Browser (if applicable) [e.g. chrome, safari] n/a
Version of CLI [e.g. v1.60.0] 1.106.1
Version of supabase-js (if applicable) [e.g. v2.22.0] 2.38.2
Version of Node.js (if applicable) [e.g. v16.20.0] v20.8.1

Additional context
I'm not running Docker Desktop, just plain CLI docker using an Alpine linux VM with colima. Everything else works splendidly.
The tests used to run just fine. I updated my schema today and wanted to re-run tests and add more before pushing to staging and production, but I ran into this error. It has been a while since I ran the tests so I don't know what version was working before.

To help us debug, could you run supabase services and report the output here?

[Vicks-M1-Air]% npx supabase test db
/bin/bash: line 8:  8637 Done                    echo
      8638 Killed                  | cpan -T TAP::Parser::SourceHandler::pgTAP &> /dev/null
error executing command
Try rerunning the command with --debug to troubleshoot the error.
[Vicks-M1-Air]% npx supabase services

        SERVICE IMAGE      │        LOCAL         │ LINKED
  ─────────────────────────┼──────────────────────┼─────────
    supabase/postgres      │ 15.1.0.117           │ -
    supabase/gotrue        │ v2.99.0              │ -
    postgrest/postgrest    │ v11.2.0              │ -
    supabase/realtime      │ v2.10.1              │ -
    supabase/storage-api   │ v0.40.4              │ -
    supabase/edge-runtime  │ v1.22.3              │ -
    supabase/studio        │ 20231023-7e2cd92     │ -
    supabase/postgres-meta │ v0.68.0              │ -
    supabase/logflare      │ 1.4.0                │ -
    bitnami/pgbouncer      │ 1.20.1-debian-11-r39 │ -
    darthsim/imgproxy      │ v3.8.0               │ -

[Vicks-M1-Air]%

On a hunch, I bumped my docker VM's RAM to 4GB and it succeeded. The default was 2GB.
[Vicks-M1-Air]% npx supabase db test
supabase/tests/supabase/auth-users.sql .. ok
All tests successful.
Files=1, Tests=1,  0 wallclock secs ( 0.01 usr  0.00 sys +  0.01 cusr  0.00 csys =  0.02 CPU)
Result: PASS

I was expecting that once the initial install completed I could lower the RAM back to 2GB for the docker VM, but after stopping/reconfiguring/starting when I ran the test it was killed again trying to install the cpan module. The mid-point of 3GB seems to be enough RAM so I will leave it at that for now (my laptop only has 8).
Why does the docker image need to reinstall the pgTAP modules every time we run db test?

Why does the docker image need to reinstall the pgTAP modules every time we run db test?

This might have been a side effect of db reset which recreates the database container.
I will repurpose this issue to improve the pgTAP installation process. One possible approach is to use a separate container for running tests.

authors: sweatybridge vickkhera

repo: supabase/cli


text:
chore: increase health check timeout

What kind of change does this PR introduce?
Bug fix, feature, docs update, ...
What is the current behavior?
Please link any relevant issues here.
What is the new behavior?
Feel free to include screenshots if it includes visual changes.
Additional context
Add any other context or screenshots.

Pull Request Test Coverage Report for Build 3152479583

0 of 2 (0.0%)  changed or added relevant lines in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 39.718%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

internal/start/start.go
0
2
0.0%

Totals

Change from base Build 3129171075:
0.0%

Covered Lines:
1999

Relevant Lines:
5033

💛  - Coveralls

authors: coveralls sweatybridge


text:
Seemingly impossible to handle auth flow yourself

Bug report

[x] I confirm this is a bug with Supabase, not with my own application.
[x] I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug
My app lets users Sign in with Steam, which uses OpenID 2.0. I have implemented this in my SvelteKit app with the help of node-steam-openid. It simply returns the user's unique steam_id once authenticated.
I need to then link this with Supabase auth, in order to create policies like this example on my public.users table:
((((auth.jwt() -> 'user_metadata'::text) ->> 'steam_id'::text))::bigint = steam_id)

I want to use SSR sometimes, so I was trying to follow the SvelteKit auth-helper example.
However, the bug is that there is seemingly a blind spot for auth that works like this. I can't create a user without supplying an email/password, which clearly does not apply in this case.
Am I missing something, or is there absolutely no way to use Supabase RLS auth (including letting it handle sessions, refresh tokens etc.,) unless you use email/password, one of the OAuth providers, phone, magic link, SSO, or OTP? I've been really shocked by this after banging my head against the wall for several days.

Hey @oliv-tree, unfortunately, we don't really support creating a user through a custom token (in this case, the steam_id). However, as a workaround, you can always just the POST /admin/users method to create a user with email + a random password and set email_confirm = true. Are you able to get the steam user's email from the API? If you aren't able to get a steam user's email, you can come up with a fake email like <steam_id>@example.com.

hey @oliv-tree, i'm gonna be closing this PR since it has been stale for a month, but feel free to reopen it if you wish to discuss this further

authors: kangmingtay oliv-tree

repo: supabase/gotrue


text:
Missing "Confirm reauthentication" email template

Bug report

[x] I confirm this is a bug with Supabase, not with my own application.
[x] I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug
There is no customizable email template for the "Confirm reauthentication" email that gets sent after calling supabase.auth.reauthenticate().
To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:

In the Supabase Dashboard, select a project and go to:  Authentication > Email Templates
Notice there is no customizable email template for the "Confirm reauthentication" email.

Expected behavior
To be able to customize the "Confirm reauthentication" email.
Additional context
I asked about this in the discussions section here, but @GaryAustin1 pointed out that this supabase.auth.reauthenticate() feature was only recently added about 3 weeks ago (https://github.com/supabase/gotrue/issues/1015), and he suggested I open an issue about this in this repo.

Since this is about a missing feature in the Supabase dashboard, it should probably be opened directly in the https://github.com/supabase/supabase repository. (Or you can just wait for someone in the Supabase team to transfer this issue :)

Good point.  I'll transfer it there.


text:
use custom sms provider #385

What kind of change does this PR introduce?
feature
What is the current behavior?
Using custom (Unlimited) SMS Provider for sending OTP
What is the new behavior?
There is a new optional boolean param named "send_otp" that controls whether the API sends the OTP code to the SMS Provider or not, since the default value is true it will not break the current behavior.
Current Behavior
curl -X POST 'https://tqfkjdmpohkqylveukuhsy.supabase.net/auth/v1/otp' \
-H "apikey: <SERVICE_KEY>" \
-H "Content-Type: application/json" \
-d '{
  "phone": "6212312312312"
}'
{}

With new Param
curl -X POST 'https://tqfkjdmpohkqylveukuhsy.supabase.net/auth/v1/otp' \
-H "apikey: <SERVICE_KEY>" \
-H "Content-Type: application/json" \
-d '{
  "phone": "6212312312312",
  "send_otp": false
}'
{"otp":"414995"}

(edited)
Recently I realized that the current behavior on "/otp" route is didn't require admin credentials, so adding send_otp parameter and returning the OTP code in that URL is not safe.
I decided to add a new route inside of "/otp" that is "/otp/phone" and use requireAdminCredentials on it, so the behavior of "/otp" is still the same like current behavior, and when we request to "/otp/phone" it need a SERVICE_ROLE_KEY
Current Behavior
curl -X POST 'https://tqfkjdmpohkqylveukuhsy.supabase.net/auth/v1/otp' \
-H "Content-Type: application/json" \
-d '{
  "phone": "6212312312312"
}'
{}

New Route
curl -X POST 'https://tqfkjdmpohkqylveukuhsy.supabase.net/auth/v1/otp/phone' \
-H "apikey: <SERVICE_KEY>" \
-H "Content-Type: application/json" \
-d '{
  "phone": "6212312312312", }'
{"otp":"414995"}

Honestly, I'm not sure about the route name, and request method.
Please let me know if you have feedback.

Hi @novanda1, on second thought, it will be much cleaner for us to modify the /admin/generate_link endpoint to one that takes in a phone field and type field. This would allow users to generate a link or otp for email or phone confirmations. The endpoint name will probably have to be renamed and we'll be discussing this internally to figure out what makes sense.


text:
fix: usage of net schema when the postgres role misses privileges

Related to https://github.com/orgs/supabase/discussions/21450.
Notes

Only the usage privilege on schema net should be required.
Also add GRANT on sequences to PUBLIC. See https://github.com/citusdata/pg_cron/blob/main/pg_cron--1.4--1.4-1.sql.

Is this ready for review? There's no code/SQL changes

Follow up on https://github.com/supabase/pg_net/pull/158

authors: soedirgo steve-chavez


text:
return signed url as signedUrl

matches the method name createSignedUrl

:tada: This PR is included in version 1.8.0-next.5 :tada:
The release is available on:

GitHub release
npm package (@next dist-tag)

Your semantic-release bot :package::rocket:

:tada: This PR is included in version 2.0.0-rc.1 :tada:
The release is available on:

GitHub release
npm package (@rc dist-tag)

Your semantic-release bot :package::rocket:

authors: inian kiwicopple

repo: supabase/storage-js


text:
Support for multi-environment variables

The project's location in my staging environment and production environment differs, so I cannot hardcode the full path within the Buttonbox config. I wish to use multi-environment variables, as described in the Craft CMS docs.
I have a multi-environment variable called basePath, which points to the project's root folder (some/folder/to/project/craft) on my staging server. On my production server, the path might differ (some/other/folder/to/project/craft).
When using multi-environment variables, as described in the docs, Buttonbox just urlencodes the variable. Let's say my general.php says that 'baseUrl'  => 'http:/www.some.site/some/folders/to/project'. So when I enter {baseUrl}/admin/resources/images/icon.png, it should render http:/www.some.site/some/folders/to/project/admin/resources/images/icon.png. But it renders it as %7BbaseUrl%7D/admin/resources/images/icon.png.

Here's what I did to buttonbox/templates/buttons/field.html:
      {% if option.imageUrl %}
        {% if option.imageUrl matches '/{[^}]*}/' %}
          {% set envVariable = option.imageUrl | replace('/.*{([^}]*)}.*/', '$1') %}
          {% set envVariable = craft.config.environmentVariables[envVariable] %}
          {% set envImageUrl = option.imageUrl | replace('/{[^}]*}/', envVariable) %}
        {% endif %}
      <img src="{{ envImageUrl ?? option.imageUrl }}"{% if option.showLabel %} class="buttonbox-buttons__with-label"{% endif %} {% if not option.showLabel %} title="{{ optionLabel }}"{% endif %} />
      {% endif %}

Hi Haabe,
You don't need to provide full path to the project. You can have your icons saved in public folder. Lets say you have your icons saved in a files folder within public folder, then the path to the icon would be /files/icon.png. It would work regardless of your different environments setup.
Hope that helps.
Many thanks

Yeah, well our different server setups make use of the public root folder difficult, whereas we've been using the multi-environment variables.
I've provided you with an example code on how to handle it. It'd be nice to see it implemented.

Hi,
We will definitely support environment specific variables in the future but I'm afraid won't be straight away as we have triggers field using URLs too.
In the meantime, you could fork this repo and implement your solution as a temporary fix.
Many thanks

repo: supercool/buttonbox


text:
Non-default page size

LiteFS is tested against the default 4KB page size, however, it should be able to handle any page size from 512 bytes to 64K.

Yeah, that's an easy fix to put in there. If implementing this issue takes too long then I'll do that. 👍

repo: superfly/litefs


text:
Implement HTTP proxy for primary redirection & consistency

This pull request implements a thin HTTP proxy that can run in front of an application and automatically handle primary redirection & TXID consistency tracking. This works for applications that use read-only GET requests and only use a single SQLite database.
It implements the following:

For non-GET requests on a replica, a fly-replay is returned to automatically forward to the primary.
For non-GET requests on the primary, a __txid cookie is set with the current database TXID.
For GET requests on a replica, it will wait until the database catches up to the TXID stored in the cookie.

Fixes #269
Configuration
To enable the proxy, you need to set several fields in the proxy section of the config:
proxy:
  # Bind address for the proxy to listen on.
  # This should match your "services.internal_port" in your fly.toml
  addr: ":8080"

  # Hostport of your application. You'll need to change the port on your
  # application so Fly only talks to it through the proxy.
  target: "localhost:8081"

  # Filename of the SQLite database you want to use for TXID tracking.
  db: "my.db"

  # If true, this enables verbose debug logging for the proxy.
  debug: false

@kentcdodds I have tests around the primary redirection and that works but I'm going to fire it up on a Fly.io test app and make sure the TXID consistency tracking is working on replicas. It's hard to test that locally since it happens really fast in tests.
This is still very much a work in progress! Please don't deploy to production! ;)

This is great!
All that is good to know!
To be clear, I can have multiple sqlite databases, but I can only specify one of them as the one for txid tracking right? That's fine for my use cases, I just wanted to be sure.
This is a pretty elegant solution I think.

Yes, that’s correct. Multiple databases is fine. I had thought about allowing a list of databases to use for TXID tracking but that seemed overly complicated.

Worked in a simple case, now I'm trying it on my own site to see if it works for a complex case.
One thing I want to double check is that it doesn't override the set-cookie header that the target server already set.

Should we ever delete the txid cookie? Seems reasonable to do that just in case they get to a high cookie and then we deploy a new instance of our app where the txid starts over. If we never delete the cookie then users would always get directed to primary until the new db caught up.

Should we ever delete the txid cookie?

I added the expiration in case someone needed to revert their database snapshot to an older version. For example, if you revert to a snapshot from yesterday then clients that saw a TXID just before the reversion could be waiting 24 hours for enough writes to come through to catch up.
I arbitrarily chose 5 minutes since that's a decently long time for a node to be disconnected from the primary.

That makes perfect sense 👍 Thanks!

Hello, the proxy feature is very promising, but I got some issue when trying it out with 30X redirections.
Currently the 'set-cookie' header seems not setting the 'Path=' attribute, so it defaults to the path segment in current URL.
Say first I issue a write request with POST /write/to/database, the response is a redirection to another read request URL GET /redirect/to/here, I can see that __txid cookie is correctly set in the first response, but it'll never send in the second request cause the URL path is different.
I'm not an expert on this, I think the proxy should set __txid cookie with Path=/ in this case, so any GET  requests after the non-GET request will correctly send the cookie, right?

@ccll Thanks for reporting that. Yes, it should be setting the cookie path. I added a fix on https://github.com/superfly/litefs/pull/304.

authors: benbjohnson ccll kentcdodds


text:
Fix test case for init minimal flag

Hello 👋
In this PR I am trying to join hands with you and write the test cases for the minimal flag. I loved the way you worked on the base of test cases, I have just edited 1 file (you might see a lot of changes because my branch is synced with graphcool/prisma/master, all these will go away as soon as you sync your master).
I will now copy-paste the snippet I have changed and try to explain the approach.
describe("init", () => {
  test("test project", async () => {
    const tmpDir = getTmpDir();
    const result = await Init.mock(tmpDir, "-m");

    expect(result.out.stdout.output).toContain("Created 3 new files");

    fs.readdir(tmpDir, (err, files) => {
      files.map(file => expect(file).toMatchSnapshot());
    });
  });
});

Let us explore this line by line:-
const result = await Init.mock(tmpDir, "-m");
=> Call init with -m flag and set directory argument (search for dirName in init/index.ts file to get to the relevant code) to tmpDir.
expect(result.out.stdout.output).toContain("Created 3 new files");
=> With the -m flag, the output contains this text.
    fs.readdir(tmpDir, (err, files) => {
      files.map(file => expect(file).toMatchSnapshot());
    });

=> As suggested by Tim, we to shapshot test to match all files in the temporary directory.
Execute this test by running ./node_modules/.bin/jest src/commands/init/index.test.ts command from prisma-cli-core folder.
This PR is against your minimal-flag branch and can be merged I think.
All good so far but there is a problem. If you take a look at run function in init/index.ts file, you will notice that prisma init command appends the dirName argument to the current working directory. So, running this test is leaving a residue folder (the temp folder) in the current directory.
Ideally, initMinimal function should clean up the temporary directory.
Let us see what Graphcool team things about this.
Thanks,

My understanding is that the tmp dir should be created in /tmp, is that not the case?

On my machine, it gave a path at /var/<.......> and this line appends the supplied path to current working directory making the temporary folder to be create in the same directory.

Update:
I can confirm the /var/<....> path because this is node source code for tmpdir and on non-windows system it gets the temporary directory like this
path = process.env.TMPDIR ||
           process.env.TMP ||
           process.env.TEMP ||
           '/tmp';

In my system, TMPDIR environment variable is stored as
divyendusingh [prisma]$ echo $TMPDIR
/var/folders/8z/_p2h9_rs6js1_hs5ff32dh2m0000gn/T/

authors: divyenduz marktani

repo: supergoat/prisma


text:
Structure

*Major Update:
Large structural changes to the repo.
Removed dependencies on a local blazegraph copy
&
Added configuration for pointing remote blazegraph database, or a local copy
With the update to blazegraph 2.0.0, we needed to change address the triple-store was queried. The static magic references littered through the project were consolidated to a config file to be loaded into the environment variables The code for handling the local copy is optionally run if the config is pointing to the local ip address, and is consolidated into it's own folder.

Blazegraph port access is configurable
We can now set the port and namespace for blazegraph by config. We also have access to the customization options available in the RWStore.properties file to control variables such as branching factor, etc. These changes allow us more options for tweaking the performance of the database.

Changed python modules layout
Separate files for integration testing and local testing.
This will allow more productivity, as the front-end will not have to worry about the back end as much

Changed top level script from shell to python
The shell scripts at top level were only shorthand, and intended for aiding development, but turned into it's own interface over time. This update corrects this path. The run script at project root optionally runs an install, upload, or the front-end Superphy servers.

Confirmation from dev team merge pull with major revision: Chad, Matt, Clare
Merging... - Ask for help if you are having trouble rebasing or merging off this revision.

repo: superphy/semantic


text:
🛑 Luck Little Learners Shop is down

In b2ce555, Luck Little Learners Shop (https://shop.luckylittlelearners.com) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Luck Little Learners Shop is back up in e156d1d after 12 minutes.

repo: superwebpros/uptime


text:
Issue while playing using playChordAt function

Hello Sir,
I have built a music website using your midi sounds package and this mail is with respect to an issue that I am facing. I am using the below method to play the music :
this.midiSounds.playChordAt(playAt, instrument, [value],delay);
The problem caused is that when I click the play button second time, all the values are being played in a second and its causing a large noise. Could you please help me solve this? It's been a while since I am trying to debug this issue.
I have pasted a portion of code below.
import React, { Component } from 'react';
import './ButtonCard.css';
import MIDISounds from 'midi-sounds-react';
import './CloudsBackground.jpg';
import { Varase } from './Varase';
// import './Modal.js'
class ButtonCard extends Component {
constructor(props){
super(props);
this.state = {
instrument : 771,
speedDivisor : 1
}
}
start(event){
console.log(this.props);
console.log(Varase);
var id1 = this.props.btnNum;
this.midiSounds.stopPlayLoop();
// var a = document.getElementById(id1).value;
//console.log(event.target.id);
Varase.map((val,i) =>{
if ((val.id) == id1){
var instrument = this.state.instrument;
var v = val.value;
for (var j = 0; j<v.length;j++){
var value = val.value[j];
var delay = val.delay[j]/this.state.speedDivisor;
var playAt = val.playAt[j]/this.state.speedDivisor;
console.log("playAt :"+playAt+" instrument: "+instrument+" value :" + value + "delay: "+delay);
this.midiSounds.playChordAt(playAt, instrument, [value],delay);
}
}
})
// console.log(a);
// Varase.map((val,i) =>{
//     console.log(Varase[i].value);
// });
}
stop(){
this.midiSounds.stopPlayLoop();
}
f1 = (event) => {
    var instrument1 = event.target.value;
    this.setState({instrument : instrument1});
    this.midiSounds.stopPlayLoop();
}
f2 = (event) => {
    this.setState({speedDivisor : event.target.value});
    this.midiSounds.stopPlayLoop();
}
replay(){
    this.stop();
    this.start();
}

render(){
return (

Instrument :
Flute
Voilin
Sitar

Speed :
1
2
3
4

Play

Stop

Replay

<MIDISounds ref={(ref) => (this.midiSounds = ref)} appElementName="root"/>

)
}
}
export default ButtonCard;

Use JSBin or any other service to create code that reproduces problem
Paste link to this code here

I tried to reproduce the same scenario using tools like JSBin and JSFiddle, but could not find a way to import the library. Can we have an alternate method for this ? Or maybe I can share a simple project with you to illustrate the issue.. Please let me know if it works for you.
Thank you.

Create a files to run and reproduce problem. Zip them and paste here with instruction to execute.

I have attached the demo.zip file down below. You just need cd into the folder, install the node modules folder (npm install), midi-sounds-react package and run npm start.
There is a Play button in the UI which plays using playChordAt function. The values are hardcoded in the function. My issues are as stated below :

When you click the play button, the values are played accordingly and it is all fine. But, the issue arises when you click the button for the second time, all the values are being played at one shot and there is a large noise for the hardcoded duration (third parameter in the function playChordAt).

When the button play is clicked while the first one is playing, there is noise again for a second and the old one continues.

Is there a way I can remove the midiSounds icon from the UI ? If yes, how can I do that ?

Zip file : demo.zip
Thank you,
Kedar Naik

Fixed code for App.js
import React, { Component } from 'react';
import './App.scss';
import MIDISounds from 'midi-sounds-react';

class App extends Component {
  temp(){
	  console.log('cancel all sounds');
	  this.midiSounds.cancelQueue();
	  console.log('start sounds from',this.midiSounds.audioContext.currentTime);
	  var startTime=this.midiSounds.audioContext.currentTime;
    this.midiSounds.playChordAt(startTime+0, 771, [48], 1);
    this.midiSounds.playChordAt(startTime+1, 771, [49], 1);
    this.midiSounds.playChordAt(startTime+2, 771, [52], 1);
    this.midiSounds.playChordAt(startTime+3, 771, [53], 1);
    this.midiSounds.playChordAt(startTime+4, 771, [55], 1);
    this.midiSounds.playChordAt(startTime+5, 771, [56], 1);
    this.midiSounds.playChordAt(startTime+6, 771, [59], 1);
    this.midiSounds.playChordAt(startTime+7, 771, [60], 1);
    this.midiSounds.playChordAt(startTime+8, 771, [60], 1);
    this.midiSounds.playChordAt(startTime+9, 771, [59], 1);
    this.midiSounds.playChordAt(startTime+10, 771, [56], 1);
    this.midiSounds.playChordAt(startTime+11, 771, [55], 1);
    this.midiSounds.playChordAt(startTime+12, 771, [53], 1);
    this.midiSounds.playChordAt(startTime+13, 771, [52], 1);
    this.midiSounds.playChordAt(startTime+14, 771, [49], 1);
    this.midiSounds.playChordAt(startTime+15, 771, [48], 1);
  }

  render() {
    return(

<button  className="btn draw-border" onClick={this.temp.bind(this)}>Play</button>

          <MIDISounds ref={(ref) => (this.midiSounds = ref)} appElementName="root" instruments={[771]} />

    );
  }
}export default App;

You can't remove MIDISounds button. You can hide it in CSS.

Thank you very much sir. This works perfectly.

authors: kedsnaik surikov

repo: surikov/midi-sounds-react


text:
Release:

Automated changes by create-pull-request GitHub action

Fail 👎

repo: surpher/PactSwiftServer


text:
Prefer Immutable Java Records over Lombok powered DTOs

Hi
Great work.
Java records are the way to go IMHO for DTOs so with this in mind can we make this simple change while the codebase is very small?
I have created the following PR https://github.com/surrealdb/surrealdb.java/pull/20

Hey @eharrow, thanks for opening the change. I am not very familiar with records, but I understand that they are read-only structs. I remember trying to use them and I had issues that seemed unnecessary. Having a quick read online - my challenge may have been being unable to extend records. This means that we would be sacrificing malleability for no foreseeable benefits. You can still have immutability in regular POJOs.
Therefore given that records offer little benefit beyond pojos+lombok, I would rather stick with pojos and lombok.

I understand your choice and in the java world as we further embrace functional programming immutability is a requirement and records enforce this and communicate it to api consumers.

I love functional programming, but not everything should be expressed functionally because we can. The GC overhead is non-negligible, and imperative procedural programming can be clearer and more performant (while still being safe). Like every decision, things must be contextual.
That said, I can't deny there will be a trend from users and from dependencies to prefer records, so I agree that we can make records the default and DTOs the exception. One concern I have is how we will find out the pain points of such decisions, as users seldom jump onto GitHub to provide examples of how the API is bad because they can't extend or use it the way they want.
Closing as I agree with the decision.

authors: eharrow phughk


text:
Bug: db.update() throws error if not all fields of records are specified

Describe the bug
When trying to update a user by the .update() function, you have to specify all fields of the record in order to update the record, otherwise the function throws an error.
Steps to reproduce
I want to update the role of the following user:
{
    id: "user:7k0keh247arqv02pjfdw"
    username: "guest"
    password: "someVerySecurePassword"
    role: "guest"
}

I do this by using .update() as stated in the Docs:
let id = "user:7k0keh247arqv02pjfdw"
let user = { role: "admin" }
await db.update(id, user);

When doing this, i recieve the following error:
Error: There was a problem with the database: Found NONE for field `username`, with record `user:7k0keh247arqv02pjfdw`, but expected a string

Expected behaviour
I expect the function not to throw, but rather update only the fields specified in the user object.
SurrealDB version
surreal 1.1.1 for Windows
SurrealDB.js version
0.11.0
Contact Details
olavnon@gmail.com
Is there an existing issue for this?

[X] I have searched the existing issues

Code of Conduct

[X] I agree to follow this project's Code of Conduct

db.update expects all the fields to be available and overwrites the whole record. What you are looking for is db.merge

Oh my, how did miss this? Yes, i am looking for db.merge, thank you.

authors: Micnubinub OTheNonE


text:
Panel dynamic remove button doesn't affect UI changes

Bug
go to https://plnkr.co/edit/Ztd2N4ymSSLdGKWnuswl?p=preview and tap to "remove" button.
Then if we tap "next" button the changes will apply
the problem only exist if we have data preset:
  survey.data = {
    car: "Mercedes-Benz"
  };

For React, Knockout, Angular and jQuery version

the problem in this code in the survey.ts
public getValue(name: string): any {
    if (!name || name.length == 0) return null;
    var value = this.valuesHash[name];
    return this.getUnbindValue(value);
  }

when we don't have a preset data, valuesHash contains "relatives" otherwise not

repo: surveyjs/surveyjs


text:
add request for cynicusrex.com

https://www.cynicusrex.com is my personal website where I write essays and such.
Web4 Should Run on LaTeX received 132 points on Hacker News.
On Chromium I get 9.4 kB transferred, on Firefox 10.20 kB, and on Vivaldi 10.3 on first load. On a second refresh all browsers show below 10 kB. GTmetrix says: “Total Page Size - 8.83KB”.

Thank you for suggesting this website. Added in commit dd0b5cb.

authors: CynicusRex susam


text:
Add XGEM: Exchange Genesis Ethlas Medium

[x] I understand that token listing is not required to use the SushiSwap Interface with a token.
[x] I understand that filing an issue or adding liquidity does not guarantee addition to the Sushi default token list.
[x] I will not ping the Discord about this listing request.

Please provide the following information for your token.
Network: Polygon
Token Address (checkSum): 0x02649c1ff4296038de4b9ba8f491b42b940a8252
Token Name (from contract): Exchange Genesis Ethlas Medium
Token Decimals (from contract): 18
Token Symbol (from contract): XGEM
SushiSwap V2 Pair Address of Token: 0xffc654a0d0f740748d9d4d0061c96c284c3cdf88
Link to sushiswap/assets PR: https://github.com/sushiswap/assets/pull/385
Link to the official homepage of token: https://ethlas.com/
Link to CoinMarketCap or CoinGecko page of token: https://www.coingecko.com/en/coins/exchange-genesis-ethlas-medium
Link to official Twitter account: https://twitter.com/Ethlas_Official

Added

authors: jiro-ono raynerljm

repo: sushiswap/assets


text:
New supplier invoice doesn't go to next cell when "Done" is pressed on keyboard

Build Number: 2.0.0
Description: When you press done after editing a cell in a row of a new supplier invoice, it doesn't change focus correctly to the new cell.
It should be in the order:

next cell in row
if no more cells in row, go to first cell of next row.

Reproducible: yes
Reproduction Steps:
Comments: This is likely a limitation of the sussol/react-native-data-table  implementation.

Appears to be fixed sometime before 2.1.0-rc1

repo: sussol/mobile


text:
support for config existing cluster

prepare for Equinix k8s cluster

merge as it is.

repo: sustainable-computing-io/kepler-action


text:
Minor cleanups to debugger detached_cb ctx argument change

[x] Documentation fixes
[x] 2.0 migration notes
[x] Fix debug-trans-dvalue detached_cb ctx argument
[x] Releases GH issue/pull references

@svaarala I pushed a fix to minisphere master to make it compatible with this change.  Not sure how the minisphere test passed here, your snapshot is from 5/16...

The test is pretty relaxed now and doesn't fail on warnings:
src/engine/debugger.c: In function ‘update_debugger’:
src/engine/debugger.c:129:5: warning: passing argument 8 of ‘duk_debugger_attach’ from incompatible pointer type [enabled by default]
     NULL);
     ^
In file included from src/engine/minisphere.h:29:0,
                 from src/engine/debugger.c:1:
src/shared/duktape.h:988:24: note: expected ‘duk_debug_detached_function’ but argument is of type ‘void (*)(void *)’
 DUK_EXTERNAL_DECL void duk_debugger_attach(duk_context *ctx,
                        ^
src/engine/debugger.c: In function ‘update_debugger’:
src/engine/debugger.c:129:5: warning: passing argument 8 of ‘duk_debugger_attach’ from incompatible pointer type [enabled by default]
     NULL);
     ^
In file included from src/engine/minisphere.h:29:0,
                 from src/engine/debugger.c:1:
src/shared/duktape.h:988:24: note: expected ‘duk_debug_detached_function’ but argument is of type ‘void (*)(void *)’
 DUK_EXTERNAL_DECL void duk_debugger_attach(duk_context *ctx,

So essentially what the minisphere test is doing is: (1) prepare the Duktape sources from the commit being tested for Minisphere, (2) run Minisphere make, and fail if that make command fails. But since Minisphere Makefile doesn't fail on warnings the test now succeeds.
I could maybe apply a diff to the Minisphere Makefile to enable warnings-as-errors for this particular test. Or maybe scan the compilation output and fail if anything gets printed.

Ah, it's just a warning, that makes sense.  I assumed that would be an error since the number of arguments doesn't match (potentially leading to an inconsistent stack).

It will in practice lead to issues but since the call is not direct but goes through a cast from the actual function to a function pointer, the compile doesn't actually detect an invalid call and only warns about the cast.

By the way the reason I didn't enable warnings-as-errors for the minisphere build is that clang, but not gcc, gripes about the code (a lot!), and I'm too lazy to fix it. :)

authors: fatcerberus svaarala

repo: svaarala/duktape


text:
setup testing tooling

setup tooling to allow testing.

will be fixed as part of #20

repo: svandragt/carbon


text:
Added sveltekit-adapter-iis to components.json

This is a library for building output that can be hosted on an IIS Web Server with iisnode.

The formatting of the JSON is incorrect.
You can run npm run fomat to automatically fix it.
The target branch of this PR is incorrect.
It must be staging

@MacFJA Okay thanks for checking on my PR.  I misunderstood the branches.  I've also fixed the formatting. You should find everything to be in order now!


text:
ESLint Flat config

Description
All the docs reference the legacy config style of eslintrc.js, but the new flat config has many advantages, and I'm trying it out to resolve some other issues.
Ref: https://eslint.org/docs/latest/use/configure/configuration-files-new

v2.36.0-next.11 is supported flat config.
https://github.com/sveltejs/eslint-plugin-svelte/releases/tag/v2.36.0-next.11
We will remove next version when Svelte 5 becomes RC.

I'm on 2.36.0-next.13, I'm using typescript, and I've followed the basic flat config setup in the readme, and getting:
Argument type
{plugins: {readonly svelte: import("eslint").ESLint.Plugin}, files?: undefined, languageOptions?: undefined, rules?: undefined, processor?: undefined} | {files: string[], languageOptions: {parser: any}, rules: {'no-inner-declarations': string, 'no-self-assign': string, 'svelte/comment-directive': string, 'svelte/system': string}, processor: string, plugins?: undefined} | {rules: {'svelte/comment-directive': string, 'svelte/no-at-debug-tags': string, 'svelte/no-at-html-tags': string, 'svelte/no-dupe-else-if-blocks': string, 'svelte/no-dupe-style-properties': string, 'svelte/no-dynamic-slot-name': string, 'svelte/no-inner-declarations': string, 'svelte/no-not-function-handler': string, 'svelte/no-object-in-text-mustaches': string, 'svelte/no-shorthand-style-property-overrides': string, 'svelte/no-unknown-style-directive-property': string, ...}}
is not assignable to parameter type ConfigWithExtends

The core issue I'm having though is a infinite loop when I run this plugin.  If I comment out all the other configs, leaving this as the only active plugin, the infinite loop remains.

I've gotten it working, almost perfectly with the new syntax!  I'll post the final config here shortly.  Also, it may not have been an infinite loop... Flat config doesn't use the .eslintignore file, and I hadn't replicated those settings into glob patterns in the config, so it was legit linting a zillion things.

// pnpm i -D globals
import globals from "globals";

import jsESLint from '@eslint/js';
// import * as espree from "espree";
import tsESLint from 'typescript-eslint';
import tsESLintParser from '@typescript-eslint/parser'
// TODO: I wasn't able to get the parser for extra files working, but maybe we don't need it?
// import * as tsESLintExtraParser from 'typescript-eslint-parser-for-extra-files';
// TODO: Turn on JSDoc, but not yet. Warning volume is already overwhelming.
// import jsdoc from 'eslint-plugin-jsdoc';
import markdown from 'eslint-plugin-markdown';
import eslintPluginSvelte from 'eslint-plugin-svelte';
import svelteESLintParser from 'svelte-eslint-parser';

const ignores = [
	// "./eslint.config.js"
	".DS_Store",
	"node_modules/**/*",
	"build/**/*",
	".svelte-kit/**/*",
	"package/**/*",
	".env",
	".env.*",
	// Ignore files for PNPM, NPM and YARN
	"pnpm-lock.yaml",
	"package-lock.json",
	"yarn.lock",
	// On CI our PNPM store is local to the application source
	".pnpm-store/**/*",
	"src/paraglide/**/*",
];
export default tsESLint.config(
	jsESLint.configs.recommended, // Recommended config applied to all files
	...tsESLint.configs.recommended,

	// jsdoc.configs['flat/recommended'],
	...markdown.configs.recommended,
	// flat/prettier: Turns off rules that may conflict with Prettier.
	// Prettier is run separately, not through ESLint.
	...eslintPluginSvelte.configs['flat/prettier'],

	{
		ignores,
		// plugins: {
		// 	tsESLint,
		// },
	},
	{
		languageOptions: {
			ecmaVersion: 'latest',
			globals: {
				$bindable: 'readonly',
				...globals.browser,
				...globals.node,
				...globals.es6,
			},
		}
	},
	// {
	// 	files: ['**/*.js'],
	// ...ignores,
	// 	plugins: {
	// 		jsdoc,
	// 	},
	// 	rules: {
	// 		'jsdoc/require-description': 'warn'
	// 	}
	// },

	// Configure typescript-eslint-parser for typescript
	{
		files: ['*.ts', '*.tsx'],
		ignores,
		languageOptions: {
			sourceType: "module",
			parser: tsESLintParser,
			// parser: tsESLintExtraParser,
			parserOptions: {
				project: './tsconfig.json',
			},
		},
	},

	// Configure svelte-eslint-parser with typescript-eslint-parser
	// 	for the non-svelte parts
	{
		files: ['*.svelte'],
		ignores,
		languageOptions: {
			parser: svelteESLintParser,
			parserOptions: {
				// Parse the `<script>` in `.svelte` as TypeScript by adding the following configuration.
				parser: tsESLintParser,
				extraFileExtensions: ['.svelte'], // This is a required setting in `@typescript-eslint/parser` v4.24.0.
				// parser: {
				// 	ts: tsESLintExtraParser,
				// 	js: espree,
				// },
				project: './tsconfig.json',
			},
		}
	}
);

Ran out of time to work on this before I got it all working.  Still getting Parsing Error: Unexpected token : (I.e. the semicolon is unuexpected) when doing Typescript type casting, so I had to remove all that from my code for now.  Aside from that it is working!

Removing the type casting resulted in svelte check errors, so I am still stuck.

eslint-plugin-svelte can be used in flat configs even without the new flat config support that's only in the next releases:
https://github.com/sveltejs/eslint-plugin-svelte/pull/708#issuecomment-2012413054

I'm using it for my config above, or at least I think I am.  I am very new to ESLint (& Javascript).
In my package.json:
		"eslint-plugin-svelte": "^2.36.0-next.13",

And from above:
	// flat/prettier: Turns off rules that may conflict with Prettier.
	// Prettier is run separately, not through ESLint.
	...eslintPluginSvelte.configs['flat/prettier'],

authors: baseballyama pboling polyzen

repo: sveltejs/eslint-plugin-svelte


text:
Writable page store

Describe the problem
The session store was removed in #5946 and the suggested pattern instead is to use the page store to access the data fetched in the main layout #5883
But the session store was writable, where the page store is only readable
So let say I do not fecth all the user data in my main layout, but then need to update it or add data to it from a +page. How could I do this?
Describe the proposed solution
I don't see all the implications of this solution but a writable page store would allow this pattern.
Alternatives considered
No response
Importance
would make my life easier
Additional Information
No response

@fcrozatier That was my problem, too. I have a popup login and before API change I could update session without to reload/refresh the page and was good to go.
Now I POST fetch my login endpoint (+server.js, export const POST = async ({ locals, params, request })) and await my api response. When the response is ok, I do locals.user = response.user; and return a new Response back to the Login.svelte.
In Login.svelte (import { invalidate } from "$app/navigation";) then on the positive Response from the endpoint I do invalidate(). This triggers my root +layout.server.js which returns { user: locals.user }.
That updates the page store behind and updates the $page.data.user without reloading/refreshing my current page.
Maybe this might be a way for your solution :)

I've tried to implement your solution but when I update the locals in the endpoint, even if I invalidate afterwards, it does not reflect in the main layout locals.
Here is a repo of what I tried

@fcrozatier I sure plain javascript and and the static adapter. Common data is stored in a writeable storage, user data is stored inside an https-only cookie. Let me see....
routes:

/api/login/+server.js
/+layout.svelte
/+layout.server.js
/+page.svelte

+page.svelte
import { invalidate } from "$app/navigation";
let userdata = [INPUT FROM LOGIN FORM];
const query = await fetch( "/api/login/", {
    method: 'POST',
    headers: {
        "Accept": "application/json",
        "Content-Type": "application/json",
    },
        body: userdata && JSON.stringify(userdata)
    });

    const fromEndpoint = await query.json();

    if ( query.ok ) {
        invalidate();
        return {
            user: fromEndpoint.user,
            message: fromEndpoint.message
        };
    }
    else throw new Error( 'Some error occurred.' );

            setTimeout( function() {
                invalidate();
                document.querySelector( ".close" ).click();
            }, 1000 );
        }

+layout.svelte
(import page...)
showing $page.data.user here
+layout.server.js
import cookie from 'cookie';
export const load = async ({ locals, request, setHeaders }) => {
    const cookies = cookie.parse( request.headers.get("cookie") || "" );

    locals.user = cookies.user ?? crypto.randomUUID();

    return {
        user: locals.user
    };
};

+server.js
export const POST = async ({ locals, params, request }) => {
    const data = await request.json();
    const response = await api({ action: 'login', ...data });

    if ( response.message && response.message === "ok" ) {
        locals.user = response.user;
        return new Response( JSON.stringify({
            user: response.user,
            message: response.message
        }), {
            headers: {
                "Set-Cookie" : cookie.serialize( "user", response.user, {
                    path: "/", httpOnly: true, sameSite: "strict", secure: true
                })
            }
        });
    }
    else throw error( 503, 'You shall not pass.');
};

I found this issue too. Most importantly, the invalidation of the session request forced the client to ask the server again about the session but didn't update the $page at all. As I remember, @Rich-Harris advised to use reset invalidation for load function in +layout.server.js, but it's not working.

Basically, without such a feature, I can't update the user parameters like name, avatar and etc.

@stalkerg My problem here is, the login process is not a separate that can reload/refresh but a popup login. So the current page is not triggering any page.(server.)js files. With the invalidation from the endpoint response it is working. Maybe my setup with static adapter is doing some magic that worked before SvelteKit API change and now works again. Yet :D

@CodexAnima ok, just invalidation() is working,  invalidation('you_api_for_get_session') not working but with getting a new session.
Hmmm

@CodexAnima in your case I think it's the cookie that makes it work. Remove the cookie and then I guess you get no chocolate.

headers: {
"Set-Cookie" : cookie.serialize( "user", response.user, {
path: "/", httpOnly: true, sameSite: "strict", secure: true
})
}

That would be convoluted to have to write a cookie each time I want to communicate data to the root layout, there must be another way ?

@fcrozatier well, the cookie keeps the logged in user persistent even when reloading the page. login out removes the cookie and user is back to default crypto.randomUUI(). Inside the cookie is a token stored for querying the api and get current users relevant data on +page.svelte (over the +page.server.js). So I need that cookie (even before SvelteKit API change).

@CodexAnima Ok I see your point, using cookies is a perfectly valid design and maybe it's the right way to achieve communication to the root layout.

@fcrozatier then again, keep in mind I need this setup for a full static adapter build for persisting user logged status.
If you use a node.js/dynamic background, you may have more options.
Since then I keep my cookies and chocolate ;)

Ok so to summarize the discussion:

If you need to update or add data it's means there is a user action
You can capture this action with a form to trigger an action endpoint
You can then create or update cookies which means data will persist, will be availabe in both the server and the client, plus it will be in sync

In the end this design may be superior to a writable page store were data won't persist, won't be available in the server and thus won't be in sync :)

Maybe there will be a similar implementation in a future SvelteKit version before version 1.0 🙏

Yep, seems to be where the project is heading #5875

authors: CodexAnima fcrozatier stalkerg

repo: sveltejs/kit


text:
docs: reword afterNavigate description so that it includes navigations to the same URL

similar to https://github.com/sveltejs/kit/pull/13133
afterNavigate also triggers on navigations to the same URL, not just new URLs. This PR replaces "a new URL" with "a URL" to make that reflect the fact.

Please don't delete this checklist! Before submitting the PR, please make sure you do the following:

[ ] It's really useful if your PR references an issue where it is discussed ahead of time. In many cases, features are absent for a reason. For large changes, please create an RFC: https://github.com/sveltejs/rfcs
[x] This message body should clearly illustrate what problems it solves.
[ ] Ideally, include a test that fails without this PR but passes with it.

Tests

[ ] Run the tests with pnpm test and lint the project with pnpm lint and pnpm check

Changesets

[ ] If your PR makes a change that should be noted in one or more packages' changelogs, generate a changeset by running pnpm changeset and following the prompts. Changesets that add features should be minor and those that fix bugs should be patch. Please prefix changeset messages with feat:, fix:, or chore:.

Edits

[x] Please ensure that 'Allow edits from maintainers' is checked. PRs without this option may be closed.

preview: https://svelte-dev-git-preview-kit-13242-svelte.vercel.app/
this is an automated message

authors: Rich-Harris eltigerchino


text:
The repl download messes with encodings

Describe the bug
Typing some umlauts such as äöü in the REPL's App.svelte and downloading it will mess up the umlauts to gibberish
To Reproduce
https://svelte.dev/repl/cefce44e52ee42a79123e6c23d108b54?version=3
Download, build and start to see the text
Expected behavior
öäü can be used and don't need to be fixed afterwards via encoding conversions
This looks correct:

This is what it really looks like when downloaded:

closing since the site has been rewritten. please file at https://github.com/sveltejs/svelte.dev/issues/new if the issue persists

authors: benmccann burningTyger

repo: sveltejs/sites


text:
How to use with capactor.js (only use index.html file)

I guess this is related to sveltekit, but i wanted to mention it here anyway. i am trying to build a capacitor.js app with sveltekit and your i18n lib. For that i need a index.html page as an entry point which is loaded upon starting the app, which then handles all the rest (looking at accept-language hader etc.)
Try 1:
As a basis i use locale-router-static and only change the following svelte configs
...
	kit: {
		adapter: adapter({
			pages: 'build',
			assets: 'build',
			fallback: 'index.html', // <-- add fallback route
			precompress: false
		  }),
		prerender: {
		  default: true,
		  entries: supportedLocales.reduce((acc, locale) => [...acc, `/`,`/${locale}`], ['*']), // <-- add '/'
		},
	},

Unfortunately this leads to an empty index.html file.

Try 2:
Now i am able to at least have a non-empty html file with this config and setting SSR:false in the hooks.js file
//hooks.js
....
    return resolve(event, {
      ssr:false,
      transformPageChunk: ({ html }) => html.replace(/<html.*>/, `<html lang="${locale}">`),
    });
  }

  return resolve(event,{ssr:false});

kit: {
    adapter: adapter(),
    prerender: {
      enabled: true,
      default:true,
      entries: supportedLocales.reduce((acc, locale) => [...acc, `/`,`/${locale}`], ['*']),
    }
  }

however that results in an index.html file which just <meta http-equiv="refresh" content="0;url=/en/"> and would then lead to always showing en on start.
Any idea how i can achieve this index.html SPA with your lib?

i was able to make it work with svelte-intl-precompile and completely not using hook.js (which is only executed during build time). then checking everything in the __layout.svelte file. I will also try to do the same with your lib now ;)


text:
[Feature Request] update workflows to cache the npm install and package steps

Usage example, including component, action, motion, or utility API
The workflow would work the exact same, the only additions would be caching the npm install, and npm run package steps; so that the workflows run faster.
Possible implementation - describe how the feature can be implemented
Simply adding more steps to the jobs
Do you want to contribute this feature and create a pull request
Yes

I can pick this up

completed in (#129)

authors: BeeMargarida Brisklemonade

repo: svelteuidev/svelteui


text:
Stack component slide transition glitch

What package has an issue
@svelteuidev/core
A clear and concise description of what the bug is
The Stack component uses CSS gap for spacing.
It causes a glitch with transition:slide, becase when the element reaches 0 height, gap is still retained, and when it's removed, the gap is suddenly removed without animation.
It can be fixed by replacing gap with margins on child elements. Is it possible to do it on the Stack component?
In which browser(s) did the problem occur?
Other - list in description
Steps To Reproduce
Click a square to remove it.
import { Stack } from '@svelteuidev/core';
<script>
  let items = [1,2,3,4,5,6,7,8,9,10];
  const removeItem = (index) => {
    items.splice(index, 1);
    items = items;
  };
</script>
<Stack spacing="xl">
  {#each items as item, index (item)}
    <div
      transition:slide
      style="height: 50px; background-color: black"
      on:click={removeItem(index)}
    ></div>
  {/each}
</Stack>

Do you know how to fix the issue
Yes
Are you willing to participate in fixing this issue and create a pull request with the fix
I would like, but unfortunately there are too few documentation on contributing.

Hi @notramo! If you would like to contribute a fix for this, we would greatly appreaciate! We have a Contributing guide here and another in our website.
If you have any questions you can always ask us here or on discord

@BeeMargarida I couldn't find documentation on how Stitches is used in this project. Could you provide some guidance on where to look for examples?
This fix would involve setting margin-top on direct child components. Is it something that can be solved with Stitches? It requires a > selector.

We have some examples in this part of the docs and the stitches docs are also really good.
So, for example, in the Stack styles, you have the root object, which style the root component of the Stack. If you want to modify the style of it's direct children, with would be something like the code below would work.
root: {
   ....
   '& > *': {
      ...
    }
}

One example where we have similar logic is in the styles for the Group component.
You can use the storybook (run yarn dev) to test out your approach.

authors: BeeMargarida notramo


text:
Options for projects and languages path doesn't get an array

Bug report
Describe the bug
Options for projects and languages path doesn't get an array
Expected behavior
ngx-translate-lint -l './src/app/shared/**/*.{html,ts}, ./src/app/pages/**/*.{html,ts}'

I move this bug for the next major release.

repo: svoboda-rabstvo/ngx-translate-lint


text:
exampleSetFlag is still presented in JSON

I found the reason for that in class
io.swagger.v3.oas.models.media.MediaType
That class has internal boolean field exampleSetFlag which is leaking to JSON schema definition.
I did 2 experiments:

renamed the field (the json file changed and started containing renamed field)
added @JsonIgnore on that field ( the json file changed and irritating field disappeared)

So I would suggest adding @JsonIgnore annotation on this field like below
public class MediaType {
...
  @JsonIgnore
    private boolean exampleSetFlag;
...
}

exampleSetFlag field is correctly ignored in serialization when using correctly configured object mapper, please see this comment about using the correctly configured object mapper.
closing ticket, please reopen if you're still experiencing issues

authors: alebastrov frantuma

repo: swagger-api/swagger-core


text:
Possilbe typo

Feel free to discard if you feel that wording is fine.

Thanks for the suggestion, but the wording is as intended. Your input is much appreciated.

authors: sergeyromanov webron

repo: swagger-api/swagger-spec


text:
Added new translation (cd ..) and new quote

Added new translation #1 : go back = "cd .."
and new quote #5 "Sometimes you need to go back before you can go forward"

Unnecessary Translations

repo: swapagarwal/geeksay


text:
fix: add env.bugfixes in schema

preset env config bugfixes at
https://github.com/swc-project/swc/blob/214427157ddf155da14b2bede3b315d3f6ce1e77/crates/swc_ecma_preset_env/src/lib.rs#L527

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

authors: CLAassistant RiESAEX

repo: swc-project/swc-playground


text:
Compiling for/of to a plain index loop

Describe the feature
Bublé has a dangerousForOf switch that you can use when you know all for/of loops in a codebase are iterating over arrays. It'll compile such loops to a regular for that runs an index over the array, when possible. This can, for code where it is valid, obviously help generate a lot better output.
Would such an option potentially be in scope for this project, or does it sound too dodgy?

This is already implemented in loose mode, which is, as the OP said, dangerous. Maybe we could move it to an assumption soon.

This issue could be closed now

authors: Austaras marijnh

repo: swc-project/swc


text:
CSS parser errors when parsing asterisk before css property

Describe the bug
parser.parse_all() returns an Err value when parsing a property prefixed by an asterisk (it's a hack for IE 7 and below source). This is not spec compliant but it should not return an error.
Input code
use swc_common::{input::StringInput, BytePos};
use swc_css_parser::{
    lexer::Lexer,
    parser::{Parser, ParserConfig},
};

fn main() {
    let data = "a { *font-size: 16px; }";
    let input = StringInput::new(data, BytePos(0), BytePos(u32::MAX));
    let config = ParserConfig {
        parse_values: false,
        allow_wrong_line_comments: false,
    };
    let lexer = Lexer::new(input, config);
    let mut parser = Parser::new(lexer, config);
    parser.parse_all().unwrap();
}

Config
No response
Playground link
No response
Expected behavior
parser.parse_all() should not return an error. Instead, this hack should be reflected in the AST somehow.
Actual behavior
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error { inner: (Span { lo: BytePos(4), hi: BytePos(5), ctxt: #0 }, ExpectedButGot("\"}\"")) }'

Version
swc_common = "0.17.3", swc_css_parser = "0.69.0"
Additional context
No response

@kdy1 Expected, because it is violate CSS spec, we can implement ie option for this, but I think it was bad for design, I want to say change * on _, i.e. violate many things in CSS:
.selector { !property: value; }
.selector { $property: value; }
.selector { &property: value; }
.selector { *property: value; }
.selector { )property: value; }
.selector { =property: value; }
.selector { %property: value; }
.selector { +property: value; }
.selector { @property: value; }
.selector { ,property: value; }
.selector { .property: value; }
.selector { /property: value; }
.selector { `property: value; }
.selector { ]property: value; }
.selector { #property: value; }
.selector { ~property: value; }
.selector { ?property: value; }
.selector { :property: value; }
.selector { |property: value; }

As you can see @property even violate nested at-rules, and &property violate nested CSS selectors (new spec)

I also think it should be at most recovered error.
It's a syntax error anyway.

hm, we can do error recovery here :+1: I will look


text:
@swc/core breaks yarn which in-turn breaks Grafana on IBM s390x machines

Describe the bug
Yarn (version 4.0.0-rc.12) is broken when we execute yarn start on IBM s390x systems (zLinux). This is because @swc-core gives an error Unsupported architecture on Linux: s390x:
The full error text is given below:
-sh-4.2$ sudo yarn start
/root/.yarn/berry/cache/@swc-core-npm-1.2.160-4f6417fe5e-9.zip/node_modules/@swc/core/binding.js:234
throw new Error(Unsupported architecture on Linux: ${arch});
^
Error: Unsupported architecture on Linux: s390x
at Object. (/root/.yarn/berry/cache/@swc-core-npm-1.2.160-4f6417fe5e-9.zip/node_modules/@swc/core/binding.js:234:23)
at Module._compile (node:internal/modules/cjs/loader:1105:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
at Object.require$$0.Module._extensions..js (/srv/grafana-install/grafana-8.5.0/.pnp.cjs:59955:33)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.require$$0.Module._load (/srv/grafana-install/grafana-8.5.0/.pnp.cjs:59795:14)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object. (/root/.yarn/berry/cache/@swc-core-npm-1.2.160-4f6417fe5e-9.zip/node_modules/@swc/core/index.js:39:88)
at Module._compile (node:internal/modules/cjs/loader:1105:14)
Previously with the classic versions of yarn both yarn and Grafana were working fine. Now that the latest versions of yarn is using @swc-core this is breaking yarn and in-turn Grafana recent versions as well (such as Grafana 8.5.0 and above).
Requesting SWC to please allow support for big-endian systems such as IBM s390x systems (zLinux).
My environment:
OS: zLinux (s390x)
NodeJS version: v16.15.1
yarn version: 4.0.0-rc.12
npm version: 8.11.0
Thanks.
Input code
No response
Config
No response
Playground link
No response
Expected behavior
@swc-core-npm-1.2.160-4f6417fe5e-9.zip/node_modules/@swc/core/binding.js:234 must support big-endian systems such as IBM s390x(zLinux) so that both yarn and in-turn grafana can seamless build on s390x systems.
Actual behavior
No response
Version
@swc-core-npm-1.2.160-4f6417fe5e-9
Additional context
No response

@kdy1 I do not believe we'll expand another native build targets in a short timeframe, instead (I recall we discussed somewhere else) we may need some automatic fallback mechanism to swc/wasm as similar to next-swc does. Thoughts?

I think it would be super useful

I'll close this one, and later file a tracking issue to support seamless fallback to @swc/wasm for the platforms does not have native binaries.
To be more clear, we do not expect to support more native build targets at this moment unless there is a strong active user base.

https://github.com/swc-project/swc/issues/5221 is filed for tracking.

@swc/core breaks yarn
Now that the latest versions of yarn is using @swc-core

Yarn isn't using swc so Yarn is unrelated to this issue.

My apologies. Yes, Yarn is unrelated to this issue.

authors: kdy1 kwonoj merceyz sinceresiva


text:
emitIsolatedDts does not emit .d.ts when using --out-file

Describe the bug
emitIsolatedDts does not output any dts when --out-file is used to specify the output location.
This works for sourcemaps with --out-file and --out-dir. This works for dts when --out-dir is used but NOT --out-file.
Input code
export interface Foo {
  name: string;
}
export const AF: Foo = {
  name: "bar",
};

Config
{
  "jsc": {
    "parser": {
      "syntax": "typescript"
    },
    "experimental": {
        "emitIsolatedDts": true
    }
  },
  "sourceMaps": true
}

Playground link (or link to the minimal reproduction)
https://play.swc.rs/?version=1.6.6&code=H4sIAAAAAAAAA%2BNKrSjILypRyMwrSS1KS0xOVXDLz1eo5lJQyEvMTbVSKC4pysxLt%2Baq5YIqTM7PKy5RcHSzAiu0RVKqlJRYpKTDVWsNAEpEJOhUAAAA&config=H4sIAAAAAAAAA02Muw2AMAxEe6aIXDMBNQ0FQ0TBRRAByzYSUZTdMR8hOt%2B9ey6NczBLgM4VOy2QZ0H%2BsjWSV%2FWHNaCZUAJHUrhhbR8HD0KOCW23%2FMyLpKiDbItXnHoVg8o7PnLzPgDZdg44evp4PQGPl4lFmAAAAA%3D%3D
SWC Info output
No response
Expected behavior
When --out-file dist/foo.ts is specified foo.js.map and foo.d.ts output behaviour should be equivalent. Today sourcemap files are outputted alongside dist/foo.js, dts files should do the same.
Actual behavior
dts files are not outputted when using --out-file
Version
v1.6.6
Additional context
No response

Are you using Rust CLI?

Yes, we're using the rust cli and invoking it per-file for the bazel rules_swc.