Skip to content

Fix CI#422

Merged
joeluong-sfcc merged 10 commits intofeature/oasfrom
ju/fix-ci
Jul 2, 2025
Merged

Fix CI#422
joeluong-sfcc merged 10 commits intofeature/oasfrom
ju/fix-ci

Conversation

@joeluong-sfcc
Copy link
Collaborator

@joeluong-sfcc joeluong-sfcc commented Jun 24, 2025

This PR fixes the CI, which includes regenerating the package-lock.json file to be compatible with newer versions of NPM (> 7), and updating some configuration files to ignore tsc/eslint on node_modules, and updating depcheck

This PR also upgrades typescript to resolve some version mismatches that caused typescript issues in node_modules. It's currently set to ~5.1.0 to keep in line with some other packages:

WARNING: You are currently running a version of TypeScript which is not officially supported by @typescript-eslint/typescript-estree.

You may find that it works just fine, or you may not.

SUPPORTED TYPESCRIPT VERSIONS: >=3.3.1 <5.2.0

YOUR TYPESCRIPT VERSION: 5.8.3

Please only submit bug reports when using the officially supported version.

npm run build works with no compilation issues, and tests pass as well.

@joeluong-sfcc joeluong-sfcc requested a review from a team as a code owner June 24, 2025 15:48
@joeluong-sfcc joeluong-sfcc changed the base branch from ju/support-x-scapi-internal to feature/oas June 24, 2025 21:02
"@types/mocha": "^8.2.3",
"@types/node-fetch": "^2.5.12",
"@types/retry": "^0.12.1",
"@types/sinon": "^9.0.11",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have separate devDependencies on the actual chai, fs-extra, and sinon packages so I think these are ok to be removed since they're just types?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we don't import any of those types anywhere so we're good to remove them

"noImplicitThis": true,
"preserveConstEnums": true
"preserveConstEnums": true,
"skipLibCheck": true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm guessing we're skipping lib check because we removed some types from devDependencies?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I updated these files as we didn't need certain changes, but the issue is that we were trying to transpile some typescript in the node_modules that was causing an error when you ran npm run build

> tsc && eslint dist --ext .ts,.js --quiet --fix

node_modules/@rdfjs/types/index.d.ts:3:1 - error TS1383: Only named exports may use 'export type'.

3 export type * from './data-model';
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@rdfjs/types/index.d.ts:4:1 - error TS1383: Only named exports may use 'export type'.

4 export type * from './stream';
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@rdfjs/types/index.d.ts:5:1 - error TS1383: Only named exports may use 'export type'.

5 export type * from './dataset';
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@rdfjs/types/index.d.ts:6:1 - error TS1383: Only named exports may use 'export type'.

6 export type * from './query';

tsconfig.json Outdated
"compilerOptions": {
"outDir": "./dist"
"outDir": "./dist",
"skipLibCheck": true
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this ignore type checks in the declaration files (.d.ts) of the generated files? If yes do we miss any valid compilation issues

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes this does, this should be fine as the changes we're ignoring are due to a typescript mismatch and wouldn't produce any compilation issues as we don't import any types directly from the npm package that's causing the issues, @rdfjs/types

But to avoid future issues, I fixed the typescript versioning mismatch and bumped the typescript version, we don't see any compilation errors with a major version bump of typescript

@joeluong-sfcc joeluong-sfcc merged commit 4dbdc01 into feature/oas Jul 2, 2025
7 checks passed
@joeluong-sfcc joeluong-sfcc deleted the ju/fix-ci branch July 2, 2025 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants