Skip to content

Commit

Permalink
revert some changes
Browse files Browse the repository at this point in the history
  • Loading branch information
csouchet committed Jan 7, 2025
1 parent ec652da commit bcc2cc8
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 4 deletions.
13 changes: 12 additions & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,18 @@ export default tseslint.config(
{
// Need to be in first before any other configuration
// https://eslint.org/docs/latest/use/configure/ignore
ignores: ['.github/*', '.idea/*', '/build/*', '/config/*', '/dist/*', 'node_modules/*', 'scripts/utils/dist/*', 'test/performance/data/*', 'test/typescript-support/*'],
ignores: [
'.github/*',
'.idea/*',
'/build/*',
'/config/*',
'/dist/*',
'node_modules/*',
'scripts/shared/types-info.mjs',
'scripts/utils/dist/*',
'test/performance/data/*',
'test/typescript-support/*',
],
},

{
Expand Down
1 change: 1 addition & 0 deletions scripts/add-license-header.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ limitations under the License.
import fs, { readFileSync } from 'node:fs';

import { computeBanner } from './shared/banner.mjs';
// eslint-disable-next-line import/namespace
import { getTypeFilesInformation } from './shared/types-info.mjs';

const { notSupportedTSVersionsFilePath, typesFilePath } = getTypeFilesInformation();
Expand Down
1 change: 1 addition & 0 deletions scripts/generate-types-for-not-supported-ts-versions.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ limitations under the License.

import * as fs from 'node:fs';

// eslint-disable-next-line import/namespace
import { getTypeFilesInformation } from './shared/types-info.mjs';

// generate a definition file for not supported TS versions. It provokes syntax error to show an explicit message about what are the supported versions.
Expand Down
6 changes: 3 additions & 3 deletions scripts/shared/types-info.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ limitations under the License.
*/

import assert from 'node:assert';
import { readFileSync } from 'node:fs';
import path from 'node:path';

const packageJSON = JSON.parse(readFileSync(path.resolve(__dirname, '../../package.json'), 'utf8'));
// generate warning when running with Node 20
// (node:75278) ExperimentalWarning: Importing JSON modules is an experimental feature. This feature could change at any time
import packageJSON from '../../package.json' with { type: 'json' };

export const getTypeFilesInformation = () => {
const notSupportedTSVersionsFilePath = packageJSON.types;
Expand Down

0 comments on commit bcc2cc8

Please sign in to comment.