-
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #45 from JoviDeCroock/chore/useContextSelectorPOC
(chore) - performant context propagation
- Loading branch information
Showing
23 changed files
with
1,227 additions
and
1,489 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
{ | ||
"name": "hooked-form", | ||
"version": "2.2.1", | ||
"version": "2.3.0-alpha.0", | ||
"description": "Forms done with React-Hooks", | ||
"author": "jdecroock <[email protected]> (https://twitter.com/JoviDeC)", | ||
"private": false, | ||
"repository": "https://www.github.com/jovidecroock/hooked-form", | ||
"sideEffects": false, | ||
"scripts": { | ||
"build": "rimraf dist && yarn build:es5 && yarn build:modern && yarn build:minified && yarn cleanup", | ||
"build:minified": "microbundle --define process.env.NODE_ENV=production --name hookedForm --output dist/prod", | ||
"build:es5": "microbundle --no-compress --name hookedForm --output dist/", | ||
"build": "rimraf dist && node ./scripts/removeLine.js && yarn build:es5 && yarn build:modern && yarn build:minified && yarn cleanup", | ||
"build:minified": "microbundle --jsx React.createElement --external react --define process.env.NODE_ENV=production --name hookedForm --output dist/prod", | ||
"build:es5": "microbundle --jsx React.createElement --external react --no-compress --name hookedForm --output dist/", | ||
"build:modern": "rollup -c && node ./scripts/sliceLicense.js", | ||
"cleanup": "rimraf .rpt2_cache && rimraf .rts2_cache_cjs && rimraf .rts2_cache_umd && rimraf .rts2_cache_es", | ||
"filesize": "bundlesize", | ||
|
@@ -42,34 +42,35 @@ | |
"@types/react": "16.8.2" | ||
}, | ||
"devDependencies": { | ||
"@ampproject/rollup-plugin-closure-compiler": "0.9.0", | ||
"@types/jest": "24.0.13", | ||
"@types/react": "16.8.8", | ||
"@types/react-dom": "16.8.2", | ||
"@testing-library/react": "8.0.5", | ||
"@types/jest": "24.0.15", | ||
"@types/react": "16.8.23", | ||
"@types/react-dom": "16.8.4", | ||
"codecov": "3.5.0", | ||
"cross-env": "5.2.0", | ||
"jest": "24.8.0", | ||
"jest-cli": "24.8.0", | ||
"microbundle": "0.11.0", | ||
"microbundle": "^0.12.0-next.3", | ||
"react": "16.9.0-alpha.0", | ||
"react-dom": "16.9.0-alpha.0", | ||
"react-testing-library": "7.0.1", | ||
"rimraf": "2.6.3", | ||
"rollup": "1.12.3", | ||
"rollup-plugin-filesize": "6.0.1", | ||
"rollup-plugin-node-resolve": "4.2.1", | ||
"rollup-plugin-replace": "^2.2.0", | ||
"rollup-plugin-terser": "4.0.4", | ||
"rollup-plugin-typescript2": "0.20.1", | ||
"rollup": "1.17.0", | ||
"rollup-plugin-filesize": "6.1.1", | ||
"rollup-plugin-node-resolve": "5.2.0", | ||
"rollup-plugin-replace": "2.2.0", | ||
"rollup-plugin-terser": "5.1.1", | ||
"rollup-plugin-typescript2": "0.22.0", | ||
"ts-jest": "24.0.2", | ||
"tslib": "1.9.3", | ||
"tslint": "5.12.1", | ||
"tslib": "1.10.0", | ||
"tslint": "5.18.0", | ||
"tslint-config-airbnb": "5.11.1", | ||
"tslint-config-prettier": "1.18.0", | ||
"tslint-react": "3.6.0", | ||
"typescript": "3.5.1" | ||
"tslint-react": "4.0.0", | ||
"typescript": "3.5.3" | ||
}, | ||
"dependencies": { | ||
"use-context-selector": "0.3.0" | ||
}, | ||
"dependencies": {}, | ||
"peerDependencies": { | ||
"react": ">=16.8.0", | ||
"react-dom": ">=16.8.0" | ||
|
@@ -97,19 +98,19 @@ | |
"bundlesize": [ | ||
{ | ||
"path": "./dist/prod/hooked-form.module.js", | ||
"maxSize": "2.25 kB" | ||
"maxSize": "2.5 kB" | ||
}, | ||
{ | ||
"path": "./dist/prod/hooked-form.umd.js", | ||
"maxSize": "2.25 kB" | ||
"maxSize": "2.5 kB" | ||
}, | ||
{ | ||
"path": "./dist/prod/hooked-form.js", | ||
"maxSize": "2.25 kB" | ||
"maxSize": "2.5 kB" | ||
}, | ||
{ | ||
"path": "./dist/prod/hooked-form.modern.js", | ||
"maxSize": "2 kB" | ||
"maxSize": "2.25 kB" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
var fs = require('fs'); | ||
|
||
const filename = `${process.cwd()}/node_modules/microbundle/dist/microbundle.js`; | ||
const IGNORED_LINE = 647; | ||
|
||
fs.readFile(filename, 'utf8', function(err, data) { | ||
let lines = data.split('\n') | ||
if (lines[IGNORED_LINE].includes('browser: options.target')) { | ||
lines = lines.filter((x, i) => i !== IGNORED_LINE && !x.includes("browser: options.target !== 'node'")) | ||
} | ||
if (!lines[712].includes('fs.writeFileSync')) { | ||
lines[712] = "fs.writeFileSync(path.resolve(options.cwd, 'mangle.json'), JSON.stringify(nameCache, null, 2));" | ||
} | ||
fs.writeFileSync(filename, lines.join('\n')) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import * as React from 'react'; | ||
import { createContext } from 'use-context-selector'; | ||
import { FormHookContext } from '../types'; | ||
|
||
export const formContext = React.createContext<FormHookContext>({} as any); | ||
export const formContext = createContext<FormHookContext>({} as any); | ||
const { Provider } = formContext; | ||
export { Provider }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.