profile
viewpoint
Fabio M. Costa fabiomcosta @godaddy Newark, California https://fb.me/fabs Working at the Website Builder at GoDaddy, previously Facebook

clarete/forbiddenfruit 480

Patch built-in python objects

andrewsmedina/magic2d 18

a framework for building 2D games using html5 canvas and javascript

cezarsa/crxpp 7

Chrome pixel perfect - An extension to compare a page with its original design.

fabiomcosta/dotfiles 7

my dotfiles :)

fabiomcosta/constructuring 5

Transforms Javascript code that uses ES6's destructuring feature into code that runs on today's browsers.

fabiomcosta/arquiteturas_aplicacoes_web 2

Codigo e apresentacao para arquiteturas de aplicacoes web

fabiomcosta/bridgejs 2

Plug & play JavaScript-framework adapter, code like PrototypeJS with any framework.

fabiomcosta/crick 2

Real event simulator for browsers

fabiomcosta/art 1

vector drawing for buttons, icons, widgets and all that stuff

fabiomcosta/backbone 1

Give your JS App some Backbone with Models, Views, Collections, and Events

Pull request review commentjamiebuilds/react-loadable

Fixed Unsafe warnings and some improvements.

 function createLoadableComponent(loadFn, options) {       return init();     } -    componentWillMount() {+    componentDidMount() {

This could introduce bugs, why don't you go the safe route and use UNSAFE_componentWillMount for now?

If you really want to go directly to didMount, this._mounted = true would need to move it to the constructor. Calling retry from the loading component before the mount phase could cause unexpected behaviors with this change, for example. The _loadModule is probably fine to stay here.

Unfortunately sounds like nobody will ever merge this anyway...

AlaguSelvan

comment created time in 2 days

issue commentbenawad/destiny

Use mvjs as a dep

It would be awesome, eitherway, if you @fabiomcosta could give us some pointers on how we could do things better and how we differ in implementation.

@sQVe I'll keep an eye on it. The project idea is great and is something that maybe could evolve into a more general "eslint-like autofix tool for file structures" with plugins that can define constraints and things like that. I'd love to have something like that on my project... our folder structure is a mess today (at work).

fabiomcosta

comment created time in 5 days

issue closedbenawad/destiny

Use mvjs as a dep

Hi @benawad and other maintainers, this is not really an issue, but I'd like to understand how you'd feel like about using this lib that I created for all the file moving operations https://github.com/fabiomcosta/mvjs/ I can definitely help with any special use cases you might have and expose the appropriate APIs, if there is not already one in place. Let me know if there is any interest and I try to create a PR with a POC using it so we can actually see if there is some benefit to it. If there is no interest plz let me know before-hand so we can avoid the extra work, but I believe this can benefit both projects as you can focus on other more important details of this project.

closed time in 5 days

fabiomcosta

issue commentbenawad/destiny

Use mvjs as a dep

Awesome, thank you so much for this quick answers! Everything you all are saying makes a lot of sense to me! If that changes in the future, let me know and I'll gladly work on the integration.

@benawad FYI, just to complement, mvjs has move and transform (fixing imports) as 2 separate API methods: https://github.com/fabiomcosta/mvjs/#api-usage

fabiomcosta

comment created time in 5 days

issue commentbenawad/destiny

Use mvjs as a dep

@sQVe, I haven't explored how much it would replace yet, that would be my next step in case you guys show interest. Thank you for answering so quickly! I can do an overview of that and maybe create a quick PR, not on its final state, that would help with answering that question.

@benawad I haven't looked at the code on this project that much and how it's achieving the import replacements, but having the JS parsed is definitely a lot safer than using regex, it can more easily warn and detect cases where it would be tricky to do with regex. Ex:

// multiline requires and imports
require(
  '../path'
)
import { x as y }
  from './path';

// edge case, but still, extra parentheses inside the call
require(('./path') + identifier);

On cases that mvjs doesn't detect a string literal it just warns about that, we can't really update those, but it's just easier to deal with these...

fabiomcosta

comment created time in 5 days

startedbenawad/destiny

started time in 5 days

issue openedbenawad/destiny

Use mvjs as a dep

Hi @benawad and other maintainers, this is not really an issue, but I'd like to have a feeling about how you'd feel like about using this lib that I created for all the file moving operations https://github.com/fabiomcosta/mvjs/ I can definitely help with any special use cases you might have and expose the appropriate APIs, if there is not already one in place. Let me know if there is any interest and I try to create a PR with a POC using it so we can actually see if there is some benefit to it. If there is no interest plz let me know before-hand so we can avoid the extra work, but I believe this can benefit both projects as you can focus on other more important details of this project.

created time in 5 days

starteddexterleng/vimac

started time in 5 days

CommitCommentEvent
CommitCommentEvent
CommitCommentEvent

pull request commentfacebook/draft-js

Allowing more flexible immutable-js version (back again)

Let me know if you need anything else from me on this one

fabiomcosta

comment created time in 22 days

issue commentfsevents/fsevents

npm install error 1.2.11

Has the issue been fixed for v1? I don't see a new release so I'm not sure why it's being closed. In the meantime I'm using 1.2.9 as previously suggested.

qianzhangsheng

comment created time in 23 days

push eventfabiomcosta/dotfiles

Fabio M. Costa

commit sha 0a766292dfbba32620a1c3f55f56f3e87c5c4358

using local flow command for coc-vim

view details

push time in 24 days

issue commentneoclide/coc.nvim

Use projects locally installed flow if available.

Ok, so for future readers, this is how the command value should look like:

      "command": "${workspaceFolder}/node_modules/.bin/flow",
dkwl93

comment created time in 24 days

push eventfabiomcosta/dotfiles

Fabio M. Costa

commit sha 16121639cc7f015350bc50505380342a38e84600

using jetbrains-mono... and oh boy... its so good!

view details

push time in 24 days

push eventfabiomcosta/dotfiles

Fabio M. Costa

commit sha 091e48dc777283b8336ed46ed4245b49b7045cb6

fixing some bugs on the install script

view details

push time in 24 days

push eventfabiomcosta/dotfiles

Fabio M. Costa

commit sha 4d85942c73c4ecc9c3caa6206dfbfa3352e55f59

branch is main for styled-componentes, as defined on their docs

view details

Fabio M. Costa

commit sha 806e34bd28b933163c033bfe455823b2a13d706e

stop ignoring tag files... I changed that config on gutentags

view details

Fabio M. Costa

commit sha 80c9209c3b47dbc6da348a5873ebcf8af7fe4a5e

making sure coc-settings is synched on nvim and vim and updating taps addresses

view details

push time in 24 days

startedneoclide/coc.nvim

started time in 24 days

push eventfabiomcosta/dotfiles

Fabio M. Costa

commit sha ef4d1bd7a7a5ddd1444501c361ea0ec419d4b59a

trying out default theme from tmux-thempack

view details

push time in a month

push eventfabiomcosta/dotfiles

Fabio M. Costa

commit sha 6d820802cc4d760df7df96ed79c74d3ca175ff8a

updating karabiner config to latest

view details

push time in a month

push eventfabiomcosta/dotfiles

Fabio M. Costa

commit sha 3eb452d4b747d302260211c0723a09f17b769981

Adding config for fnm

view details

Fabio M. Costa

commit sha 464b97fb46c6469a9f3aef26c2777accd7eac79d

installing dracula with dracula name

view details

Fabio M. Costa

commit sha eda55fa646398672fa0be5f82d61a09c55615d07

installing fnm and removing things related to "n", which is the node manager I used to use

view details

Fabio M. Costa

commit sha 33a5b8ad81ec9aef5d15f32849c079801a746dbb

not installing n

view details

push time in a month

startedkasper/phoenix

started time in a month

startedpigigaldi/Pock

started time in a month

Pull request review commentfacebook/draft-js

Add ClassNames support to the customStyleMap

 class DraftEditorLeaf extends React.Component<Props> {       styleObj = Object.assign(styleObj, newStyles);     } +    // skip inserting an empty `class` property to the element+    const classes = classNames.length+      ? // we don't use `cx` here to allow users to take care their classNames+        // minification by themselves. This is handy when used libraries like `jss`+        // or similar+        {className: classNames.join(' ').trim()}+      : {};

Setting classes to null or undefined would already create a dom node without an empty class attribute.

https://codesandbox.io/s/upbeat-yalow-uwkoh

Spreading here is just unnecessary and not good for perf.

newsiberian

comment created time in a month

pull request commentwebpack/webpack-dev-server

chore(deps): update dependency chokidar to v3 - autoclosed

Sorry about the misinformation, and thank you very much for answering. fsevents@1.2.9 works with node v12, so I just had to make it got updated.

renovate[bot]

comment created time in a month

issue commentfsevents/fsevents

npm install error 1.2.11

Here as well, fsevents@1.2.11 doesn't compile with node v12 I get similar errors to btargac

qianzhangsheng

comment created time in a month

pull request commentwebpack/webpack-dev-server

chore(deps): update dependency chokidar to v3 - autoclosed

Sounds like chokidar v2 depends on fsevents@v1 on macos, which doesn't work with node12. Can't chokidar be update for now while waiting for this other suggested refactor?

renovate[bot]

comment created time in a month

pull request commentfacebook/draft-js

Allowing more flexible immutable-js version (back again)

Just did it @claudiopro , thx for bering open for this.

fabiomcosta

comment created time in a month

push eventfabiomcosta/draft-js

Kanitkorn S

commit sha 824fd125e579932db0cb47c9dd55a7bc9462a8d9

Upgrade eslint + flow, and fix failed test from nullishCoalescingOperator (#2083) Summary: **Summary** I want to upgrade ESLint and Flow on this project. I ended up with - Remove unused `eslint-plugin-relay` - Upgrade all ESLint packages to the latest version and fix all the new lint errors afterward. - `eslint-config-fbjs` - `eslint-config-prettier` - `eslint-plugin-babel` - `eslint-plugin-flowtype` - `eslint-plugin-jsx-a11y` - `eslint-plugin-prettier` - `eslint-plugin-react` - Upgrade Flow (`flow-bin`) to the `0.115.0`. ~Then I found that `yarn test` is failing at~ ``` src/component/handlers/composition/__tests__/DraftEditorCompostionHandler-test.js: Support for the experimental syntax 'nullishCoalescingOperator' isn't currently enabled (70:40) ``` ~So I added `babel/plugin-proposal-nullish-coalescing-operator` to jest preprocessor as well.~ Move plugins in `.babelrc` to jest preprocessor as https://github.com/facebook/draft-js/pull/2083#issuecomment-502032839 **Test Plan** `yarn lint`, `yarn flow`, and `yarn test` should all pass. Pull Request resolved: https://github.com/facebook/draft-js/pull/2083 Reviewed By: claudiopro Differential Revision: D19398251 Pulled By: mrkev fbshipit-source-id: 4fc2f6dd6e0cd44266d061455b7b6a433231715a

view details

Jordan Brown

commit sha b051fc1b39a809e0575fb585ff7fd626aae321f6

Upgrade to Flow explicit inexact object type syntax Reviewed By: dunnbobcat Differential Revision: D19416353 fbshipit-source-id: 26f111ed06e8ad7cee6717dbcb391f94e096f91a

view details

Sebastian Markbage

commit sha 9d587d9f1912ef720a95ed2710837bd353998375

Remove findDOMNode from getContentEditableContainer Reviewed By: mrkev Differential Revision: D19524937 fbshipit-source-id: 3fba5f71d7cdc725e00f3e40956b9f036949c7c7

view details

Sebastian Markbage

commit sha c1a55ceb49e60e32424ee634096c219b71008d92

Remove findDOMNode in DraftEditorDragHandler Summary: As in my previous change, editor.editorContainer is always an element and doesn't need findDOMNode. https://github.com/facebook/draft-js/blob/822d2fbd3597c3fe20cc2508d6a12d9a6f856999/src/component/base/DraftEditor.react.js#L370 This isn't exactly the same because the previous code got the parent node: https://github.com/facebook/draft-js/blob/822d2fbd3597c3fe20cc2508d6a12d9a6f856999/src/component/base/DraftEditor.react.js#L366 However for this purpose they're the same. There are no listeners on the inner one and the event bubbles. We already have a ref to the inner one so might as well use it. Now I think that this has since been fixed in React so we might not need this workaround at all anymore. Reviewed By: gaearon Differential Revision: D19540873 fbshipit-source-id: 89f91105b97ae6b0eeb5b4d615642a79eef6ab92

view details

Sebastian Markbage

commit sha 0dd3978104fea042e6cc01f00b62e5bbef764c0c

Remove findDOMNode from DraftEditorBlockNode Summary: This is part of DraftEditorContentsExperimental which is not actually rolled out anywhere. It's only used on some test pages for specific users: https://our.intern.facebook.com/intern/gatekeeper/projects/draft_tree_data_support/ I don't know if we have plans of actually rolling this out further. So I'll give it a benefit of a doubt that maybe we'll want to get back to it. We have to 100% get rid of findDOMNode uses in React though and this is technically reachable from Comet if the GK turns on. So I have to fix it or remove it. This diff fixes it by attaching a ref to the wrapper element created by blocks. However, if this is rendered in a parent a wrapper is not created. https://github.com/facebook/draft-js/blob/bafe30ab702c10b463fc7ee60bc2d6d9d4f7aef3/src/component/contents/exploration/DraftEditorBlockNode.react.js#L370 The non-experimental version uses a permanent wrapper div for this (D14716519): https://github.com/facebook/draft-js/blob/dceddf552006ea607bc5c15ce3d1b629eca1cb70/src/component/contents/DraftEditorBlock.react.js#L241 However, I'm not sure how you can even create a nested custom block and if scrolling is even relevant in that case. So my fix disables the auto-scrolling in that edge case. Seems good enough to me given that nobody is currently using this. I defer to the Draft.js team for a more permanent fix if we're rolling this out further. Reviewed By: gaearon Differential Revision: D19564783 fbshipit-source-id: f8250133334824f130a4214999a4768f39d49f4b

view details

Dan Abramov

commit sha 8c5004242ab6fa51b3aa1462f002d185392150c6

Add editorRef prop to DraftEditor Summary: We're gonna use it to remove some findDOMNode usage. This lets you access the actual contentEditable. In the future, we might be able to remove the `.editor` and `.editorContainer` instance fields, and make them both refs. Reviewed By: claudiopro Differential Revision: D19555598 fbshipit-source-id: a86be5370a9fd173b3bb062ecc50cabdf9823b75

view details

Dan Abramov

commit sha 3ba907bb2a4fb8cfa55c0135f485d25e8500db96

Add a preventScroll prop Summary: Browser scrolls to native editors when they get inserted into the DOM. Draft replicates that behavior. However, that behavior is occasionally not what we want at all. As a result of this, we sometimes have "scroll wars" where different parts of the product code try to restore scroll after others change it. This is a source of bugs. This adds a first-class way to disable this behavior. I named the prop a bit generically so that if I find more such cases, I can disable them too. Reviewed By: steveluscher Differential Revision: D19568181 fbshipit-source-id: ed4db22abebbdae1b11d84e1bf6d7772a840b3da

view details

Mike Vitousek

commit sha bf5611c388dcdf54e90dd06e914ef93d2a5e278a

Deploy Flow v0.117 to www Summary: Flow 0.117 Reviewed By: nmote Differential Revision: D19567450 fbshipit-source-id: 261f97de2d95d3e1ad128502bb33203ba2615421

view details

Kevin Chavez

commit sha 9b9376bd041559766fe86786c749a0d033c837b1

Re-write `DraftEditorExample` in the website using react hooks (#2287) Summary: Also took the oportunity to clean up the component- it had unused imports and `_handleKeyCommand` was returning a boolean instead of `"handled"` and `"not-handled"`. `yarn && yarn start`, used the editor. Pull Request resolved: https://github.com/facebook/draft-js/pull/2287 Differential Revision: D19598449 Pulled By: claudiopro fbshipit-source-id: 275ef520c10f941236138211c8eb572c6df28f9d

view details

Fabio M. Costa

commit sha 695b1117cd413a12e667e2bd5d0324cffe908c9c

Merge branch 'master' of https://github.com/facebook/draft-js into more_flexible_draftjs_versioning

view details

push time in a month

created tagfabiomcosta/mvjs

tagv1.12.1

🗂️Easily move JavaScript modules.

created time in a month

push eventfabiomcosta/mvjs

Fabio M. Costa

commit sha 0177545faf452c344c709f1d3497372a3433d2ae

Updating project description and README to better match its current state

view details

Fabio M. Costa

commit sha 7c8d5fd65c3cebb7771779638fbba3a714330665

1.12.1

view details

push time in a month

push eventfabiomcosta/mvjs

Fabio M. Costa

commit sha d86ef0d57ff3692114da972811cdc945f757c28c

There is no need for that comment

view details

push time in a month

push eventfabiomcosta/mvjs

Fabio M. Costa

commit sha 6ed0200b3662c0c25b3649fb508a8315a5bd6ea5

Small example update

view details

push time in a month

created tagfabiomcosta/mvjs

tagv1.11.0

🗂️Easily move JavaScript modules.

created time in a month

created tagfabiomcosta/mvjs

tagv1.12.0

🗂️Easily move JavaScript modules.

created time in a month

push eventfabiomcosta/mvjs

Fabio M. Costa

commit sha 190ce3dc7aa680fc8770c9fd8e19f648832064c0

adding an example to the README file

view details

push time in a month

push eventfabiomcosta/mvjs

Fabio M. Costa

commit sha 81ae798fe344bd331c108a3bd9103dab3a6228cb

Ignoring binary files and not using requireResolve when the import happens from non-js files

view details

Fabio M. Costa

commit sha 56b28cdd4e30d87a14ce4730c907e1187a418b03

making path regex more strict to avoid changing paths where we shouldnt

view details

Fabio M. Costa

commit sha 2a2b15526b7a954b1b5c78c013b072756bdb39b5

Just warning about file not being found instead of throwing error.

view details

Fabio M. Costa

commit sha 6bf8c27bdf723db2109f154411634450185d2202

1.11.0

view details

Fabio M. Costa

commit sha 449c5067836bafabe017493cd5b95de4a8b187f2

fixing unit tests

view details

Fabio M. Costa

commit sha 4f0f438b813146b860adb4a6c11c711f45aa3f21

1.12.0

view details

push time in a month

issue commentfacebook/flow

Type incompatibility despite identical types

could it be related to https://github.com/facebook/flow/issues/8242 ?

DullReferenceException

comment created time in a month

fork fabiomcosta/source-from-zeit-deployment

Download deployment source files for a deployment from zeit.co

fork in a month

push eventfabiomcosta/dotfiles

Fabio M. Costa

commit sha a4b16c20dc139c45818a73d0bff491c501692a55

improvements... sorry I didnt merge these before and there are too many changes...

view details

push time in a month

PR opened godaddy/svgs

Adding peerDependenciesMeta information

This will make react-native-svg effectively optional, and avoid the warnings when installing svgs on web projects.

Screen Shot 2020-01-15 at 12 22 03 PM

This is supported since npm 6.11: https://github.com/npm/cli/releases/tag/v6.11.0 yarn docs (but npm supports it as well as you can see on the previous link): https://next.yarnpkg.com/configuration/manifest#peerDependenciesMeta example: https://github.com/knex/knex/blob/master/package.json#L55-L71

+8 -1

0 comment

1 changed file

pr created time in a month

create barnchfabiomcosta/svgs

branch : peerDependenciesMeta_react_native

created branch time in a month

fork fabiomcosta/svgs

svgs is a compatiblity layer between svg and react-native-svg

fork in a month

PR opened facebook/draft-js

Allowing more flexible immutable-js version (back again)

Summary

https://github.com/facebook/draft-js/pull/468 introduced a change that locked the immutable-js to be 3.7.x. Reading the PR, you can see that was supposed to be a band-aid PR while https://github.com/immutable-js/immutable-js/pull/881/files was getting merged. 881 eventually got merged and included on the latest immutable-js release, but the problem is that when installing the latest release of immutable-js, there are still multiple type errors across the codebase and, most importantly, it seems like updating the immutable-js version on Facebook itself is hard to accomplish, so this update is being avoided as much as possible.

Note that the problems that 3.8.x introduces are only related to Flow types and not actual issues and there are no breaking changes (GoDaddy has been using draft-js in production for more than a year now without issues).

Locking immutable-js to that version is an issue if your project with draft-js an the newest version of immutable-js. In this case, you'll end up bundling both versions of immutable-js on your application, which is not ideal.

This PR tries to achieve a middle ground, where immutable-js stays at 3.7.x, while opening the semver range to allow draft-js to be used with other versions bigger than 3.7.x and smaller than 4.0.0.

Test Plan

Running yarn on with this change applied doesn't change the yarn.lock file

+4 -4

0 comment

4 changed files

pr created time in a month

push eventfabiomcosta/draft-js

Fabio M. Costa

commit sha e503924b942e8b28fdc4a0be943909afce170a51

updates on bundles

view details

push time in a month

create barnchfabiomcosta/draft-js

branch : more_flexible_draftjs_versioning

created branch time in a month

push eventfabiomcosta/fabiomcosta.github.io

Fabio M. Costa

commit sha d340c3294a1e6801f8b5d30a41c3dd52a06850e5

fixing page title

view details

push time in 2 months

push eventfabiomcosta/fabiomcosta.github.io

Fabio M. Costa

commit sha d91ebc4cb8bc681513817a1136e4940825330b19

adding presentation

view details

push time in 2 months

create barnchfabiomcosta/fabiomcosta.github.io

branch : master

created branch time in 2 months

created repositoryfabiomcosta/fabiomcosta.github.io

created time in 2 months

pull request commentgodaddy/javascript

Adds TypeScript flavor packages for ESLint

https://github.com/godaddy/javascript/pull/88 has been merged, so I would adjust this PR to have less peerDeps, according to what has been done there. This looks fantastic!

andyfleming

comment created time in 2 months

Pull request review commentgodaddy/javascript

Adds TypeScript flavor packages for ESLint

 # godaddy-style -Official GoDaddy JavaScript styleguide. It includes `eslint` packages for three use-cases and can be used as a standard in any new project.+Official GoDaddy JavaScript styleguide. It includes `eslint` packages for various use-cases and can be used as a standard in any new project.  - [`eslint-config-godaddy`]: Base configuration for _non-React_, ES6 JavaScript applications - [`eslint-config-godaddy-react`]: Configuration for ES6 React JavaScript applications - [`eslint-config-godaddy-es5`]: Configuration for React _and_ non-React ES5 JavaScript applications+- [`eslint-config-godaddy-typescript`]: Configuration for ES6 TypeScript applications+- [`eslint-config-godaddy-react-typescript`]: Configuration for ES6 React JavaScript applications+- [`eslint-config-godaddy-flow`]: Configuration for ES6 React JavaScript applications using Flow

Cool! Thx for adding this missing one

andyfleming

comment created time in 2 months

push eventfabiomcosta/arquiteturas_aplicacoes_web

Fabio M. Costa

commit sha b156d39ac4e5e8b9a6e7226a73a5bdc6db3c420a

adicionando links

view details

push time in 2 months

push eventfabiomcosta/arquiteturas_aplicacoes_web

Fabio M. Costa

commit sha 97aa4d5d99672d2c974a5e2669af3bdf93cc0f9f

criando um README

view details

push time in 2 months

create barnchfabiomcosta/arquiteturas_aplicacoes_web

branch : master

created branch time in 2 months

created repositoryfabiomcosta/arquiteturas_aplicacoes_web

Codigo e apresentacao para arquiteturas de aplicacoes web

created time in 2 months

issue commentfacebook/draft-js

Draft 0.11.0 Umbrella

Yeah, I think we could just close this issue... the new releases are there...

flarnie

comment created time in 2 months

issue commentfacebook/draft-js

Immutable-js newest version -> draft-js incompatible

Any chance we'll ever get to at least update to the latest 3.x.x version? :/

markpradhan

comment created time in 2 months

issue commentfacebook/draft-js

Issue with updated https://draftjs.org/ demo editor

By debugging the issue on the production site I can see that the editorState that we have access on draft-js/src/component/selection/getUpdatedSelectionState.js is not really matching the HTML content. The data-offset-key on the HTML is always data-offset-key="erdqe-0-0", which makes me think that this might be related to some sort of server-sider-rendering issue, and that draft-js doesn't work well with SSR.

scottfr

comment created time in 2 months

issue commentfacebook/draft-js

Issue with updated https://draftjs.org/ demo editor

This PR will potentially fix this issue as well, but it was created to fix a separate issue, that happen to be on the same code path of the issue that is happening on the production website.

https://github.com/facebook/draft-js/pull/2297

scottfr

comment created time in 2 months

PR opened facebook/draft-js

Making sure we don't throw when selecting text on multiple fields

Summary

When selecting text between multiple draft-js Editor fields rendered on a page, an unexpected error happens.

Test Plan

I created this sandbox to more easily show the issue this PR is solving. Follow the instructions on the sandbox to repro the issue and see the error: https://codesandbox.io/s/affectionate-rgb-64zsc

+27 -10

0 comment

3 changed files

pr created time in 2 months

create barnchfabiomcosta/draft-js

branch : fix_selection_multiple_fields

created branch time in 2 months

push eventfabiomcosta/draft-js

Claudio Procida

commit sha fb7882b436fa148629a2e0ab4784218a2fc5d630

Fixes flow error (#1962) Summary: **Summary** Fixes a flow error in master (#1961) by replacing an inline `$FlowFixMe` with the appropriate type `string` **Test Plan** ``` → yarn flow Using globally installed version of Yarn yarn run v1.12.1 $ flow src No errors! ✨ Done in 0.28s. ``` Pull Request resolved: https://github.com/facebook/draft-js/pull/1962 Differential Revision: D13548249 fbshipit-source-id: 6975261897187560536a08fafc24c3400d7bf645

view details

Claudio Procida

commit sha 642aa119af114e8db590fe76cd2f2b84e118471c

Normalize copyright headers to BSD + patents grant and drop the year (#1964) Summary: **Summary** This PR follows up work started by niveditc on #1860 and suspended because of limitations with tooling. Let's give it another try. - Remove all copyright years - Correct copyright headers under `website/` referencing the MIT license - Inline `All rights reserved.` on the same line of the copyright - Fixes copyright headers of examples incorrectly using headers for source files The PR also normalizes copyright headers to BSD with patents grant, as some files were later added with the newest MIT license applied to React and other OSS projects. We should discuss the switch to MIT for Draft.js as well. **Test Plan** Manual inspection of files + `yarn lint` Pull Request resolved: https://github.com/facebook/draft-js/pull/1964 Differential Revision: D13562427 fbshipit-source-id: 6a15d29ff56a6340ee2a0f13f278b207f1761d28

view details

Claudio Procida

commit sha 585af35c3a8c31fefb64bc884d4001faa96544d3

Relicense under MIT and remove patents grant (#1967) Summary: **Summary** After internal discussion and approval by the legal team, we decided to align Draft.js with other Facebook open source projects [recently re-licensed under MIT](https://code.fb.com/web/relicensing-react-jest-flow-and-immutable-js/). This PR removes the patents grant and re-licenses all Draft.js source files under the MIT license. **Test Plan** `yarn lint` Manual code inspection Pull Request resolved: https://github.com/facebook/draft-js/pull/1967 Differential Revision: D13572529 fbshipit-source-id: f59982148515fdc7a2f697c92e1939e211b6125c

view details

Isaiah Solomon

commit sha 37f2f2ac16e4edf29c7c7e8230dec544faeafdfe

added highlighting (<mark> tag) to draft js html to content block converter Summary: Added mark tag as recognizable tag used for styling in HTML conversion. We need this because we need a way to include a custom style for highlighted text (via `span`), which there currently seems to be no support for. Reference to similar open source pull request with same change: https://github.com/facebook/draft-js/pull/1277/commits/638f68641c0ea4f4f0f45ae44e221f3e04006796 Reviewed By: claudiopro Differential Revision: D13573448 fbshipit-source-id: a72716dd39870d9db8cc0b13d8fcbed683e49063

view details

PLa

commit sha 6db3726eeffe0e747b508bf768a7851b87509e8a

Add live demo to README.md (#1907) Summary: **Summary** - Add live demo (GIF) to your README file Pull Request resolved: https://github.com/facebook/draft-js/pull/1907 Differential Revision: D13745823 fbshipit-source-id: 94d0309c270c9337b2c35265e9a6d8c335854566

view details

Anthony Muscat

commit sha 9b2a3660fa2e6abb8f6503ebf7f830bc98d0c248

Update fbjs to 1.0.0 to fix ReDos Vulnerability (#1978) Summary: **Summary** draft-js was using older version of fbjs that uses older version ua-parser-js what has a vulnerability. https://app.snyk.io/vuln/npm:ua-parser-js:20180227 **Test Plan** 1. Run npm test and it passes 2. Run npm build and it passes Pull Request resolved: https://github.com/facebook/draft-js/pull/1978 Differential Revision: D13746429 fbshipit-source-id: 636e9ad795f97781f6dc8a88125dcea0be005987

view details

Deep

commit sha 363f66e36790b67bea87e88813134dcd84fcc643

Remove componentWillReceiveProps usages in examples (#1952) Summary: **Summary** Resolves [1940](https://github.com/facebook/draft-js/issues/1940) Change usage of `componentWillReceiveProps` in Tex examples to `componentDidUpdate` Pull Request resolved: https://github.com/facebook/draft-js/pull/1952 Reviewed By: claudiopro Differential Revision: D13417818 Pulled By: claudiopro fbshipit-source-id: b13ff3140c3207cddaeb8d98c239f7dfd4b04a47

view details

Nivedita Chopra

commit sha a3a35857b0697d573f425138e9260324d0b059b8

Update webpack-dev-server & babel version in TeX examples (#1981) Summary: **Summary** * Upgrade `webpack-dev-server` to 3.1.14 to fix [vulnerability in versions < 3.1.11](https://nvd.nist.gov/vuln/detail/CVE-2018-14732) & `webpack` to 4.0.0 to match it * Upgrade `babel` to 6.0.0 & `babel-loader` to 7.0.0 to match `webpack` upgrade * Changes to `server.js` & `app.js` to support the `webpack` & `babel` version upgrades **Test Plan** Run `yarn start` and load http://localhost:3000/ <img width="1089" alt="screenshot 2019-01-21 13 22 30" src="https://user-images.githubusercontent.com/2357761/51502558-5974d780-1d8b-11e9-8568-917f43967188.png"> Pull Request resolved: https://github.com/facebook/draft-js/pull/1981 Reviewed By: claudiopro Differential Revision: D13754649 Pulled By: claudiopro fbshipit-source-id: 19169f9b091d85344d975e2d7b963437b7701e9b

view details

Claudio Procida

commit sha e942ee9205da89354a366d05f90645736988d38d

Fixes lint warnings in convertFromHTMLToContentBlocks2 tests Summary: Fixes lint warnings in convertFromHTMLToContentBlocks2 tests and initializes with defaults from the `clear` method. Reviewed By: j-nolan Differential Revision: D13711386 fbshipit-source-id: e5562b69c4388b75ea5a0b5abfb4508ad9096a87

view details

Paco Estevez Garcia

commit sha c022efba2bae265bbaf532f6c867a094b571f917

Update to 0.92.0 Summary: This diff updates `~/www` to Flow 0.92.0 Reviewed By: motiz88 Differential Revision: D13900311 fbshipit-source-id: 2ddbbd3f02aba09fa8f24e2b9692fb10b07ad620

view details

Claudio Procida

commit sha e8a281c936fc78834c1e1d2505ba5153aed531c5

Upgrades flow-bin to 0.91.0 and mutes fbjs joinClasses error � (#1989) Summary: **Summary** Fixes a CI build error (#1988) by adding a `$FlowExpectedError` annotation, and upgrading [flow-bin](https://www.npmjs.com/package/flow-bin) to 0.91.0 **Test Plan** ``` yarn run flow flow src ``` ``` → flow src The flow server's version didn't match the client's, so it exited. Going to launch a new one. Launching Flow server for /Users/procidac/Development/gh/claudiopro/draft-js/src Spawned flow server (pid=87525) Logs will go to /private/tmp/flow/zSUserszSprocidaczSDevelopmentzSghzSclaudioprozSdraft-jszSsrc.log Monitor logs will go to /private/tmp/flow/zSUserszSprocidaczSDevelopmentzSghzSclaudioprozSdraft-jszSsrc.monitor_log No errors! ``` Pull Request resolved: https://github.com/facebook/draft-js/pull/1989 Reviewed By: pakoito Differential Revision: D13917267 Pulled By: pakoito fbshipit-source-id: ce66ee4c67c4e7cc46c51ca91a4ade3d980fdf2e

view details

Claudio Procida

commit sha a4cc10d80045d52db9dafb98ecadeb4597521077

Adds email notifications for TravisCI builds (#1990) Summary: **Summary** Adds claudiopro 's email for TravisCI build notifications. Feel free to do the same if you want to stay in the loop. **Test Plan** Wait for the next build to receive an email from TravisCI �‍♂️ Pull Request resolved: https://github.com/facebook/draft-js/pull/1990 Reviewed By: elboman Differential Revision: D13935604 Pulled By: elboman fbshipit-source-id: 0a3020e65890793b82c87626f6da284ec310805c

view details

Deniz Susman

commit sha 71672107a9593a71acf9b4d7aaed00432b75d932

Fix typo in code comment for DraftEditor (#1991) Summary: "effectively" instead of "effetively". Pull Request resolved: https://github.com/facebook/draft-js/pull/1991 Differential Revision: D13945386 fbshipit-source-id: bfc4b2edc3dff6177ccb0865e4265aeb412744f7

view details

claudiopro

commit sha a97ed7efcf0caeee8ab0a03f785b4b431eba5a8f

Upgrades Draft to React 16.8 ⚛️ (#1996) Summary: **Summary** Upgrades [react](https://npm.im/react) and [react-dom](https://npm.im/react-dom) dependencies to the freshly released 16.8 version supporting Hooks. **Test Plan** `yarn` manual smoke test of editor in examples Pull Request resolved: https://github.com/facebook/draft-js/pull/1996 Differential Revision: D13982016 fbshipit-source-id: b2f87a1d85336f60d7a03318e5e0155bb3c44fc8

view details

Jan Karlo Dela Cruz

commit sha c21a9f7f09fa737f27875dc5ca8264a0b1dc86c2

Fix bad destructuring when content block key has a `-` (#1995) Summary: **Summary** If a content block was created with a key that contains the `-`, it would fail to decode the `decoratorKey` and the `leafKey` because the current implementation relies on `-` to be a parsing delimiter. Here's an example: ```js class SomeComponent extends React.Component { constructor(props) { super(props); const block = new ContentBlock({ type: 'paragraph', text: 'some-text', key: 'some-key' }); const contentState = ContentBlock.createFromBlockArray([block]); this.state = {editorState: EditorState.createWithContent(contentState)}; this.onChange = editorState => this.setState({editorState}); } render() { return ( <Editor editorState={this.state.editorState} onChange={this.onChange} /> ); } } ``` When you select anywhere on the editor, you'd get this error: ``` TypeError: Cannot read property 'getIn' of undefined 45 | const focusBlockKey = focusPath.blockKey; 46 | const focusLeaf = editorState > 47 | .getBlockTree(focusBlockKey) | ^ 48 | .getIn([focusPath.decoratorKey, 'leaves', focusPath.leafKey]); 49 | 50 | const anchorLeafStart: number = anchorLeaf.get('start'); at getUpdatedSelectionState (src/component/selection/getUpdatedSelectionState.js:47:30) at getDraftEditorSelectionWithNodes (src/component/selection/getDraftEditorSelectionWithNodes.js:48:58) at getDraftEditorSelection (src/component/selection/getDraftEditorSelection.js:37:53) at assertGetDraftEditorSelection (src/component/selection/__tests__/getDraftEditorSelection-test.js:55:53) at Object.<anonymous> (src/component/selection/__tests__/getDraftEditorSelection-test.js:211:3) ``` **Test Plan** Added a unit test for `DraftOffsetKey.js` to check for all delimiter cases. Pull Request resolved: https://github.com/facebook/draft-js/pull/1995 Differential Revision: D13982004 fbshipit-source-id: 3cd5967ad86041e310c41e7bcbfff4e868062804

view details

Deniz Susman

commit sha e84e757caf05d0d25695ac6b88089e8d799ef8a6

Typo fix in code comment (#1997) Summary: "programmatically" instead of "programatically". Pull Request resolved: https://github.com/facebook/draft-js/pull/1997 Differential Revision: D14004426 fbshipit-source-id: f775eb9e69ca0f9dbd02fbe94132ebc166f82d08

view details

Claudio Procida

commit sha bd799f56a2594dcb177a9fbe9985059134502841

Cleans up and refreshes generated website resources (#1998) Summary: **Summary** Cleans up unused website resources from before the migration to Docusaurus, and makes sure static website resources are generated and refreshed at every build. **Test Plan** ``` yarn cd website yarn build yarn start ``` Website loads and pages contain the expected content. Pull Request resolved: https://github.com/facebook/draft-js/pull/1998 Reviewed By: niveditc Differential Revision: D14004275 Pulled By: niveditc fbshipit-source-id: 2d0afaf448ae5d1c6f9f6915e530c50c983135d1

view details

Claudio Procida

commit sha b4183b1519edcd075325adae0cb208551dc80f50

Normalize case in convertFromHTMLToContentBlocks variable names Summary: Normalize case in `convertFromHTMLToContentBlocks` variable names. It is often found as `convertFromHTMLtoContentBlocks` (lowercase 'to') and can give us unpleasant surprises in case of codemods Reviewed By: mitermayer Differential Revision: D14004772 fbshipit-source-id: e7dc11a6eeedbf2fa3ca607f613f99fa6583942a

view details

Claudio Procida

commit sha fdf63aa6a8907e0889b882bf1db051fa412be283

Handles <br> tags in refactored HTML converter Summary: This diff aligns the refactored HTML converter with the legacy one to correctly handle <br> tags Reviewed By: mitermayer Differential Revision: D14027112 fbshipit-source-id: 68c2ae2272bac4e2d90a72b71cfb43f7b20faa3a

view details

Daniel Sainati

commit sha 3400cdafb465640c41d3728d52ed59e8f13ad78a

deploy 0.93 Summary: This diff updates ~/www to Flow 0.93.0 Reviewed By: pakoito Differential Revision: D14074027 fbshipit-source-id: 39459cb65fb0fb10eecf31066423146499ffe634

view details

push time in 2 months

issue openedfacebook/draft-js

The version tags are not updated

The latest version on npm is 0.11.3, but the latest tag here on gitub is 0.11.0: https://github.com/facebook/draft-js/releases

Can someone push the tags used to publish the npm package?

created time in 2 months

issue commentfacebook/draft-js

Issue with updated https://draftjs.org/ demo editor

Upon further investigation, the editor works ok during local development but the generated site has a broken editor. I suspect it's due to the minification step. cc @endiliey for help! Anyway to turn off minification during the build step (other than hacking the local Docusaurus core in node_modules)?

We need to try out the editor on a non-Docusaurus environment like CRA with minification to actually determine if it's Docusaurus' minification that's breaking it.

Repro steps:

ezgif com-video-to-gif

Update: I set minimize: false in Docusaurus webpack's config and this fixes the issue. So it's quite confirmed it's Docusaurus' minification step, but it could be a bug in one of Docusaurus' minification tools or the way Draft.js is writing the code.

@yangshun I cloned the repo and ran the website without any changes and got no errors there. Did anyone try just updating the website with the latest code on master?

scottfr

comment created time in 2 months

issue commentfacebook/draft-js

Issue with updated https://draftjs.org/ demo editor

@angelikatyborska I can get the broken behavior on Chrome as well sometimes...

scottfr

comment created time in 2 months

push eventfabiomcosta/javascript

Fabio M. Costa

commit sha ba085c85c8fc8d98e0f59e3d0402b0a475986170

using proper versioning

view details

push time in 2 months

issue openedfabiomcosta/mvjs

Don't throw when imports are not

Saw these errors and they should just be warnings... this tool shouldn't be affected by those, just let the users know via a warning.

INFO: Detected project path: gDev/gd/vnext-editor
Error: File "gDev/gd/vnext-editor/bin/clean" is importing "gDev/gd/vnext-editor/build'));
rimraf.sync(path.resolve(__dirname, '../stats" but it does not exists.
    at requireResolve (g.npm/_npx/75097/lib/node_modules/@fabiomcosta/mvjs/lib/requireResolve.js:17:13)
    at getAbsoluteImportSourcePath (g.npm/_npx/75097/lib/node_modules/@fabiomcosta/mvjs/lib/path.js:101:38)
    at updateSourcePath (g.npm/_npx/75097/lib/node_modules/@fabiomcosta/mvjs/lib/path.js:155:36)
    at content.replace (g.npm/_npx/75097/lib/node_modules/@fabiomcosta/mvjs/lib/runner.js:51:53)
    at String.replace (<anonymous>)
    at genericTransform (g.npm/_npx/75097/lib/node_modules/@fabiomcosta/mvjs/lib/runner.js:40:40) ERR gDev/gd/vnext-editor/src/server/config/local/index.js Transformation error (File "gDev/gd/vnext-editor/src/server/config/local/index.js" is importing "gDev/gd/vnext-editor/src/server/config/local/overrides.json" but it does not exists.)
Error: File "gDev/gd/vnext-editor/src/server/config/local/index.js" is importing "gDev/gd/vnext-editor/src/server/config/local/overrides.json" but it does not exists.
    at requireResolve (g.npm/_npx/75097/lib/node_modules/@fabiomcosta/mvjs/lib/requireResolve.js:17:13)
    at getAbsoluteImportSourcePath (g.npm/_npx/75097/lib/node_modules/@fabiomcosta/mvjs/lib/path.js:101:38)
    at updateSourcePath (g.npm/_npx/75097/lib/node_modules/@fabiomcosta/mvjs/lib/path.js:155:36)
    at updateLiteralPath (g.npm/_npx/75097/lib/node_modules/@fabiomcosta/mvjs/lib/ast.js:43:47)
    at updateNodePath (g.npm/_npx/75097/lib/node_modules/@fabiomcosta/mvjs/lib/ast.js:53:14)
    at NodePath.transform.find.filter.forEach.path (g.npm/_npx/75097/lib/node_modules/@fabiomcosta/mvjs/lib/transform.js:31:54)
    at __paths.forEach (g.npm/_npx/75097/lib/node_modules/@fabiomcosta/mvjs/node_modules/jscodeshift/src/Collection.js:77:36)
    at Array.forEach (<anonymous>)
    at Collection.forEach (g.npm/_npx/75097/lib/node_modules/@fabiomcosta/mvjs/node_modules/jscodeshift/src/Collection.js:76:18)
    at transformer (g.npm/_npx/75097/lib/node_modules/@fabiomcosta/mvjs/lib/transform.js:30:93)
 ERR gDev/gd/vnext-editor/src/server/config/local-build/index.js Transformation error (File "gDev/gd/vnext-editor/src/server/config/local-build/index.js" is importing "gDev/gd/vnext-editor/src/server/config/local-build/overrides.json" but it does not exists.)
Error: File "gDev/gd/vnext-editor/src/server/config/local-build/index.js" is importing "gDev/gd/vnext-editor/src/server/config/local-build/overrides.json" but it does not exists.
    at requireResolve (g.npm/_npx/75097/lib/node_modules/@fabiomcosta/mvjs/lib/requireResolve.js:17:13)
    at getAbsoluteImportSourcePath (g.npm/_npx/75097/lib/node_modules/@fabiomcosta/mvjs/lib/path.js:101:38)
    at updateSourcePath (g.npm/_npx/75097/lib/node_modules/@fabiomcosta/mvjs/lib/path.js:155:36)
    at updateLiteralPath (g.npm/_npx/75097/lib/node_modules/@fabiomcosta/mvjs/lib/ast.js:43:47)
    at updateNodePath (g.npm/_npx/75097/lib/node_modules/@fabiomcosta/mvjs/lib/ast.js:53:14)
    at NodePath.transform.find.filter.forEach.path (g.npm/_npx/75097/lib/node_modules/@fabiomcosta/mvjs/lib/transform.js:31:54)
    at __paths.forEach (g.npm/_npx/75097/lib/node_modules/@fabiomcosta/mvjs/node_modules/jscodeshift/src/Collection.js:77:36)
    at Array.forEach (<anonymous>)
    at Collection.forEach (g.npm/_npx/75097/lib/node_modules/@fabiomcosta/mvjs/node_modules/jscodeshift/src/Collection.js:76:18)
    at transformer (g.npm/_npx/75097/lib/node_modules/@fabiomcosta/mvjs/lib/transform.js:30:93)

created time in 2 months

push eventfabiomcosta/mvjs

Fabio M. Costa

commit sha f2cb5ed066d3647b3cde0f2557dc111d212f14ae

Update README.md

view details

push time in 2 months

pull request commentfacebook/draft-js

fixed a bug related to draft losing its selection

ping?

pferdone

comment created time in 2 months

issue commentfacebook/codemod

Ignore binary files automatically

I THINK this commit fixes this issue for python3, but I'm not sure if there has been a new release after that: https://github.com/facebook/codemod/commit/d9f2c24747e1f9cb8d608ef0fcd8afe8063cc870

raviqqe

comment created time in 2 months

pull request commentbabel/babel

Add optional-chaining and nullish-coalescing to preset-env

Good to go?

Druotic

comment created time in 2 months

pull request commentbenmosher/eslint-plugin-import

Check duplicates for normal imports and flow type imports separately

:/ Too bad this wasn't introduced with an option to disable this behavior. You can import types and other things with the same import with:

import defaultNamed, { named, typed namedType } from './module';

This is fine as the default, but it would be nice to provide an option to keep the previous behavior.

sgtpepper43

comment created time in 2 months

startedgodaddy/gasket

started time in 2 months

pull request commentgodaddy/javascript

[proposal] Opening up dep versioning and removing most peerDependencies

I guess I missed this one, thx!

On Mon, Dec 2, 2019 at 9:00 AM Jacob Page notifications@github.com wrote:

@DullReferenceException requested changes on this pull request.

In packages/eslint-config-godaddy-react/package.json https://github.com/godaddy/javascript/pull/88#discussion_r352713903:

"peerDependencies": {

  • "babel-eslint": ">=7.2.1 <11.0.0",
  • "eslint": "^6.1.0",
  • "eslint-plugin-json": "^1.4.0",
  • "eslint-plugin-jsx-a11y": "^6.2.3",
  • "eslint-plugin-mocha": "^5.3.0",
  • "eslint-plugin-react": "^7.14.2"
  • "eslint": ">=6.0.0"
  • },
  • "dependencies": {
  • "babel-eslint": "^10.0.3",
  • "eslint-config-godaddy": "^4.0.0",
  • "eslint-plugin-flowtype": "^4.5.2",
  • "eslint-plugin-jsx-a11y": "*",

Could you change this to a ^ version? Don't want a non-backwards-compatible release breaking things for people.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/godaddy/javascript/pull/88?email_source=notifications&email_token=AAAG64S2V6GETBSA3DBZV5LQWU5JNA5CNFSM4JQXE23KYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCNSQQSA#pullrequestreview-325388360, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAG64USDZXDJG5O2NC25ATQWU5JNANCNFSM4JQXE23A .

--

Fabio Miranda Costa twitter: @fabiomiranda github: fabiomcosta

fabiomcosta

comment created time in 3 months

Pull request review commentgodaddy/javascript

[proposal] Opening up dep versioning and removing most peerDependencies

   "bin": {     "eslint-godaddy-flow": "bin/eslint-godaddy-flow"   },-  "dependencies": {-    "eslint-config-godaddy": "^4.0.0"-  },   "peerDependencies": {-    "babel-eslint": ">=7.2.1 <11.0.0",-    "eslint": "^6.1.0",+    "eslint": ">=6.0.0"+  },+  "dependencies": {+    "babel-eslint": "^10.0.3",+    "eslint-config-godaddy": "^4.0.0",

I need to use the next version for these, can I have publish rights please?

fabiomcosta

comment created time in 3 months

Pull request review commentgodaddy/javascript

[proposal] Opening up dep versioning and removing most peerDependencies

   "bin": {     "eslint-godaddy-flow": "bin/eslint-godaddy-flow"   },-  "dependencies": {-    "eslint-config-godaddy": "^4.0.0"-  },   "peerDependencies": {-    "babel-eslint": ">=7.2.1 <11.0.0",-    "eslint": "^6.1.0",-    "eslint-plugin-babel": "^5.3.0",-    "eslint-plugin-flowtype": "^4.2.0",-    "eslint-plugin-json": "^1.4.0",-    "eslint-plugin-mocha": "^5.3.0"+    "eslint": ">=6.0.0"+  },+  "dependencies": {+    "babel-eslint": "*",

Updated based on the suggestions here. unrelated: we should also probably create a separate PR removing the es5 package, it's just one more thing to maintain and it's probably not used by anyone.

fabiomcosta

comment created time in 3 months

push eventfabiomcosta/javascript

Fabio M. Costa

commit sha f115b3cb43e40c39c422f8c051dc3d76017d8291

updating based on CR

view details

push time in 3 months

Pull request review commentgodaddy/javascript

[proposal] Opening up dep versioning and removing most peerDependencies

   "bin": {     "eslint-godaddy-flow": "bin/eslint-godaddy-flow"   },-  "dependencies": {-    "eslint-config-godaddy": "^4.0.0"-  },   "peerDependencies": {-    "babel-eslint": ">=7.2.1 <11.0.0",-    "eslint": "^6.1.0",-    "eslint-plugin-babel": "^5.3.0",-    "eslint-plugin-flowtype": "^4.2.0",-    "eslint-plugin-json": "^1.4.0",-    "eslint-plugin-mocha": "^5.3.0"+    "eslint": ">=6.0.0"+  },+  "dependencies": {+    "babel-eslint": "*",

Sounds good... I'll keep eslint as a peer because the other plugins do that anyway... I'll update the PR now

fabiomcosta

comment created time in 3 months

fork fabiomcosta/react-transition-group

An easy way to perform animations when a React component enters or leaves the DOM

https://reactcommunity.org/react-transition-group/

fork in 3 months

PR opened godaddy/javascript

[proposal] Opening up dep versioning and removing most peerDependencies

Today, when installing any of the eslint-config-godaddy-* packages, you're also required to install some peer deps that most ppl shouldn't care about. My understanding is that this was done so consumers could more easily control those version on their side and we wouldn't need to have to keep maintaining that on our side.

This PR tries to make installing these packages easier, while allowing consumers to also have control over those dependencies versions, if they ever want to, by providing them with version "*".

Their own project's package-lock will help those version stay as stable as possible, while allowing the capability of updating, if they need/want to.

Because this is a dependency for a lint tool (runs statically, not at runtime), I don't expect the fact that there are no hard fixed versioning on those dependencies to be a big issue, because any issue after an update on their side would be immediately visible, leading to a downgrade on theirside and eventual fix on this library, if so required.

I need to test this more before an eventual publish, but I was blocked by the fact that I can't publish beta versions, can someone help me with that?

+1322 -1549

0 comment

9 changed files

pr created time in 3 months

create barnchfabiomcosta/javascript

branch : proposal_less_peer_dep_more_loose_dep

created branch time in 3 months

Pull request review commentgodaddy/javascript

[major] depend on latest babel-eslint for react

     "eslint-config-godaddy": "^2.0.0"   },   "peerDependencies": {-    "eslint": "^4.3.0",+    "babel-eslint": ">=7.2.1 <11.0.0",

Hmm, why not just >=7.0.0?

Swaagie

comment created time in 3 months

pull request commentfacebook/draft-js

Prepares v0.11.2 release

@claudiopro any reason why 0.11.2 was never publish to NPM and its tag never pushed to this repo?

claudiopro

comment created time in 4 months

issue commentwebpack/webpack

[request-for-help-with-developing-plugin] Help with module lazy evaluation plugin

I understand, and any import can have side effects as well, but that's not what I'm trying to solve. Thank you for your comments so far.

fabiomcosta

comment created time in 4 months

CommitCommentEvent

issue commentfacebook/draft-js

Decorators are not working as expected

Here is a slightly simplified version that focus little more on the issue: https://codepen.io/fabiomcosta/pen/LYPwpde?editors=0010

backyardcoder

comment created time in 5 months

push eventfabiomcosta/mvjs

Fabio M. Costa

commit sha 36fa26e88f15f56bb80f33891a952a9357779927

npm audit and updates

view details

Fabio M. Costa

commit sha fcd6ffff2dcd3bfdfe1cdf9b4b1bfa7436b29517

Enabling support for fixing imports on files other than js modules with a generic regular expression approach.

view details

Fabio M. Costa

commit sha 6b8edbe41467f7c498e7429d77a13636552820a0

updating flow-bin

view details

Fabio M. Costa

commit sha 7c2b51b3c350f99850fe7786407d5114b5698844

removing check for self.require and global.require. those functions are define per module and are not really global, so that wasnt a valid check and increased complexity

view details

Fabio M. Costa

commit sha 65c2be4dfe0e653ca93ec739587fd8140423bc08

properly updating the readme file with the introduction of the new feature

view details

Fabio M. Costa

commit sha 85b44dac87eac6034cc4b61eec181278964eb7bc

1.10.0

view details

push time in 5 months

created tagfabiomcosta/mvjs

tagv1.10.0

🗂️Easily move JavaScript modules.

created time in 5 months

issue closedfabiomcosta/mvjs

Use `git` or `hg` to search for the project files

We are currently searching for the project files ourselves, with pure Node fs functions. This is fine, but we end up changing more files than we should. If we used git to search for the existing files, it will already consider the .gitignore definitions, which generally excludes node_modules (which we currently already exclude in a hard coded way) and excludes folders that contains auto-generated code (generally babel transpiled code), that we also don't want to update.

closed time in 5 months

fabiomcosta

issue commentfabiomcosta/mvjs

Use `git` or `hg` to search for the project files

This will also make the project depend on a supported VCS. I'm not sure if there is any real benefit on doing this TBH.

fabiomcosta

comment created time in 5 months

issue closedfabiomcosta/mvjs

Moving a file should be done with either `git` or `hg`

The default behavior for when a project uses git or hg is to want to have the file moved with those tools in order to have the commit changes to look like moving a file. Let's detect if the project is using one of these tools and use git mv or hgmvto move the files instead of using node'sfs.rename` function.

closed time in 5 months

fabiomcosta

issue commentfabiomcosta/mvjs

Moving a file should be done with either `git` or `hg`

There is no real need to move files with any vcs, most vcs these days will smartly detect the moved files. https://github.com/fabiomcosta/mvjs/commit/c08af03ea887e2c86942ac6057c32da292e8b125

fabiomcosta

comment created time in 5 months

issue closedfabiomcosta/mvjs

Add support to move folders

Currently moving a folder is not supported, but it's definitely a desirable feature.

closed time in 5 months

fabiomcosta

issue commentfabiomcosta/mvjs

Add support to move folders

this has been implemented since https://github.com/fabiomcosta/mvjs/commit/faf1c28691c04702b9e23e05aa55231acde819bc but I forgot to close this issue.

fabiomcosta

comment created time in 5 months

issue commentwebpack/webpack

[request-for-help-with-developing-plugin] Help with module lazy evaluation plugin

@evilebottnawi thank you for reading and answering! 100% agreed, Babel even has this open available via its @babel/plugin-transform-modules-commonjs plugin, but we can't use that because optimizations like tree shaking and module concatenation won't work properly because WP runs after Babel and won't be able to "see" the module on its ESM form. This is the same reason why we set "modules" to false on Babel's preset-env. I explained this further on the SO link: https://stackoverflow.com/questions/57262947/lazy-evaluation-of-modules-with-webpack?noredirect=1#comment101152378_57262947

fabiomcosta

comment created time in 5 months

issue openedwebpack/webpack

Help with module lazy evaluation plugin

Hello folks,

I've tried to get help/pointer to a Webpack Plugin that would allow lazy evaluation of JS modules on Stackoverflow with no success, so I decided to post this here, in the hope that it would get more visibility.

The SO post explains what I mean by lazy evaluation. https://stackoverflow.com/questions/57262947/lazy-evaluation-of-modules-with-webpack?noredirect=1#comment101152378_57262947

If no such plugin already exists but you have any pointers on how I could achieve that via a plugin, please let me know as well.

From the example on the SO link, the following code:

import _ from 'lodash';

export function toUpperCase(str) {
  return _.toUpper(str);
}

Should become:

module.exports.toUpperCase = function(str) {
  return require('lodash').default.toUpper(str);
}

I think this could be achieved by tapping on the import Parser hook to remove the module level import statement, but I'm not sure how I can change the imported module identifier to the require call shown on the example.

Any pointers or tips on how to achieve this, or to plugins that do this or something similar would be greatly appreciated.

created time in 5 months

push eventfabiomcosta/dotfiles

Fabio M. Costa

commit sha 9ab15e3cd4d2a6c7c03ef562d12a03de64ab9193

starting vim mode by default

view details

push time in 5 months

more