diff --git a/packages/forms/package.json b/packages/forms/package.json index d4839b38694d..80ff5bf32f37 100644 --- a/packages/forms/package.json +++ b/packages/forms/package.json @@ -2,7 +2,8 @@ "name": "@redwoodjs/forms", "version": "0.15.3", "files": [ - "dist" + "dist", + "src/index.d.ts" ], "main": "dist/index.js", "types": "src/index.d.ts", @@ -21,11 +22,9 @@ "react": "*" }, "scripts": { - "build": "yarn build:js && yarn build:types", + "build": "yarn build:js", "prepublishOnly": "yarn cross-env NODE_ENV=production yarn build", "build:js": "babel src -d dist --extensions \".js,.ts,.tsx\" --delete-dir-on-start", - "build:types": "tsc --build --verbose && yarn postbuild:types", - "postbuild:types": "yarn cp-cli .buildcache/ dist/", "build:watch": "nodemon --watch src --ext \"js,ts,tsx\" --ignore dist --exec \"yarn build\"", "test": "jest", "test:watch": "yarn test --watch" diff --git a/packages/forms/src/index.d.ts b/packages/forms/src/index.d.ts index cc54429dbe55..5719e0ec0993 100644 --- a/packages/forms/src/index.d.ts +++ b/packages/forms/src/index.d.ts @@ -1,3 +1,5 @@ +// TODO: These need proper types. + declare module '@redwoodjs/forms' { const Form: any const FieldErrorContext: any diff --git a/packages/forms/src/types.d.ts b/packages/forms/src/types.d.ts deleted file mode 100644 index d2c0a4e44920..000000000000 --- a/packages/forms/src/types.d.ts +++ /dev/null @@ -1 +0,0 @@ -// placeholder for types. diff --git a/packages/forms/tsconfig.json b/packages/forms/tsconfig.json deleted file mode 100644 index 8f21166db1f7..000000000000 --- a/packages/forms/tsconfig.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": "../../tsconfig.compilerOption.json", - "compilerOptions": { - "baseUrl": ".", - "rootDir": "src", - "tsBuildInfoFile": ".buildcache/tsconfig.tsbuildinfo", - "outDir": ".buildcache", - }, - "files": [ - "./src/types.d.ts" - ] -} diff --git a/packages/web/package.json b/packages/web/package.json index d281894a2835..024d828201a0 100644 --- a/packages/web/package.json +++ b/packages/web/package.json @@ -3,10 +3,10 @@ "version": "0.15.3", "files": [ "dist", - "src/global.web-auto-imports.d.ts" + "src/index.d.ts" ], "main": "dist/index.js", - "types": "src/global.web-auto-imports.d.ts", + "types": "src/index.d.ts", "license": "MIT", "dependencies": { "@apollo/react-components": "^3.1.3", diff --git a/packages/web/src/global.web-auto-imports.ts b/packages/web/src/global.web-auto-imports.ts deleted file mode 100644 index ce43f200c31b..000000000000 --- a/packages/web/src/global.web-auto-imports.ts +++ /dev/null @@ -1,20 +0,0 @@ -/* eslint-disable @typescript-eslint/ban-ts-ignore */ -/* eslint-disable no-redeclare */ -/* eslint-disable no-undef */ -import type _React from 'react' -import type _gql from 'graphql-tag' -import type _PropTypes from 'prop-types' -import type { - mockGraphQLMutation as _mockGraphQLMutation, - mockGraphQLQuery as _mockGraphQLQuery, -} from '@redwoodjs/testing' - -declare global { - // We reduce the number of imports that a user has to do by making them - // globals via `Webpack.ProvidePlugin` - const React: typeof _React - const gql: typeof _gql - const PropTypes: typeof _PropTypes - const mockGraphQLQuery: typeof _mockGraphQLQuery - const mockGraphQLMutation: typeof _mockGraphQLMutation -} diff --git a/packages/web/src/index.d.ts b/packages/web/src/index.d.ts index cb62e3aa9590..aceb299e9866 100644 --- a/packages/web/src/index.d.ts +++ b/packages/web/src/index.d.ts @@ -1,10 +1,8 @@ -/* eslint-disable no-undef */ -/*eslint no-redeclare: [2, { "builtinGlobals": false }]*/ - +/* eslint-disable no-redeclare, no-undef */ import type _React from 'react' import type _gql from 'graphql-tag' import type _PropTypes from 'prop-types' -import { +import type { mockGraphQLMutation as _mockGraphQLMutation, mockGraphQLQuery as _mockGraphQLQuery, } from '@redwoodjs/testing' @@ -68,5 +66,6 @@ declare module '@redwoodjs/web' { const FlashProvider: any const GraphQLProvider: any const createGraphQLClient: any - const withCell: any + + // TODO: RedwoodProvider }