Skip to content

Commit 651ef4a

Browse files
authored
ref: Deprecate deepReadDirSync (#10016)
1 parent 848e6ad commit 651ef4a

File tree

9 files changed

+12
-0
lines changed

9 files changed

+12
-0
lines changed

packages/astro/src/index.server.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ export {
5454
addRequestDataToEvent,
5555
DEFAULT_USER_INCLUDES,
5656
extractRequestData,
57+
// eslint-disable-next-line deprecation/deprecation
5758
deepReadDirSync,
5859
Integrations,
5960
Handlers,

packages/nextjs/test/buildProcess/tests/nft.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ it('excludes build-time SDK dependencies from nft files', () => {
3333
expect(rollupEntries.length).toEqual(0);
3434

3535
// We don't want to accidentally remove the wrappers
36+
// eslint-disable-next-line deprecation/deprecation
3637
const wrapperFiles = deepReadDirSync('src/config/wrappers/').filter(filename => filename !== 'types.ts');
3738
expect(sentryWrapperEntries.length).toEqual(wrapperFiles.length);
3839
});

packages/node-experimental/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ export {
4949
addRequestDataToEvent,
5050
DEFAULT_USER_INCLUDES,
5151
extractRequestData,
52+
// eslint-disable-next-line deprecation/deprecation
5253
deepReadDirSync,
5354
getModuleFromFilename,
5455
close,

packages/node/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ export { NodeClient } from './client';
8080
export { makeNodeTransport } from './transports';
8181
export { defaultIntegrations, init, defaultStackParser, getSentryRelease } from './sdk';
8282
export { addRequestDataToEvent, DEFAULT_USER_INCLUDES, extractRequestData } from '@sentry/utils';
83+
// eslint-disable-next-line deprecation/deprecation
8384
export { deepReadDirSync } from './utils';
8485
export { getModuleFromFilename } from './module';
8586
// eslint-disable-next-line deprecation/deprecation

packages/node/src/utils.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import * as path from 'path';
77
* @param targetDir Absolute or relative path of the directory to scan. All returned paths will be relative to this
88
* directory.
99
* @returns Array holding all relative paths
10+
* @deprecated This function will be removed in the next major version.
1011
*/
1112
export function deepReadDirSync(targetDir: string): string[] {
1213
const targetDirAbsPath = path.resolve(targetDir);

packages/node/test/utils.test.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ describe('deepReadDirSync', () => {
2525
].map(p => (process.platform === 'win32' ? p.replace(/\//g, '\\') : p));
2626

2727
// compare sets so that order doesn't matter
28+
// eslint-disable-next-line deprecation/deprecation
2829
expect(new Set(deepReadDirSync('./test/fixtures/testDeepReadDirSync'))).toEqual(new Set(expected));
2930
});
3031

@@ -35,6 +36,7 @@ describe('deepReadDirSync', () => {
3536
fs.mkdtemp(`${tmpDir}${path.sep}`, (err, dirPath) => {
3637
if (err) throw err;
3738
try {
39+
// eslint-disable-next-line deprecation/deprecation
3840
expect(deepReadDirSync(dirPath)).toEqual([]);
3941
done();
4042
} catch (error) {
@@ -44,10 +46,12 @@ describe('deepReadDirSync', () => {
4446
});
4547

4648
it('errors if directory does not exist', () => {
49+
// eslint-disable-next-line deprecation/deprecation
4750
expect(() => deepReadDirSync('./IDontExist')).toThrowError('Directory does not exist.');
4851
});
4952

5053
it('errors if given path is not a directory', () => {
54+
// eslint-disable-next-line deprecation/deprecation
5155
expect(() => deepReadDirSync('package.json')).toThrowError('it is not a directory');
5256
});
5357
});

packages/remix/src/index.server.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ export {
5353
addRequestDataToEvent,
5454
DEFAULT_USER_INCLUDES,
5555
extractRequestData,
56+
// eslint-disable-next-line deprecation/deprecation
5657
deepReadDirSync,
5758
Integrations,
5859
Handlers,

packages/serverless/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ export {
5555
DEFAULT_USER_INCLUDES,
5656
addRequestDataToEvent,
5757
extractRequestData,
58+
// eslint-disable-next-line deprecation/deprecation
5859
deepReadDirSync,
5960
Handlers,
6061
Integrations,

packages/sveltekit/src/server/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ export {
5151
addRequestDataToEvent,
5252
DEFAULT_USER_INCLUDES,
5353
extractRequestData,
54+
// eslint-disable-next-line deprecation/deprecation
5455
deepReadDirSync,
5556
Integrations,
5657
Handlers,

0 commit comments

Comments
 (0)