Skip to content

Commit

Permalink
Refresh Libraries (#1243)
Browse files Browse the repository at this point in the history
* chore: update libraries

* fix: build issues

* fix: ts issues

* fix: nohoist everything

* fix: missing dev dependency

* fix: move react-frame-component to correct library

* fix: add explicit typing to componentIndex per CI

* fix: import react in componentIndex

* fix: react import

* build: ignore node 11 for now, known error with jest
  • Loading branch information
darthtrevino committed Mar 6, 2019
1 parent 0feb250 commit fd1bae4
Show file tree
Hide file tree
Showing 40 changed files with 4,036 additions and 4,909 deletions.
9 changes: 5 additions & 4 deletions .travis.yml
@@ -1,15 +1,16 @@
language: node_js
addons:
apt:
update: true
apt:
update: true

before_install:
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- -version 1.7.0
- export PATH=$HOME/.yarn/bin:$PATH

node_js:
- "node"
- "lts/*"
- 'lts/*'
# Disabled until https://github.com/facebook/jest/issues/8069 is resolved
#- "node"

cache:
directories:
Expand Down
32 changes: 15 additions & 17 deletions package.json
Expand Up @@ -56,21 +56,21 @@
}
},
"devDependencies": {
"@commitlint/cli": "^7.2.1",
"@commitlint/config-conventional": "^7.1.2",
"@types/jest": "^23.3.9",
"husky": "^1.1.3",
"jest": "^23.6.0",
"jest-environment-jsdom": "^23.4.0",
"lerna": "^3.4.3",
"lint-staged": "^8.0.4",
"@commitlint/cli": "^7.5.2",
"@commitlint/config-conventional": "^7.5.0",
"@types/jest": "^24.0.9",
"husky": "^1.3.1",
"jest": "^24.1.0",
"jest-environment-jsdom": "^24.0.0",
"lerna": "^3.13.1",
"lint-staged": "^8.1.5",
"npm-run-all": "^4.1.5",
"prettier": "^1.14.3",
"ts-jest": "^23.10.4",
"tslint": "^5.11.0",
"tslint-config-prettier": "^1.15.0",
"tslint-react": "~3.6.0",
"typescript": "^3.1.6"
"prettier": "^1.16.4",
"ts-jest": "^24.0.0",
"tslint": "^5.13.1",
"tslint-config-prettier": "^1.18.0",
"tslint-react": "^3.6.0",
"typescript": "^3.3.3333"
},
"jest": {
"moduleFileExtensions": [
Expand Down Expand Up @@ -118,9 +118,7 @@
"packages/*"
],
"nohoist": [
"**/@types/*",
"**/hoist-non-react-statics",
"**/redux"
"**"
]
}
}
6 changes: 3 additions & 3 deletions packages/dnd-core/package.json
Expand Up @@ -8,7 +8,7 @@
"scripts": {
"build:esm": "tsc -b tsconfig.esm.json",
"build:cjs": "tsc -b tsconfig.cjs.json",
"build": "run-p build:*" ,
"build": "run-p build:*",
"clean": "rimraf lib",
"watch": "tsc -w --preserveWatchOutput",
"start": "npm run watch",
Expand All @@ -26,7 +26,7 @@
},
"devDependencies": {
"npm-run-all": "^4.1.5",
"rimraf": "^2.6.2",
"typescript": "^3.1.6"
"rimraf": "^2.6.3",
"typescript": "^3.3.3333"
}
}
2 changes: 1 addition & 1 deletion packages/dnd-core/src/DragDropManagerImpl.ts
Expand Up @@ -76,7 +76,7 @@ export default class DragDropManagerImpl<Context>

