Skip to content

Commit

Permalink
Types: Restore element, icons, primitives types (#21781)
Browse files Browse the repository at this point in the history
* Restore element, icons, primitives types
* Partially reverts #21613 (c2684b2)
* Reverts #21784 (74fcd4c)

Some `@wordpress/*` emit TypeScript type declarations and include them with the published packages. Shortly after publishing, it was discovered the `@wordpress/element` conflicted with the DefinitelyTyped 3rd party type declarations of several packages and a patch release was published removing the published types from `@wordpress/element`, `@wordpress/primitives`, and `@wordpress/icons` (#21613, #21784).

The DefinitelyTyped type declarations have been updated to remove conflicts with the included `@wordpress/element` types. The types can be published again.

See #21767 for more details.
  • Loading branch information
sirreal authored Apr 28, 2020
1 parent c28d828 commit d20e340
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 6 deletions.
4 changes: 4 additions & 0 deletions packages/element/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
## Master

### New Feature

- Include TypeScript type declarations ([#21781](https://github.com/WordPress/gutenberg/pull/21781))

## 2.13.1 (2020-04-15)

### Bug Fix
Expand Down
1 change: 1 addition & 0 deletions packages/element/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"main": "build/index.js",
"module": "build-module/index.js",
"react-native": "src/index",
"types": "build-types",
"sideEffects": false,
"dependencies": {
"@babel/runtime": "^7.9.2",
Expand Down
4 changes: 4 additions & 0 deletions packages/icons/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
## Master

### New Feature

- Include TypeScript type declarations ([#21781](https://github.com/WordPress/gutenberg/pull/21781))

## 1.3.1 (2020-04-15)

### Bug Fix
Expand Down
1 change: 1 addition & 0 deletions packages/icons/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"main": "build/index.js",
"module": "build-module/index.js",
"react-native": "src/index",
"types": "build-types",
"dependencies": {
"@babel/runtime": "^7.9.2",
"@wordpress/element": "../element",
Expand Down
File renamed without changes.
4 changes: 4 additions & 0 deletions packages/primitives/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
## Master

### New Feature

- Include TypeScript type declarations ([#21781](https://github.com/WordPress/gutenberg/pull/21781))

## 1.3.1 (2020-04-15)

### Bug Fix
Expand Down
1 change: 1 addition & 0 deletions packages/primitives/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"module": "build-module/index.js",
"react-native": "src/index",
"sideEffects": false,
"types": "build-types",
"dependencies": {
"@babel/runtime": "^7.9.2",
"@wordpress/element": "file:../element",
Expand Down
File renamed without changes.
9 changes: 3 additions & 6 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,20 @@
{ "path": "packages/autop" },
{ "path": "packages/blob" },
{ "path": "packages/block-editor" },
{ "path": "packages/element" },
{ "path": "packages/dom-ready" },
{ "path": "packages/escape-html" },
{ "path": "packages/html-entities" },
{ "path": "packages/i18n" },
{ "path": "packages/icons" },
{ "path": "packages/is-shallow-equal" },
{ "path": "packages/prettier-config" },
{ "path": "packages/primitives" },
{ "path": "packages/priority-queue" },
{ "path": "packages/project-management-automation" },
{ "path": "packages/token-list" },
{ "path": "packages/url" },
{ "path": "packages/warning" }

// Temporarily disabled due to conflicts with 3rd party DefinitelyTyped types
// See https://github.com/WordPress/gutenberg/pull/21613
// { "path": "packages/element" },
// { "path": "packages/icons" },
// { "path": "packages/primitives" }
],
"files": []
}

0 comments on commit d20e340

Please sign in to comment.