profile
viewpoint

editorconfig/editorconfig-vscode 808

EditorConfig extension for Visual Studio Code

avajs/ava-docs 447

Localized docs for AVA

avajs/awesome-ava 318

Awesome AVA resources

avajs/eslint-plugin-ava 207

ESLint rules for AVA

kevva/brightness-cli 179

Change the screen brightness

kevva/brightness 177

Change screen brightness

benlesh/symbol-observable 167

Symbol.observable ponyfill

kevva/bin-wrapper 127

Binary wrapper that makes your programs seamlessly available as local dependencies

avajs/atom-ava 102

Snippets for AVA and run tests directly in the editor

avajs/gulp-ava 57

Run AVA tests

release SamVerschueren/dynongo-pager

v0.3.0

released time in a day

push eventSamVerschueren/dynongo-pager

Sam Verschueren

commit sha 145c0d55c96f18fe711f397b77f19f3f52fc5a90

0.3.0

view details

push time in a day

created tagSamVerschueren/dynongo-pager

tagv0.3.0

Easy paging for DynamoDB with dynongo

created time in a day

push eventSamVerschueren/dynongo-pager

Sam Verschueren

commit sha 4c352a1af161d4a22412d6ac41857d6415ad298d

Drop support for Node.js 4

view details

push time in a day

push eventSamVerschueren/dynongo-pager

Sam Verschueren

commit sha 16d7d40b1e4fd8b2f546d32acea9f27dc830f5fd

Test Node.js 10, 12 and 14

view details

push time in a day

push eventSamVerschueren/dynongo-pager

Sam Verschueren

commit sha e16b961b5dd4cf943cc79352e1f2b348c9d1e8c9

Make limit optional and calculate page correctly if limit is too high - fixes #1

view details

push time in a day

issue closedSamVerschueren/dynongo-pager

Paging does not work if `limit` is set to `Infinity` or limit is to high

We noticed that using a limit of Infinity to get as much data as possible does not work. The reason is that the check here https://github.com/SamVerschueren/dynongo-pager/commit/8737670c4544636dbc861654ce35a677188ad572#diff-32f7e91f31aab7e46692fb842d767ecdR57 will always be false in that case.

We should do a raw query, so we get the LastEvaluatedKey as well and change the check to