function bindActionCreator(actionCreator: ActionCreator<any>) {
return (...args: any[]) => {
const action = actionCreator.apply(manager, args)
const action = actionCreator.apply(manager, args as any)
if (typeof action !== 'undefined') {
dispatch(action)
}
Expand Down
1 change: 1 addition & 0 deletions packages/dnd-core/src/__tests__/DragDropManager.spec.ts
@@ -1,4 +1,5 @@
declare var require: any
declare var setImmediate: any

import createTestBackend, { TestBackend } from 'react-dnd-test-backend'
import * as Types from './types'
Expand Down
24 changes: 13 additions & 11 deletions packages/documentation-examples/package.json
Expand Up @@ -19,25 +19,27 @@
"start": "tsc -w --preserveWatchOutput"
},
"dependencies": {
"@types/faker": "^4.1.4",
"@types/query-string": "^6.1.1",
"@types/styled-components": "^4.0.3",
"@types/faker": "^4.1.5",
"@types/query-string": "^6.2.0",
"@types/styled-components": "^4.1.12",
"dnd-core": "^7.0.2",
"faker": "^4.1.0",
"immutability-helper": "^2.8.1",
"immutability-helper": "^3.0.0",
"lodash": "^4.17.11",
"query-string": "^6.2.0",
"query-string": "^6.3.0",
"react-dnd": "^7.0.2",
"react-dnd-html5-backend": "^7.0.2",
"styled-components": "^4.0.3"
"react-frame-component": "^4.1.0",
"styled-components": "^4.1.3"
},
"devDependencies": {
"@types/react": "^16.4.18",
"@types/react-dom": "^16.0.9",
"@types/react": "^16.8.7",
"@types/react-dom": "^16.8.2",
"npm-run-all": "^4.1.5",
"react": "^16.6.1",
"rimraf": "^2.6.2",
"typescript": "^3.1.6"
"react": "^16.8.4",
"react-dom": "^16.8.4",
"rimraf": "^2.6.3",
"typescript": "^3.3.3333"
},
"peerDependencies": {
"react": ">= 16.3"
Expand Down
Expand Up @@ -3,7 +3,7 @@ import { NativeTypes } from 'react-dnd-html5-backend'
import Dustbin from './Dustbin'
import Box from './Box'
import ItemTypes from './ItemTypes'
const update = require('immutability-helper')
import update from 'immutability-helper'

export interface ContainerState {
droppedBoxNames: string[]
Expand Down Expand Up @@ -75,17 +75,18 @@ export default class Container extends React.Component<{}, ContainerState> {

private handleDrop(index: number, item: { name: string }) {
const { name } = item
const droppedBoxNames = name ? { $push: [name] } : {}
const droppedBoxNames = name ? { $push: [name] } : { $push: [] }
const dustbins = {
[index]: {
lastDroppedItem: {
$set: item,
},
},
}

this.setState(
update(this.state, {
dustbins: {
[index]: {
lastDroppedItem: {
$set: item,
},
},
},
dustbins,
droppedBoxNames,
}),
)
Expand Down
@@ -1,3 +1,5 @@
declare var require: any

import * as React from 'react'
import { DragDropContextProvider } from 'react-dnd'
import HTML5Backend from 'react-dnd-html5-backend'
Expand Down
@@ -1,10 +1,11 @@
// tslint:disable jsx-no-lambda
declare var require: any
import * as React from 'react'
import { NativeTypes } from 'react-dnd-html5-backend'
import Dustbin from './Dustbin'
import Box from './Box'
import ItemTypes from './ItemTypes'
const update = require('immutability-helper')
import update from 'immutability-helper'
const shuffle = require('lodash/shuffle')

export interface SourceBox {
Expand Down
Expand Up @@ -8,7 +8,7 @@ import {
import ItemTypes from './ItemTypes'
import DraggableBox from './DraggableBox'
import snapToGrid from './snapToGrid'
const update = require('immutability-helper')
import update from 'immutability-helper'

const styles: React.CSSProperties = {
width: 300,
Expand Down
Expand Up @@ -7,7 +7,7 @@ import {
} from 'react-dnd'
import ItemTypes from './ItemTypes'
import Box from './Box'
const update = require('immutability-helper')
import update from 'immutability-helper'

const styles: React.CSSProperties = {
width: 300,
Expand Down
Expand Up @@ -2,7 +2,7 @@ import * as React from 'react'
import { DropTarget, ConnectDropTarget } from 'react-dnd'
import Card from './Card'
import ItemTypes from './ItemTypes'
const update = require('immutability-helper')
import update from 'immutability-helper'

const style = {
width: 400,
Expand Down
@@ -1,6 +1,6 @@
import * as React from 'react'
import Card from './Card'
const update = require('immutability-helper')
import update from 'immutability-helper'

const style = {
width: 400,
Expand Down
@@ -1,7 +1,7 @@
import * as React from 'react'
import { name } from 'faker'
import Card from './Card'
const update = require('immutability-helper')
import update from 'immutability-helper'

const style = {
width: 400,
Expand Down
5 changes: 4 additions & 1 deletion packages/documentation-examples/src/index.ts
@@ -1,3 +1,4 @@
import * as React from 'react'
import chessboard from './00 Chessboard'
import dustbinCopyOrMove from './01 Dustbin/Copy or Move'
import dustbinMultipleTargets from './01 Dustbin/Multiple Targets'
Expand All @@ -17,7 +18,9 @@ import customizeHandlesAndPreviews from './05 Customize/Handles and Previews'
import otherNativeFiles from './06 Other/Native Files'

export * from './isDebugMode'
export const componentIndex = {
export const componentIndex: {
[key: string]: React.ComponentClass | React.FunctionComponent
} = {
chessboard,
'dustbin-single-target': dustbinSingleTarget,
'dustbin-multiple-targets': dustbinMultipleTargets,
Expand Down
3 changes: 2 additions & 1 deletion packages/documentation-examples/tsconfig.cjs.json
Expand Up @@ -2,7 +2,8 @@
"extends": "../../tsconfig.cjs.base.json",
"compilerOptions": {
"outDir": "./lib/cjs",
"baseUrl": "./"
"baseUrl": "./",
"skipLibCheck": true
},
"include": ["./src/index.ts"]
}
3 changes: 2 additions & 1 deletion packages/documentation-examples/tsconfig.esm.json
Expand Up @@ -2,7 +2,8 @@
"extends": "../../tsconfig.esm.base.json",
"compilerOptions": {
"outDir": "./lib/esm",
"baseUrl": "./"
"baseUrl": "./",
"skipLibCheck": true
},
"include": ["./src/index.ts"]
}
111 changes: 55 additions & 56 deletions packages/documentation/package.json
@@ -1,58 +1,57 @@
{
"name": "react-dnd-documentation",
"description": "React DnD Docsite",
"version": "7.0.2",
"private": true,
"license": "MIT",
"dependencies": {
"@types/query-string": "^6.1.1",
"@types/react": "^16.4.18",
"@types/react-dom": "^16.0.9",
"@types/react-helmet": "^5.0.7",
"@types/styled-components": "^4.0.3",
"gatsby": "^2.0.40",
"gatsby-image": "^2.0.19",
"gatsby-plugin-favicon": "^3.1.4",
"gatsby-plugin-manifest": "^2.0.7",
"gatsby-plugin-offline": "^2.0.12",
"gatsby-plugin-react-helmet": "^3.0.1",
"gatsby-plugin-sharp": "^2.0.12",
"gatsby-plugin-styled-components": "^3.0.1",
"gatsby-plugin-typescript": "^2.0.1",
"gatsby-plugin-typography": "^2.2.1",
"gatsby-remark-copy-linked-files": "^2.0.6",
"gatsby-remark-embed-snippet": "^3.0.3",
"gatsby-remark-images": "^2.0.6",
"gatsby-remark-prismjs": "^3.0.3",
"gatsby-source-filesystem": "^2.0.7",
"gatsby-transformer-remark": "^2.1.11",
"gatsby-transformer-sharp": "^2.1.8",
"prismjs": "^1.15.0",
"query-string": "^6.2.0",
"react": "^16.6.1",
"react-dnd": "^7.0.2",
"react-dnd-documentation-examples": "^7.0.2",
"react-dnd-html5-backend": "^7.0.2",
"react-dnd-test-backend": "^7.0.2",
"react-dom": "^16.6.1",
"react-frame-component": "^4.0.2",
"react-helmet": "^5.2.0",
"react-typography": "^0.16.13",
"rehype-react": "^3.0.3",
"styled-components": "^4.0.3",
"typography": "^0.16.17",
"typography-theme-github": "^0.15.10"
},
"devDependencies": {
"gh-pages": "^2.0.1",
"npm-run-all": "^4.1.5"
},
"scripts": {
"clean": "rimraf .cache public apidocs",
"develop": "gatsby develop",
"start": "npm run develop",
"build_static_site": "gatsby build --prefix-paths",
"publish_gh_pages": "NODE_DEBUG=gh-pages gh-pages -d public -t",
"release": "run-s clean build_static_site publish_gh_pages"
}
"name": "react-dnd-documentation",
"description": "React DnD Docsite",
"version": "7.0.2",
"private": true,
"license": "MIT",
"dependencies": {
"@types/query-string": "^6.2.0",
"@types/react": "^16.8.7",
"@types/react-dom": "^16.8.2",
"@types/react-helmet": "^5.0.8",
"@types/styled-components": "^4.1.12",
"gatsby": "^2.1.23",
"gatsby-image": "^2.0.31",
"gatsby-plugin-favicon": "^3.1.5",
"gatsby-plugin-manifest": "^2.0.22",
"gatsby-plugin-offline": "^2.0.24",
"gatsby-plugin-react-helmet": "^3.0.8",
"gatsby-plugin-sharp": "^2.0.25",
"gatsby-plugin-styled-components": "^3.0.6",
"gatsby-plugin-typescript": "^2.0.10",
"gatsby-plugin-typography": "^2.2.8",
"gatsby-remark-copy-linked-files": "^2.0.9",
"gatsby-remark-embed-snippet": "^3.2.2",
"gatsby-remark-images": "^3.0.6",
"gatsby-remark-prismjs": "^3.2.4",
"gatsby-source-filesystem": "^2.0.23",
"gatsby-transformer-remark": "^2.3.1",
"gatsby-transformer-sharp": "^2.1.15",
"prismjs": "^1.15.0",
"query-string": "^6.3.0",
"react": "^16.8.4",
"react-dnd": "^7.0.2",
"react-dnd-documentation-examples": "^7.0.2",
"react-dnd-html5-backend": "^7.0.2",
"react-dnd-test-backend": "^7.0.2",
"react-dom": "^16.8.4",
"react-helmet": "^5.2.0",
"react-typography": "^0.16.18",
"rehype-react": "^3.1.0",
"styled-components": "^4.1.3",
"typography": "^0.16.18",
"typography-theme-github": "^0.16.18"
},
"devDependencies": {
"gh-pages": "^2.0.1",
"npm-run-all": "^4.1.5"
},
"scripts": {
"clean": "rimraf .cache public apidocs",
"develop": "gatsby develop",
"start": "npm run develop",
"build_static_site": "gatsby build --prefix-paths",
"publish_gh_pages": "NODE_DEBUG=gh-pages gh-pages -d public -t",
"release": "run-s clean build_static_site publish_gh_pages"
}
}
2 changes: 2 additions & 0 deletions packages/documentation/src/components/layout.tsx
@@ -1,4 +1,6 @@
// tslint:disable jsx-no-lambda
declare var require: any

import * as React from 'react'
import Helmet from 'react-helmet'
import styled from 'styled-components'
Expand Down

0 comments on commit fd1bae4

Please sign in to comment.