profile
viewpoint

jer-sen/ant-design 0

🌈 A UI Design Language and React UI library

jer-sen/apollo-client 0

:rocket: A fully-featured, production ready caching GraphQL client for every server or UI framework

jer-sen/apollo-server 0

🌍 GraphQL server for Express, Connect, Hapi, Koa and more

jer-sen/cron-parser 0

Node.js library for parsing crontab instructions

jer-sen/DefinitelyTyped 0

The repository for high quality TypeScript type definitions.

jer-sen/duplicacy 0

A new generation cloud backup tool

jer-sen/eslint-plugin-output-todo-comments 0

Contains single rule that warns about used warning comments and shows them as they are

jer-sen/formik 0

Build forms in React, without the tears 😭

jer-sen/jurismatic 0

http://www.jurismatic.com

issue commentapollographql/apollo-client

useQuery query.data === null with a server error during refetching after a previous server error

Since errorPolicy is set to default (none) an according to the doc, query.data should be undefined:

If the response includes GraphQL errors, they are returned on error.graphQLErrors and the response data is set to undefined even if the server returns data in its response. This means network errors and GraphQL errors result in a similar response shape. This is the default error policy.

jer-sen

comment created time in 14 days

issue commentapollographql/apollo-client

useQuery query.data === null with a server error during refetching after a previous server error

Here is the server response body: {"errors":[{"message":"Internal server error"}],"data":null}. The data field returned by the server is null so the result of the refetch may be correct. But then the result of the first query (undefined) is wrong...

jer-sen

comment created time in 15 days

issue openedapollographql/apollo-client

useQuery query.data === null with a server error during refetching after a previous server error

<!-- Thanks for filing an issue on Apollo Client!

Please make sure that you include the following information to ensure that your issue is actionable.

If you don't follow the template, your issue may end up being closed without anyone looking at it carefully, because it is not actionable for us without the information in this template.

PLEASE NOTE: Feature requests and non-bug related discussions are no longer managed in this repo. Feature requests should be opened in https://github.com/apollographql/apollo-feature-requests. -->

Intended outcome: <!-- What you were trying to accomplish when the bug occurred, and as much code as possible related to the source of the problem. --> query.data === undefined according to TypeScript type

Actual outcome: <!-- A description of what actually happened, including a screenshot or copy-paste of any related error messages, logs, or other output that might be related. Places to look for information include your browser console, server console, and network logs. Please avoid non-specific phrases like “didn’t work” or “broke”. --> query.data === null

How to reproduce the issue: <!-- If possible, please create a reproduction using https://github.com/apollographql/react-apollo-error-template and link to it here. If you prefer an in-browser way to create reproduction, try: https://codesandbox.io/s/github/apollographql/react-apollo-error-template

Instructions for how the issue can be reproduced by a maintainer or contributor. Be as specific as possible, and only mention what is necessary to reproduce the bug. If possible, try to isolate the exact circumstances in which the bug occurs and avoid speculation over what the cause might be. --> I have a React.js app (in runing in Firefox). A component uses useQuery hook. At the first load the server returns a GraphQL error (in an HTTP 200 response). I refetch the query with the same server error returned. Then I get query.data === null. The null value seems restored from last value stored by underlying ObservableQuery object and only returned after the refetch.

Versions <!-- Run the following command in your project directory, and paste its (automatically copied to clipboard) results here:

npx envinfo@latest --preset apollo --clipboard -->

System: OS: Windows 10 10.0.19043 Binaries: Node: 14.18.1 - C:\Program Files\nodejs\node.EXE Yarn: 1.22.10 - ~\AppData\Roaming\npm\yarn.CMD npm: 7.10.0 - C:\Program Files\nodejs\npm.CMD Browsers: Chrome: 96.0.4664.45 Edge: Spartan (44.19041.1266.0), Chromium (95.0.1020.53) npmPackages: @apollo/client: ^3.4.16 => 3.4.17

created time in 15 days

issue openednecolas/react-native-web

removeListener deprecated

In react-native@0.65.0 they deprecated the old api in favour of a more terse name, so removeListener() becomes remove().

This line https://github.com/necolas/react-native-web/blob/081a128db325f9ee10c359e304e9f6cc7f4f9c56/packages/react-native-web/src/exports/AppState/index.js#L81 raise the console.error message EventEmitter.removeListener('function(e){a(e)}', ...): Method has been deprecated. Please instead useremove()on the subscription returned byEventEmitter.addListener.

created time in 15 days

issue openedapollographql/apollo-tooling

graphql 16 renamed PossibleTypeExtensions to PossibleTypeExtensionsRule

Hello,

At this line file required should be updated: https://github.com/apollographql/apollo-tooling/blob/5b0b1ed1d7aef2bf8c558fce7a5a00ce6494baf7/packages/apollo-graphql/src/schema/buildSchemaFromSDL.ts#L57

