Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: dep upgrade and iface fixes #196

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions angular.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"cli": {
"analytics": false
},
"version": 1,
"newProjectRoot": "projects",
"newProjectRoot": "projects",
Expand Down
101 changes: 51 additions & 50 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,60 +20,61 @@
"projects/tiny-translator"
],
"dependencies": {
"@angular-devkit/architect": "^0.800.0",
"@angular-devkit/core": "~8.0.0",
"@angular-devkit/schematics": "~8.0.0",
"@angular/animations": "^8.0.0",
"@angular/cdk": "^8.0.0",
"@angular/common": "^8.0.0",
"@angular/compiler": "^8.0.0",
"@angular/core": "^8.0.0",
"@angular/flex-layout": "^8.0.0-beta.26",
"@angular/forms": "^8.0.0",
"@angular/material": "^8.0.0",
"@angular/platform-browser": "^8.0.0",
"@angular/platform-browser-dynamic": "^8.0.0",
"@angular/pwa": "^0.13.9",
"@angular/router": "~8.0.0",
"@angular/service-worker": "~8.0.0",
"core-js": "^2.6.2",
"@angular-devkit/architect": "^0.1300.1",
"@angular-devkit/core": "~13.0.1",
"@angular-devkit/schematics": "~13.0.1",
"@angular/animations": "^13.0.0",
"@angular/cdk": "^13.0.0",
"@angular/common": "^13.0.0",
"@angular/compiler": "^13.0.0",
"@angular/core": "^13.0.0",
"@angular/flex-layout": "^12.0.0-beta.35",
"@angular/forms": "^13.0.0",
"@angular/material": "^13.0.0",
"@angular/platform-browser": "^13.0.0",
"@angular/platform-browser-dynamic": "^13.0.0",
"@angular/pwa": "^13.0.1",
"@angular/router": "~13.0.0",
"@angular/service-worker": "~13.0.0",
"core-js": "^3.19.1",
"hammerjs": "^2.0.8",
"rxjs": "6.5.2",
"tokenizr": "1.4.0",
"tsickle": "0.35.0",
"zone.js": "~0.9.1"
"rxjs": "7.4.0",
"tokenizr": "1.6.4",
"tsickle": "0.43.0",
"zone.js": "~0.11.4"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.800.0",
"@angular-devkit/build-ng-packagr": "~0.800.0",
"@angular/cli": "~8.0.0",
"@angular/compiler-cli": "~8.0.0",
"@angular/language-service": "~8.0.0",
"@types/jasmine": "~3.3.5",
"@types/jasminewd2": "~2.0.6",
"@types/node": "~10.12.18",
"@types/request": "^2.48.1",
"codelyzer": "~5.0.1",
"coveralls": "^3.0.0",
"@angular-devkit/build-angular": "~13.0.1",
"@angular-devkit/build-ng-packagr": "~0.1002.0",
"@angular/cli": "~13.0.1",
"@angular/compiler-cli": "~13.0.0",
"@angular/language-service": "~13.0.0",
"@angular/localize": "^13.0.0",
"@types/jasmine": "~3.10.2",
"@types/jasminewd2": "~2.0.10",
"@types/node": "~16.11.6",
"@types/request": "^2.48.7",
"codelyzer": "~6.0.2",
"coveralls": "^3.1.1",
"cpx": "^1.5.0",
"cross-env": "^5.1.1",
"cross-env": "^7.0.3",
"istanbul": "^0.4.5",
"jasmine-core": "~3.3.0",
"jasmine-node": "^1.14.5",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~3.1.4",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~2.0.1",
"karma-jasmine": "~2.0.1",
"karma-jasmine-html-reporter": "^1.4.0",
"jasmine-core": "~3.10.1",
"jasmine-node": "^3.0.0",
"jasmine-spec-reporter": "~7.0.0",
"karma": "~6.3.7",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage-istanbul-reporter": "~3.0.3",
"karma-jasmine": "~4.0.1",
"karma-jasmine-html-reporter": "^1.7.0",
"lcov-result-merger": "^3.1.0",
"move-cli": "^1.2.0",
"ng-packagr": "^5.2.0",
"protractor": "~5.4.2",
"replace": "^1.0.1",
"ts-node": "~7.0.0",
"tslib": "^1.9.0",
"tslint": "~5.16.0",
"typescript": "~3.4.5"
"move-cli": "^2.0.0",
"ng-packagr": "^13.0.1",
"protractor": "~7.0.0",
"replace": "^1.2.1",
"ts-node": "~10.4.0",
"tslib": "^2.3.1",
"tslint": "~5.20.1",
"typescript": "~4.4.4"
}
}
}
2 changes: 1 addition & 1 deletion projects/ngx-i18nsupport-lib/src/api/api.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ describe('ngx-i18nsupport-lib API test spec', () => {

const SRCDIR = 'test/testdata/i18n/';

const ENCODING = 'UTF-8';
const ENCODING = 'utf-8';

/**
* Helper function to read Xliff from File
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ export interface ITranslationMessagesFileFactory {
createFileFromFileContent(i18nFormat: string,
xmlContent: string,
path: string,
encoding: string,
optionalMaster?: { xmlContent: string, path: string, encoding: string }): ITranslationMessagesFile;
encoding: BufferEncoding ,
optionalMaster?: { xmlContent: string, path: string, encoding: BufferEncoding }): ITranslationMessagesFile;

/**
* Read file function for any file with unknown format.
Expand All @@ -34,7 +34,7 @@ export interface ITranslationMessagesFileFactory {
*/
createFileFromUnknownFormatFileContent(xmlContent: string,
path: string,
encoding: string,
optionalMaster?: { xmlContent: string, path: string, encoding: string })
encoding: BufferEncoding ,
optionalMaster?: { xmlContent: string, path: string, encoding: BufferEncoding })
: ITranslationMessagesFile;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ export class TranslationMessagesFileFactory implements ITranslationMessagesFileF
public static fromFileContent(i18nFormat: string,
xmlContent: string,
path: string,
encoding: string,
optionalMaster?: {xmlContent: string, path: string, encoding: string}): ITranslationMessagesFile {
encoding: BufferEncoding ,
optionalMaster?: {xmlContent: string, path: string, encoding: BufferEncoding }): ITranslationMessagesFile {
return new TranslationMessagesFileFactory().createFileFromFileContent(i18nFormat, xmlContent, path, encoding, optionalMaster);
}

Expand All @@ -51,8 +51,8 @@ export class TranslationMessagesFileFactory implements ITranslationMessagesFileF
*/
public static fromUnknownFormatFileContent(xmlContent: string,
path: string,
encoding: string,
optionalMaster?: {xmlContent: string, path: string, encoding: string}): ITranslationMessagesFile {
encoding: BufferEncoding ,
optionalMaster?: {xmlContent: string, path: string, encoding: BufferEncoding }): ITranslationMessagesFile {
return new TranslationMessagesFileFactory().createFileFromUnknownFormatFileContent(xmlContent, path, encoding, optionalMaster);
}

Expand All @@ -71,8 +71,8 @@ export class TranslationMessagesFileFactory implements ITranslationMessagesFileF
createFileFromFileContent(i18nFormat: string,
xmlContent: string,
path: string,
encoding: string,
optionalMaster?: { xmlContent: string, path: string, encoding: string }): ITranslationMessagesFile {
encoding: BufferEncoding ,
optionalMaster?: { xmlContent: string, path: string, encoding: BufferEncoding }): ITranslationMessagesFile {
if (i18nFormat === FORMAT_XLIFF12) {
return new XliffFile(xmlContent, path, encoding);
}
Expand Down Expand Up @@ -104,8 +104,8 @@ export class TranslationMessagesFileFactory implements ITranslationMessagesFileF
*/
createFileFromUnknownFormatFileContent(xmlContent: string,
path: string,
encoding: string,
optionalMaster?: { xmlContent: string, path: string, encoding: string })
encoding: BufferEncoding ,
optionalMaster?: { xmlContent: string, path: string, encoding: BufferEncoding })
: ITranslationMessagesFile {
let formatCandidates = [FORMAT_XLIFF12, FORMAT_XLIFF20, FORMAT_XMB, FORMAT_XTB];
if (path && path.endsWith('xmb')) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export abstract class AbstractTranslationMessagesFile implements ITranslationMes

protected _filename: string;

protected _encoding: string;
protected _encoding: BufferEncoding ;

protected _parsedDocument: Document;

Expand Down Expand Up @@ -50,8 +50,8 @@ export abstract class AbstractTranslationMessagesFile implements ITranslationMes
*/
protected parseContent(
xmlString: string,
path: string, encoding: string,
optionalMaster?: { xmlContent: string, path: string, encoding: string })
path: string, encoding: BufferEncoding ,
optionalMaster?: { xmlContent: string, path: string, encoding: BufferEncoding })
: void {
this._filename = path;
this._encoding = encoding;
Expand Down
2 changes: 1 addition & 1 deletion projects/ngx-i18nsupport-lib/src/impl/xliff-file.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ describe('ngx-i18nsupport-lib xliff 1.2 test spec', () => {

const SRCDIR = 'test/testdata/i18n/';

const ENCODING = 'UTF-8';
const ENCODING = 'utf-8';

/**
* Helper function to read Xliff from File
Expand Down
4 changes: 2 additions & 2 deletions projects/ngx-i18nsupport-lib/src/impl/xliff-file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ export class XliffFile extends AbstractTranslationMessagesFile implements ITrans
* This is read from the file, but if you know it before, you can avoid reading the file twice.
* @return XliffFile
*/
constructor(xmlString: string, path: string, encoding: string) {
constructor(xmlString: string, path: string, encoding: BufferEncoding ) {
super();
this._warnings = [];
this._numberOfTransUnitsWithMissingId = 0;
this.initializeFromContent(xmlString, path, encoding);
}

private initializeFromContent(xmlString: string, path: string, encoding: string): XliffFile {
private initializeFromContent(xmlString: string, path: string, encoding: BufferEncoding ): XliffFile {
this.parseContent(xmlString, path, encoding);
const xliffList = this._parsedDocument.getElementsByTagName('xliff');
if (xliffList.length !== 1) {
Expand Down
2 changes: 1 addition & 1 deletion projects/ngx-i18nsupport-lib/src/impl/xliff2-file.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ describe('ngx-i18nsupport-lib XLIFF 2.0 test spec', () => {

const SRCDIR = 'test/testdata/i18n/';

const ENCODING = 'UTF-8';
const ENCODING = 'utf-8';

/**
* Helper function to read Xliff 2.0 from File
Expand Down
4 changes: 2 additions & 2 deletions projects/ngx-i18nsupport-lib/src/impl/xliff2-file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ export class Xliff2File extends AbstractTranslationMessagesFile implements ITran
* This is read from the file, but if you know it before, you can avoid reading the file twice.
* @return xliff file
*/
constructor(xmlString: string, path: string, encoding: string) {
constructor(xmlString: string, path: string, encoding: BufferEncoding ) {
super();
this._warnings = [];
this._numberOfTransUnitsWithMissingId = 0;
this.initializeFromContent(xmlString, path, encoding);
}

private initializeFromContent(xmlString: string, path: string, encoding: string): Xliff2File {
private initializeFromContent(xmlString: string, path: string, encoding: BufferEncoding ): Xliff2File {
this.parseContent(xmlString, path, encoding);
const xliffList = this._parsedDocument.getElementsByTagName('xliff');
if (xliffList.length !== 1) {
Expand Down
2 changes: 1 addition & 1 deletion projects/ngx-i18nsupport-lib/src/impl/xmb-file.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ describe('ngx-i18nsupport-lib xmb test spec', () => {

const SRCDIR = 'test/testdata/i18n/';

const ENCODING = 'UTF-8';
const ENCODING = 'utf-8';

/**
* Helper function to read Xmb from File
Expand Down
4 changes: 2 additions & 2 deletions projects/ngx-i18nsupport-lib/src/impl/xmb-file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ export class XmbFile extends AbstractTranslationMessagesFile implements ITransla
*/
constructor(
private _translationMessageFileFactory: ITranslationMessagesFileFactory,
xmlString: string, path: string, encoding: string) {
xmlString: string, path: string, encoding: BufferEncoding ) {

super();
this._warnings = [];
this._numberOfTransUnitsWithMissingId = 0;
this.initializeFromContent(xmlString, path, encoding);
}

private initializeFromContent(xmlString: string, path: string, encoding: string): XmbFile {
private initializeFromContent(xmlString: string, path: string, encoding: BufferEncoding ): XmbFile {
this.parseContent(xmlString, path, encoding);
if (this._parsedDocument.getElementsByTagName('messagebundle').length !== 1) {
throw new Error(format('File "%s" seems to be no xmb file (should contain a messagebundle element)', path));
Expand Down
Loading