From dfa7254b1d56b7c339dde39fbb371db369d865fe Mon Sep 17 00:00:00 2001 From: Pierre Millot Date: Wed, 20 Oct 2021 17:34:53 +0200 Subject: [PATCH] chore: clean up unused package and auto exports (#1315) --- .eslintrc.js | 1 + package.json | 1 - packages/client-personalization/src/types/index.ts | 2 +- packages/client-search/src/methods/client/index.ts | 2 +- packages/client-search/src/types/index.ts | 3 ++- packages/recommend/src/index.ts | 2 ++ packages/recommend/src/types/index.ts | 2 +- scripts/generate-exports.js | 3 ++- 8 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 6530cf849..7fe06168c 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -22,6 +22,7 @@ const noExtraneousOverrides = require('./scripts/packages').map(package => { module.exports = { plugins: ['functional', 'sonarjs', 'wdio', 'simple-import-sort', 'promise'], extends: [ + 'algolia', 'algolia/jest', 'algolia/typescript', 'plugin:functional/recommended', diff --git a/package.json b/package.json index 8f0515a1c..82b4c4b40 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,6 @@ "barrelsby": "2.2.0", "bundlesize": "0.18.0", "dotenv": "8.2.0", - "dotenv-extended": "2.7.1", "eslint": "6.8.0", "eslint-config-algolia": "15.0.0", "eslint-config-prettier": "6.10.0", diff --git a/packages/client-personalization/src/types/index.ts b/packages/client-personalization/src/types/index.ts index 83c20c8c7..6ce567858 100644 --- a/packages/client-personalization/src/types/index.ts +++ b/packages/client-personalization/src/types/index.ts @@ -3,7 +3,7 @@ */ export * from './GetPersonalizationStrategyResponse'; -export * from './PersonalizationStrategy'; export * from './PersonalizationClient'; export * from './PersonalizationClientOptions'; +export * from './PersonalizationStrategy'; export * from './SetPersonalizationStrategyResponse'; diff --git a/packages/client-search/src/methods/client/index.ts b/packages/client-search/src/methods/client/index.ts index 95c828da4..210702541 100644 --- a/packages/client-search/src/methods/client/index.ts +++ b/packages/client-search/src/methods/client/index.ts @@ -15,11 +15,11 @@ export * from './deleteApiKey'; export * from './deleteDictionaryEntries'; export * from './generateSecuredApiKey'; export * from './getApiKey'; +export * from './getAppTask'; export * from './getDictionarySettings'; export * from './getLogs'; export * from './getSecuredApiKeyRemainingValidity'; export * from './getTopUserIDs'; -export * from './getAppTask'; export * from './getUserID'; export * from './hasPendingMappings'; export * from './initIndex'; diff --git a/packages/client-search/src/types/index.ts b/packages/client-search/src/types/index.ts index 02eb82f6c..1087df4f3 100644 --- a/packages/client-search/src/types/index.ts +++ b/packages/client-search/src/types/index.ts @@ -35,12 +35,12 @@ export * from './FindAnswersResponse'; export * from './FindObjectOptions'; export * from './FindObjectResponse'; export * from './GetApiKeyResponse'; +export * from './GetDictionarySettingsResponse'; export * from './GetLogsOptions'; export * from './GetLogsResponse'; export * from './GetObjectOptions'; export * from './GetObjectsOptions'; export * from './GetObjectsResponse'; -export * from './GetDictionarySettingsResponse'; export * from './GetTopUserIDsResponse'; export * from './HasPendingMappingsOptions'; export * from './HasPendingMappingsResponse'; @@ -65,6 +65,7 @@ export * from './PartialUpdateObjectResponse'; export * from './PartialUpdateObjectsOptions'; export * from './RemoveUserIDResponse'; export * from './ReplaceAllObjectsOptions'; +export * from './RequireAtLeastOne'; export * from './RestoreApiKeyResponse'; export * from './Rule'; export * from './SaveObjectResponse'; diff --git a/packages/recommend/src/index.ts b/packages/recommend/src/index.ts index e067cd20c..98d771d13 100644 --- a/packages/recommend/src/index.ts +++ b/packages/recommend/src/index.ts @@ -2,4 +2,6 @@ * @file Automatically generated by barrelsby. */ +export * from './createRecommendClient'; +export * from './methods/index'; export * from './types/index'; diff --git a/packages/recommend/src/types/index.ts b/packages/recommend/src/types/index.ts index 94e7dc14a..98035bb8f 100644 --- a/packages/recommend/src/types/index.ts +++ b/packages/recommend/src/types/index.ts @@ -4,10 +4,10 @@ export * from './BaseRecommendClient'; export * from './FrequentlyBoughtTogetherQuery'; -export * from './RecommendationsQuery'; export * from './RecommendClientOptions'; export * from './RecommendModel'; export * from './RecommendOptions'; export * from './RecommendSearchOptions'; +export * from './RecommendationsQuery'; export * from './RelatedProductsQuery'; export * from './WithRecommendMethods'; diff --git a/scripts/generate-exports.js b/scripts/generate-exports.js index 5ac827de7..f2431e412 100644 --- a/scripts/generate-exports.js +++ b/scripts/generate-exports.js @@ -5,7 +5,8 @@ const execa = require('execa'); const targets = fs.readdirSync('packages').filter(f => fs.statSync(`packages/${f}`).isDirectory()); const exclude = { all: '__tests__', - algoliasearch: 'builds|presets', + algoliasearch: 'builds', + recommend: 'builds', transporter: 'concerns', };