profile
viewpoint
Francisco Presencia franciscop Tokyo, Japan https://francisco.io/ Twitter: @fpresencia

franciscop/brownies 2386

🍫 Tastier cookies, local, session, and db storage in a tiny package. Includes subscribe() events for changes.

franciscop/atama 82

:evergreen_tree: State management tool using Proxy()

franciscop/cookies 42

🍪 Delicious browser cookies

franciscop/burla 12

Advanced URL manipulation library using the History API

franciscop/backblaze 11

An unofficial package to easily deal with Backblaze API on Node.js

franciscop/create-static-web 11

Another static site generator

franciscop/crossroad 9

🛣 A React library to handle navigation in your WebApp. Built with simple components and React Hooks so your code is cleaner.

franciscop/check-licenses 7

A simple tool to check all the licenses in your dependencies

franciscop/atocha 6

Run clean terminal commands from Node.js

franciscop/cloudbleed 6

Website interface for cloudbleed domain list

issue closedfranciscop/server

Heroku wrong IP

Describe the bug The described way of obtaining the IP is through ctx.ip, but in Heroku (and possibly others) this is returning an internal IP, and not the user IP as expected. Instead, server.js should use ctx.headers["x-forwarded-for"] to correctly find the IP when possible, since it's a "de-facto standard".

