Skip to content

Commit

Permalink
chore: temp commit
Browse files Browse the repository at this point in the history
  • Loading branch information
mcdurdin committed Oct 17, 2024
1 parent 51142ac commit 2cf5db1
Show file tree
Hide file tree
Showing 7 changed files with 620 additions and 8 deletions.
15 changes: 15 additions & 0 deletions common/web/types/src/util/file-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,11 @@ export const HISTORY_MD = 'HISTORY.md';
*/
export const README_MD = 'README.md';

/**
* Standard project file name - LICENSE in Markdown format
*/
export const LICENSE_MD = 'LICENSE.md';

/**
* Gets the file type based on extension, dealing with multi-part file
* extensions. Does not sniff contents of file or assume file existence. Does
Expand All @@ -91,6 +96,16 @@ export function fromFilename(filename: string): Binary | Source | Any {
return result;
}

/**
* Removes the file extension, include known .model.* patterns, from a filename
* @param filename
* @returns
*/
export function removeExtension(filename: string): string {
const ext = fromFilename(filename);
return filename.substring(0, filename.length - ext.length);
}

/**
* Gets the file type based on extension, dealing with multi-part file
* extensions. Does not sniff contents of file or assume file existence.
Expand Down
2 changes: 1 addition & 1 deletion developer/src/common/web/utils/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export { KeymanUrls } from './utils/keyman-urls.js';
export * as KPJ from './types/kpj/kpj-file.js';
export { KPJFileReader } from './types/kpj/kpj-file-reader.js';
export { KPJFileWriter } from './types/kpj/kpj-file-writer.js';
export { KeymanDeveloperProject, KeymanDeveloperProjectFile, KeymanDeveloperProjectType, } from './types/kpj/keyman-developer-project.js';
export { KeymanDeveloperProject, KeymanDeveloperProjectFile, KeymanDeveloperProjectType, KeymanDeveloperProjectOptions } from './types/kpj/keyman-developer-project.js';
export { isValidEmail } from './is-valid-email.js';

export * as KpsFile from './types/kps/kps-file.js';
Expand Down
2 changes: 1 addition & 1 deletion developer/src/kmc-copy/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module.exports = {
overrides: [
{
files:"src/**/*.ts",
extends: ["../../../common/web/eslint/eslintNoNodeImports.js"],
extends: ["../../../common/tools/eslint/eslintNoNodeImports.js"],
}
],
rules: {
Expand Down
5 changes: 3 additions & 2 deletions developer/src/kmc-copy/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,12 @@ builder_parse "$@"
#-------------------------------------------------------------------------------------------------------------------

do_test() {
eslint .
# TODO-COPY: enale
# eslint .
cd test
tsc --build
cd ..
readonly C8_THRESHOLD=30
readonly C8_THRESHOLD=60
c8 -skip-full --reporter=lcov --reporter=text --lines $C8_THRESHOLD --statements $C8_THRESHOLD --branches $C8_THRESHOLD --functions $C8_THRESHOLD mocha "${builder_extra_params[@]}"
builder_echo warning "Coverage thresholds are currently $C8_THRESHOLD%, which is lower than ideal."
builder_echo warning "Please increase threshold in build.sh as test coverage improves."
Expand Down
Loading

0 comments on commit 2cf5db1

Please sign in to comment.