From a74c16f6951b8750541de1e09a01252676984082 Mon Sep 17 00:00:00 2001 From: Noah Overcash Date: Wed, 19 Apr 2023 16:19:18 -0500 Subject: [PATCH 1/4] Re-export type declarations from stripes-types --- components/index.d.ts | 1 + core/index.d.ts | 1 + final-form/index.d.ts | 2 ++ package.json | 2 ++ smart-components/index.d.ts | 2 ++ 5 files changed, 8 insertions(+) create mode 100644 components/index.d.ts create mode 100644 core/index.d.ts create mode 100644 final-form/index.d.ts create mode 100644 smart-components/index.d.ts diff --git a/components/index.d.ts b/components/index.d.ts new file mode 100644 index 0000000..c500744 --- /dev/null +++ b/components/index.d.ts @@ -0,0 +1 @@ +export * from '@folio/stripes-types/components'; diff --git a/core/index.d.ts b/core/index.d.ts new file mode 100644 index 0000000..67ac7b8 --- /dev/null +++ b/core/index.d.ts @@ -0,0 +1 @@ +export * from '@folio/stripes-types/core'; diff --git a/final-form/index.d.ts b/final-form/index.d.ts new file mode 100644 index 0000000..cfdad6b --- /dev/null +++ b/final-form/index.d.ts @@ -0,0 +1,2 @@ +export { default } from '@folio/stripes-types/final-form'; +export * from '@folio/stripes-types/final-form'; diff --git a/package.json b/package.json index 706de53..83c4152 100644 --- a/package.json +++ b/package.json @@ -24,6 +24,7 @@ "@folio/stripes-form": "~8.1.0", "@folio/stripes-logger": "~1.0.0", "@folio/stripes-smart-components": "~8.1.0", + "@folio/stripes-types": "^1.0.1", "@folio/stripes-ui": "~1.1.0", "@folio/stripes-util": "~5.2.1", "redux": "~4.0.0" @@ -34,6 +35,7 @@ "react-redux": "~8.0.5" }, "peerDependencies": { + "@types/react": "^17.0.2", "react": "^17.0.2", "react-dom": "^17.0.2", "react-redux": "~8.0.5" diff --git a/smart-components/index.d.ts b/smart-components/index.d.ts new file mode 100644 index 0000000..560ecc0 --- /dev/null +++ b/smart-components/index.d.ts @@ -0,0 +1,2 @@ +export { default } from '@folio/stripes-types/smart-components'; +export * from '@folio/stripes-types/smart-components'; From 24db82c3a1eb24bc70923d460687db0a38505164 Mon Sep 17 00:00:00 2001 From: Noah Overcash Date: Wed, 26 Apr 2023 11:04:38 -0500 Subject: [PATCH 2/4] Fix linting/deps --- .eslintrc | 11 ++++++++++- package.json | 1 - 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.eslintrc b/.eslintrc index 68b14f8..d202eb7 100644 --- a/.eslintrc +++ b/.eslintrc @@ -1,3 +1,12 @@ { - "extends": "@folio/eslint-config-stripes" + "extends": "@folio/eslint-config-stripes", + "overrides": [ + { + "files": ["**/*.d.ts"], + "rules": { + // eslint does not like .d.ts files without a corresponding .js file + "import/no-unresolved": "off" + } + } + ] } diff --git a/package.json b/package.json index 3ebdabf..be698f9 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,6 @@ "react-redux": "~8.0.5" }, "peerDependencies": { - "@types/react": "^17.0.2", "react": "^17.0.2", "react-dom": "^17.0.2", "react-redux": "~8.0.5" From 78a413bf71659e3982e3443d002a8bee6e9735e9 Mon Sep 17 00:00:00 2001 From: Noah Overcash Date: Thu, 3 Aug 2023 09:23:11 -0500 Subject: [PATCH 3/4] Update README/changelog --- CHANGELOG.md | 1 + README.md | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4a9d17c..95a81a1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ * *BREAKING* `stripes-smart-components` `9.0` * *BREAKING* `stripes-ui` `2.0.0` * *BREAKING* `react` `v18` +* `stripes-types` `v1` ## [8.0.0](https://github.com/folio-org/stripes/tree/v8.0.0) (2023-01-31) diff --git a/README.md b/README.md index be01da8..d186841 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,6 @@ Stripes is a toolkit for building single-page web applications that FOLIO UI mod * [Overview of Stripes](doc/overview.md) - Concepts that guided the design of Stripes * [Stripes entities](doc/modules-apps-etc.md) - Terminology of things pertaining to Stripes - ## Developing with Stripes Getting started and new environment setup @@ -39,6 +38,10 @@ Guides for development and testing * [Depending on unreleased features](doc/depending-on-unreleased-features.md) * [Troubleshooting guide](doc/troubleshooting.md) - An evolving troubleshooting guide +## TypeScript support + +Typings for the Stripes framework may be found in [stripes-types](https://github.com/folio-org/stripes-types) + ## Implementing Stripes Guides for dev-ops and platform implementors From 8f083f5c995468ded422cc17c2b72497a26b09c4 Mon Sep 17 00:00:00 2001 From: Noah Overcash Date: Thu, 14 Sep 2023 17:09:38 -0400 Subject: [PATCH 4/4] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d4ed63d..ae68054 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "@folio/stripes-form": "~9.0.0", "@folio/stripes-logger": "~1.0.0", "@folio/stripes-smart-components": "~9.0.0", - "@folio/stripes-types": "^1.0.1", + "@folio/stripes-types": "^2.0.0", "@folio/stripes-ui": "~2.0.0", "@folio/stripes-util": "~6.0.0", "redux": "^4.2.1"