if (items.length > options.limit || rawResult.LastEvaluatedKey) {

closed time in a day

SamVerschueren

issue openedSamVerschueren/dynongo-pager

Paging does not work if `limit` is set to `Infinity` or limit is to high

We noticed that using a limit of Infinity to get as much data as possible does not work. The reason is that the check here https://github.com/SamVerschueren/dynongo-pager/commit/8737670c4544636dbc861654ce35a677188ad572#diff-32f7e91f31aab7e46692fb842d767ecdR57 will always be false in that case.

We should do a raw query, so we get the LastEvaluatedKey as well and change the check to

if (items.length > options.limit || rawResult.LastEvaluatedKey) {

created time in 2 days

PR closed SamVerschueren/dynongo

remove ExpressionAttributeValues if it is an empty object

When doing query operations, like '$exists', the query will be parsed into an object with ExpressionAttributeValues: {}, which will cause an error ValidationException: ExpressionAttributeValues must not be empty

+5 -0

3 comments

1 changed file

wankunpp

pr closed time in 4 days

pull request commentSamVerschueren/dynongo

remove ExpressionAttributeValues if it is an empty object

Fixed in d413ae6

I never noticed this PR apparently, thanks for sending it because it gave me the lead on where it failed!

wankunpp

comment created time in 4 days

push eventSamVerschueren/dynongo

Sam Verschueren

commit sha d413ae6eb63920cd549da59de61b15cc19ef22bb

Fix query when attribute values are empty - fixes #55

view details

push time in 4 days

issue closedSamVerschueren/dynongo

Objects can't be empty

When you provide a query which results in empty AttributeValues for instance, this will fail when executed against DynamoDB.

closed time in 4 days

SamVerschueren

issue commentSamVerschueren/dynongo

Objects can't be empty

Ok, I found out that when using .where({firstName: {$exists: true}}) causes this error.

SamVerschueren

comment created time in 4 days

push eventSamVerschueren/dynongo

Sam Verschueren

commit sha 7b0dcad0007ba02c8c28257b334d98709227b3c4

Add Node.js 14 as test target

view details

push time in 4 days

push eventSamVerschueren/dynongo

Sam Verschueren

commit sha 33d5f618e04e4d3268a674f664a08fb74f2f1692

Add support for strongly consistent reads - fixes #63

view details

push time in 4 days

issue closedSamVerschueren/dynongo

Add Support For ConsistentRead

Do you plan to add support for the ConsistentRead: true param?

It's similar to how the following params are passed in the request TableName, KeyConditionExpression, ExpressionAttributeValues, IndexName.

https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.ReadConsistency.html

closed time in 4 days

Gerst20051

issue commentSamVerschueren/dynongo

Add Support For ConsistentRead

I was wrong, should only be added to the find() and findOne() APIs.

Gerst20051

comment created time in 4 days

issue commentSamVerschueren/dynongo

Add Support For ConsistentRead

I'm open for a PR to add a .consistent() method on read and write operations. Should be super easy to do.

Gerst20051

comment created time in 5 days

issue commentSamVerschueren/dynongo

Queries/scans may return no data

Just throwing might be dangerous as well, although I understand the problem. Or would you only throw if the result set is empty but we do have a LastEvaluatedKey?

gabmontes

comment created time in 5 days

pull request commentarcanis/clipanion

feat: add description property to flags - fixes #12

Thanks @arcanis and @paul-soporan for guiding me through this! Cheers 🍷

SamVerschueren

comment created time in 20 days

pull request commentarcanis/clipanion

feat: add description property to flags - fixes #12

@paul-soporan @arcanis processed all feedback I believe. Thanks for reviewing!

SamVerschueren

comment created time in 21 days

PullRequestReviewEvent

Pull request review commentarcanis/clipanion

feat: add description property to flags - fixes #12

 export class Cli<Context extends BaseContext = BaseContext> implements MiniCli<C                 ? commandClass.usage.examples.map(([label, cli]) => [formatMarkdownish(label, {format: this.format(colored), paragraphs: false}), cli.replace(/\$0/g, this.binaryName)])                 : undefined; -            data.push({path, usage, category, description, details, examples});+            const options = builder.getOptions();

Do I need to use formatMarkdownish somewhere? Wasn't really sure 🤔 .

SamVerschueren

comment created time in 21 days

push eventSamVerschueren/clipanion

Sam Verschueren

commit sha ce1f5134b0505d1a8b4b9aeb4f8c2445a636e222

Remove unused import

view details

push time in 21 days

push eventSamVerschueren/clipanion

Sam Verschueren

commit sha f2dcd1d758af7fb98e2d38059d6966785fecfc63

Map options to a definition/description object

view details

push time in 21 days

PullRequestReviewEvent

Pull request review commentarcanis/clipanion

feat: add description property to flags - fixes #12

 export class Cli<Context extends BaseContext = BaseContext> implements MiniCli<C                     result += `\n`;                 } -                result += `${this.format(colored).bold(prefix)}${this.getUsageByRegistration(commandClass)}\n`;+                result += `${this.format(colored).bold(prefix)}${this.getUsageByRegistration(commandClass, {showOptionList: true})}\n`;

I'm not sure if I should add showOptionList option at line 342 or 393 as well. I don't know how I to access those code paths.

SamVerschueren

comment created time in 21 days

Pull request review commentarcanis/clipanion

feat: add description property to flags - fixes #12

 export class Cli<Context extends BaseContext = BaseContext> implements MiniCli<C                 ? commandClass.usage.examples.map(([label, cli]) => [formatMarkdownish(label, {format: this.format(colored), paragraphs: false}), cli.replace(/\$0/g, this.binaryName)])                 : undefined; -            data.push({path, usage, category, description, details, examples});+            const options = builder.getOptions();

I was just wondering, why not keeping it with names as string array instead of doing a names.join(',') here. But I'll map it, no problem :).

SamVerschueren

comment created time in 21 days

PullRequestReviewEvent

push eventSamVerschueren/clipanion

Sam Verschueren

commit sha 8905b055622c18d66f789c90206462d9ff15f9f9

Only show options in command help page

view details

push time in 21 days

Pull request review commentarcanis/clipanion

feat: add description property to flags - fixes #12

 export class Cli<Context extends BaseContext = BaseContext> implements MiniCli<C                 ? commandClass.usage.examples.map(([label, cli]) => [formatMarkdownish(label, {format: this.format(colored), paragraphs: false}), cli.replace(/\$0/g, this.binaryName)])                 : undefined; -            data.push({path, usage, category, description, details, examples});+            const options = builder.getOptions();

I also think that the hidden properties should also be hidden from the definitions.

Makes sense.

Not sure about renaming names to definition and joining it here? What do you think @arcanis ?

SamVerschueren

comment created time in 21 days

PullRequestReviewEvent

push eventSamVerschueren/clipanion

Sam Verschueren

commit sha 715e2be8cd1ff4de5f7fb63cdf1b9b8c96a66425

chore: Remove log

view details

push time in 22 days

Pull request review commentarcanis/clipanion

feat: add description property to flags - fixes #12

 run # invalid ``` -#### `@Command.String(optionNames: string, {tolerateBoolean?: boolean})`+#### `@Command.String(optionNames: string, {tolerateBoolean?: boolean, description?: string})`

Not sure if you want me to add it here as well? Some other options like hidden or tolerateBoolean are not defined here as well. Might've been forgotten in the past.

SamVerschueren

comment created time in 22 days

PullRequestReviewEvent

push eventSamVerschueren/clipanion

Sam Verschueren

commit sha a97139da49cd0d31ff1a5049489605ca6bd2d335

feat: Add support for description in `Command.Counter`

view details

push time in 22 days

pull request commentarcanis/clipanion

feat: add description property to flags - fixes #12

@arcanis I already updated the definitions, can you check if this is what you meant?

@paul-soporan So you mean if you just run bin without any action or something, it should just print the list of possibilities and not the options per item.

image

SamVerschueren

comment created time in 22 days

push eventSamVerschueren/clipanion

Paul Soporan

commit sha b1482d4f986d197b471577747d5e537c55873a53

docs: document command inheritance

view details

Paul Soporan

commit sha 0fe65c6f557ea4ecb80473a3dc10a60b5859b09f

feat: Command.Counter - boolean option counter ("run -vvv")

view details

Paul Soporan

commit sha 8e64f1133458a44403d93d94554f3354abb1357c

docs(readme): switch required option in Command.String example

view details

Paul Soporan

commit sha ab8291fadea7a33afc3b6c24187d32ac809e1fc2

style: fix brace style

view details

Maël Nison

commit sha 5348f072ad112252ed898cda8a904741f75dfb6e

Merge pull request #39 from paul-soporan/docs/inheritance docs: document command inheritance

view details

Maël Nison

commit sha 4f7bf1b05933848b9be6d6637acc9f142b193108

Merge pull request #41 from paul-soporan/feat/counter feat: Command.Counter - boolean option counter ("run -vvv")

view details

Maël Nison

commit sha 9a6700b740726ac83e58115d4b210dcf3cea1e94

Merge pull request #43 from paul-soporan/docs/command-string-required docs(readme): switch required option in Command.String example

view details

Sam Verschueren

commit sha dc90fb109fcc53b57c51237efe565db474363bf4

feat: add description property to flags - fixes #12

view details

Sam Verschueren

commit sha cd6d20ecf144e3d59f3eb38eab9ba68500fa97fe

chore: Add tests

view details

Sam Verschueren

commit sha 8e64535cf28297ff92bc30e306c0750381c0921a

feat: Add options to definitions

view details

push time in 22 days

push eventSamVerschueren/clipanion

Paul Soporan

commit sha b1482d4f986d197b471577747d5e537c55873a53

docs: document command inheritance

view details

Paul Soporan

commit sha 0fe65c6f557ea4ecb80473a3dc10a60b5859b09f

feat: Command.Counter - boolean option counter ("run -vvv")

view details

Paul Soporan

commit sha 8e64f1133458a44403d93d94554f3354abb1357c

docs(readme): switch required option in Command.String example

view details

Paul Soporan

commit sha ab8291fadea7a33afc3b6c24187d32ac809e1fc2

style: fix brace style

view details

Maël Nison

commit sha 5348f072ad112252ed898cda8a904741f75dfb6e

Merge pull request #39 from paul-soporan/docs/inheritance docs: document command inheritance

view details

Maël Nison

commit sha 4f7bf1b05933848b9be6d6637acc9f142b193108

Merge pull request #41 from paul-soporan/feat/counter feat: Command.Counter - boolean option counter ("run -vvv")

view details

Maël Nison

commit sha 9a6700b740726ac83e58115d4b210dcf3cea1e94

Merge pull request #43 from paul-soporan/docs/command-string-required docs(readme): switch required option in Command.String example

view details

push time in 22 days

push eventSamVerschueren/clipanion

Sam Verschueren

commit sha 30b26a220a0f1fc21f0b7b98d1277b99703194a8

feat: Add options to definitions

view details

push time in 22 days

pull request commentarcanis/clipanion

feat: add description property to flags - fixes #12

Just added tests as well.

SamVerschueren

comment created time in a month

push eventSamVerschueren/clipanion

Sam Verschueren

commit sha 0163ca461e7011031574be6500e3fc43084b44f1

chore: Add tests

view details

push time in a month

PR opened arcanis/clipanion

feat: add description property to flags - fixes #12

This PR fixes #12

I didn't add tests yet, so that's the next thing I will do but already wanted to receive feedback on the things I did up until now.

Kind regards, Sam

Screenshots image image image

+40 -12

0 comment

2 changed files

pr created time in a month

push eventSamVerschueren/clipanion

Sam Verschueren

commit sha 7f6e2373ca46679c21b3970c2cd0ff9f422eeb80

feat: add description property to flags - fixes #12

view details

push time in a month

create barnchSamVerschueren/clipanion

branch : iss12

created branch time in a month

issue commentarcanis/clipanion

Add `details` property to `@Command.{String,Boolean,Array}`

Ok, so this is what I have right now.

No options documented image

Verbose option documented image

Some questions that I have.

  1. If we have a @Command.String('--name'), do we want to show it as --name or as --name #0 in the options list?
  2. Do we want to document positional parameters as well? I would be ok to not do that (for now) as I might not see much value. And we didn't discuss how that would look as well. So I'm up for it if you want to, but I need to know how you guys see this.
ifiokjr

comment created time in a month

issue commentarcanis/clipanion

Add `details` property to `@Command.{String,Boolean,Array}`

@arcanis Should we hide options that don't have a description? Or just show them without?

ifiokjr

comment created time in a month

fork SamVerschueren/clipanion

Type-safe CLI library with no dependencies

fork in a month

issue commentarcanis/clipanion

Add `details` property to `@Command.{String,Boolean,Array}`

@cspotcode I guess that's a separate feature from this one so I'd suggest creating a new issue for that explaining how exactly you see the grouping as output for instance.

ifiokjr

comment created time in a month

issue commentarcanis/clipanion

Add `details` property to `@Command.{String,Boolean,Array}`

We actually need this as well. I'll see if I can come up with a PR in the coming days.

@arcanis Do you prefer details or description? To me description feels better as it is describing the property.

ifiokjr

comment created time in a month

issue openedSamVerschueren/alfred-notifier

Add support for Alfred 4

The notifier still works, but it tries to re-open Alfred 3. This means that the update message only appears when Alfred 4 is killed and restarted by the user. Mostly after a reboot. Because a lot of people don't actually ever reboot their system, they will never receive the update message.

created time in a month

issue commentSamVerschueren/alfred-notifier

Opens multiple Alfred instances

I actually found a solution in alfred-updater by killing Alfred first and then re-opening it. It's this block https://github.com/SamVerschueren/alfred-updater/blob/master/index.js#L67-L74.

Alfred 4 does indeed prevent this but it shows a warning message

https://github.com/SamVerschueren/alfred-updater/blob/master/index.js#L67-L74

The reason alfred-notifier doesn't do this for Alfred 4 is because it tries to start Alfred 3 still :p. So have to fix that first.

sonicdoe

comment created time in a month

issue closedSamVerschueren/alfred-notifier

Shows bad update message

screenshot

Alfred v4.1, freshly installed via npm i -g alfred-jira today, so alfy@0.9.1 and alfred-notifier@0.2.3

https://github.com/colinf/alfred-jira for workflow reference

closed time in a month

charliegroll

issue commentSamVerschueren/alfred-notifier

Shows bad update message

This is an issue on their side. See this line over here https://github.com/colinf/alfred-jira/blob/master/info.plist#L76. They have to remove that text. So it would be best to send them a PR fixing this.

charliegroll

comment created time in a month

issue commentSamVerschueren/alfred-updater

Checking for updates start a new alfred instance

This should be fixed right now. The reason I have to re-open Alfred is to make sure it reloads all the workflows again. This is now done by killing the application first and then re-opening it.

jeandat

comment created time in a month

issue commentSamVerschueren/alfred-updater

Doesn't work with Alfred 4

Updated the workflow and it should work for Alfred 4 now. Feel free to open an issue if you find something.

askhogan

comment created time in a month

release SamVerschueren/alfred-updater

v0.3.0

released time in a month

created tagSamVerschueren/alfred-updater

tagv0.3.0

Alfred workflow updater

created time in a month

push eventSamVerschueren/alfred-updater

Sam Verschueren

commit sha e8f57f5dc74c25f1f246cfea2af6d32d227259bb

0.3.0

view details

push time in a month

push eventSamVerschueren/alfred-updater

Sam Verschueren

commit sha f88fd46e5f0ebf7ee8afd7d04252188903bb4e33

Update dependencies

view details

push time in a month

push eventSamVerschueren/alfred-updater

Sam Verschueren

commit sha 23a82364a794157a98f6e5f3ebbd4abd98e3c612

Add support for Alfred 4 and fix opening second instance - fixes #4 #5

view details

push time in a month

issue closedSamVerschueren/alfred-updater

Checking for updates start a new alfred instance

Do you guys hit the same issue when alfred-updater runs? On my mac, it creates a second instance (and a third etc every time it runs). I'm on macOS Mojave 10.14.3 with node 11.10.1 and alfred latest version 3.8.1. The bug was there for quite some time but I just discovered alfred-updater is responsible. Is there something to configure? Thx.

Demo: https://drive.google.com/open?id=1xAU0JnquOb93_6ESCyQqR-OGZww9Kl-U

closed time in a month

jeandat

push eventSamVerschueren/alfred-updater

Sam Verschueren

commit sha 25d5f4c9036b574f987d904fbaefea6e5a1db367

Add support for Alfred 4 and fix opening second instance

view details

push time in a month

issue commentSamVerschueren/alfred-updater

Doesn't work with Alfred 4

I'm working on this right now. Hope to get this out tomorrow.

askhogan

comment created time in a month

push eventSamVerschueren/alfred-updater

Sam Verschueren

commit sha 88ebf770fdd5970cfe33c91492adb9be9b24ee68

Upgrade alfred-link and drop support for Node.js lower than 8

view details

push time in a month

push eventSamVerschueren/alfred-updater

Sam Verschueren

commit sha eb379e9d659827e114e460d151984d8f4cb36e23

Upgrade alfred-link and drop support for Node.js 4

view details

push time in a month

push eventSamVerschueren/alfred-updater

Sam Verschueren

commit sha 8a75f105eb2588435e4928a7b930aa029e370bdd

Meta tweaks

view details

push time in a month

push eventSamVerschueren/alfred-updater

Sam Verschueren

commit sha 9cdf94408d0e4987bba92afc094c4812d77efb6f

Meta tweaks

view details

push time in a month

issue openedSamVerschueren/bragg-route-invoke

Drop older Node.js versions

Only support Node.js 10 on upwards.

created time in a month

release SamVerschueren/bragg-route-invoke

v2.1.0

released time in a month

push eventSamVerschueren/bragg-route-invoke

Sam Verschueren

commit sha 8928c3408ae418f349118f9d46c3241ec0dbe0b8

2.1.0

view details

push time in a month

created tagSamVerschueren/bragg-route-invoke

tagv2.1.0

Invoke bragg routes in a lambda function

created time in a month

push eventSamVerschueren/bragg-route-invoke

Sam Verschueren

commit sha 6bab32050fdd45ebe613f892c48a24558565549a

Fix tests and meta tweaks

view details

Sam Verschueren

commit sha f7f27aeba3fe06fb5d26871f27c0d4cc15b07830

Test newer Node.js versions

view details

Sam Verschueren

commit sha 57eac2fe631cca4b0990b86d398ed50b0b41a248

Set error expose flag to true by default - fixes #7

view details

push time in a month

push eventSamVerschueren/bragg-route-invoke

Sam Verschueren

commit sha efaec00331e6db067de26f86324688bf7d25e389

Set error expose flag to true by default - fixes #7

view details

push time in a month

issue closedSamVerschueren/bragg-route-invoke

Set `expose` to `true`

When an error has to be parsed, it should be exposed by default.

closed time in a month

SamVerschueren

PR closed SamVerschueren/bragg-route-invoke

Update linting + fix ava to ^0.25.0

I wanted to add support for both the Bragg versions, but the listing was not complaint with the latest standards, so this is the fix for that.

+21 -21

1 comment

3 changed files

bartcallant

pr closed time in a month

pull request commentSamVerschueren/bragg-route-invoke

Update linting + fix ava to ^0.25.0

Fixed it myself by downgrading XO and AVA to do the minimal on changes. Will do a commit later on to drop older Node.js versions.

bartcallant

comment created time in a month

push eventSamVerschueren/bragg-route-invoke

Sam Verschueren

commit sha 6d5193732224ed82e9e1766691963fa41c66cc33

Test newer Node.js versions

view details

push time in a month

push eventSamVerschueren/bragg-route-invoke

Sam Verschueren

commit sha 5fdfc6be7f0309c14b2b3651d7f7a5bbf48d2087

Fix tests and meta tweaks

view details

push time in a month

issue openedSamVerschueren/bragg-route-invoke

Set `expose` to `true`

When an error has to be parsed, it should be exposed by default.

created time in 2 months

startedstevermeister/ngx-wig

started time in 2 months

pull request commentSamVerschueren/tsd

Tweak readme.md

Thanks! :)