To Reproduce Steps to reproduce the behavior:

  1. Log the IP console.log(ctx.ip)
  2. Deploy on Heroku
  3. Check the IP in the logs (it's local)
  4. Google "What is my IP" and see that ofc it's different

Expected behavior The result from What is my IP and Heroku logs' IP should be the same

Possible Fix A potential fix:

export default forwardedMiddleware = ctx => {
  const forwarded = ctx.headers["x-forwarded-for"];
  if (forwarded) {
    ctx.ip = forwarded.trim().split(/\,\s?/g).shift();
  }
}

closed time in 3 days

franciscop

issue commentfranciscop/server

Heroku wrong IP

Fixed 👍

franciscop

comment created time in 3 days

push eventfranciscop/server

Francisco

commit sha 1d7e111cfcc710afc2a870988b04ebfb1174e4b5

1.0.37

view details

push time in 3 days

created tagfranciscop/server

tagv1.0.37

:desktop_computer: Simple and powerful server for Node.js

created time in 3 days

push eventfranciscop/server

Francisco

commit sha 5298b97b5cd6bdf5468d0da5966aaa9fdb32e695

Fixed issue #140 and added a bit of docs

view details

push time in 3 days

issue openedfranciscop/server

Heroku wrong IP

Describe the bug The described way of obtaining the IP is through ctx.ip, but in Heroku (and possibly others) this is returning an internal IP, and not the user IP as expected. Instead, server.js should use ctx.headers["x-forwarded-for"] to correctly find the IP when possible, since it's a "de-facto standard".

To Reproduce Steps to reproduce the behavior:

  1. Log the IP console.log(ctx.ip)
  2. Deploy on Heroku
  3. Check the IP in the logs (it's local)
  4. Google "What is my IP" and see that ofc it's different

Expected behavior The result from What is my IP and Heroku logs' IP should be the same

Possible Fix A potential fix:

export default forwardedMiddleware = ctx => {
  const forwarded = ctx.headers["x-forwarded-for"];
  if (forwarded) {
    ctx.ip = forwarded.trim().split(/\,\s?/g).shift();
  }
}

created time in 3 days

push eventfranciscop/statux

Francisco

commit sha 6684a544aa352921e1c72243685499a8881a9351

Fixed link

view details

push time in 3 days

fork franciscop/ReactStateMuseum

A whirlwind tour of React state management systems by example

fork in 6 days

push eventfranciscop/franciscop.github.io

Francisco

commit sha e2ed978d922a5f3074ed9006c8df8c8cfce4cdfb

Added reset

view details

push time in 11 days

created tagfranciscop/use-async

tagv1.0.4

React hooks to make handling async operations a breeze

created time in 11 days

push eventfranciscop/use-async

Francisco

commit sha f88cffe4150a7ae8c27a4c450e8c6d39886a0a7c

1.0.4

view details

push time in 11 days

push eventfranciscop/use-async

Francisco

commit sha a5903ea5c966e0edfd28eeb63b8eb4575bf5c44b

Improved readme greatly

view details

push time in 11 days

push eventfranciscop/use-async

Francisco

commit sha fc4a74f9c5c3e21e831669a4b19988d1ca5b2aa6

Added badges

view details

push time in 12 days

push eventfranciscop/use-async

Francisco

commit sha aaf664d6fdc943fa2972c66b2d39ff04932a1547

1.0.3

view details

push time in 12 days

created tagfranciscop/use-async

tagv1.0.3

React hooks to make handling async operations a breeze

created time in 12 days

push eventfranciscop/use-async

Francisco

commit sha d774b82e1b6f5d7e87ee2b9afc8240fbced90d61

Throw errors properly

view details

push time in 12 days

push eventfranciscop/use-async

Francisco

commit sha 2450648172f1e947085561ba1c49f079ab066f32

1.0.2

view details

push time in 12 days

created tagfranciscop/use-async

tagv1.0.2

React hooks to make handling async operations a breeze

created time in 12 days

push eventfranciscop/use-async

Francisco

commit sha 6745b60aa220ba0f4ddc05ae64977e97de3929ca

Let errors to be thrown (for now)

view details

push time in 12 days

push eventfranciscop/happy

Francisco

commit sha 9d88ceade7aaf9488c0a4ec7770099ce31019100

0.13.4

view details

push time in 12 days

created tagfranciscop/happy

tagv0.13.4

Happy simplifies your day-to-day git workflow:

created time in 12 days

push eventfranciscop/happy

Francisco Presencia

commit sha b36c95fb61eeaa7ee2672d64468ce2323ab04868

Update save.js

view details

push time in 12 days

push eventfranciscop/use-async

Francisco

commit sha 7e615690029c9954494b6b7100231e9d8853b521

Testing github workflows

view details

push time in 12 days

create barnchfranciscop/use-async

branch : master

created branch time in 12 days

created repositoryfranciscop/use-async

React hooks to make handling async operations a breeze

created time in 12 days

issue commentwhatwg/html

Form disabled attribute to disable the form submission

@caub thanks for opening this Issue, I came to whatwg/html to propose this feature and was happy to see there was already a lot of work. What are the next steps here? How can I help moving this forward as an individual?

It seems that in the official PR @caub needs to sign the Agreement.

Once that's done, the PR is merged and according to the FAQ, steps 1-8 should've been covered, right? Maybe even 1-10.

caub

comment created time in 13 days

issue commentfacebook/react

Library compatible since hooks, should it be `"^16.8.0 || ^17.0.0 || ^18.0.0"` or `">=16.8"`?

Yes, I meant that it's published with no breaking changes as per the quote above from the React team, as seems like it happened with React 17. As a developer using React, I appreciate it, but maintaining libraries becomes more difficult.

What are those breaking changes? I couldn't find them after I searched, or do you mean there are only internal breaking changes and somehow that doesn't translate in any public-API breaking changes?

franciscop

comment created time in 13 days

issue commentfacebook/react

Library compatible since hooks, should it be `"^16.8.0 || ^17.0.0 || ^18.0.0"` or `">=16.8"`?

I guess my problem is mainly with React 18 breaking SemVer and making what seems like unnecessary work for devs:

Since concurrency in React 18 is opt-in, there are no significant out-of-the-box breaking changes to component behavior.

I want my libraries to be "done", and only have to update them if there's potential for any issue. In this situation, needing to go through my libraries and update/publish a new version of all of them/year without a potential for a breaking change feels onerous and that's why I believe it's possibly a React-specific issue.

That, plus potentially the issue of not being able to keyword search my own username in npm makes maintaining React npm libraries tricky (I have 86 JS libraries).

franciscop

comment created time in 13 days

issue commentfacebook/react

Library compatible since hooks, should it be `"^16.8.0 || ^17.0.0 || ^18.0.0"` or `">=16.8"`?

Sorry @markerikson I never wrote ^16.8 (besides to show how it used to be done back in the day), I am comparing both in the title and main question ">=16.8.0" vs "^16.8.0 || ^17.0.0 || ^18.0.0"

franciscop

comment created time in 16 days

more