Skip to content

Commit

Permalink
Merge pull request #11 from open-template-hub/develop
Browse files Browse the repository at this point in the history
Update dependencies
  • Loading branch information
furknyavuz authored Jan 10, 2023
2 parents 53806fa + 4074aa1 commit eb47fce
Show file tree
Hide file tree
Showing 17 changed files with 83 additions and 68 deletions.
2 changes: 1 addition & 1 deletion .run/build-lib.run.xml → .run/build.run.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<scripts>
<script value="build" />
</scripts>
<node-interpreter value="/usr/local/bin/node" />
<node-interpreter value="project" />
<envs />
<method v="2" />
</configuration>
Expand Down
2 changes: 1 addition & 1 deletion .run/install.run.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<configuration default="false" name="install" type="js.build_tools.npm" nameIsGenerated="true">
<package-json value="$PROJECT_DIR$/package.json" />
<command value="install" />
<node-interpreter value="/usr/local/bin/node" />
<node-interpreter value="project" />
<envs />
<method v="2" />
</configuration>
Expand Down
2 changes: 1 addition & 1 deletion .run/outdated.run.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<scripts>
<script value="outdated" />
</scripts>
<node-interpreter value="/usr/local/bin/node" />
<node-interpreter value="project" />
<envs />
<method v="2" />
</configuration>
Expand Down
2 changes: 1 addition & 1 deletion .run/update.run.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<configuration default="false" name="update" type="js.build_tools.npm" nameIsGenerated="true">
<package-json value="$PROJECT_DIR$/package.json" />
<command value="update" />
<node-interpreter value="/usr/local/bin/node" />
<node-interpreter value="project" />
<envs />
<method v="2" />
</configuration>
Expand Down
4 changes: 3 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=827846
"recommendations": ["angular.ng-template"]
"recommendations": [
"angular.ng-template"
]
}
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2022 Open Template Hub
Copyright (c) 2023 Open Template Hub

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</p>

<h1 align="center">
Open Template Hub - Countdown UI Component v4
Open Template Hub - Countdown UI Component v5
</h1>

