mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
chore: Use conventional changelog and automate config version bumps
* chore: add the reference change to npm version * chore: remove unused require * chore: add conventional-changelog * chore: add git to pre-release config changes * style: formatting * chore: fix commit message * chore: add no-verify to commit of configs * chore: no more shellJs * chore: fixing async * chore: committing restored * refactor: move and rename * chore: remove shelljs devdep and old script * chore: change npm script ref after refactor * chore: upgrade-config code improvements * chore: edit package.json (not package-lock) * chore(changelog): use conventionalcommits preset * chore: add conventional changelog config * chore: use .versionrc directly * chore: update changelog config * chore: update .versionrc.json * chore: use standard-version * chore: change to standard version * styling(changelog): remove a tags + formatting * styling: conventiontal-changelog styling * chore: postformatting of changelog * chore: remove unnecessary dependencies * chore: add upgrade-config to version as backup * docs: update release.md * styling: order scripts alphabetically * docs: requested changes + dry-run explanation * chore: release script to TS * chore: use ts-node to execute the TS scripts * docs: add some documentation comments to script * docs: remove unnecessary newline * docs: fix comment linting * chore: add test/integration and templates configs * chore: correct automated commit message * chore: remove fdir dependency * chore: remove manual-git-changelog dependency * chore: impl requested changes * docs: update script comments * chore: ensure full cov * chore: review comments
This commit is contained in:
@@ -1,10 +1,7 @@
|
||||
import { readJson } from 'fs-extra';
|
||||
import type { KeyValueStorage } from '../storage/keyvalue/KeyValueStorage';
|
||||
import { resolveModulePath } from '../util/PathUtil';
|
||||
import { readPackageJson } from '../util/PathUtil';
|
||||
import { Initializer } from './Initializer';
|
||||
|
||||
const PACKAGE_JSON_PATH = resolveModulePath('package.json');
|
||||
|
||||
/**
|
||||
* This initializer simply writes the version number of the server to the storage.
|
||||
* This will be relevant in the future when we look into migration initializers.
|
||||
@@ -22,7 +19,7 @@ export class ModuleVersionVerifier extends Initializer {
|
||||
}
|
||||
|
||||
public async handle(): Promise<void> {
|
||||
const pkg = await readJson(PACKAGE_JSON_PATH);
|
||||
const pkg = await readPackageJson();
|
||||
await this.storage.set(this.storageKey, pkg.version);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { posix, win32 } from 'path';
|
||||
import { readJson } from 'fs-extra';
|
||||
import urljoin from 'url-join';
|
||||
import type { TargetExtractor } from '../http/input/identifier/TargetExtractor';
|
||||
import type { ResourceIdentifier } from '../http/representation/ResourceIdentifier';
|
||||
@@ -270,6 +271,13 @@ export function resolveAssetPath(path = modulePathPlaceholder): string {
|
||||
return absoluteFilePath(path);
|
||||
}
|
||||
|
||||
/**
|
||||
* Reads the project package.json and returns it.
|
||||
*/
|
||||
export async function readPackageJson(): Promise<Record<string, any>> {
|
||||
return readJson(resolveModulePath('package.json'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Concatenates all the given strings into a normalized URL.
|
||||
* Will place slashes between input strings if necessary.
|
||||
|
||||
Reference in New Issue
Block a user