Skip to content

Commit

Permalink
Merge pull request #50 from joomcode/fix/changelog-errors
Browse files Browse the repository at this point in the history
fix: errors in `updateChangelog` script
  • Loading branch information
uid11 authored Dec 7, 2023
2 parents 8ef4b69 + 78c30fd commit 1a67791
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 34 deletions.
16 changes: 4 additions & 12 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@

[Full Changelog](https://github.com/joomcode/e2ed/compare/v0.15.12...v0.15.13)

- [Merge pull request #49 from joomcode/fix/stricter-type-of-expect-function](https://github.com/joomcode/e2ed/commit/"tformat:5bef95cc0d010394d9654af7d112bf8) ([a5ff85146uid11](https://github.com/a5ff85146uid11))
- [Merge pull request #49 from joomcode/fix/stricter-type-of-expect-function](https://github.com/joomcode/e2ed/commit/5bef95cc0d010394d9654af7d112bf8a5ff85146) ([uid11](https://github.com/uid11))

fix: stricter type of `expect` function

- ["](https://github.com/joomcode/e2ed/commit/") ([](https://github.com/))

"tformat:d72142f57210d289f7fc5b780122f093e82903d5uid11|FI-705 fix: stricter type of `expect` function
- [FI-705 fix: stricter type of `expect` function](https://github.com/joomcode/e2ed/commit/d72142f57210d289f7fc5b780122f093e82903d5) ([uid11](https://github.com/uid11))

fix: support usual promises in `expect` function

Expand Down Expand Up @@ -52,17 +50,11 @@

chore: update github action and node version in ci.yaml

- ["](https://github.com/joomcode/e2ed/commit/") ([](https://github.com/))

"tformat:791ed2f932f0cdd541c8d0f719c44dfce8f312eaNikita Torchinskiy|Merge pull request #48 from joomcode/FI-1028
- [Merge pull request #48 from joomcode/FI-1028](https://github.com/joomcode/e2ed/commit/791ed2f932f0cdd541c8d0f719c44dfce8f312ea) ([nnn3d](https://github.com/nnn3d))

FI-1028: remove E2ED*DOCKER_DO*\* params

- ["](https://github.com/joomcode/e2ed/commit/") ([](https://github.com/))

"tformat:15794d3a1ab9c227cf4a687bb065e5d60589334aNikita*Torchinskiy|FI-1028: remove E2ED_DOCKER_DO*\* params

- ["](https://github.com/joomcode/e2ed/commit/") ([](https://github.com/))
- [FI-1028: remove E2ED*DOCKER_DO*\* params](https://github.com/joomcode/e2ed/commit/15794d3a1ab9c227cf4a687bb065e5d60589334a) ([nnn3d](https://github.com/nnn3d))

## [v0.15.12](https://github.com/joomcode/e2ed/tree/v0.15.12) (2023-11-29)

Expand Down
18 changes: 2 additions & 16 deletions autotests/configurator/mapBackendResponseToLog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,13 @@ import type {MapBackendResponseToLog} from 'autotests/types/packSpecific';
export const mapBackendResponseToLog: MapBackendResponseToLog = ({
completionTimeInMs,
request,
responseBody,
responseHeaders,
statusCode,
}) => {
if (statusCode >= 400) {
return undefined;
}

if (request) {
const maybeWithDuration: {duration?: string} = {};
const duration = getDurationWithUnits(completionTimeInMs - request.utcTimeInMs);

if (completionTimeInMs !== undefined && request.utcTimeInMs !== undefined) {
maybeWithDuration.duration = getDurationWithUnits(completionTimeInMs - request.utcTimeInMs);
}

return {...maybeWithDuration, statusCode, url: request?.url};
}

return {
responseBody: responseBody instanceof Buffer ? String(responseBody) : responseBody,
responseHeaders,
statusCode,
};
return {duration, statusCode, url: request?.url};
};
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"author": "uid11",
"license": "MIT",
"bin": {
"e2ed": "./bin/localEntrypoint.js",
"e2ed-init": "./bin/init.js"
"e2ed": "bin/localEntrypoint.js",
"e2ed-init": "bin/init.js"
},
"bugs": "https://github.com/joomcode/e2ed/issues",
"engines": {
Expand All @@ -21,7 +21,7 @@
"homepage": "https://github.com/joomcode/e2ed#readme",
"repository": {
"type": "git",
"url": "https://github.com/joomcode/e2ed"
"url": "git+https://github.com/joomcode/e2ed.git"
},
"dependencies": {
"bin-v8-flags-filter": "1.2.0",
Expand Down
8 changes: 5 additions & 3 deletions scripts/updateChangelog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,15 @@ import {repository, version} from '../package.json';

const EXEC_FILE_OPTIONS = {encoding: 'utf8'} as const;

function assertValueIsDefined<T>(value: T): asserts value is Exclude<T, undefined> {
function assertValueIsDefined<Type>(value: Type): asserts value is Exclude<Type, undefined> {
if (value === undefined) {
throw new TypeError('Asserted value is undefined');
}
}

const {href: repoUrl, origin: repoOrigin} = new URL(repository.url);
const {hostname, pathname} = new URL(repository.url);
const repoOrigin = `https://${hostname}`;
const repoUrl = `${repoOrigin}${pathname.slice(0, -4)}`;
const changelogPath = join(__dirname, '..', 'CHANGELOG.md');

const fullDate = new Date().toISOString().slice(0, 10);
Expand All @@ -29,7 +31,7 @@ const SEPARATOR = '\n'.repeat(64);
const gitOptions = [
'log',
`HEAD...v${previousVersion}`,
`--pretty="tformat:%H%aN|%s%n%b${'%n'.repeat(SEPARATOR.length)}"`,
`--pretty=tformat:%H%aN|%s%n%b${'%n'.repeat(SEPARATOR.length)}`,
];

const commits = execFileSync('git', gitOptions, EXEC_FILE_OPTIONS)
Expand Down

0 comments on commit 1a67791

Please sign in to comment.