From d2d73c63ae460eed8b160abaf8124f2a04bec6ec Mon Sep 17 00:00:00 2001 From: Haroen Viaene Date: Tue, 17 Aug 2021 15:57:30 +0200 Subject: [PATCH 1/2] feat(is widget): upgrade to standard types This makes the TS integration no longer need `experimental-typescript` --- src/templates/InstantSearch.js widget/.template.js | 2 +- src/templates/InstantSearch.js widget/package.json.hbs | 4 ++-- src/templates/InstantSearch.js widget/src/types.ts.hbs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/templates/InstantSearch.js widget/.template.js b/src/templates/InstantSearch.js widget/.template.js index c8a5fe113..263f0fd28 100644 --- a/src/templates/InstantSearch.js widget/.template.js +++ b/src/templates/InstantSearch.js widget/.template.js @@ -4,7 +4,7 @@ const teardown = require('../../tasks/node/teardown'); module.exports = { category: 'Widget', libraryName: 'instantsearch.js', - supportedVersion: '>= 4.21.0 < 5.0.0', + supportedVersion: '>= 4.27.1 < 5.0.0', templateName: 'instantsearch.js-widget', packageNamePrefix: 'instantsearch-widget-', keywords: [ diff --git a/src/templates/InstantSearch.js widget/package.json.hbs b/src/templates/InstantSearch.js widget/package.json.hbs index 6a04df75e..890c9919b 100644 --- a/src/templates/InstantSearch.js widget/package.json.hbs +++ b/src/templates/InstantSearch.js widget/package.json.hbs @@ -34,7 +34,7 @@ "dist" ], "peerDependencies": { - "instantsearch.js": "^4.0.0" + "instantsearch.js": "^4.27.1" }, "devDependencies": { "@babel/cli": "7.13.10", @@ -60,7 +60,7 @@ "eslint-plugin-jest": "24.1.5", "eslint-plugin-jsdoc": "32.2.0", "eslint-plugin-prettier": "3.3.1", - "instantsearch.js": "{{ libraryVersion }}-experimental-typescript.0", + "instantsearch.js": "{{ libraryVersion }}", "jest": "26.6.3", "prettier": "2.2.1", "rollup-plugin-api-extractor": "0.2.2", diff --git a/src/templates/InstantSearch.js widget/src/types.ts.hbs b/src/templates/InstantSearch.js widget/src/types.ts.hbs index ee80b4083..1699203f9 100644 --- a/src/templates/InstantSearch.js widget/src/types.ts.hbs +++ b/src/templates/InstantSearch.js widget/src/types.ts.hbs @@ -2,7 +2,7 @@ import type { Renderer, Connector, WidgetFactory, -} from 'instantsearch.js/es/types'; +} from 'instantsearch.js/es'; /* * Parameters send only to the widget creator function From f553e12d0cac0e8bf40380efc09e9dfb36d4f907 Mon Sep 17 00:00:00 2001 From: Haroen Viaene Date: Tue, 17 Aug 2021 16:21:16 +0200 Subject: [PATCH 2/2] update e2e --- e2e/__snapshots__/templates.test.js.snap | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/e2e/__snapshots__/templates.test.js.snap b/e2e/__snapshots__/templates.test.js.snap index 3cae1bb41..50283d45a 100644 --- a/e2e/__snapshots__/templates.test.js.snap +++ b/e2e/__snapshots__/templates.test.js.snap @@ -4139,7 +4139,7 @@ exports[`Templates InstantSearch.js widget File content: package.json 1`] = ` \\"dist\\" ], \\"peerDependencies\\": { - \\"instantsearch.js\\": \\"^4.0.0\\" + \\"instantsearch.js\\": \\"^4.27.1\\" }, \\"browserslist\\": [ \\"last 2 chrome versions\\", @@ -4349,7 +4349,7 @@ exports[`Templates InstantSearch.js widget File content: src/types.ts 1`] = ` Renderer, Connector, WidgetFactory, -} from 'instantsearch.js/es/types'; +} from 'instantsearch.js/es'; /* * Parameters send only to the widget creator function