Skip to content

Commit

Permalink
feat: add [email protected] to peerDependencies; update other dep…
Browse files Browse the repository at this point in the history
…endencies
  • Loading branch information
nodkz committed May 30, 2021
1 parent dbc609d commit 3adf5f5
Show file tree
Hide file tree
Showing 17 changed files with 1,235 additions and 1,434 deletions.
28 changes: 14 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,33 +25,33 @@
"homepage": "https://github.com/graphql-compose/graphql-compose-mongoose",
"dependencies": {
"dataloader": "^2.0.0",
"graphql-compose-connection": "8.1.0",
"graphql-compose-pagination": "8.1.0"
"graphql-compose-connection": "8.2.0",
"graphql-compose-pagination": "8.2.0"
},
"peerDependencies": {
"graphql-compose": "^7.21.4 || ^8.0.0",
"graphql-compose": "^7.21.4 || ^8.0.0 || ^9.0.0",
"mongoose": "^5.0.0 || ^4.4.0"
},
"devDependencies": {
"@types/jest": "26.0.23",
"@typescript-eslint/eslint-plugin": "4.22.0",
"@typescript-eslint/parser": "4.22.0",
"eslint": "7.25.0",
"@typescript-eslint/eslint-plugin": "4.25.0",
"@typescript-eslint/parser": "4.25.0",
"eslint": "7.27.0",
"eslint-config-airbnb-base": "14.2.1",
"eslint-config-prettier": "8.3.0",
"eslint-plugin-import": "2.22.1",
"eslint-plugin-import": "2.23.4",
"eslint-plugin-prettier": "3.4.0",
"graphql": "15.5.0",
"graphql-compose": "8.0.1",
"jest": "26.6.3",
"graphql-compose": "9.0.0",
"jest": "27.0.3",
"mongodb-memory-server": "6.9.6",
"mongoose": "5.12.7",
"prettier": "2.2.1",
"mongoose": "5.12.12",
"prettier": "2.3.0",
"request": "2.88.2",
"rimraf": "3.0.2",
"semantic-release": "17.4.2",
"ts-jest": "26.5.5",
"typescript": "4.2.4"
"semantic-release": "17.4.3",
"ts-jest": "27.0.1",
"typescript": "4.3.2"
},
"scripts": {
"prepare": "tsc -p ./tsconfig.build.json",
Expand Down
3 changes: 0 additions & 3 deletions src/__tests__/github_issues/117-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ import mongoose from 'mongoose';
import { MongoMemoryServer } from 'mongodb-memory-server';
import { composeWithMongoose } from '../../index';

// May require additional time for downloading MongoDB binaries
jasmine.DEFAULT_TIMEOUT_INTERVAL = 60000;

let mongoServer: MongoMemoryServer;
beforeAll(async () => {
mongoServer = new MongoMemoryServer();
Expand Down
3 changes: 0 additions & 3 deletions src/__tests__/github_issues/120-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ afterAll(() => {
mongoServer.stop();
});

// May require additional time for downloading MongoDB binaries
jasmine.DEFAULT_TIMEOUT_INTERVAL = 60000;

describe('issue #120 - check `connection` resolver with last/before', () => {
const RecordSchema = new mongoose.Schema({ id: String, title: String });
const Record = mongoose.model('Record', RecordSchema);
Expand Down
3 changes: 0 additions & 3 deletions src/__tests__/github_issues/128-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ afterAll(() => {
mongoServer.stop();
});

// May require additional time for downloading MongoDB binaries
jasmine.DEFAULT_TIMEOUT_INTERVAL = 60000;

describe('issue #128 - OR/AND filter args not working with some other filter args', () => {
const RecordSchema = new mongoose.Schema({
id: String,
Expand Down
3 changes: 0 additions & 3 deletions src/__tests__/github_issues/135-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ afterAll(() => {
mongoServer.stop();
});

// May require additional time for downloading MongoDB binaries
jasmine.DEFAULT_TIMEOUT_INTERVAL = 60000;

describe('issue #135 - Mongoose virtuals', () => {
const RecordSchema = new mongoose.Schema({ id: String, title: String });

Expand Down
3 changes: 0 additions & 3 deletions src/__tests__/github_issues/136-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ afterAll(() => {
mongoServer.stop();
});

// May require additional time for downloading MongoDB binaries
jasmine.DEFAULT_TIMEOUT_INTERVAL = 60000;

describe('issue #136 - Mongoose virtuals', () => {
const CommentSchema = new mongoose.Schema({
author: {
Expand Down
5 changes: 1 addition & 4 deletions src/__tests__/github_issues/157-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,8 @@ afterAll(() => {
mongoServer.stop();
});

// May require additional time for downloading MongoDB binaries
jasmine.DEFAULT_TIMEOUT_INTERVAL = 60000;

describe('issue #157 - Optional enum error', () => {
const Visit = mongoose.model(
const Visit = mongoose.model<any>(
'visit',
new mongoose.Schema({
url: { type: String, required: true },
Expand Down
3 changes: 0 additions & 3 deletions src/__tests__/github_issues/194-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ afterAll(() => {
mongoServer.stop();
});

// May require additional time for downloading MongoDB binaries
jasmine.DEFAULT_TIMEOUT_INTERVAL = 60000;

describe('issue #194 - useAlias', () => {
const UserSchema = new mongoose.Schema({
e: {
Expand Down
3 changes: 0 additions & 3 deletions src/__tests__/github_issues/248-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ afterAll(() => {
mongoServer.stop();
});

// May require additional time for downloading MongoDB binaries
jasmine.DEFAULT_TIMEOUT_INTERVAL = 60000;

describe("issue #248 - payloads' errors", () => {
const UserSchema = new mongoose.Schema({
name: String,
Expand Down
3 changes: 0 additions & 3 deletions src/__tests__/github_issues/78-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ afterAll(() => {
mongoServer.stop();
});

// May require additional time for downloading MongoDB binaries
jasmine.DEFAULT_TIMEOUT_INTERVAL = 60000;

describe('issue #78 - Mongoose and Discriminators', () => {
const options = { discriminatorKey: 'kind' };

Expand Down
3 changes: 0 additions & 3 deletions src/__tests__/github_issues/92-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ import { schemaComposer, graphql } from 'graphql-compose';
import { composeWithMongoose } from '../../index';
import { UserModel } from '../../__mocks__/userModel';

// May require additional time for downloading MongoDB binaries
jasmine.DEFAULT_TIMEOUT_INTERVAL = 60000;

beforeAll(() => UserModel.base.createConnection());
afterAll(() => UserModel.base.disconnect());

Expand Down
3 changes: 0 additions & 3 deletions src/__tests__/github_issues/93-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ import { schemaComposer, graphql } from 'graphql-compose';
import { composeWithMongoose } from '../../index';
import { UserModel } from '../../__mocks__/userModel';

// May require additional time for downloading MongoDB binaries
jasmine.DEFAULT_TIMEOUT_INTERVAL = 60000;

beforeAll(() => UserModel.base.createConnection());
afterAll(() => UserModel.base.disconnect());

Expand Down
8 changes: 5 additions & 3 deletions src/discriminators/__mocks__/characterModels.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,11 @@ export const CharacterObject = {
const CharacterSchema = new Schema(CharacterObject);
const ACharacterSchema = new Schema({ ...CharacterObject });

export function getCharacterModels(
DKey: string
): { CharacterModel: Model<any>; PersonModel: Model<any>; DroidModel: Model<any> } {
export function getCharacterModels(DKey: string): {
CharacterModel: Model<any>;
PersonModel: Model<any>;
DroidModel: Model<any>;
} {
CharacterSchema.set('discriminatorKey', DKey);

const CharacterModel: Model<any> = mongoose.models.Character
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,9 @@ describe('DiscriminatorTypeComposer', () => {
it('should have field names synced with the baseTC', () => {
expect(baseDTC.getFieldNames()).toEqual(Object.keys(baseDTC.getDInterface().getFields()));

beforeAll(() => {
baseDTC.addFields({
field1: 'String',
field2: 'String',
});
baseDTC.addFields({
field1: 'String',
field2: 'String',
});

expect(baseDTC.getFieldNames()).toEqual(Object.keys(baseDTC.getDInterface().getFields()));
Expand Down
18 changes: 10 additions & 8 deletions src/resolvers/createMany.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,16 @@ export function createMany<TSource = any, TContext = any, TDoc extends Document
type: outputType,
args: {
records: {
type: (recordHelperArgs(tc, {
prefix: 'CreateMany',
suffix: `${opts?.suffix || ''}Input`,
removeFields: ['id', '_id'],
isRequired: true,
requiredFields,
...opts?.records,
}) as any).record.type.List.NonNull,
type: (
recordHelperArgs(tc, {
prefix: 'CreateMany',
suffix: `${opts?.suffix || ''}Input`,
removeFields: ['id', '_id'],
isRequired: true,
requiredFields,
...opts?.records,
}) as any
).record.type.List.NonNull,
},
},
resolve: async (resolveParams) => {
Expand Down
8 changes: 5 additions & 3 deletions src/resolvers/helpers/__tests__/limit-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ describe('Resolver helper `limit` ->', () => {
it('should process `opts.defaultValue` arg', () => {
expect((limitHelperArgs() as any).limit.defaultValue).toBe(100);
expect(
(limitHelperArgs({
defaultValue: 333,
}) as any).limit.defaultValue
(
limitHelperArgs({
defaultValue: 333,
}) as any
).limit.defaultValue
).toBe(333);
});
});
Expand Down
Loading

0 comments on commit 3adf5f5

Please sign in to comment.