gatsbyjs/gatsby 46408
Build blazing fast, modern apps and websites with React
ElGamal cryptosystem for JavaScript.
Validation for the Model objects of Bookshelf.js
A CHIP-8 emulator written in JavaScript for educational purposes.
An open-source JavaScript library for creating card games.
⚡️Simple, Modular & Accessible UI Components for your React Applications
Personal startpage implemented in Gatsby, to help me grasp this neat framework
:tropical_fish: Babel is a compiler for writing next generation JavaScript.
⚡️The Fullstack React Framework — built on Next.js
startedsvenkreiss/html5validator
started time in 8 hours
startedcsstools/normalize.css
started time in a day
starteddbox/html5-kitchen-sink
started time in a day
startedJLHwung/postcss-font-family-system-ui
started time in 2 days
pull request commentblitz-js/blitz
refactor: use standard 'globalThis' object in Node
Wonderful, thank you! Unfortunately, I’m currently busy with a company projects, so I may not have time to complete the task…
comment created time in 3 days
startedshvaikalesh/shim-keyboard-event-key
started time in 3 days
issue closedkripod/react-polymorphic-box
jest failed when testing a component that use
Description
I've got an error during jest test process when I test a component that import a component who use Box. The problem is that this component is located in our private component library and the issue only happened in this particular case. If I directly test the component directly in the library there is no problem at all.
Here is my architecture :
- MyCard (Component where test failed) --> import Card component from @library/Card --> Card component contains the polymorphic box logic
Here is the error :
Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.
The react render works, the problem came only when using jest
Workaround
- Move the Box component directly from the react-polymorphic-box into my library (Works)
Reproduction
To reproduce it you have to import a component from a library that use polymorphic.
Possible issue location
Maybe the issue is the bundle generated
Environment
System:
- OS: macOS 10.15.6
- CPU: (8) x64 Intel(R) Core(TM) i5-8257U CPU @ 1.40GHz
- Memory: 86.46 MB / 16.00 GB
- Shell: 3.1.2 - /usr/local/bin/fish
Binaries:
- Node: 12.18.2 - ~/.nvm/versions/node/v12.18.2/bin/node
- Yarn: 1.22.4 - /usr/local/bin/yarn
- npm: 6.14.5 - ~/.nvm/versions/node/v12.18.2/bin/npm
Browsers:
- Chrome: 84.0.4147.89
- Firefox Developer Edition: 79.0
- Safari: 13.1.2
Libs:
react-scripts: 3.4.1 jest: 24.9.0 @testing-library/react: 10.4.4
I can't create a codesandbox to reproduce this issue but if you have any question, please ask :)
closed time in 3 days
HeadFoxissue commentkripod/react-polymorphic-box
jest failed when testing a component that use
This should be resolved by v2.0.6. Thanks to all of you for reporting again!
comment created time in 3 days
created tagkripod/react-polymorphic-box
Building blocks for strongly typed polymorphic components in React.
created time in 3 days
push eventkripod/react-polymorphic-box
commit sha e19af235ca80f988b9a5efc9ad78db99412dd2fb
chore(release): 2.0.6
push time in 3 days
push eventkripod/react-polymorphic-box
commit sha 1f8aa3cf05cbea808236bba11d03bb9268f4d4f4
fix(meta): package bundling
commit sha 1addc94dda3ef0cc2292231992500449b79d1b6b
chore: add 'clean' script
commit sha 57e95aac2261115a2fd1620c4a36be463044edf7
chore(deps): update
push time in 3 days
startedwooorm/franc
started time in 3 days
startedHeydon/inclusive-menu-button
started time in 3 days
push eventkripod/otion
commit sha c27fb93d86214722649581d2b95e022304e0e009
chore(release): publish
push time in 3 days
push eventkripod/otion
commit sha 99aa618b628e42a36eb86b104b30e920300d9ed9
fix: don't minify ' :' to ':' in custom selectors
push time in 3 days
issue commentkripod/react-polymorphic-box
jest failed when testing a component that use
@arturwojtas Thank you for the detailed explanation! I'll look into this soon.
comment created time in 4 days
startedalexreardon/tiny-invariant
started time in 4 days
startedrvpanoz/luna
started time in 4 days
startedreactjs/react-gradual-upgrade-demo
started time in 4 days
push eventkripod/react-layout-components
Kristóf Poduszló (via Travis CI)
commit sha 0aa304a90c9e7ece75d7fd4e6a1953e29071f9c2
Deploy kripod/react-layout-components to github.com/kripod/react-layout-components.git:gh-pages
push time in 4 days
push eventkripod/react-layout-components
commit sha 44101c18252cc3f3b4f985ae0986947a66fd228b
feat: add <Pin> component for absolute positioning
push time in 4 days
push eventkripod/react-layout-components
Kristóf Poduszló (via Travis CI)
commit sha 0181bec7bf041ce371c3a3701b4dd26510560e4c
Deploy kripod/react-layout-components to github.com/kripod/react-layout-components.git:gh-pages
push time in 4 days
push eventkripod/react-layout-components
commit sha d954a93f38aca6eee0e0540a3fd89f4ceeef5e56
refactor: remove vertical writing mode support
push time in 4 days
startedpopperjs/popper-core
started time in 4 days
startedatomiks/tippyjs
started time in 4 days
startedatomiks/tippyjs-react
started time in 4 days
push eventkripod/otion
commit sha 1a4bda5a0926b2babbcf2443a29e16fedc7a3748
chore(release): publish
push time in 4 days
push eventkripod/otion
commit sha bc1ed78cab58099fa2beae1cbf52550957af9ec7
fix(hydrate): ignore broken rule declarations
push time in 4 days
push eventkripod/react-layout-components
Kristóf Poduszló (via Travis CI)
commit sha 854dac0f33aa52d0a0f1ab5aca7408116827fe3c
Deploy kripod/react-layout-components to github.com/kripod/react-layout-components.git:gh-pages
push time in 5 days
push eventkripod/react-layout-components
commit sha 2fd66b331105a7cbc34dd99c508ee4d91ba24e65
refactor: abstract away `withUnit` method for CSS
push time in 5 days
push eventkripod/react-layout-components
Kristóf Poduszló (via Travis CI)
commit sha f12b47b948ef1ba239e380c4df34633d42c6e501
Deploy kripod/react-layout-components to github.com/kripod/react-layout-components.git:gh-pages
push time in 5 days
push eventkripod/react-layout-components
commit sha a0e63f905e1e0555969463fb6c79aeef5146e362
feat(Lane): support for separate inline spacing
push time in 5 days
push eventkripod/react-layout-components
Kristóf Poduszló (via Travis CI)
commit sha 4d72963e8276e599c4e1fa45ad3169838c01b0d9
Deploy kripod/react-layout-components to github.com/kripod/react-layout-components.git:gh-pages
push time in 5 days
push eventkripod/react-layout-components
commit sha 196ee9bcdb2ce33aaa6d96a1545d1fc3f2ddccba
fix: ssr with `CSS.supports`
push time in 5 days
startedgcanti/newtype-ts
started time in 6 days
issue openedvercel/next.js
Feature request
Official TSConfig bases are now available for several environments. Next.js should have a similar package (e.g. @tsconfig/next or @vercel/tsconfig) which could be extended by developers.
created time in 6 days
startedashleemboyer/a11y-components-playground
started time in 6 days
push eventkripod/record-like-deep-assign
commit sha 83cc135ddb0127e044311a74a4cbd50166acbefd
test: add bundle size checks
push time in 6 days
issue commentkripod/otion
@eddyw Thank you for your great work and the PR for making that concept a reality. I decided to rewrite otion from the ground up with high test coverage and this idea in mind. During the weekend, I even wrote a tiny library for deep-merging objects to help with this goal.
It may take a while to get all these things together. Until then, the current version of otion can be used safely.
comment created time in 6 days
push eventkripod/record-like-deep-assign
commit sha 0bb1474b21c9d6c2dfb013c897be44d240cee77c
chore(release): 1.0.1
push time in 6 days
created tagkripod/record-like-deep-assign
Recursively assigns enumerable own properties of the given sources to a target object
created time in 6 days
push eventkripod/record-like-deep-assign
commit sha b0f232c59fe2da684ccb0eecc1e7db3cb201e32d
chore: add missing package metadata
push time in 6 days
created tagkripod/record-like-deep-assign
Recursively assigns enumerable own properties of the given sources to a target object
created time in 6 days
push eventkripod/record-like-deep-assign
commit sha aabd4f5451d27943a5c3fe586e2fe201a6066ad1
chore(release): 1.0.0
commit sha b287d77b3237713dd6bd83fa2dc4716aea83d499
chore: add missing release script
push time in 6 days
created repositorykripod/record-like-deep-assign
Recursively assigns enumerable own properties of the given sources to a target object
created time in 6 days
issue closedmillsp/ts-toolbelt
Assigning/merging objects recursively while leaving arrays intact
🤔 Question
Describe your question
I'm currently working on a deepAssign function which calls Object.assign recursively on object literals (but not arrays or instantiated classes like Date). The header looks as follows:
function deepAssign<
T extends { [key: string]: any },
U extends Array<{ [key: string]: any }>
>(target: T, ...sources: U): O.Assign<T, U, "deep">;
I would like the following object:
deepAssign(
{ arr: [1, 2, 3] as const },
{ arr: [4] as const, b: null },
{ b: "test", c: { d: new Date() } },
{ c: { d: { e: "Not merged with date properties" } } },
);
To match the following type:
type T = {
arr: [4], // Not [4, 2, 3]
b: string,
{ c: { d: { e: string } },
};
How should this be done?
Search tags, topics
#deepAssign #deepMerge #object
closed time in 6 days
kripodissue commentmillsp/ts-toolbelt
Assigning/merging objects recursively while leaving arrays intact
That's weird. As I've reinstalled my dependencies, I cannot reproduce it, either. Sorry for the false positive and thank you for being so helpful again! 😊
comment created time in 6 days
startedairbnb/Lona
started time in 7 days
startedjlengstorf/eslint-plugin-replyguy
started time in 7 days
startedmodule-federation/module-federation-examples
started time in 7 days
startedkulshekhar/ts-jest
started time in 7 days
issue commentkripod/otion
Custom JSX pragma for better integration with React
It seems this could be done with a Babel macro. As for resolving composition, please see issue #47.
comment created time in 8 days
issue commentmillsp/ts-toolbelt
Assigning/merging objects recursively while leaving arrays intact
Unfortunately, it turns out that O.Assign discards keys of the first objects, as seen below:
import { O, M, L } from "ts-toolbelt";
export default function deepAssign<
T extends { [key: string]: any },
U extends Array<{ [key: string]: any }>
>(
target: T,
...sources: U
): O.Assign<T, U, "deep", 1, M.BuiltInObject | L.List>;
export default function deepAssign(target: Record<string, any>) {
const sources = Array.prototype.slice.call(arguments, 1);
sources.forEach((source) => {
for (const key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
const value = source[key];
typeof value === "object" /* TODO: Check for "record", too */ &&
value /* !== null */ &&
Object instanceof (value.constructor || /* Returns false: */ deepAssign)
? deepAssign(target[key], value) // Extend object literals only
: (target[key] = value); // Treat non-literals like `Date` atomically
}
}
});
return target;
}
const x0 = deepAssign({}, { a: { b: { c: 1 } } }, { a: { b: { c: 2, d: 3 } } });
const x1 = deepAssign(
{},
{ a: { b: { c: 1 } } },
{ a: { b: { c: undefined, d: 3 } } }
);
const x5 = deepAssign({}, { a: [1, 2, 3] as const }, { a: [1] as const });
const x5b = deepAssign(
{},
{ a: [1, 2, 3] as const, b: "This string gets discarded" },
{ a: [1] as const }
);
const x6 = deepAssign({}, [], { a: 1 });
const x9 = deepAssign(
{ arr: [1, 2, 3] as const },
{ arr: [4] as const, b: null },
{ b: "test", c: { d: new Date() } },
{ c: { d: { e: "Not merged with date properties" } } }
);
x5b has a type of { a: readonly [1]; } instead of { a: readonly [1]; b: string; }.
x9 seems to infer its return type only from the last parameter.
comment created time in 8 days
push eventkripod/otion
commit sha cb07f4cbd85af93fc54bd35a54307e241d07daf5
refactor: new instance tests
push time in 8 days
push eventkripod/otion
commit sha fdbac4705218df4d3501cf5161b56586908ecc84
chore: refactor instance tests
push time in 8 days
startedbumbag/bumbag-ui
started time in 8 days
push eventkripod/otion
commit sha 99ca5917645612980ce1834ae7ba8230a2456442
chore: fix type issues in the `css` method
push time in 8 days
push eventkripod/otion
commit sha ee66bcde1647d6c217b1638f901055914ce445f4
chore: rename stringifier methods
push time in 8 days
push eventkripod/otion
commit sha 3696d74caa83b1c261e5cf6238a715ddbd597865
chore: make mapping function return an array
commit sha 0de3b8cb5f88b66d09dbc25871cf808c380989f2
chore: fix class name pushing
commit sha 91e7b79ca1539a76db4518b714eb106024ea1c2d
chore: add declaration list serialization
push time in 8 days
push eventkripod/otion
commit sha 4ecf96c7e929719abeafa356bb1368bc58e202e1
chore: add declaration normalization with tests
push time in 8 days
push eventkripod/otion
commit sha bd8f28814b5d664fa09e928c777b69a37e770954
refactor: shorten 'associate' to 'map'
push time in 9 days
push eventkripod/otion
commit sha 71a8a43b7504375b7ff4cc0ed79fcbe7a3aa5842
chore: recreate 'setup' method
commit sha d7bd5501b29e0ef0176f86a1a15b709bfab3424a
refactor: make `InjectorInstance` strict
push time in 9 days
startedmatthiasott/a11y-accordion-tabs
started time in 9 days
startedaleclarson/vite-tsconfig-paths
started time in 9 days
starteddaybrush/selecto
started time in 10 days
issue commentmillsp/ts-toolbelt
Assigning/merging objects recursively while leaving arrays intact
Marvelous, thank you so much for creating this in such a short time! 🙏
comment created time in 10 days
pull request commentblitz-js/blitz
refactor: use standard 'globalThis' object in Node
@merelinguist Wonderful, thank you! 🙌
comment created time in 10 days
issue commentmillsp/ts-toolbelt
Assigning/merging objects recursively while leaving arrays intact
Yes, that seems to be it, thank you!
It would be neat is there was a more convenient built-in method specifically for this. For instance, adding a new MergeStyle parameter type might help to avoid merging arrays when using Assign. I would appreciate if this could be done, as your complex customized solution may become hard to maintain over time.
comment created time in 10 days
startedopen-wc/locator
started time in 10 days
startedpantharshit00/prisma-docs-generator
started time in 11 days
startedwebcomponents/custom-elements-json
started time in 11 days
startednextauthjs/next-auth
started time in 11 days
Pull request review commentvercel/next.js
module.exports = ( require('@babel/plugin-proposal-nullish-coalescing-operator'), isServer && require('@babel/plugin-syntax-bigint'), [require('@babel/plugin-proposal-numeric-separator').default, false],+ require('@babel/plugin-proposal-export-namespace-from'),
It's done, thank you for the tip and for guiding me throughout the whole review process!
comment created time in 12 days
issue commentmillsp/ts-toolbelt
Assigning/merging objects recursively while leaving arrays intact
I would highly appreciate if you could come up with a solution to this, even an imperfect one would suffice 😊
For the initial version of the package I'm working on, merging types of regular type instances is a quirk I could live with. (I saw something in the issue you've linked which might be interesting.)
Also, I'll make sure to add you as a contributor once I'll have the chance to release the small utility library.
comment created time in 12 days
issue commentmillsp/ts-toolbelt
Assigning/merging objects recursively while leaving arrays intact
Thank you for these ideas! I'm not quite sure whether the 'with ...[{a: 1}], U will be inferred as {a: 1}[]' constraint stands still with TypeScript 4. As for the IsClass type, it's less important than the immutability of arrays. The latter would be crucial, though.
comment created time in 12 days
push eventkripod/next.js
commit sha 98b4076d9e36ed8c51bfe71a8b118fd5d9c2d7cc
test: fix namespace-exported React
push time in 12 days
push eventkripod/next.js
commit sha 788c0a022d19ed32e9191e48624db94bec11378f
test: try fixing Babel integration test
push time in 12 days
push eventkripod/next.js
commit sha b39ef9a5c4da89128ff1d910d5fe0284ebadf329
test: add integration test for namespace exports
push time in 12 days
push eventkripod/next.js
commit sha d0b6026dc508567e4410331c4c626de7c8cffac6
examples: Update with-electron .gitignore (#15783) Thank you for the excellent examples. This PR updates the `.gitignore` for [with-electron](https://github.com/vercel/next.js/tree/canary/examples/with-electron) example to ignore the output folders.
commit sha 9f92819742c0138ef90e155feb94224d450f8883
Remove dotenv from auth0 Next.js example (#15398) We should remove the dotenv dependency from all Next.js examples (in favor of Next.js environment support): https://github.com/vercel/next.js/issues/15225
commit sha 9dd974dfca1efd0b451065056f95f92747e2dada
Fix dotenv loading with cascading values (#15799) Adds additional test cases for cascading env values and corrects behavior Fixes: https://github.com/vercel/next.js/issues/15744
commit sha ed0a47b1104c718894e1f411e505d6a64f00e792
v9.5.2-canary.2
commit sha 210a6980d2d630e0ed7c67552a6ebf96921dac15
Solve large portion of webpack 5 deprecation warnings (#15806) - Using `namedChunks` where possible, this will also allow for faster access to the chunks as we no longer have to look them up like we did before using `find` - Using the new asset hooks introduced in the latest webpack beta - Using the new externals function signature
commit sha 60f1d58c837ac604ce8fa475bf592457119f82cc
Fix some webpack 5 deprecation warnings (#15797) - Use latest terser version (still 1 warning in the stable version which is an open PR) - Add emitOnErrors instead of noEmitOnErrors - Added trace-deprecations for Next.js core development
commit sha ea026151b2e0d09e82e620f277147e9767e05f5c
with-electron-typescript build error fix (#15803) Fixes #15802 Added Params type to prevent typescript error during build step
commit sha e89bcf7e3965783424468463c0cde0b45e32f868
Add docs page for Create Next App (#15454) Following up from #14830, this PR adds a new page to the docs for Create Next App. The content is identical to the README created as part of #14830. Also added a link on the main `getting-started` page to the new docs for Create Next App to help users find more info on Create Next App if needed. I'm unsure as to whether the content for the documentation needs to be different from the one I wrote for the README. Please let me know if that's the case, and I will be happy to tweak the structure.
commit sha b87e4989e2a8f542b050422c6b049da5393c26a1
Rename exportTrailingSlash to existing trailingSlash property (#15768) In terms of url rewriting, `trailingSlash` supports everything `exportTrailingSlash` does. We can just share all other code paths and deprecate `exportTrailingSlash`. This PR shows a deprecation warning when `exportTrailingSlash` is used. Also fixes https://github.com/vercel/next.js/issues/15774 We can update the tests now or later. (I kept them the same to prove it's non-breaking) To do: - [x] Do we want to keep this? => nope https://github.com/vercel/next.js/blob/841d4efc517a379d8947f491e3c6a1c4784bbccf/packages/next/next-server/lib/router/router.ts#L329 - [x] I kept `exportTrailingSlash` here. Do we want to rename that as well? => nope https://github.com/vercel/next.js/blob/2d9d649d492b77adeddea0242ab6b7fe73d18079/packages/next/build/index.ts#L959
commit sha e8c3190255e8023fd44a2b1518724cfbb38a3de9
Support persisting the dev cache buster (#15827) Same as #15483 but couldn't push to it --- Closes #15483 Fixes #15828
commit sha 6ffc3f2a152c2310d92d5967f78e12e5ed316970
Updated with-passport example to fix syntax errors (#15831) I was referencing the with-passport example and found a minor syntax error:\ The login and signup page both used `event.preventDefault()` on the submit handlers, whereby the correct reference to the event is `e` as defined within the `handleSubmit` functions. Additionally used the chance to bump npm packages, the largest bump being swr to the latest version: 0.3.0 ### Summary of all Changes made: * Fixed syntax error on login page * Fixed syntax error on signup page * Bumped cookie to 0.4.1 * Bumped next-connect to 0.8.1 * Bumped swr to 0.3.0
commit sha 0ebf4df87f1c7a948f3c844aae13317db9afefe7
Merge branch 'canary' into fix-browser-compat
push time in 12 days
pull request commentvercel/next.js
@timneutkens May I help with anything to advance the state of this PR? 😊
comment created time in 12 days
startedmoroshko/react-scanner
started time in 13 days
issue commentmillsp/ts-toolbelt
Assigning/merging objects recursively while leaving arrays intact
Thank you, I’m eagerly waiting for how this will turn out. As for the arrays, I’m going to treat them like tuples, which are immutable by nature. My implementation of deepAssign may possibly be used for storing CSS styling rules in JS. In that case, arrays are utilized for providing fallback values. Assigning them deeply would not make sense.
comment created time in 13 days
pull request commentblitz-js/blitz
refactor: use standard 'globalThis' object in Node
Thanks for getting back to me!
Unfortunately, I’m not quite sure whether I’ll have time to do all of this.
comment created time in 13 days
issue openedmillsp/ts-toolbelt
Assigning/merging objects recursively while leaving arrays intact
🤔 Question
Describe your question
I'm currently working on a deepAssign function which calls Object.assign recursively on object literals (but not arrays or instantiated classes). The header looks as follows:
export default function deepAssign<
T extends { [key: string]: any },
U extends ReadonlyArray<{ [key: string]: any }>
>(target: T, ...sources: U): O.Assign<T, U, "deep">;
I would like the following object:
deepAssign(
{ arr: [1, 2, 3] as const },
{ arr: [4] as const, b: null },
{ b: 'test', c: { d: new Date() } },
{ c: { d: { e: 'Not merged with date properties' } },
);
To match the following type:
type T = {
arr: [4], // Not [4, 2, 3]
b: string,
{ c: { d: { e: 'Not merged with date properties' } },
};
How should this be done?
Search tags, topics
#deepAssign #deepMerge #object
created time in 13 days
issue openedkripod/otion
Deprecate DOMInjector in favor of CSSOMInjector
Motivation
As browsers are adding support for debugging the CSSOM, there should be no need to resort to slower DOM-based solutions.
created time in 13 days
issue openedkripod/otion
Use Records as the input of `css` on the long term
Motivation
As suggested by this article, hashing could be avoided for identical style records. This could increase performance, possibly with low efforts.
created time in 13 days
issue commentkripod/otion
Thank you for sharing your thoughts in detail, @etc-tiago! While object spreading is possible, someone may decide to pass stringified class names generated by otion to a component, e.g.:
type GreetingProps = {
className: string;
}
function Greeting({ className }: ComponentProps) {
return (
<p
className={css(
{ color: "red" }, // Pre-defined styles
className // Overrides specified as a string of class names
)}
>
Hello!
</p>
);
}
function App() {
return <Greeting className={css({ color: "green" })} />;
}
For this case, otion should keep track of its injected rules in a class-keyed Map. When composing an object with a list of class name strings, the latter should be mapped back to objects and then deep-merged with the initial object. I think the library should be re-architectured to accommodate room for implementing this functionality.
comment created time in 13 days
push eventkripod/otion
commit sha e58266aa36c0a3515d42d0c731e69a430f8fc301
docs: add note about production-readiness resolves #50
push time in 13 days
issue closedkripod/otion
[Question] Otion is ready for use in production?
Since otion follows the semantic version, and has not yet released version 1.0.0, do you believe that otion is ready for use in production?
Otion proved to be an alternative to @emotion and styled components and I believe that the atomicity of css will be a trend for the future. I would like to contribute more actively to the project and I would like to know if you have a roadmap for version 1.0.0...
closed time in 13 days
etc-tiagoissue commentkripod/otion
[Question] Otion is ready for use in production?
Thank you for the question! The main barrier for v1 is thorough automatic testing. However, existing functionality should be safe to use. A section about this will be written to the monorepo's readme.
I would appreciate if you could help with writing tests, mainly for the css() function. You may find usage methods in the otion package's readme and the Gatsby example project. I recommend inspecting a VirtualInjector to ensure that rules are generated properly.
comment created time in 13 days