created time in 18 days

issue commentgetsentry/sentry-react-native

Unhandled promises are not logged at all (iOS and Android)

@jennmueng & @marandaneto you should also clean the code by removing the current workaround when the runtime check will be implemented

lukewlms

comment created time in 19 days

issue commentserverless-heaven/serverless-webpack

Useless warning on excluded modules WARNING: Could not determine version of module ###

@j0k3r what do you need exactly?

The log comes from this line: https://github.com/serverless-heaven/serverless-webpack/blob/9b5c29030549698d2548ee2b020c8e81a9f22e51/lib/packExternalModules.js#L149 It seems that serverless-webpack looks for a version of any external module (and is not happy if module is not in depedencies nor in devDependencies) even if it is force exluded. Is it really what we want?

mongodb module requires some optional modules found by webpack so I've added these to externals since I don't want to use theim. But I get the warning during build...

jer-sen

comment created time in 23 days

issue openedserverless-heaven/serverless-webpack

Useless warning on excluded modules WARNING: Could not determine version of module ###

This is a Bug Report

Description

For bug reports:

  • What went wrong? Warnings during builds WARNING: Could not determine version of module ###
  • What did you expect should have happened? No warning. Since the modules are excluded their version should not be determined.
  • What was the config you used? The module is not in dependecies, but in webpack externals and forceExclude
  • What stacktrace or error message from your provider did you see? WARNING: Could not determine version of module ###

Similar or dependent issue(s): non found

Additional Data

  • Serverless-Webpack Version you're using: serverless-webpack@5.5.5
  • Webpack version you're using: webpack@5.61.0
  • Serverless Framework Version you're using: Framework Core: 2.64.1
  • Operating System: Windows 10
  • ***Stack Trace (if available)***: NA

created time in 24 days

PR opened adaltas/node-csv

Add TypeScript stream.TransformOptions properties to Options

To match doc and code: super({...{writableObjectMode: true}, ...opts}); All the options from the Node.js Writable Stream API and the Node.js Readable Stream API are supported and passed as is.

+1 -1

0 comment

1 changed file

pr created time in 25 days

push eventjer-sen/node-csv

jer-sen

commit sha 01d3c91af3bbaa7cef90de62b0ec040f3b01d2d4

Restore export

view details

push time in 25 days

push eventjer-sen/node-csv

jer-sen

commit sha 653e678b217f6abfd23c9fdda7eac3184332eac9

Add TypeScript stream.TransformOptions properties to Options To match doc and code: `super({...{writableObjectMode: true}, ...opts});` All the options from the Node.js Writable Stream API and the Node.js Readable Stream API are supported and passed as is.

view details

push time in 25 days

fork jer-sen/node-csv

Full featured CSV parser with simple api and tested against large datasets.

https://csv.js.org

fork in 25 days

issue commentgetsentry/sentry-react-native

Unhandled promises are not logged at all (iOS and Android)

@jennmueng as explained in my comment here https://github.com/facebook/fbjs/pull/413#issuecomment-949583551, I think you should do 2 or 3 things to close this issue:

  • add to the installation doc that promise dependency must be added to the project identical to react-native's dependency
  • add a runtime check with an alert to the developer if Promise !== _global.Promise here https://github.com/getsentry/sentry-react-native/blob/e3d11a1b657f1864af41414dced73394f03e9b23/src/js/integrations/reactnativeerrorhandlers.ts#L83
  • add a peer dependency to promise@^8.0.3? But it will break for older/newer versions of RN depending on another versoin of promise...

What do you think about all this?

lukewlms

comment created time in a month

pull request commentfacebook/fbjs

Bump "promise" to ^8.0.3 to match React Native

You are right. In fact, what happens is that sentry-expo requires promise module to register an event. Cf https://github.com/getsentry/sentry-react-native/blob/e3d11a1b657f1864af41414dced73394f03e9b23/src/js/integrations/reactnativeerrorhandlers.ts#L83

But the version resolved is not the one from react-native at ^8.0.3, it's an other hoisted for react-native-web#fbjs#promise and expo#fbemitter#fbjs#promise at 7.3.1. So the event is not registered on the global Promise object installed by react-native.

I see to possible fixes:

  • bumping promise version of fbjs => all modules will then use the same version that will be hoisted
  • adding a dependency to my project at the same version than react-native => react-native will use this hoisted version which will be the one resolved by sentry-expo's require

The second one seems cleaner to me. I will suggest Sentry to update there installation doc and add a runtime check.

Sorry for the mistake in my previous comment and many thanks for invastigating my issue.

bengourley

comment created time in a month

issue openedadaltas/node-csv

Undocumented relax option

Page for relax option is missing: https://csv.js.org/parse/options/relax/

