Conversation
| "@types/mocha": "^8.2.3", | ||
| "@types/node-fetch": "^2.5.12", | ||
| "@types/retry": "^0.12.1", | ||
| "@types/sinon": "^9.0.11", |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Yes, we don't import any of those types anywhere so we're good to remove them
base.tsconfig.json
Outdated
| "noImplicitThis": true, | ||
| "preserveConstEnums": true | ||
| "preserveConstEnums": true, | ||
| "skipLibCheck": true |
There was a problem hiding this comment.
I'm guessing we're skipping lib check because we removed some types from devDependencies?
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Does this ignore type checks in the declaration files (.d.ts) of the generated files? If yes do we miss any valid compilation issues
There was a problem hiding this comment.
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
This PR fixes the CI, which includes regenerating the
package-lock.jsonfile to be compatible with newer versions of NPM (> 7), and updating some configuration files to ignore tsc/eslint on node_modules, and updating depcheckThis PR also upgrades
typescriptto resolve some version mismatches that caused typescript issues innode_modules. It's currently set to~5.1.0to keep in line with some other packages:npm run buildworks with no compilation issues, and tests pass as well.