Skip to content

Commit

Permalink
fix(javascript): common package types (generated)
Browse files Browse the repository at this point in the history
algolia/api-clients-automation#4015

Co-authored-by: algolia-bot <[email protected]>
Co-authored-by: Clément Vannicatte <[email protected]>
Co-authored-by: Pierre Millot <[email protected]>
  • Loading branch information
3 people committed Oct 22, 2024
1 parent 3d21c6a commit a1b7c61
Show file tree
Hide file tree
Showing 23 changed files with 44 additions and 41 deletions.
9 changes: 0 additions & 9 deletions packages/client-common/index.ts

This file was deleted.

9 changes: 9 additions & 0 deletions packages/client-common/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
export * from './cache';
export * from './constants';
export * from './createAlgoliaAgent';
export * from './createAuth';
export * from './createIterablePromise';
export * from './getAlgoliaAgent';
export * from './logger';
export * from './transporter';
export * from './types';
2 changes: 1 addition & 1 deletion packages/client-common/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"types": ["node", "vitest/globals"],
"outDir": "dist"
},
"include": ["src", "index.ts"],
"include": ["src"],
"exclude": ["dist", "node_modules", "src/__tests__"]
}
8 changes: 4 additions & 4 deletions packages/client-common/tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ export default defineConfig([
{
...getBaseNodeOptions(pkg, __dirname),
format: 'cjs',
dts: { entry: { common: 'index.ts' } },
entry: { common: 'index.ts' },
dts: { entry: { common: 'src/index.ts' } },
entry: { common: 'src/index.ts' },
},
{
...getBaseNodeOptions(pkg, __dirname),
format: 'esm',
dts: { entry: { common: 'index.ts' } },
entry: { common: 'index.ts' },
dts: { entry: { common: 'src/index.ts' } },
entry: { common: 'src/index.ts' },
},
]);
1 change: 0 additions & 1 deletion packages/logger-console/index.ts

This file was deleted.

8 changes: 4 additions & 4 deletions packages/logger-console/tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ export default defineConfig([
{
...getBaseNodeOptions(pkg, __dirname),
format: 'cjs',
dts: { entry: { logger: 'index.ts' } },
entry: { logger: 'index.ts' },
dts: { entry: { logger: 'src/logger.ts' } },
entry: { logger: 'src/logger.ts' },
},
{
...getBaseNodeOptions(pkg, __dirname),
format: 'esm',
dts: { entry: { logger: 'index.ts' } },
entry: { logger: 'index.ts' },
dts: { entry: { logger: 'src/logger.ts' } },
entry: { logger: 'src/logger.ts' },
},
]);
1 change: 0 additions & 1 deletion packages/requester-browser-xhr/index.ts

This file was deleted.

1 change: 1 addition & 0 deletions packages/requester-browser-xhr/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './createXhrRequester';
2 changes: 1 addition & 1 deletion packages/requester-browser-xhr/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"types": ["node", "vitest/globals"],
"outDir": "dist"
},
"include": ["src", "index.ts"],
"include": ["src"],
"exclude": ["dist", "node_modules", "src/__tests__"]
}
4 changes: 2 additions & 2 deletions packages/requester-browser-xhr/tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ export default defineConfig({
...getBaseBrowserOptions(pkg, __dirname),
minify: true,
globalName: 'requesterxhr',
entry: { 'requester.xhr': 'index.ts' },
dts: { entry: { 'requester.xhr': 'index.ts' } },
entry: { 'requester.xhr': 'src/index.ts' },
dts: { entry: { 'requester.xhr': 'src/index.ts' } },
});
1 change: 0 additions & 1 deletion packages/requester-fetch/index.ts

This file was deleted.

1 change: 1 addition & 0 deletions packages/requester-fetch/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './createFetchRequester';
2 changes: 1 addition & 1 deletion packages/requester-fetch/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"types": ["node", "vitest/globals"],
"outDir": "dist"
},
"include": ["src", "index.ts"],
"include": ["src"],
"exclude": ["dist", "node_modules", "src/__tests__"]
}
12 changes: 6 additions & 6 deletions packages/requester-fetch/tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,22 @@ export default defineConfig([
...getBaseNodeOptions(pkg, __dirname),
format: 'cjs',
name: 'node cjs',
entry: { 'requester.fetch.node': 'index.ts' },
dts: { entry: { 'requester.fetch.node': 'index.ts' } },
entry: { 'requester.fetch.node': 'src/index.ts' },
dts: { entry: { 'requester.fetch.node': 'src/index.ts' } },
},
{
...getBaseNodeOptions(pkg, __dirname),
format: 'esm',
name: 'node esm',
entry: { 'requester.fetch.node': 'index.ts' },
dts: { entry: { 'requester.fetch.node': 'index.ts' } },
entry: { 'requester.fetch.node': 'src/index.ts' },
dts: { entry: { 'requester.fetch.node': 'src/index.ts' } },
},
{
...getBaseBrowserOptions(pkg, __dirname),
minify: true,
name: 'browser esm',
entry: { 'requester.fetch.browser': 'index.ts' },
dts: { entry: { 'requester.fetch.browser': 'index.ts' } },
entry: { 'requester.fetch.browser': 'src/index.ts' },
dts: { entry: { 'requester.fetch.browser': 'src/index.ts' } },
globalName: 'requesterfetch',
},
]);
1 change: 0 additions & 1 deletion packages/requester-node-http/index.ts

This file was deleted.

1 change: 1 addition & 0 deletions packages/requester-node-http/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './createHttpRequester';
2 changes: 1 addition & 1 deletion packages/requester-node-http/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"types": ["node", "vitest/globals"],
"outDir": "dist"
},
"include": ["src", "index.ts"],
"include": ["src"],
"exclude": ["dist", "node_modules", "src/__tests__"]
}
8 changes: 4 additions & 4 deletions packages/requester-node-http/tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ export default defineConfig([
{
...getBaseNodeOptions(pkg, __dirname),
format: 'cjs',
entry: { 'requester.http': 'index.ts' },
dts: { entry: { 'requester.http': 'index.ts' } },
entry: { 'requester.http': 'src/index.ts' },
dts: { entry: { 'requester.http': 'src/index.ts' } },
},
{
...getBaseNodeOptions(pkg, __dirname),
format: 'esm',
entry: { 'requester.http': 'index.ts' },
dts: { entry: { 'requester.http': 'index.ts' } },
entry: { 'requester.http': 'src/index.ts' },
dts: { entry: { 'requester.http': 'src/index.ts' } },
},
]);
3 changes: 0 additions & 3 deletions packages/requester-testing/index.ts

This file was deleted.

2 changes: 2 additions & 0 deletions packages/requester-testing/src/browserEchoRequester.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ import { createEchoRequester } from './createEchoRequester';
export function browserEchoRequester(status: number = 200): Requester {
return createEchoRequester({ getURL: (url: string) => new URL(url), status });
}

export type { EchoResponse } from './createEchoRequester.ts';
3 changes: 3 additions & 0 deletions packages/requester-testing/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export * from './browserEchoRequester';
export * from './createEchoRequester';
export * from './nodeEchoRequester';
2 changes: 2 additions & 0 deletions packages/requester-testing/src/nodeEchoRequester.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ import { createEchoRequester } from './createEchoRequester';
export function nodeEchoRequester(status: number = 200): Requester {
return createEchoRequester({ getURL: (url: string) => new URL(url), status });
}

export type { EchoResponse } from './createEchoRequester.ts';
2 changes: 1 addition & 1 deletion packages/requester-testing/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"types": ["node"],
"outDir": "dist"
},
"include": ["src", "index.ts"],
"include": ["src"],
"exclude": ["dist", "node_modules"]
}

0 comments on commit a1b7c61

Please sign in to comment.