Cf https://github.com/adaltas/node-csv/blob/879a9dd3bfb4eca25d47519e6eff89838523ba26/packages/csv-parse/lib/index.d.ts#L147

created time in a month

pull request commentfacebook/fbjs

Bump "promise" to ^8.0.3 to match React Native

@zpao I use sentry-expo for bug tracking (as a LOT of people using Expo since its the recommanded and only supported bug tracker for managed workflow: https://docs.expo.dev/guides/using-sentry/). It needs to hook on Promise global object to report failed or unhandled promised. To do so it relies on promise module but it needs to use the same version than the one that hooked on Promise global object, otherwise Sentry do not received events. React Native depends on promise: "^8.0.3" but 2 other modules depend inderectly on an other version of promise through fbjs: react-native-web#fbjs#promise & expo#fbemitter#fbjs#promise. If fbjs dependency on promise were bumped to ^8.0.3 there would be only one version in my project and everything would work fine (as it does with this addition to my package.json: "resolutions": { "react-native-web/**/promise": "^8.0.3", "expo/**/promise": "^8.0.3" },).

So, could you merge this PR ?

bengourley

comment created time in a month

issue commentgetsentry/sentry-react-native

Unhandled promises are not logged at all (iOS and Android)

react-native-web still relies on fbjs so I'm still facing this issue :(

lukewlms

comment created time in a month

pull request commentfacebook/fbjs

Bump "promise" to ^8.0.3 to match React Native

@zpao react-native-web still relies on fbjs which cause me trouble. Why can't you merge this PR?

bengourley

comment created time in a month

issue commenti18next/react-i18next

Type-safe translations do not work with plurals

@njacob1001 you can use patch-package module

Mephistofeles

comment created time in a month

issue commentfacebook/create-react-app

eslint-config-react-app is not compatible with ESLint 8

Here is a dirty fix that you can use with patch-package:

diff --git a/node_modules/eslint-plugin-flowtype/dist/rules/noUnusedExpressions.js b/node_modules/eslint-plugin-flowtype/dist/rules/noUnusedExpressions.js
index 6171456..f1a9d72 100644
--- a/node_modules/eslint-plugin-flowtype/dist/rules/noUnusedExpressions.js
+++ b/node_modules/eslint-plugin-flowtype/dist/rules/noUnusedExpressions.js
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
   value: true
 });
 
-var _noUnusedExpressions = require('eslint/lib/rules/no-unused-expressions');
+var _noUnusedExpressions = require('eslint/use-at-your-own-risk').builtinRules.get('no-unused-expressions');
 
 var _noUnusedExpressions2 = _interopRequireDefault(_noUnusedExpressions);
 

kirill-konshin

comment created time in a month

issue commenti18next/react-i18next

Type-safe translations do not work with plurals

@pedrodurek @adrai types in ts4.1/index.d.ts must be updated to support new json format v4. Here is something working for me:

