From 4280854da5ccee6d100f92e29d57001ad1a2b7d4 Mon Sep 17 00:00:00 2001 From: Yann Renaudin Date: Fri, 30 Aug 2019 19:27:56 -0400 Subject: [PATCH 01/11] chore: update typescript version --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9797c54..e18ed91 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13853,9 +13853,9 @@ "dev": true }, "typescript": { - "version": "3.4.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.4.2.tgz", - "integrity": "sha512-Og2Vn6Mk7JAuWA1hQdDQN/Ekm/SchX80VzLhjKN9ETYrIepBFAd8PkOdOTK2nKt0FCkmMZKBJvQ1dV1gIxPu/A==", + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.6.2.tgz", + "integrity": "sha512-lmQ4L+J6mnu3xweP8+rOrUwzmN+MRAj7TgtJtDaXE5PMyX2kCrklhg3rvOsOIfNeAWMQWO2F1GPc1kMD2vLAfw==", "dev": true }, "undefsafe": { diff --git a/package.json b/package.json index 99dd92f..7c602d1 100644 --- a/package.json +++ b/package.json @@ -68,7 +68,7 @@ "typedoc": "^0.15.0", "typedoc-plugin-external-module-name": "^2.0.0", "typedoc-plugin-internal-external": "^2.0.1", - "typescript": "^3.4.2", + "typescript": "^3.5.3", "webpack": "4.38.0", "webpack-cli": "^3.3.0" }, From c3aefadf18c74eb984736fc3a0f72bf4f22db561 Mon Sep 17 00:00:00 2001 From: Yann Renaudin Date: Fri, 30 Aug 2019 19:28:35 -0400 Subject: [PATCH 02/11] fix: Destination type is properly inferred from source and provided class --- src/morphism.ts | 12 +++++++++++- src/typescript.spec.ts | 23 +++++++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/src/morphism.ts b/src/morphism.ts index 76bb0fe..a7bce4d 100644 --- a/src/morphism.ts +++ b/src/morphism.ts @@ -148,7 +148,17 @@ function morphism( type: Constructable ): Mapper; // morphism({}, null, T) => mapper(S) => T -function morphism(schema: TSchema, items: SourceFromSchema, type: Constructable): Target; // morphism({}, {}, T) => T +function morphism< + TSchema = Schema, SourceFromSchema>, + Target = never, + Source extends SourceFromSchema = SourceFromSchema +>(schema: TSchema, items: Source, type: Constructable): Target; // morphism({}, {}, T) => T + +function morphism< + TSchema = Schema, SourceFromSchema>, + Target = never, + Source extends SourceFromSchema = SourceFromSchema +>(schema: TSchema, items: Source[], type: Constructable): Target[]; // morphism({}, [], T) => T[] function morphism>( schema: TSchema, diff --git a/src/typescript.spec.ts b/src/typescript.spec.ts index 2336c30..daccd97 100644 --- a/src/typescript.spec.ts +++ b/src/typescript.spec.ts @@ -161,6 +161,29 @@ describe('Typescript', () => { morphism>({ a: ({ _a }) => _a.toString() }); morphism>({ a: ({ _a }) => _a.toString() }); }); + + it('shoud infer result type from source when a class is provided', () => { + class Source { + constructor(public id: number, public ugly_field: string) {} + } + + class Destination { + constructor(public id: number, public field: string) {} + } + + const source = [new Source(1, 'abc'), new Source(1, 'def')]; + + const schema: StrictSchema = { + id: 'id', + field: 'ugly_field' + }; + const expected = [new Destination(1, 'abc'), new Destination(1, 'def')]; + + const result = morphism(schema, source, Destination); + result.forEach((item, idx) => { + expect(item).toEqual(expected[idx]); + }); + }); }); describe('Morphism Function Type Checking', () => { From b5c2c8d4589500f0d7ec7d3de474ec15bac0b9b0 Mon Sep 17 00:00:00 2001 From: Yann Renaudin Date: Fri, 30 Aug 2019 19:46:08 -0400 Subject: [PATCH 03/11] fix: mapper type fails on undefined source --- src/morphism.ts | 4 ++-- src/types.ts | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/morphism.ts b/src/morphism.ts index a7bce4d..2bf44d1 100644 --- a/src/morphism.ts +++ b/src/morphism.ts @@ -72,7 +72,7 @@ function transformItems>(schema: TSchema, type tree = new MorphismSchemaTree(schema); } - function mapper(source: any) { + const mapper: Mapper = (source: any) => { if (!source) { return source; } @@ -96,7 +96,7 @@ function transformItems>(schema: TSchema, type return transformValuesFromObject(object, tree, [object], jsObject); } } - } + }; return mapper; } diff --git a/src/types.ts b/src/types.ts index 36dca74..9bab0f0 100644 --- a/src/types.ts +++ b/src/types.ts @@ -38,7 +38,7 @@ export type StrictSchema = { | ActionFunction | ActionAggregator | ActionSelector - | StrictSchema + | StrictSchema; } & { [SCHEMA_OPTIONS_SYMBOL]?: SchemaOptions }; export type Schema = { /** `destinationProperty` is the name of the property of the target object you want to produce */ @@ -47,7 +47,7 @@ export type Schema = { | ActionFunction | ActionAggregator | ActionSelector - | Schema + | Schema; } & { [SCHEMA_OPTIONS_SYMBOL]?: SchemaOptions }; export type Actions = ActionFunction | ActionAggregator | ActionString | ActionSelector; @@ -172,6 +172,6 @@ export type DestinationFromSchema = T extends StrictSchema | Schema< export type ResultItem = DestinationFromSchema; export interface Mapper> { - (data: SourceFromSchema[]): TResult[]; - (data: SourceFromSchema): TResult; + (data?: SourceFromSchema[] | null): TResult[]; + (data?: SourceFromSchema | null): TResult; } From 1e9de48ec476aac2fa196b77da06a8f82e30fb07 Mon Sep 17 00:00:00 2001 From: Yann Renaudin Date: Fri, 30 Aug 2019 19:55:17 -0400 Subject: [PATCH 04/11] fix: cherry pick fix for ActionSelector on @next branch --- src/types.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/types.ts b/src/types.ts index 9bab0f0..7227386 100644 --- a/src/types.ts +++ b/src/types.ts @@ -37,7 +37,7 @@ export type StrictSchema = { | ActionString | ActionFunction | ActionAggregator - | ActionSelector + | ActionSelector | StrictSchema; } & { [SCHEMA_OPTIONS_SYMBOL]?: SchemaOptions }; export type Schema = { @@ -46,7 +46,7 @@ export type Schema = { | ActionString | ActionFunction | ActionAggregator - | ActionSelector + | ActionSelector | Schema; } & { [SCHEMA_OPTIONS_SYMBOL]?: SchemaOptions }; From 2a9fcd0d12aa7126bf7418776c844290f9e7c0ab Mon Sep 17 00:00:00 2001 From: Yann Renaudin Date: Fri, 30 Aug 2019 19:59:12 -0400 Subject: [PATCH 05/11] fix: use typescript exact version - https://github.com/Microsoft/TypeScript/issues/29112 --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index e18ed91..fc32936 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13853,9 +13853,9 @@ "dev": true }, "typescript": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.6.2.tgz", - "integrity": "sha512-lmQ4L+J6mnu3xweP8+rOrUwzmN+MRAj7TgtJtDaXE5PMyX2kCrklhg3rvOsOIfNeAWMQWO2F1GPc1kMD2vLAfw==", + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.5.3.tgz", + "integrity": "sha512-ACzBtm/PhXBDId6a6sDJfroT2pOWt/oOnk4/dElG5G33ZL776N3Y6/6bKZJBFpd+b05F3Ct9qDjMeJmRWtE2/g==", "dev": true }, "undefsafe": { diff --git a/package.json b/package.json index 7c602d1..93c424a 100644 --- a/package.json +++ b/package.json @@ -68,7 +68,7 @@ "typedoc": "^0.15.0", "typedoc-plugin-external-module-name": "^2.0.0", "typedoc-plugin-internal-external": "^2.0.1", - "typescript": "^3.5.3", + "typescript": "3.5.3", "webpack": "4.38.0", "webpack-cli": "^3.3.0" }, From 6310583e0b86ec36c4c4fd763dae57071f474516 Mon Sep 17 00:00:00 2001 From: Yann Renaudin Date: Mon, 11 Nov 2019 18:29:29 -0500 Subject: [PATCH 06/11] fix: use expression instead of interface to avoid typescript widening type --- src/types.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/types.ts b/src/types.ts index 7227386..09cb5a4 100644 --- a/src/types.ts +++ b/src/types.ts @@ -35,7 +35,7 @@ export type StrictSchema = { /** `destinationProperty` is the name of the property of the target object you want to produce */ [destinationProperty in keyof Target]: | ActionString - | ActionFunction + | { (iteratee: Source, source: Source[], target: Target[destinationProperty]): Target[destinationProperty] } | ActionAggregator | ActionSelector | StrictSchema; @@ -44,7 +44,7 @@ export type Schema = { /** `destinationProperty` is the name of the property of the target object you want to produce */ [destinationProperty in keyof Target]?: | ActionString - | ActionFunction + | { (iteratee: Source, source: Source[], target: Target[destinationProperty]): Target[destinationProperty] } | ActionAggregator | ActionSelector | Schema; From 922f487eb73b4a00b4c386a585a38209e8f99fbd Mon Sep 17 00:00:00 2001 From: Yann Renaudin Date: Mon, 11 Nov 2019 18:30:04 -0500 Subject: [PATCH 07/11] test: add typescript test to ensure union type as target is allowed --- src/typescript.spec.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/typescript.spec.ts b/src/typescript.spec.ts index daccd97..129eac4 100644 --- a/src/typescript.spec.ts +++ b/src/typescript.spec.ts @@ -1,4 +1,4 @@ -import Morphism, { morphism, StrictSchema, Schema } from './morphism'; +import Morphism, { morphism, StrictSchema, Schema, createSchema } from './morphism'; describe('Typescript', () => { describe('Registry Type Checking', () => { @@ -184,6 +184,14 @@ describe('Typescript', () => { expect(item).toEqual(expected[idx]); }); }); + + it('should accept union types as Target', () => { + const schema = createSchema<{ a: string } | { a: string; b: string }, { c: string }>({ + a: ({ c }) => c + }); + + expect(morphism(schema, { c: 'result' }).a).toEqual('result'); + }); }); describe('Morphism Function Type Checking', () => { From 0665af2562e92428796a6f5590fbf6d6eab39e95 Mon Sep 17 00:00:00 2001 From: Yann Renaudin Date: Fri, 13 Dec 2019 19:03:17 -0500 Subject: [PATCH 08/11] fix: provide destination property to Selector Action to infer return type of fn --- src/types.ts | 62 ++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 50 insertions(+), 12 deletions(-) diff --git a/src/types.ts b/src/types.ts index 09cb5a4..41223db 100644 --- a/src/types.ts +++ b/src/types.ts @@ -1,4 +1,4 @@ -import { SCHEMA_OPTIONS_SYMBOL, SchemaOptions } from './morphism'; +import { SCHEMA_OPTIONS_SYMBOL, SchemaOptions } from "./morphism"; /** * A structure-preserving object from a source data towards a target data. @@ -35,22 +35,38 @@ export type StrictSchema = { /** `destinationProperty` is the name of the property of the target object you want to produce */ [destinationProperty in keyof Target]: | ActionString - | { (iteratee: Source, source: Source[], target: Target[destinationProperty]): Target[destinationProperty] } + | { + ( + iteratee: Source, + source: Source[], + target: Target[destinationProperty] + ): Target[destinationProperty]; + } | ActionAggregator - | ActionSelector + | ActionSelector | StrictSchema; } & { [SCHEMA_OPTIONS_SYMBOL]?: SchemaOptions }; export type Schema = { /** `destinationProperty` is the name of the property of the target object you want to produce */ [destinationProperty in keyof Target]?: | ActionString - | { (iteratee: Source, source: Source[], target: Target[destinationProperty]): Target[destinationProperty] } + | { + ( + iteratee: Source, + source: Source[], + target: Target[destinationProperty] + ): Target[destinationProperty]; + } | ActionAggregator - | ActionSelector + | ActionSelector | Schema; } & { [SCHEMA_OPTIONS_SYMBOL]?: SchemaOptions }; -export type Actions = ActionFunction | ActionAggregator | ActionString | ActionSelector; +export type Actions = + | ActionFunction + | ActionAggregator + | ActionString + | ActionSelector; /** * @interface ActionFunction @@ -129,7 +145,9 @@ export type ActionString = string; // TODO: ActionString should support * //=> { fooAndBar: { foo: 'foo', bar: 'bar' } } * ``` */ -export type ActionAggregator = T extends object ? (keyof T)[] | string[] : string[]; +export type ActionAggregator = T extends object + ? (keyof T)[] | string[] + : string[]; /** * @interface ActionSelector * @typeparam Source Source/Input Type @@ -157,21 +175,41 @@ export type ActionAggregator = T extends object ? ( *``` * */ -export interface ActionSelector { +export interface ActionSelector< + Source = object, + Target = any, + TargetProperty extends keyof Target = any +> { path: ActionString | ActionAggregator; - fn: (fieldValue: any, object: Source, items: Source, objectToCompute: R) => R; + fn: ( + fieldValue: any, + object: Source, + items: Source, + objectToCompute: Target + ) => Target[TargetProperty]; } export interface Constructable { new (...args: any[]): T; } -export type SourceFromSchema = T extends StrictSchema | Schema ? U : never; -export type DestinationFromSchema = T extends StrictSchema | Schema ? U : never; +export type SourceFromSchema = T extends + | StrictSchema + | Schema + ? U + : never; +export type DestinationFromSchema = T extends + | StrictSchema + | Schema + ? U + : never; export type ResultItem = DestinationFromSchema; -export interface Mapper> { +export interface Mapper< + TSchema extends Schema | StrictSchema, + TResult = ResultItem +> { (data?: SourceFromSchema[] | null): TResult[]; (data?: SourceFromSchema | null): TResult; } From 1384bd9738bc14187e3c5ca28ef2968d1c167c19 Mon Sep 17 00:00:00 2001 From: Yann Renaudin Date: Fri, 13 Dec 2019 19:04:22 -0500 Subject: [PATCH 09/11] test: add UT to validate type validation on Action Selector fn function --- src/typescript.spec.ts | 155 +++++++++++++++++++++++++++-------------- 1 file changed, 102 insertions(+), 53 deletions(-) diff --git a/src/typescript.spec.ts b/src/typescript.spec.ts index 129eac4..5586621 100644 --- a/src/typescript.spec.ts +++ b/src/typescript.spec.ts @@ -1,47 +1,52 @@ -import Morphism, { morphism, StrictSchema, Schema, createSchema } from './morphism'; - -describe('Typescript', () => { - describe('Registry Type Checking', () => { - it('Should return a Mapper when using Register', () => { +import Morphism, { + morphism, + StrictSchema, + Schema, + createSchema +} from "./morphism"; + +describe("Typescript", () => { + describe("Registry Type Checking", () => { + it("Should return a Mapper when using Register", () => { class Foo { foo: string; } - const schema = { foo: 'bar' }; - const source = { bar: 'value' }; + const schema = { foo: "bar" }; + const source = { bar: "value" }; const mapper = Morphism.register(Foo, schema); - expect(mapper(source).foo).toEqual('value'); - expect(mapper([source][0]).foo).toEqual('value'); + expect(mapper(source).foo).toEqual("value"); + expect(mapper([source][0]).foo).toEqual("value"); }); }); - describe('Schema Type Checking', () => { - it('Should allow to type the Schema', () => { + describe("Schema Type Checking", () => { + it("Should allow to type the Schema", () => { interface IFoo { foo: string; bar: number; } - const schema: Schema = { foo: 'qux' }; - const source = { qux: 'foo' }; + const schema: Schema = { foo: "qux" }; + const source = { qux: "foo" }; const target = morphism(schema, source); expect(target.foo).toEqual(source.qux); }); - it('Should allow to use a strict Schema', () => { + it("Should allow to use a strict Schema", () => { interface IFoo { foo: string; bar: number; } - const schema: StrictSchema = { foo: 'qux', bar: () => 1 }; - const source = { qux: 'foo' }; + const schema: StrictSchema = { foo: "qux", bar: () => 1 }; + const source = { qux: "foo" }; const target = morphism(schema, source); expect(target.foo).toEqual(source.qux); expect(target.bar).toEqual(1); }); - it('should accept 2 generic parameters on StrictSchema', () => { + it("should accept 2 generic parameters on StrictSchema", () => { interface Source { inputA: string; inputB: string; @@ -53,32 +58,34 @@ describe('Typescript', () => { fooC: string; } const schema: StrictSchema = { - fooA: 'inputA', + fooA: "inputA", fooB: ({ inputB }) => inputB, - fooC: 'inputC' + fooC: "inputC" }; const mapper = morphism(schema); - expect(mapper({ inputA: 'test', inputB: 'test2', inputC: 'test3' })).toEqual({ - fooA: 'test', - fooB: 'test2', - fooC: 'test3' + expect( + mapper({ inputA: "test", inputB: "test2", inputC: "test3" }) + ).toEqual({ + fooA: "test", + fooB: "test2", + fooC: "test3" }); }); - it('should accept 2 generic parameters on Schema', () => { + it("should accept 2 generic parameters on Schema", () => { interface Source2 { inputA: string; } const schema: Schema<{ foo: string }, Source2> = { - foo: 'inputA' + foo: "inputA" }; - morphism(schema, { inputA: 'test' }); - morphism(schema, [{ inputA: '' }]); + morphism(schema, { inputA: "test" }); + morphism(schema, [{ inputA: "" }]); }); - it('should accept 2 generic parameters on Schema', () => { + it("should accept 2 generic parameters on Schema", () => { interface S { s1: string; } @@ -86,26 +93,26 @@ describe('Typescript', () => { d1: string; } const schema: StrictSchema = { - d1: 's1' + d1: "s1" }; - const a = morphism(schema)([{ s1: 'test' }]); + const a = morphism(schema)([{ s1: "test" }]); const itemA = a.shift(); expect(itemA).toBeDefined(); if (itemA) { itemA.d1; } - morphism(schema, { s1: 'teest' }).d1.toString(); - const b = morphism(schema, [{ s1: 'teest' }]); + morphism(schema, { s1: "teest" }).d1.toString(); + const b = morphism(schema, [{ s1: "teest" }]); const itemB = b.shift(); expect(itemB).toBeDefined(); if (itemB) { itemB.d1; } - morphism(schema, [{ s1: 'teest' }]); - morphism(schema, [{ s1: 'test' }]); + morphism(schema, [{ s1: "teest" }]); + morphism(schema, [{ s1: "test" }]); }); - it('should not fail with typescript', () => { + it("should not fail with typescript", () => { interface S { s1: string; } @@ -122,29 +129,45 @@ describe('Typescript', () => { namingIsHard: string; } - const a = morphism>({ namingIsHard: 'boring_api_field' }, [{ boring_api_field: 2 }]); + const a = morphism>( + { namingIsHard: "boring_api_field" }, + [{ boring_api_field: 2 }] + ); const itemA = a.pop(); expect(itemA).toBeDefined(); if (itemA) { itemA.namingIsHard; } - const b = morphism>({ namingIsHard: 'boring_api_field' }, { boring_api_field: 2 }); + const b = morphism>( + { namingIsHard: "boring_api_field" }, + { boring_api_field: 2 } + ); b.namingIsHard; - const c = morphism>({ namingIsHard: 'boring_api_field' }, [{ boring_api_field: 2 }]); + const c = morphism>( + { namingIsHard: "boring_api_field" }, + [{ boring_api_field: 2 }] + ); const itemC = c.pop(); expect(itemC).toBeDefined(); if (itemC) { itemC.namingIsHard; } - const d = morphism({ namingIsHard: 'boring_api_field' }, { boring_api_field: 2 }); + const d = morphism( + { namingIsHard: "boring_api_field" }, + { boring_api_field: 2 } + ); d.namingIsHard; - morphism({ namingIsHard: 'boring_api_field' }); - morphism>({ namingIsHard: 'boring_api_field' })({ boring_api_field: 2 }); - const e = morphism>({ namingIsHard: 'boring_api_field' })([{ boring_api_field: 2 }]); + morphism({ namingIsHard: "boring_api_field" }); + morphism>({ + namingIsHard: "boring_api_field" + })({ boring_api_field: 2 }); + const e = morphism>({ + namingIsHard: "boring_api_field" + })([{ boring_api_field: 2 }]); const itemE = e.pop(); expect(itemE).toBeDefined(); if (itemE) { @@ -162,7 +185,7 @@ describe('Typescript', () => { morphism>({ a: ({ _a }) => _a.toString() }); }); - it('shoud infer result type from source when a class is provided', () => { + it("shoud infer result type from source when a class is provided", () => { class Source { constructor(public id: number, public ugly_field: string) {} } @@ -171,13 +194,13 @@ describe('Typescript', () => { constructor(public id: number, public field: string) {} } - const source = [new Source(1, 'abc'), new Source(1, 'def')]; + const source = [new Source(1, "abc"), new Source(1, "def")]; const schema: StrictSchema = { - id: 'id', - field: 'ugly_field' + id: "id", + field: "ugly_field" }; - const expected = [new Destination(1, 'abc'), new Destination(1, 'def')]; + const expected = [new Destination(1, "abc"), new Destination(1, "def")]; const result = morphism(schema, source, Destination); result.forEach((item, idx) => { @@ -185,17 +208,20 @@ describe('Typescript', () => { }); }); - it('should accept union types as Target', () => { - const schema = createSchema<{ a: string } | { a: string; b: string }, { c: string }>({ + it("should accept union types as Target", () => { + const schema = createSchema< + { a: string } | { a: string; b: string }, + { c: string } + >({ a: ({ c }) => c }); - expect(morphism(schema, { c: 'result' }).a).toEqual('result'); + expect(morphism(schema, { c: "result" }).a).toEqual("result"); }); }); - describe('Morphism Function Type Checking', () => { - it('should infer target type from array input', () => { + describe("Morphism Function Type Checking", () => { + it("should infer target type from array input", () => { interface Source { ID: number; } @@ -206,9 +232,32 @@ describe('Typescript', () => { const rows: Array = [{ ID: 1234 }]; - const schema: StrictSchema = { id: 'ID' }; + const schema: StrictSchema = { id: "ID" }; expect(morphism(schema, rows)).toBeDefined(); expect(morphism(schema, rows)[0].id).toEqual(1234); }); }); + + describe("Selector Action", () => { + it("should match return type of fn with target property", () => { + interface Source { + foo: string; + } + + interface Target { + foo: number; + } + + const schema: StrictSchema = { + foo: { + path: "foo", + fn: val => { + return Number(val); + } + } + }; + const source: Source = { foo: "1" }; + expect(morphism(schema, source)).toEqual({ foo: 1 }); + }); + }); }); From 4c071dab1cb32a29347a214ddc835a97586111cc Mon Sep 17 00:00:00 2001 From: Yann Renaudin Date: Fri, 31 Jan 2020 18:52:50 -0500 Subject: [PATCH 10/11] chore: update library tagline --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 93c424a..c9d14b9 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "morphism", "version": "1.0.0", - "description": "Do not repeat anymore your objects transformations.", + "description": "Type-safe object transformer for JavaScript, TypeScript & Node.js. ", "homepage": "https://github.com/nobrainr/morphism", "main": "./dist/morphism.js", "types": "./dist/types/morphism.d.ts", From 4634e808ce4123d8b9b711a3100e8bf66374982e Mon Sep 17 00:00:00 2001 From: Yann Renaudin Date: Fri, 31 Jan 2020 18:53:51 -0500 Subject: [PATCH 11/11] chore: update PR Template --- .github/PULL_REQUEST_TEMPLATE.MD | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.MD b/.github/PULL_REQUEST_TEMPLATE.MD index 788602f..1d8e786 100644 --- a/.github/PULL_REQUEST_TEMPLATE.MD +++ b/.github/PULL_REQUEST_TEMPLATE.MD @@ -3,15 +3,9 @@ ## Description - -## Checklist -- [ ] No duplicated code -- [ ] No temporary code (console.log, commented code, dead code) -- [ ] Code self-documentated (code hints, unit test names) -- [ ] No sensitive information logged / sent -- [ ] Error management with proper message -- [ ] Unit tests 100% (new code, edited code, exhaustive) + ## Related Issue +