-
-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add mongoose 7 compatibility (by @meabed)
* chore: fix mongoose 7 compatibility * chore: fix mongoose 7 compatibility * chore: format * chore: fix import * chore: fix validate * chore: fix validate * chore: update package.json * chore: update mongoose and typescript * chore: fix validate * chore: fix test * chore: fix test * chore: fix test * chore: fix test * chore: update dependencies * chore: update dependencies * chore: fix typescript * chore: fix typescript * chore: update github actions * chore: update github actions * chore: update github actions * fix: update jest * chore: update jest, release and github actions * chore: github actions * chore: update test
- Loading branch information
Showing
13 changed files
with
2,404 additions
and
4,007 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,13 +8,22 @@ on: [push, pull_request] | |
jobs: | ||
tests: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
packages: write | ||
contents: write | ||
strategy: | ||
matrix: | ||
node-version: [14.x, 16.x] | ||
node-version: [14.x, 16.x, 18.x] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: echo "🎉 The job was triggered by a ${{ github.event_name }} event." | ||
- uses: styfle/[email protected] | ||
with: | ||
workflow_id: nodejs.yml | ||
access_token: ${{ secrets.GITHUB_TOKEN }} | ||
- uses: FranzDiebold/github-env-vars-action@v2 | ||
- uses: actions/checkout@v3 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v1 | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- name: Install node_modules | ||
|
@@ -23,10 +32,14 @@ jobs: | |
run: yarn test | ||
env: | ||
CI: true | ||
- name: Testing with previous mongoose versions | ||
run: yarn test-prev-vers | ||
- name: Testing with previous mongoose versions 6 | ||
run: yarn test-prev-vers-6 | ||
env: | ||
CI: true | ||
- name: Testing with previous mongoose versions 5 | ||
run: yarn test-prev-vers-5 | ||
env: | ||
CI: true | ||
CI: true | ||
- name: Send codecov.io stats | ||
if: matrix.node-version == '14.x' | ||
run: bash <(curl -s https://codecov.io/bash) || echo '' | ||
|
@@ -35,18 +48,21 @@ jobs: | |
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/alpha' || github.ref == 'refs/heads/beta' | ||
needs: [tests] | ||
runs-on: ubuntu-latest | ||
permissions: | ||
packages: write | ||
contents: write | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v3 | ||
- name: Use Node.js 14 | ||
uses: actions/setup-node@v1 | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 14.x | ||
- name: Install node_modules | ||
run: yarn install | ||
- name: Build | ||
run: yarn build | ||
- name: Semantic Release (publish to npm) | ||
run: yarn semantic-release | ||
run: npx semantic-release@19 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,34 +24,33 @@ | |
}, | ||
"homepage": "https://github.com/graphql-compose/graphql-compose-mongoose", | ||
"dependencies": { | ||
"dataloader": "^2.0.0", | ||
"dataloader": "^2.2.2", | ||
"graphql-compose-connection": "8.2.1", | ||
"graphql-compose-pagination": "8.3.0" | ||
}, | ||
"peerDependencies": { | ||
"graphql-compose": "^7.21.4 || ^8.0.0 || ^9.0.0", | ||
"mongoose": "^6.0.0 || ^5.0.0 || ^4.4.0" | ||
"mongoose": "^7.0.0 || ^6.0.0 || ^5.0.0 || ^4.4.0" | ||
}, | ||
"devDependencies": { | ||
"@types/jest": "27.0.3", | ||
"@typescript-eslint/eslint-plugin": "5.7.0", | ||
"@typescript-eslint/parser": "5.7.0", | ||
"eslint": "8.4.1", | ||
"@types/jest": "28.1.8", | ||
"@typescript-eslint/eslint-plugin": "5.54.0", | ||
"@typescript-eslint/parser": "5.54.0", | ||
"eslint": "8.35.0", | ||
"eslint-config-airbnb-base": "15.0.0", | ||
"eslint-config-prettier": "8.3.0", | ||
"eslint-plugin-import": "2.25.3", | ||
"eslint-plugin-prettier": "4.0.0", | ||
"graphql": "16.1.0", | ||
"graphql-compose": "9.0.5", | ||
"jest": "27.4.5", | ||
"mongodb-memory-server": "8.0.4", | ||
"mongoose": "6.1.2", | ||
"prettier": "2.5.1", | ||
"eslint-config-prettier": "8.6.0", | ||
"eslint-plugin-import": "2.27.5", | ||
"eslint-plugin-prettier": "4.2.1", | ||
"graphql": "16.6.0", | ||
"graphql-compose": "9.0.10", | ||
"jest": "28.1.3", | ||
"mongodb-memory-server": "8.11.5", | ||
"mongoose": "7.0.0", | ||
"prettier": "2.8.4", | ||
"request": "2.88.2", | ||
"rimraf": "3.0.2", | ||
"semantic-release": "18.0.1", | ||
"ts-jest": "27.1.1", | ||
"typescript": "4.5.4" | ||
"rimraf": "4.1.3", | ||
"ts-jest": "28.0.8", | ||
"typescript": "4.9.5" | ||
}, | ||
"scripts": { | ||
"prepare": "tsc -p ./tsconfig.build.json", | ||
|
@@ -65,6 +64,7 @@ | |
"link": "yarn build && yarn link graphql-compose && yarn link graphql-compose-connection && yarn link graphql-compose-pagination && yarn link mongoose && yarn link", | ||
"unlink": "rimraf node_modules && yarn install", | ||
"semantic-release": "semantic-release", | ||
"test-prev-vers": "yarn add [email protected] --dev --ignore-scripts && yarn coverage && git checkout HEAD -- package.json yarn.lock" | ||
"test-prev-vers-6": "yarn add [email protected] --dev --ignore-scripts && yarn coverage && git checkout HEAD -- package.json yarn.lock", | ||
"test-prev-vers-5": "yarn add [email protected] --dev --ignore-scripts && yarn coverage && git checkout HEAD -- package.json yarn.lock" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.