@@ -34,14 +34,15 @@ export interface Resources {}
  * import 'react-i18next';
  * declare module 'react-i18next' {
  *   interface CustomTypeOptions {
- *     defaultNS: 'custom';
+ *     defaultNS: 'custom',
  *     returnNull: false,
  *     returnEmptyString: false,
  *     resources: {
  *       custom: {
- *         foo: 'foo';
- *       };
- *     };
+ *         foo: 'foo',
+ *       },
+ *     },
+ *     jsonFormat: 'v4',
  *   }
  * }
  * ```
@@ -56,6 +57,7 @@ type TypeOptions = MergeBy<
     returnEmptyString: true;
     defaultNS: 'translation';
     resources: Resources;
+    jsonFormat: 'v4',
   },
   CustomTypeOptions
 >;
@@ -92,16 +94,24 @@ declare module 'i18next' {
 }
 
 // Normalize single namespace
+type WithOrWithoutPlural<K> =
+  TypeOptions['jsonFormat'] extends 'v4' ?
+    K extends unknown ?
+      K extends `${infer B}_${'zero' | 'one' | 'two' | 'few' | 'many' | 'other'}` ? B | K : K
+      : never
+    :
+    K
+;
 type AppendKeys<K1, K2> = `${K1 & string}.${K2 & string}`;
 type AppendKeys2<K1, K2> = `${K1 & string}.${Exclude<K2, keyof any[]> & string}`;
 type Normalize2<T, K = keyof T> = K extends keyof T
   ? T[K] extends Record<string, any>
     ? T[K] extends readonly any[]
-      ? AppendKeys2<K, keyof T[K]> | AppendKeys2<K, Normalize2<T[K]>>
-      : AppendKeys<K, keyof T[K]> | AppendKeys<K, Normalize2<T[K]>>
+      ? AppendKeys2<K, WithOrWithoutPlural<keyof T[K]>> | AppendKeys2<K, Normalize2<T[K]>>
+      : AppendKeys<K, WithOrWithoutPlural<keyof T[K]>> | AppendKeys<K, Normalize2<T[K]>>
     : never
   : never;
-type Normalize<T> = keyof T | Normalize2<T>;
+type Normalize<T> = WithOrWithoutPlural<keyof T> | Normalize2<T>;
 
 // Normalize multiple namespaces
 type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void
Mephistofeles

comment created time in a month

issue openedYousefED/typescript-json-schema

Tuples should be translated to prefixItems

As for now, tuples such as [number] are translated to { items: [{ type: "number"}], "maxItems": 1, "minItems": 1, "type": "array" }. But in my understanding items must contain a schema, not an array: https://json-schema.org/draft/2020-12/json-schema-core.html#items So prefixItems should be used instead. Note that, in case of an empty array, there should be no prefixItems nor items (just maxItems and minItems with value 0).

Ajv JSON schema validator seems to work with an array in items but throws an error with an empty array.

created time in 2 months

issue commentexpo/expo-cli

Security issue: whole content of app.json in build result for Web

@EvanBacon?

jer-sen

comment created time in 2 months

issue openedmdn/translated-content

Issue with "window.location": no forceget parameter for reload()

MDN URL: https://developer.mozilla.org/fr/docs/Web/API/window/location

What information was incorrect, unhelpful, or incomplete?

No forceget parameter for reload()

Specific section or headline?

https://developer.mozilla.org/fr/docs/Web/API/window/location#m.c3.a9thodes https://developer.mozilla.org/fr/docs/Web/API/window/location#exemple_2_forcer_le_rechargement_de_la_page_actuelle_depuis_le_serveur

What did you expect to see?

https://developer.mozilla.org/en-US/docs/Web/API/Location/reload#location.reload_has_no_parameter

Did you test this? If so, how?

No

<!-- Do not make changes below this line --> <details> <summary>MDN Content page report details</summary>

  • Folder: fr/web/api/window/location
  • MDN URL: https://developer.mozilla.org/fr/docs/Web/API/window/location
  • GitHub URL: https://github.com/mdn/translated-content/blob/main/files/fr/web/api/window/location/index.html
  • Last commit: https://github.com/mdn/translated-content/commit/556b5447d3023fff1cfdbc377e7f6d71cc4e23a3
  • Document last modified: 2021-09-10T17:23:11.000Z

</details>

created time in 3 months

issue commentexpo/expo-cli

Security issue: whole content of app.json in build result for Web

@EvanBacon any update on this critical issue?

jer-sen

comment created time in 3 months

issue commentexpo/expo-cli

Security issue: whole content of app.json in build result for Web

There is already some code for iOS/Android builds that take only some properties of app.json. It would be a good idea to be DRY and reuse the same code. Don't you think? Also it would be nice to get the same values with expo-cconstant from web than from iOS/Android.

As for the link I've copied/pasted, it's a piece of code I've found that seems to do already what is needed for web builds. Can you reuse that?

jer-sen

comment created time in 3 months

issue commentexpo/expo-cli

Security issue: whole content of app.json in build result for Web

Yes, at least staticConfigPath projectRoot packageJsonPath (so _internal ?). Could you select same properties than for iOS/Android builds? https://github.com/expo/expo-cli/blob/1375d6eea5dd112331244d6800996c62c983b0da/packages/config/src/Config.ts#L136

jer-sen

comment created time in 3 months

issue openedexpo/expo-cli

Security issue: whole content of app.json in build result for Web

Summary

When building for web, some useless and potentially sensitive (such as hooks configuration with auth tockens (Sentry, ...), project folder on local computer, …) data from app.json are included in the bundle.

Environment

Expo CLI 4.10.1 environment info: System: OS: Windows 10 10.0.19042 Binaries: Node: 14.15.5 - C:\Program Files\nodejs\node.EXE Yarn: 1.22.10 - ~\AppData\Roaming\npm\yarn.CMD npm: 7.10.0 - C:\Program Files\nodejs\npm.CMD IDEs: Android Studio: Version 3.5.0.0 AI-191.8026.42.35.5900203 npmPackages: expo: ~42.0.1 => 42.0.3 react: 16.13.1 => 16.13.1 react-dom: 16.13.1 => 16.13.1 react-native: https://github.com/expo/react-native/archive/sdk-42.0.0.tar.gz => 0.63.2 react-native-web: ~0.13.12 => 0.13.18 Expo Workflow: managed

Please specify your device/emulator/simulator platform, model and version

web

Error output

None

Reproducible demo or steps to reproduce from a blank project

Easy to test with a new project, build for web, look into the JS chunks for “staticConfigPath” or any configuration added to app.json.

created time in 3 months

more