[![Version](https://img.shields.io/npm/v/@open-template-hub/countdown?color=CB3837&style=for-the-badge&logo=npm)](https://www.npmjs.com/package/@open-template-hub/countdown)
Expand Down
18 changes: 15 additions & 3 deletions dependency-checker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ const lines = outdatedCmd.stdout.toString().split( '\n' );

const columnIndexes = [ 0, 0, 0, 0 ];

let indexOfDependedBy = -1;

console.log(
'<p align="center">\n' +
' <a href="https://opentemplatehub.com">\n' +
Expand All @@ -14,7 +16,7 @@ console.log(
'\n' +
'\n' +
'<h1 align="center">\n' +
'Open Template Hub - Countdown UI Component v4\n' +
'Open Template Hub - Countdown UI Component v5\n' +
' <br/>\n' +
'(outdated packages)\n' +
'</h1>\n' +
Expand All @@ -41,7 +43,17 @@ for ( const line of lines ) {

modifiedLine += '| ';

for ( let part of stringParts ) {
for ( let i = 0; i < stringParts.length; ++i ) {
const part = stringParts[ i ];

if ( lines.indexOf( line ) === 0 && i < stringParts.length - 1 && stringParts[ i + 1 ] === 'Depended' ) {
indexOfDependedBy = i;
}

if ( indexOfDependedBy !== -1 && i >= indexOfDependedBy ) {
continue;
}

if ( part.match( /\s+/ ) ) {
modifiedLine += ' | ';
} else {
Expand All @@ -63,5 +75,5 @@ for ( const line of lines ) {

console.log(
'\n' +
'<table align="right"><tr><td><a href="https://opentemplatehub.com"><img src="https://raw.githubusercontent.com/open-template-hub/open-template-hub.github.io/master/assets/logo/brand-logo.png" width="50px" alt="oth"/></a></td><td><b>Open Template Hub © 2021</b></td></tr></table>\n'
'<table align="right"><tr><td><a href="https://opentemplatehub.com"><img src="https://raw.githubusercontent.com/open-template-hub/open-template-hub.github.io/master/assets/logo/brand-logo.png" width="50px" alt="oth"/></a></td><td><b>Open Template Hub © 2023</b></td></tr></table>\n'
);
7 changes: 5 additions & 2 deletions docs/OUTDATED.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,16 @@


<h1 align="center">
Open Template Hub - Countdown UI Component v4
Open Template Hub - Countdown UI Component v5
<br/>
(outdated packages)
</h1>

Following packages are not updated in the develop branch yet. So, if you want to update outdated packages on your own risk, update the package.json and install dependencies.

| Package | Current | Wanted | Latest | Location |
| --- | --- | --- | --- | --- |
| typescript | 4.8.4 | 4.8.4 | 4.9.4 | node_modules/typescript |

<table align="right"><tr><td><a href="https://opentemplatehub.com"><img src="https://raw.githubusercontent.com/open-template-hub/open-template-hub.github.io/master/assets/logo/brand-logo.png" width="50px" alt="oth"/></a></td><td><b>Open Template Hub © 2021</b></td></tr></table>
<table align="right"><tr><td><a href="https://opentemplatehub.com"><img src="https://raw.githubusercontent.com/open-template-hub/open-template-hub.github.io/master/assets/logo/brand-logo.png" width="50px" alt="oth"/></a></td><td><b>Open Template Hub © 2023</b></td></tr></table>

32 changes: 16 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,31 +11,31 @@
},
"private": true,
"dependencies": {
"@angular/animations": "^14.0.1",
"@angular/common": "^14.0.1",
"@angular/compiler": "^14.0.1",
"@angular/core": "^14.0.1",
"@angular/forms": "^14.0.1",
"@angular/platform-browser": "^14.0.1",
"@angular/platform-browser-dynamic": "^14.0.1",
"@angular/router": "^14.0.1",
"rxjs": "~7.5.0",
"@angular/animations": "^15.0.4",
"@angular/common": "^15.0.4",
"@angular/compiler": "^15.0.4",
"@angular/core": "^15.0.4",
"@angular/forms": "^15.0.4",
"@angular/platform-browser": "^15.0.4",
"@angular/platform-browser-dynamic": "^15.0.4",
"@angular/router": "^15.0.4",
"rxjs": "~7.8.0",
"tslib": "^2.4.0",
"zone.js": "~0.11.4"
"zone.js": "~0.12.0"
},
"devDependencies": {
"@angular-devkit/build-angular": "^14.0.1",
"@angular/cli": "^14.0.1",
"@angular/compiler-cli": "^14.0.1",
"@angular-devkit/build-angular": "^15.0.4",
"@angular/cli": "^15.0.4",
"@angular/compiler-cli": "^15.0.4",
"@types/jasmine": "^4.0.3",
"@types/node": "^17.0.33",
"@types/node": "^18.0.4",
"jasmine-core": "^4.1.1",
"karma": "^6.3.20",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage": "^2.2.0",
"karma-jasmine": "^5.0.1",
"karma-jasmine-html-reporter": "^2.0.0",
"ng-packagr": "^14.0.1",
"typescript": "^4.7.3"
"ng-packagr": "^15.0.3",
"typescript": "~4.8.4"
}
}
2 changes: 1 addition & 1 deletion projects/countdown/LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2022 Open Template Hub
Copyright (c) 2023 Open Template Hub

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion projects/countdown/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</p>

<h1 align="center">
Open Template Hub - Countdown UI Component v4
Open Template Hub - Countdown UI Component v5
</h1>

[![GitHubRepo](https://img.shields.io/badge/GitHub-Repository-24292e.svg?style=for-the-badge&logo=github)](https://github.com/open-template-hub/countdown)
Expand Down
32 changes: 16 additions & 16 deletions projects/countdown/karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html

module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
module.exports = function ( config ) {
config.set( {
basePath: "",
frameworks: [ "jasmine", "@angular-devkit/build-angular" ],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage'),
require('@angular-devkit/build-angular/plugins/karma')
require( "karma-jasmine" ),
require( "karma-chrome-launcher" ),
require( "karma-jasmine-html-reporter" ),
require( "karma-coverage" ),
require( "@angular-devkit/build-angular/plugins/karma" )
],
client: {
jasmine: {
Expand All @@ -25,20 +25,20 @@ module.exports = function (config) {
suppressAll: true // removes the duplicated traces
},
coverageReporter: {
dir: require('path').join(__dirname, '../../coverage/countdown'),
subdir: '.',
dir: require( "path" ).join( __dirname, "../../coverage/countdown" ),
subdir: ".",
reporters: [
{ type: 'html' },
{ type: 'text-summary' }
{ type: "html" },
{ type: "text-summary" }
]
},
reporters: ['progress', 'kjhtml'],
reporters: [ "progress", "kjhtml" ],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
browsers: [ "Chrome" ],
singleRun: false,
restartOnFileChange: true
});
} );
};
6 changes: 3 additions & 3 deletions projects/countdown/package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "@open-template-hub/countdown",
"description": "This library contains countdown ui component for UI Templates on Open Template Hub",
"version": "4.0.5",
"version": "5.0.0",
"license": "MIT",
"peerDependencies": {
"@angular/common": ">=14.0.1",
"@angular/core": ">=14.0.1"
"@angular/common": ">=15.0.1",
"@angular/core": ">=15.0.1"
},
"dependencies": {
"tslib": "^2.3.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export class CountdownComponent implements OnChanges {

ngOnChanges( _: SimpleChanges ): void {
if ( !this.warningThreshold || !this.errorThreshold ) {
this.warningThreshold = ( this.totalTime ?? 1) * 2 / 3;
this.warningThreshold = ( this.totalTime ?? 1 ) * 2 / 3;
this.errorThreshold = ( this.totalTime ?? 1 ) / 3;
}

Expand All @@ -36,8 +36,8 @@ export class CountdownComponent implements OnChanges {
}

setRemainingPathColor( timeLeft?: number ) {
if( !timeLeft) {
return
if ( !timeLeft ) {
return;
}

const { error, warning, success } = this.colorCodes;
Expand All @@ -51,8 +51,8 @@ export class CountdownComponent implements OnChanges {
}

calculateTimeFraction() {
const rawTimeFraction = ( this.timeLeft ?? 1) / ( this.totalTime ?? 1 );
return rawTimeFraction === 0 ? 0 : rawTimeFraction - ( 1 / ( this.totalTime ?? 1) ) * ( 1 - rawTimeFraction );
const rawTimeFraction = ( this.timeLeft ?? 1 ) / ( this.totalTime ?? 1 );
return rawTimeFraction === 0 ? 0 : rawTimeFraction - ( 1 / ( this.totalTime ?? 1 ) ) * ( 1 - rawTimeFraction );
}

setCircleDasharray() {
Expand Down
7 changes: 4 additions & 3 deletions projects/countdown/src/lib/countdown.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { CountdownComponent } from './component/countdown/countdown.component';

@NgModule({
@NgModule( {
declarations: [
CountdownComponent
],
Expand All @@ -12,5 +12,6 @@ import { CountdownComponent } from './component/countdown/countdown.component';
exports: [
CountdownComponent
]
})
export class CountdownModule { }
} )
export class CountdownModule {
}
19 changes: 8 additions & 11 deletions projects/countdown/src/test.ts
Original file line number Diff line number Diff line change
@@ -1,27 +1,24 @@
// This file is required by karma.conf.js and loads recursively all the .spec and framework files

import { getTestBed } from '@angular/core/testing';
import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';
import 'zone.js';
import 'zone.js/testing';
import { getTestBed } from '@angular/core/testing';
import {
BrowserDynamicTestingModule,
platformBrowserDynamicTesting
} from '@angular/platform-browser-dynamic/testing';

declare const require: {
context(path: string, deep?: boolean, filter?: RegExp): {
<T>(id: string): T;
context( path: string, deep?: boolean, filter?: RegExp ): {
<T>( id: string ): T;
keys(): string[];
};
};

// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(
BrowserDynamicTestingModule,
platformBrowserDynamicTesting(),
BrowserDynamicTestingModule,
platformBrowserDynamicTesting(),
);

// Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/);
const context = require.context( './', true, /\.spec\.ts$/ );
// And load the modules.
context.keys().map(context);
context.keys().map( context );

0 comments on commit eb47fce

Please sign in to comment.