papb

comment created time in 2 months

push eventSamVerschueren/tsd

Pedro Augusto de Paula Barbosa

commit sha 7bfdddf59a0a6dcf70685012b7cf6de2db205ffb

Tweak readme.md (#66) Co-authored-by: Ethan Arrowood <ethan.arrowood@gmail.com>

view details

push time in 2 months

PR merged SamVerschueren/tsd

Tweak readme.md

This PR relates to issue #55. In particular, to the first bullet of this comment I made there.

I'm not even sure if what I've written in this PR is correct; but it is what I understood after a lot of digging. If it's wrong, please explain and then I will be happy to fix the PR.

I am pretending to be writing for my past self, which would have really wanted some explanation in this direction.

Thanks!!

+7 -0

0 comment

1 changed file

papb

pr closed time in 2 months

pull request commentSamVerschueren/tsd

Allow specifying the test files and typings file manually

I like the idea. However, I believe we should go for globbing patterns for the testFiles with globby. It will still accept the array as you provided, but also allow globbing patterns to resolve the files.

smartclash

comment created time in 2 months

Pull request review commentSamVerschueren/tsd

Update readme.md

  > Check TypeScript type definitions +## Overview

Can you move this below ## Install? And leave 2 blank lines between the sections?

papb

comment created time in 2 months

release SamVerschueren/stream-to-observable

v0.3.1

released time in 2 months

push eventSamVerschueren/stream-to-observable

Sam Verschueren

commit sha 7bcebfbb6a4bf31406c1a9614aebc9b8da7cebdf

0.3.1

view details

push time in 2 months

created tagSamVerschueren/stream-to-observable

tagv0.3.1

Convert Node Streams into ECMAScript-Observables

created time in 2 months

push eventSamVerschueren/stream-to-observable

Maël Nison

commit sha 1e16aace95e889c3967cf63fe43baf74b5915ffa

Add missing optional peer dependencies (#5)

view details

push time in 2 months

push eventSamVerschueren/stream-to-observable

Maël Nison

commit sha 6c7093f659f3ce245eb25ba1ee27914155d58abc

Add missing optional peer dependencies (#5)

view details

push time in 2 months

issue commentSamVerschueren/stream-to-observable

Error: Cannot find any-observable implementation nor global.Observable. when running husky.

Have you installed RxJS or zen-observable as mentioned in the documentation?

asimqt

comment created time in 2 months

pull request commentSamVerschueren/stream-to-observable

Add missing optional peer dependencies

Thanks!

arcanis

comment created time in 2 months

push eventSamVerschueren/stream-to-observable

Maël Nison

commit sha 95a5fed560f017e7a12d26d3469bb5c496cfae97

Add missing optional peer dependencies (#5)

view details

push time in 2 months

PR merged SamVerschueren/stream-to-observable

Add missing optional peer dependencies

This diff adds the missing optional peer dependencies on rxjs and zen-observable (required because of the transitive dependency on any-observable, cf https://github.com/sindresorhus/any-observable/pull/25). Without that, Yarn will refuse giving any-observable access to the Observable implementations.

Because it only uses peerDependenciesMeta (and not peerDependencies), this diff is entirely compatible with other package managers (it won't cause warning to appear anywhere).

+8 -0

0 comment

1 changed file

arcanis

pr closed time in 2 months

Pull request review commentsindresorhus/got

Add got4aws to AWS section

 got('unix:/var/run/docker.sock:/containers/json');  ## AWS -Requests to AWS services need to have their headers signed. This can be accomplished by using the [`aws4`](https://www.npmjs.com/package/aws4) package. This is an example for querying an ["API Gateway"](https://docs.aws.amazon.com/apigateway/api-reference/signing-requests/) with a signed request.+Requests to AWS services need to have their headers signed. This can be accomplished by using the [`got4aws`](https://www.npmjs.com/package/got4aws) package. This is an example for querying an ["API Gateway"](https://docs.aws.amazon.com/apigateway/api-reference/signing-requests/) with a signed request.  ```js-const got = require('got');-const AWS = require('aws-sdk');-const aws4 = require('aws4');--const chain = new AWS.CredentialProviderChain();+const got4aws = require('got4aws');; -// Create a Got instance to use relative paths and signed requests-const awsClient = got.extend({-	prefixUrl: 'https://<api-id>.execute-api.<api-region>.amazonaws.com/<stage>/',-	hooks: {-		beforeRequest: [-			async options => {-				const credentials = await chain.resolvePromise();-				aws4.sign(options, credentials);-			}-		]-	}-});+const awsClient = got4aws(); -const response = await awsClient('endpoint/path', {+const response = await awsClient('https://<api-id>.execute-api.<api-region>.amazonaws.com/<stage>/endpoint/path', {

I could easily change it to a real URL like I do in the docs of got4aws itself. If you are familiar with API Gateway, I believe you definitely know how this works. I just copy-pasted it from the example which was already present in the docs before.

SamVerschueren

comment created time in 2 months

pull request commentsindresorhus/got

Add got4aws to AWS section

But then without TS and the IIFE.

SamVerschueren

comment created time in 2 months

pull request commentsindresorhus/got

Add got4aws to AWS section

You mean something like I do in the got4aws example itself?

import got4aws from 'got4aws';

// Load credentials from `~/.aws/credentials`
const got = got4aws({
	providers: new AWS.SharedIniFileCredentials({profile: 'myProfile'})
});

(async () => {
	const {body} = await got.get('https://12abc34.execute-api.us-east-1.amazonaws.com/v0');

	console.log(body);
	//=> {status: 'ok'}
})();
SamVerschueren

comment created time in 2 months

issue commentSamVerschueren/tsd

Allow testing another TypeScript version

Thanks to the work of @phryneas I am already able to do something like this.

image

In my type definition, I used the nullish coalescing operator which was introduced in TypeScript@3.7. The older versions report issues on that, which is pretty slick!

It still need some more work though. Let's say it still in proof-of-concept phase :).

SamVerschueren

comment created time in 2 months

more