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

Update dependencies #90

Merged
merged 18 commits into from
Jan 10, 2023
Merged
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
7 changes: 5 additions & 2 deletions .run/build.run.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="build" type="js.build_tools.npm" nameIsGenerated="true">
<package-json value="$PROJECT_DIR$/package.json" />
<command value="build" />
<node-interpreter value="/usr/local/bin/node" />
<command value="run" />
<scripts>
<script value="build" />
</scripts>
<node-interpreter value="project" />
<package-manager value="npm" />
<envs />
<method v="2" />
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" />
<package-manager value="npm" />
<envs />
<method v="2" />
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" />
<package-manager value="npm" />
<envs />
<method v="2" />
Expand Down
2 changes: 1 addition & 1 deletion .run/start.run.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<scripts>
<script value="start" />
</scripts>
<node-interpreter value="/usr/local/bin/node" />
<node-interpreter value="project" />
<package-manager value="npm" />
<envs />
<method v="2" />
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" />
<package-manager value="npm" />
<envs />
<method v="2" />
Expand Down
2 changes: 1 addition & 1 deletion NPM-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 - Server Generator v4
Open Template Hub - Server Generator v5
</h1>

[![GitHubRepo](https://img.shields.io/badge/GitHub-Repository-24292e.svg?style=for-the-badge&logo=github)](https://github.com/open-template-hub/server-generator)
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 - Server Generator v4
Open Template Hub - Server Generator v5
</h1>

[![Version](https://img.shields.io/npm/v/@open-template-hub/server-generator?color=CB3837&style=for-the-badge&logo=npm)](https://www.npmjs.com/package/@open-template-hub/server-generator)
Expand Down
34 changes: 23 additions & 11 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 - Server Generator v4\n' +
'Open Template Hub - Server Generator v5\n' +
' <br/>\n' +
'(outdated packages)\n' +
'</h1>\n' +
Expand All @@ -26,42 +28,52 @@ for ( const line of lines ) {
if ( line.length === 0 ) {
continue;
}

if ( lines.indexOf( line ) === 0 ) {
columnIndexes[ 0 ] = line.indexOf( 'Current' );
columnIndexes[ 1 ] = line.indexOf( 'Wanted' ) + 3;
columnIndexes[ 2 ] = line.indexOf( 'Latest' ) + 6;
columnIndexes[ 3 ] = line.indexOf( 'Location' ) + 9;
}

let modifiedLine = '';

if ( columnIndexes [ 0 ] >= 0 ) {
const stringParts = line.split( /(\s+)/ );

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 {
modifiedLine += part;
}
}

modifiedLine += ' |';

console.log( modifiedLine );
} else {
console.log( modifiedLine );
}

if ( lines.indexOf( line ) === 0 ) {
console.log( '| --- | --- | --- | --- | --- |' );
}
}

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'
);
8 changes: 6 additions & 2 deletions docs/OUTDATED.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,17 @@


<h1 align="center">
Open Template Hub - Server Generator v4
Open Template Hub - Server Generator 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 |
| --- | --- | --- | --- | --- |
| @types/inquirer | 8.2.5 | 8.2.5 | 9.0.3 | node_modules/@types/inquirer |
| inquirer | 8.2.5 | 8.2.5 | 9.1.4 | node_modules/inquirer |

<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>

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@
"@types/ncp": "^2.0.5",
"@types/rimraf": "^3.0.2",
"colors": "1.4.0",
"inquirer": "^8.2.4",
"inquirer": "~8.2.5",
"ncp": "^2.0.0",
"rimraf": "^3.0.2",
"shelljs": "^0.8.5",
"yargs": "^17.5.1"
},
"devDependencies": {
"@types/inquirer": "^8.2.1",
"@types/node": "^17.0.41",
"@types/inquirer": "^8.2.5",
"@types/node": "^18.0.4",
"@types/shelljs": "^0.8.11",
"@types/yargs": "^17.0.10",
"ts-node": "^10.8.1",
Expand Down
Loading