Skip to content

Commit

Permalink
chore(solution): merge master into feature/branch
Browse files Browse the repository at this point in the history
  • Loading branch information
Igmat committed Jan 29, 2018
2 parents 0413cbe + fffdd45 commit c7fade5
Show file tree
Hide file tree
Showing 24 changed files with 123 additions and 29 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,18 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

<a name="0.5.1"></a>
## [0.5.1](https://github.com/Igmat/baset/compare/v0.5.0...v0.5.1) (2018-01-29)


### Bug Fixes

* **core:** replace all line endings with LF and trim baseline ([3d75a3e](https://github.com/Igmat/baset/commit/3d75a3e)), closes [#32](https://github.com/Igmat/baset/issues/32)
* **plugin-ts:** adding support for paths from tsconfig ([864ffdd](https://github.com/Igmat/baset/commit/864ffdd)), closes [#33](https://github.com/Igmat/baset/issues/33)




<a name="0.5.0"></a>
# [0.5.0](https://github.com/Igmat/baset/compare/v0.4.1...v0.5.0) (2018-01-26)

Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"./packages/*",
"./tests/*"
],
"version": "0.5.0",
"version": "0.5.1",
"commands": {
"publish": {
"allowBranch": "master",
Expand Down
8 changes: 8 additions & 0 deletions packages/baset-cli/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

<a name="0.5.1"></a>
## [0.5.1](https://github.com/Igmat/baset/compare/v0.5.0...v0.5.1) (2018-01-29)




**Note:** Version bump only for package baset-cli

<a name="0.5.0"></a>
# [0.5.0](https://github.com/Igmat/baset/compare/v0.4.1...v0.5.0) (2018-01-26)

Expand Down
6 changes: 3 additions & 3 deletions packages/baset-cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "baset-cli",
"version": "0.5.0",
"version": "0.5.1",
"description": "CLI for BaseT project.",
"keywords": [
"baset-cli",
Expand Down Expand Up @@ -28,13 +28,13 @@
"@types/glob": "^5.0.34",
"@types/node": "^9.3.0",
"@types/yargs": "^10.0.1",
"baset": "^0.5.0",
"baset": "^0.5.1",
"doctoc": "^1.3.0",
"tslint": "^5.9.1",
"typescript": "^2.6.2"
},
"dependencies": {
"baset-core": "^0.5.0",
"baset-core": "^0.5.1",
"find-up": "^2.1.0",
"glob": "^7.1.2",
"glob-promise": "^3.3.0",
Expand Down
11 changes: 11 additions & 0 deletions packages/baset-core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,17 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

<a name="0.5.1"></a>
## [0.5.1](https://github.com/Igmat/baset/compare/v0.5.0...v0.5.1) (2018-01-29)


### Bug Fixes

* **core:** replace all line endings with LF and trim baseline ([3d75a3e](https://github.com/Igmat/baset/commit/3d75a3e)), closes [#32](https://github.com/Igmat/baset/issues/32)




<a name="0.5.0"></a>
# [0.5.0](https://github.com/Igmat/baset/compare/v0.4.1...v0.5.0) (2018-01-26)

Expand Down
4 changes: 2 additions & 2 deletions packages/baset-core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "baset-core",
"version": "0.5.0",
"version": "0.5.1",
"description": "Core library for BaseT project.",
"keywords": [
"baset-core",
Expand All @@ -25,7 +25,7 @@
"license": "MIT",
"devDependencies": {
"@types/node": "^9.3.0",
"baset": "^0.5.0",
"baset": "^0.5.1",
"doctoc": "^1.3.0",
"tslint": "^5.9.1",
"typescript": "^2.6.2"
Expand Down
4 changes: 2 additions & 2 deletions packages/baset-core/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,11 @@ export class Tester {
private testSpec = async (name: string) => {
const reader = this.readers.find(({ pattern }) => pattern.test(name));
if (!reader) throw new Error(`No reader defined for ${name}!`);
const output = await reader.read(name);
const output = (await reader.read(name)).replace(/\r?\n|\r/g, '\n').trim();
const ext = path.extname(name);
const baselinePath = path.resolve(name.replace(new RegExp(`${ext}$`), '.base'));
const baselineValue = await isExists(baselinePath)
? await readFile(baselinePath, { encoding: 'utf-8' })
? (await readFile(baselinePath, { encoding: 'utf-8' })).replace(/\r?\n|\r/g, '\n').trim()
: false;
await writeFile(path.resolve(`${baselinePath}.tmp`), output);

Expand Down
8 changes: 8 additions & 0 deletions packages/baset-plugin-export/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

<a name="0.5.1"></a>
## [0.5.1](https://github.com/Igmat/baset/compare/v0.5.0...v0.5.1) (2018-01-29)




**Note:** Version bump only for package baset-plugin-export

<a name="0.5.0"></a>
# [0.5.0](https://github.com/Igmat/baset/compare/v0.4.1...v0.5.0) (2018-01-26)

Expand Down
4 changes: 2 additions & 2 deletions packages/baset-plugin-export/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "baset-plugin-export",
"version": "0.5.0",
"version": "0.5.1",
"description": "Export plugin for BaseT project.",
"keywords": [
"baset-plugin-export",
Expand All @@ -25,7 +25,7 @@
"license": "MIT",
"devDependencies": {
"@types/node": "^9.3.0",
"baset": "^0.5.0",
"baset": "^0.5.1",
"doctoc": "^1.3.0",
"tslint": "^5.9.1",
"typescript": "^2.6.2"
Expand Down
11 changes: 11 additions & 0 deletions packages/baset-plugin-ts/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,17 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

<a name="0.5.1"></a>
## [0.5.1](https://github.com/Igmat/baset/compare/v0.5.0...v0.5.1) (2018-01-29)


### Bug Fixes

* **plugin-ts:** adding support for paths from tsconfig ([864ffdd](https://github.com/Igmat/baset/commit/864ffdd)), closes [#33](https://github.com/Igmat/baset/issues/33)




<a name="0.5.0"></a>
# [0.5.0](https://github.com/Igmat/baset/compare/v0.4.1...v0.5.0) (2018-01-26)

Expand Down
7 changes: 4 additions & 3 deletions packages/baset-plugin-ts/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "baset-plugin-ts",
"version": "0.5.0",
"version": "0.5.1",
"description": "TypeScript plugin for BaseT project.",
"keywords": [
"baset-plugin-ts",
Expand All @@ -26,7 +26,7 @@
"license": "MIT",
"devDependencies": {
"@types/node": "^9.3.0",
"baset": "^0.5.0",
"baset": "^0.5.1",
"doctoc": "^1.3.0",
"tslint": "^5.9.1",
"typescript": "^2.6.2"
Expand All @@ -35,6 +35,7 @@
"find-up": "^2.1.0",
"ts-node": "^4.1.0",
"typescript": "^2.6.2",
"baset-core": "^0.5.0"
"baset-core": "^0.5.0",
"tsconfig-paths": "^3.1.1"
}
}
2 changes: 2 additions & 0 deletions packages/baset-plugin-ts/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { sync } from 'find-up';
import * as path from 'path';
import { Options, register } from 'ts-node';
import { register as registerPaths } from 'tsconfig-paths';
import { CompilerOptions } from 'typescript';
import { isPrimitive } from 'util';

Expand All @@ -23,6 +24,7 @@ export default class TypeScriptReader {
: { compilerOptions: config.compilerOptions };

register(registerOptions);
registerPaths(registerOptions.compilerOptions);
// TODO: investigate do we need https://www.npmjs.com/package/tsconfig-paths
}

Expand Down
8 changes: 8 additions & 0 deletions packages/baset/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

<a name="0.5.1"></a>
## [0.5.1](https://github.com/Igmat/baset/compare/v0.5.0...v0.5.1) (2018-01-29)




**Note:** Version bump only for package baset

<a name="0.5.0"></a>
# [0.5.0](https://github.com/Igmat/baset/compare/v0.4.1...v0.5.0) (2018-01-26)

Expand Down
6 changes: 3 additions & 3 deletions packages/baset/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "baset",
"version": "0.5.0",
"version": "0.5.1",
"description": "Tool for testing using baseline strategy.",
"keywords": [
"baset",
Expand All @@ -24,8 +24,8 @@
"prepublish": "node ./scripts/prepublish.js"
},
"dependencies": {
"baset-cli": "^0.5.0",
"baset-plugin-export": "^0.5.0"
"baset-cli": "^0.5.1",
"baset-plugin-export": "^0.5.1"
},
"devDependencies": {
"@types/node": "^9.3.0"
Expand Down
3 changes: 3 additions & 0 deletions tests/accept.spec.base
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
"",
"Temp baseline for index.spec.ts is written.",
"Test for index.spec.ts is passed",
"Temp baseline for pathImport.spec.ts is written.",
"Test for pathImport.spec.ts is passed",
""
],
"stderr": []
Expand All @@ -38,6 +40,7 @@
"",
"",
"Baseline index.spec.base is written.",
"Baseline pathImport.spec.base is written.",
""
],
"stderr": []
Expand Down
8 changes: 8 additions & 0 deletions tests/sample-project/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

<a name="0.5.1"></a>
## [0.5.1](https://github.com/Igmat/baset/compare/v0.5.0...v0.5.1) (2018-01-29)




**Note:** Version bump only for package sample-project

<a name="0.5.0"></a>
# [0.5.0](https://github.com/Igmat/baset/compare/v0.4.1...v0.5.0) (2018-01-26)

Expand Down
6 changes: 3 additions & 3 deletions tests/sample-project/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sample-project",
"version": "0.5.0",
"version": "0.5.1",
"private": true,
"description": "",
"main": "index.js",
Expand All @@ -11,7 +11,7 @@
"author": "",
"license": "MIT",
"devDependencies": {
"baset": "^0.5.0",
"baset-plugin-export": "^0.5.0"
"baset": "^0.5.1",
"baset-plugin-export": "^0.5.1"
}
}
2 changes: 2 additions & 0 deletions tests/test.spec.base
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
"",
"Temp baseline for index.spec.ts is written.",
"Test for index.spec.ts is passed",
"Temp baseline for pathImport.spec.ts is written.",
"Test for pathImport.spec.ts is passed",
""
],
"stderr": []
Expand Down
11 changes: 11 additions & 0 deletions tests/typescript-project/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,17 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

<a name="0.5.1"></a>
## [0.5.1](https://github.com/Igmat/baset/compare/v0.5.0...v0.5.1) (2018-01-29)


### Bug Fixes

* **plugin-ts:** adding support for paths from tsconfig ([864ffdd](https://github.com/Igmat/baset/commit/864ffdd)), closes [#33](https://github.com/Igmat/baset/issues/33)




<a name="0.5.0"></a>
# [0.5.0](https://github.com/Igmat/baset/compare/v0.4.1...v0.5.0) (2018-01-26)

Expand Down
8 changes: 8 additions & 0 deletions tests/typescript-project/lib/someCoolClass.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
export class SomeCoolClass {
private a = 1000;
private b = 300;

getSum() {
return this.a + this.b;
}
}
8 changes: 4 additions & 4 deletions tests/typescript-project/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "typescript-project",
"version": "0.5.0",
"version": "0.5.1",
"private": true,
"description": "",
"main": "index.js",
Expand All @@ -11,9 +11,9 @@
"author": "",
"license": "MIT",
"devDependencies": {
"baset": "^0.5.0",
"baset-plugin-export": "^0.5.0",
"baset-plugin-ts": "^0.5.0",
"baset": "^0.5.1",
"baset-plugin-export": "^0.5.1",
"baset-plugin-ts": "^0.5.1",
"typescript": "^2.6.2"
}
}
1 change: 1 addition & 0 deletions tests/typescript-project/pathImport.spec.base
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{ "sum": 1300 }
3 changes: 3 additions & 0 deletions tests/typescript-project/pathImport.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { SomeCoolClass } from 'someCoolClass';

export const sum = new SomeCoolClass().getSum();
9 changes: 3 additions & 6 deletions tests/typescript-project/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,11 @@
"paths": {
"*": [
"node_modules/*",
"src/types/*"
"src/types/*",
"lib/*"
]
},
"experimentalDecorators": true,
"emitDecoratorMetadata": true
},
"include": [
"src/**/*",
"!src/**/*.spec.ts"
]
}
}

0 comments on commit c7fade5

Please sign in to comment.