Skip to content

Commit

Permalink
Merge pull request #31 from Integreat/UpgradeDependencies
Browse files Browse the repository at this point in the history
Upgrade dependencies
  • Loading branch information
michael-markl authored Sep 29, 2021
2 parents bd8218d + 8975194 commit d0cc35e
Show file tree
Hide file tree
Showing 8 changed files with 1,583 additions and 1,870 deletions.
6 changes: 6 additions & 0 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions .idea/runConfigurations.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/demo.js

Large diffs are not rendered by default.

47 changes: 32 additions & 15 deletions flow-typed/npm/jest_v26.x.x.js → flow-typed/npm/jest_v27.x.x.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// flow-typed signature: e60c7806ec0ddaf4588f438843ef37bd
// flow-typed version: 7afca48d86/jest_v26.x.x/flow_>=v0.104.x
// flow-typed signature: 5ddcf688200e3506308fdcfa78ca48d9
// flow-typed version: 644a595e77/jest_v27.x.x/flow_>=v0.134.x

type JestMockFn<TArguments: $ReadOnlyArray<*>, TReturn> = {
(...args: TArguments): TReturn,
Expand Down Expand Up @@ -259,6 +259,9 @@ type DomTestingLibraryType = {
// 5.x
toHaveDisplayValue(value: string | string[]): void,
toBeChecked(): void,
toBeEmptyDOMElement(): void,
toBePartiallyChecked(): void,
toHaveDescription(text: string | RegExp): void,
...
};

Expand Down Expand Up @@ -801,6 +804,14 @@ type JestObjectType = {
* Returns the number of fake timers still left to run.
*/
getTimerCount(): number,
/**
* Set the current system time used by fake timers.
* Simulates a user changing the system clock while your program is running.
* It affects the current time but it does not in itself cause
* e.g. timers to fire; they will fire exactly as they would have done
* without the call to jest.setSystemTime().
*/
setSystemTime(now?: number | Date): void,
/**
* The same as `mock` but not moved to the top of the expectation by
* babel-jest.
Expand All @@ -822,11 +833,15 @@ type JestObjectType = {
* Determines if the given function is a mocked function.
*/
isMockFunction(fn: Function): boolean,
/**
* Alias of `createMockFromModule`.
*/
genMockFromModule(moduleName: string): any,
/**
* Given the name of a module, use the automatic mocking system to generate a
* mocked version of the module for you.
*/
genMockFromModule(moduleName: string): any,
createMockFromModule(moduleName: string): any,
/**
* Mocks a module with an auto-mocked version when it is being required.
*
Expand Down Expand Up @@ -881,13 +896,6 @@ type JestObjectType = {
* or setInterval() and setImmediate()).
*/
advanceTimersByTime(msToRun: number): void,
/**
* Executes only the macro task queue (i.e. all tasks queued by setTimeout()
* or setInterval() and setImmediate()).
*
* Renamed to `advanceTimersByTime`.
*/
runTimersToTime(msToRun: number): void,
/**
* Executes only the macro-tasks that are currently pending (i.e., only the
* tasks that have been queued by setTimeout() or setInterval() up to this
Expand Down Expand Up @@ -1032,11 +1040,20 @@ declare var it: {
* @param {Function} Test
* @param {number} Timeout for the test, in milliseconds.
*/
skip(
name: JestTestName,
fn?: (done: JestDoneFn) => ?Promise<mixed>,
timeout?: number
): void,
skip: {|
(
name: JestTestName,
fn?: (done: JestDoneFn) => ?Promise<mixed>,
timeout?: number
): void,
each(
...table: Array<Array<mixed> | mixed> | [Array<string>, string]
): (
name: JestTestName,
fn?: (...args: Array<any>) => ?Promise<mixed>,
timeout?: number
) => void,
|},
/**
* Highlight planned tests in the summary output
*
Expand Down
53 changes: 29 additions & 24 deletions flow-typed/npm/react-dom_v16.x.x.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
// flow-typed signature: a333d1cdbb5a4103d0be63a412070e22
// flow-typed version: b2693c1879/react-dom_v16.x.x/flow_>=v0.117.x
// flow-typed signature: a39f42f172876eba767e8d47cd282535
// flow-typed version: ad3adf2de8/react-dom_v16.x.x/flow_>=v0.117.x

declare module 'react-dom' {
declare function findDOMNode(
componentOrElement: Element | ?React$Component<any, any>,
componentOrElement: Element | ?React$Component<any, any>
): null | Element | Text;

declare function render<ElementType: React$ElementType>(
element: React$Element<ElementType>,
container: Element,
callback?: () => void,
callback?: () => void
): React$ElementRef<ElementType>;

declare function hydrate<ElementType: React$ElementType>(
element: React$Element<ElementType>,
container: Element,
callback?: () => void,
callback?: () => void
): React$ElementRef<ElementType>;

declare function createPortal(
node: React$Node,
container: Element,
container: Element
): React$Portal;

declare function unmountComponentAtNode(container: any): boolean;
Expand All @@ -32,15 +32,15 @@ declare module 'react-dom' {
b: B,
c: C,
d: D,
e: E,
e: E
): void;
declare function unstable_renderSubtreeIntoContainer<
ElementType: React$ElementType,
ElementType: React$ElementType
>(
parentComponent: React$Component<any, any>,
nextElement: React$Element<ElementType>,
container: any,
callback?: () => void,
callback?: () => void
): React$ElementRef<ElementType>;
}

Expand All @@ -49,62 +49,67 @@ declare module 'react-dom/server' {
declare function renderToStaticMarkup(element: React$Node): string;
declare function renderToNodeStream(element: React$Node): stream$Readable;
declare function renderToStaticNodeStream(
element: React$Node,
element: React$Node
): stream$Readable;
declare var version: string;
}

type Thenable = { then(resolve: () => mixed, reject?: () => mixed): mixed, ... };
declare interface Thenable {
then(resolve: () => mixed, reject?: () => mixed): mixed;
}

declare module 'react-dom/test-utils' {
declare var Simulate: { [eventName: string]: (element: Element, eventData?: Object) => void, ... };
declare var Simulate: {
[eventName: string]: (element: Element, eventData?: Object) => void,
...,
};
declare function renderIntoDocument(
instance: React$Element<any>,
instance: React$Element<any>
): React$Component<any, any>;
declare function mockComponent(
componentClass: React$ElementType,
mockTagName?: string,
mockTagName?: string
): Object;
declare function isElement(element: React$Element<any>): boolean;
declare function isElementOfType(
element: React$Element<any>,
componentClass: React$ElementType,
componentClass: React$ElementType
): boolean;
declare function isDOMComponent(instance: any): boolean;
declare function isCompositeComponent(
instance: React$Component<any, any>,
instance: React$Component<any, any>
): boolean;
declare function isCompositeComponentWithType(
instance: React$Component<any, any>,
componentClass: React$ElementType,
componentClass: React$ElementType
): boolean;
declare function findAllInRenderedTree(
tree: React$Component<any, any>,
test: (child: React$Component<any, any>) => boolean,
test: (child: React$Component<any, any>) => boolean
): Array<React$Component<any, any>>;
declare function scryRenderedDOMComponentsWithClass(
tree: React$Component<any, any>,
className: string,
className: string
): Array<Element>;
declare function findRenderedDOMComponentWithClass(
tree: React$Component<any, any>,
className: string,
className: string
): ?Element;
declare function scryRenderedDOMComponentsWithTag(
tree: React$Component<any, any>,
tagName: string,
tagName: string
): Array<Element>;
declare function findRenderedDOMComponentWithTag(
tree: React$Component<any, any>,
tagName: string,
tagName: string
): ?Element;
declare function scryRenderedComponentsWithType(
tree: React$Component<any, any>,
componentClass: React$ElementType,
componentClass: React$ElementType
): Array<React$Component<any, any>>;
declare function findRenderedComponentWithType(
tree: React$Component<any, any>,
componentClass: React$ElementType,
componentClass: React$ElementType
): ?React$Component<any, any>;
declare function act(callback: () => void | Thenable): Thenable;
}
59 changes: 29 additions & 30 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@integreat-app/react-sticky-headroom",
"version": "1.2.0",
"version": "1.2.1",
"engines": {
"node": ">=6.9",
"npm": ">=3.8"
Expand Down Expand Up @@ -55,57 +55,56 @@
"styled-components": "4.x.x || 5.x.x"
},
"devDependencies": {
"@babel/cli": "^7.14.3",
"@babel/core": "^7.14.3",
"@babel/plugin-proposal-class-properties": "^7.13.0",
"@babel/plugin-proposal-do-expressions": "^7.14.0",
"@babel/plugin-proposal-export-default-from": "^7.12.13",
"@babel/plugin-proposal-export-namespace-from": "^7.14.2",
"@babel/plugin-proposal-json-strings": "^7.14.2",
"@babel/plugin-proposal-logical-assignment-operators": "^7.14.2",
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.14.2",
"@babel/plugin-proposal-numeric-separator": "^7.14.2",
"@babel/plugin-proposal-optional-chaining": "^7.14.2",
"@babel/plugin-proposal-pipeline-operator": "^7.12.13",
"@babel/plugin-proposal-throw-expressions": "^7.12.13",
"@babel/cli": "^7.15.7",
"@babel/core": "^7.15.5",
"@babel/plugin-proposal-class-properties": "^7.14.5",
"@babel/plugin-proposal-do-expressions": "^7.14.5",
"@babel/plugin-proposal-export-default-from": "^7.14.5",
"@babel/plugin-proposal-export-namespace-from": "^7.14.5",
"@babel/plugin-proposal-json-strings": "^7.14.5",
"@babel/plugin-proposal-logical-assignment-operators": "^7.14.5",
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.14.5",
"@babel/plugin-proposal-numeric-separator": "^7.14.5",
"@babel/plugin-proposal-optional-chaining": "^7.14.5",
"@babel/plugin-proposal-pipeline-operator": "^7.15.0",
"@babel/plugin-proposal-throw-expressions": "^7.14.5",
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
"@babel/plugin-syntax-import-meta": "^7.10.4",
"@babel/plugin-transform-react-jsx": "^7.14.3",
"@babel/plugin-transform-runtime": "^7.14.3",
"@babel/preset-env": "^7.14.4",
"@babel/preset-flow": "^7.13.13",
"@babel/preset-react": "^7.13.13",
"@babel/runtime": "^7.14.0",
"@babel/plugin-transform-react-jsx": "^7.14.9",
"@babel/plugin-transform-runtime": "^7.15.0",
"@babel/preset-env": "^7.15.6",
"@babel/preset-flow": "^7.14.5",
"@babel/preset-react": "^7.14.5",
"@babel/runtime": "^7.15.4",
"@integreat-app/eslint-config-babel": "^0.6.0",
"@integreat-app/eslint-config-flow": "^0.6.0",
"@integreat-app/eslint-config-jest": "^0.6.0",
"@integreat-app/eslint-config-node": "^0.6.0",
"@integreat-app/eslint-config-react": "^0.6.1",
"babel-core": "^7.0.0-bridge.0",
"babel-eslint": "^10.1.0",
"babel-jest": "^27.0.2",
"babel-jest": "^27.2.2",
"babel-loader": "^8.2.2",
"babel-plugin-styled-components": "^1.12.0",
"babel-plugin-styled-components": "^1.13.2",
"enzyme": "^3.11.0",
"enzyme-adapter-react-16": "^1.15.6",
"enzyme-to-json": "^3.6.2",
"eslint": "^7.27.0",
"flow-bin": "~0.152.0",
"eslint": "^7.32.0",
"flow-bin": "~0.160.2",
"flow-copy-source": "^2.0.9",
"flow-typed": "^3.3.1",
"jest": "^27.0.4",
"jest-junit": "^12.1.0",
"jest-styled-components": "^7.0.4",
"jest": "^27.2.2",
"jest-junit": "^12.3.0",
"jest-styled-components": "^7.0.5",
"raf": "^3.4.1",
"react": "^16.14.0",
"react-dom": "^16.14.0",
"rimraf": "^3.0.2",
"styled-components": "^5.3.0",
"styled-components": "^5.3.1",
"stylelint": "^13.13.1",
"stylelint-config-recommended": "^5.0.0",
"stylelint-config-styled-components": "^0.1.1",
"stylelint-processor-styled-components": "^1.10.0",
"webpack": "^5.38.1"
"webpack": "^5.54.0"
},
"dependencies": {}
}
8 changes: 4 additions & 4 deletions src/Headroom.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ type ModeType = 'pinned' | 'unpinned' | 'static'
type DirectionType = 'up' | 'down'
type TransitionType = 'none' | 'normal' | 'pinned-to-static'

type PropsType = {|
type PropsType = $ReadOnly<{|
/** The child node to be displayed as a header */
children: Node,
/** The maximum amount of px the header should move up when scrolling */
Expand All @@ -39,13 +39,13 @@ type PropsType = {|
zIndex?: number,
/** A classname for applying custom styles to the wrapper. Use at your own risk. */
className?: string
|}
|}>

type StateType = {|
type StateType = $ReadOnly<{|
mode: ModeType,
transition: TransitionType,
animateUpFrom: ?number
|}
|}>

const HeaderWrapper: StyledComponent<{|
positionStickyDisabled: boolean,
Expand Down
Loading

0 comments on commit d0cc35e

Please sign in to comment.