Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

⬆ Bump eslint, typescript and jest #8

Merged
merged 8 commits into from
Nov 8, 2023
Merged

Conversation

dawidreedsy
Copy link

@dawidreedsy dawidreedsy commented Nov 7, 2023

In order to build new mongoose 8 had to bump few packages and the build worked after few changes
1.

// src/resource.ts
if (instance === 'ObjectID' || instance === 'ObjectId') {

To check for the ObjectId, as i believe mongoose changed this.
2. The validation error returns only the deepest property, but i do not think this is a problem as it still returns validation error. (Check test/resource/create.spec.ts for changes)
3. Had to update find function in src/resource.ts as sort object like {undefined: undefined} is not being removed.
4. Added --bail option to the npm test script as jest returns exit code 0 otherwise

@dawidreedsy dawidreedsy changed the title ⬆ Bump typescript and eslint ⬆ Bump typescript, eslint and jest Nov 7, 2023
@dawidreedsy dawidreedsy force-pushed the update-pacakges branch 2 times, most recently from b6483cb to 369af4d Compare November 7, 2023 15:50
@dawidreedsy dawidreedsy requested a review from a team November 7, 2023 16:01

Choose a reason for hiding this comment

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

You haven't bumped typescript as your PR title says

Copy link
Author

Choose a reason for hiding this comment

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

You are right didn't even notice it, this should fix the broken build

Copy link
Author

Choose a reason for hiding this comment

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

Changing title and description

@dawidreedsy dawidreedsy changed the title ⬆ Bump typescript, eslint and jest ⬆ Bump eslint and jest Nov 8, 2023
@dawidreedsy dawidreedsy changed the title ⬆ Bump eslint and jest ⬆ Bump eslint Nov 8, 2023
@dawidreedsy dawidreedsy removed the request for review from alecgibson November 8, 2023 09:24
@dawidreedsy
Copy link
Author

dawidreedsy commented Nov 8, 2023

@alecgibson
I just realised Ci doesn't fail on failed tests, fixing

@dawidreedsy dawidreedsy changed the title ⬆ Bump eslint ⬆ Bump eslint, typescript and jest Nov 8, 2023
@dawidreedsy
Copy link
Author

@dawidreedsy dawidreedsy mentioned this pull request Nov 8, 2023
Comment on lines -10 to -11
"test": "jest --config ./test/jest.json --runInBand",
"cover": "jest --config ./test/jest.json --runInBand --coverage",

Choose a reason for hiding this comment

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

Did you just add --bail for testing CI failure? Can we remove please?

Copy link
Author

Choose a reason for hiding this comment

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

Otherwise jest failes with exit code 0

Copy link
Author

Choose a reason for hiding this comment

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

tsconfig.json Outdated Show resolved Hide resolved
@dawidreedsy dawidreedsy merged commit 8cb3099 into main Nov 8, 2023
1 check passed
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.

3 participants