caub
Repos
151
Followers
42
Following
3

:mag: Parse user input into a valid PostgreSQL tsquery

54
6

:art: Wheel color-picker made with canvas

10
3

Components for integrating the Wurd CMS in a React app

:bookmark: List of projects & scripts

2
0

Browser JS client for the Wurd CMS

Events

issue comment
Add the /webhook_endpoints/:we_id/secret endpoint

ah ok, thanks

Created at 1 month ago
opened issue
Add the /webhook_endpoints/:we_id/secret endpoint

Is your feature request related to a problem? Please describe.

In Stripe dashboard, I can see this endpoint exist, and allow to see the webhook secret

I'd like to use it from this lib

Describe the solution you'd like

Add retrieveSecret in https://github.com/stripe/stripe-node/blob/master/lib/resources/WebhookEndpoints.js#L13

Describe alternatives you've considered

We would store the webhook secret at the moment it was created, but this is less practical than being able to read it

Additional context

No response

Created at 1 month ago
issue comment
Let string type take Date instance

You should use new Date(..).toJSON() or .toISOString() to get a standard format

or something like .toJSON().slice(0, 10) to get YYYY-MM-DD format when needed

Created at 1 month ago

8.4.1

Created at 1 month ago

Add comment for singleQuoteReplacement

Readme: add supporting details

Created at 1 month ago
issue comment
License

Hi, the licence is "ISC" in the package.json

free of use, no constraints

Created at 1 month ago
issue comment
Negated wildcard phrase produces invalid syntax

Fixed, thanks for reporting

Created at 1 month ago
issue comment
Ending or starting query in `'` character produces invalid syntax

We added this singleQuoteReplacement option lately, and I added a comment about it that it should not be a reserved word

For example does it work for you to use a space ' ' or a a '+'?

Created at 1 month ago

Fix #20 negated wildcard stringification (#22)

Created at 1 month ago
closed issue
Negated wildcard phrase produces invalid syntax

I was testing this module out in production and within 24h someone entered a term like this 😅

-"keyword"*

…which produces the invalid syntax:

!("keyword"):*

…perhaps a wildcard after a phrase should just be dropped?

Created at 1 month ago
pull request closed
Fix #20 negated wildcard stringification

Fix #20

Created at 1 month ago
pull request opened
Fix #20 negated wildcard stringification

Fix #20

Created at 1 month ago
create branch
caub create branch fix-neg-wild
Created at 1 month ago
issue comment
Documentation needs better examples

Yes

Created at 1 month ago
issue comment
Styles are output multiple times during SSR

Not using next.js I tried this: https://replit.com/@caub/emotion-dup-styles#index.js

import { CacheProvider, Global } from '@emotion/react';
import { cache } from '@emotion/css';
import styled from '@emotion/styled';

const Bg = styled.div({
  backgroundColor: '#48c'
});

const Sub = ({ children }) => <Bg>[children}</Bg>;

const app = (
  <CacheProvider value={cache}>
    <Global styles={{ div: { margiin: 0 } }} />
    <Sub>Test 1</Sub>
    <Sub>Test 2</Sub>
  </CacheProvider>
)

Then react renderToStaticMarkup doesn't give any styles

I can see them in cache, what's the properway to add them in the markup? Object.values(cache.inserted).join('\n')?

Created at 1 month ago
Undeclared dependency jwk-to-pem

@gnongsie or @rsachan8 it's just moving jwk-to-pem from devDependencies to dependencies, else npm i --production won't work as described

simple fix, do you want a PR?

Created at 1 month ago
issue comment
Ending or starting query in `'` character produces invalid syntax

Would using the option added in https://github.com/caub/pg-tsquery/issues/14 help here?

Created at 2 months ago
issue comment
Negated wildcard phrase produces invalid syntax

yes it is, ok so

Created at 2 months ago
issue comment
Negated wildcard phrase produces invalid syntax

I'll check if !("keyword":*) is valid, in which case it's a precedence fix to do in the parser

Created at 2 months ago
issue comment
Negated wildcard phrase produces invalid syntax

For now it may be possible to fix this case by customizing the default regexes: https://github.com/caub/pg-tsquery/blob/master/index.js#L59-L64

Created at 2 months ago
issue comment
Negated wildcard phrase produces invalid syntax

Good catch, I'll try a fix when I've time

Created at 2 months ago
Is this lib basically doing /\p{Emoji}|\p{Default_Ignorable_Code_Point}/gu ?

In my usecase, I just need to remove them, so I can do .replace(/\p{Emoji}|\p{Default_Ignorable_Code_Point}/gu, ''), and that works for multi code points emojis is this right?

'️🤷‍♂️'.replace(/\p{Emoji}|\p{Default_Ignorable_Code_Point}/gu, '').length
0

but .match(/\p{Emoji}|\p{Default_Ignorable_Code_Point}/gu) return multiple characters instead of one, is this what you meant?

Created at 2 months ago
Is this lib basically doing /\p{Emoji}|\p{Default_Ignorable_Code_Point}/ ?

That regex /\p{Emoji}|\p{Default_Ignorable_Code_Point}/ would detect all emojis and join controls

Created at 2 months ago
push

Update index.js

Created at 2 months ago
push

Update index.js

Created at 2 months ago