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

langium-cli/textmate: Move overlooked process node dependency to the node-util.ts #1466

Merged
merged 1 commit into from
Apr 23, 2024
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
2 changes: 1 addition & 1 deletion examples/arithmetics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
"vscode-languageserver": "~9.0.1"
},
"devDependencies": {
"langium-cli": "~3.0.2"
"langium-cli": "~3.0.3"
},
"volta": {
"node": "18.19.1",
Expand Down
2 changes: 1 addition & 1 deletion examples/arithmetics/src/language-server/generated/ast.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/******************************************************************************
* This file was generated by langium-cli 3.0.2.
* This file was generated by langium-cli 3.0.3.
* DO NOT EDIT MANUALLY!
******************************************************************************/

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/******************************************************************************
* This file was generated by langium-cli 3.0.2.
* This file was generated by langium-cli 3.0.3.
* DO NOT EDIT MANUALLY!
******************************************************************************/

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/******************************************************************************
* This file was generated by langium-cli 3.0.2.
* This file was generated by langium-cli 3.0.3.
* DO NOT EDIT MANUALLY!
******************************************************************************/

Expand Down
2 changes: 1 addition & 1 deletion examples/domainmodel/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"vscode-languageserver": "~9.0.1"
},
"devDependencies": {
"langium-cli": "~3.0.2"
"langium-cli": "~3.0.3"
},
"volta": {
"node": "18.19.1",
Expand Down
2 changes: 1 addition & 1 deletion examples/domainmodel/src/language-server/generated/ast.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/******************************************************************************
* This file was generated by langium-cli 3.0.2.
* This file was generated by langium-cli 3.0.3.
* DO NOT EDIT MANUALLY!
******************************************************************************/

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/******************************************************************************
* This file was generated by langium-cli 3.0.2.
* This file was generated by langium-cli 3.0.3.
* DO NOT EDIT MANUALLY!
******************************************************************************/

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/******************************************************************************
* This file was generated by langium-cli 3.0.2.
* This file was generated by langium-cli 3.0.3.
* DO NOT EDIT MANUALLY!
******************************************************************************/

Expand Down
2 changes: 1 addition & 1 deletion examples/requirements/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
"vscode-languageserver": "~9.0.1"
},
"devDependencies": {
"langium-cli": "~3.0.2"
"langium-cli": "~3.0.3"
},
"volta": {
"node": "18.19.1",
Expand Down
2 changes: 1 addition & 1 deletion examples/requirements/src/language-server/generated/ast.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/******************************************************************************
* This file was generated by langium-cli 3.0.2.
* This file was generated by langium-cli 3.0.3.
* DO NOT EDIT MANUALLY!
******************************************************************************/

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/******************************************************************************
* This file was generated by langium-cli 3.0.2.
* This file was generated by langium-cli 3.0.3.
* DO NOT EDIT MANUALLY!
******************************************************************************/

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/******************************************************************************
* This file was generated by langium-cli 3.0.2.
* This file was generated by langium-cli 3.0.3.
* DO NOT EDIT MANUALLY!
******************************************************************************/

Expand Down
2 changes: 1 addition & 1 deletion examples/statemachine/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"vscode-languageserver": "~9.0.1"
},
"devDependencies": {
"langium-cli": "~3.0.2"
"langium-cli": "~3.0.3"
},
"volta": {
"node": "18.19.1",
Expand Down
2 changes: 1 addition & 1 deletion examples/statemachine/src/language-server/generated/ast.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/******************************************************************************
* This file was generated by langium-cli 3.0.2.
* This file was generated by langium-cli 3.0.3.
* DO NOT EDIT MANUALLY!
******************************************************************************/

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/******************************************************************************
* This file was generated by langium-cli 3.0.2.
* This file was generated by langium-cli 3.0.3.
* DO NOT EDIT MANUALLY!
******************************************************************************/

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/******************************************************************************
* This file was generated by langium-cli 3.0.2.
* This file was generated by langium-cli 3.0.3.
* DO NOT EDIT MANUALLY!
******************************************************************************/

Expand Down
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/generator-langium/templates/core/.package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"@typescript-eslint/parser": "~7.3.1",
"@typescript-eslint/eslint-plugin": "~7.3.1",
"eslint": "~8.57.0",
"langium-cli": "~3.0.2",
"langium-cli": "~3.0.3",
"typescript": "~5.1.6"
},
"volta": {
Expand Down
2 changes: 1 addition & 1 deletion packages/langium-cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "langium-cli",
"version": "3.0.2",
"version": "3.0.3",
"description": "CLI for Langium - the language engineering tool",
"homepage": "https://langium.org",
"engines": {
Expand Down
4 changes: 2 additions & 2 deletions packages/langium-cli/src/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ import { generateModule } from './generator/module-generator.js';
import { generateTextMate } from './generator/highlighting/textmate-generator.js';
import { generateMonarch } from './generator/highlighting/monarch-generator.js';
import { generatePrismHighlighting } from './generator/highlighting/prism-generator.js';
import { elapsedTime, getTime, log } from './generator/langium-util.js';
import { getUserChoice, schema } from './generator/node-util.js';
import { getTime, log } from './generator/langium-util.js';
import { elapsedTime, getUserChoice, schema } from './generator/node-util.js';
import { RelativePath } from './package-types.js';
import { getFilePath } from './package.js';
import { validateParser } from './parser-validation.js';
Expand Down
8 changes: 0 additions & 8 deletions packages/langium-cli/src/generator/langium-util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,6 @@ export function log(level: 'log' | 'warn' | 'error', options: { watch?: boolean
}
}

let start = process.hrtime();

export function elapsedTime(): string {
const elapsed = process.hrtime(start)[1] / 1000000; // divide by a million to get nano to milli
start = process.hrtime(); // reset the timer
return elapsed.toFixed();
}

export function getTime(): string {
const date = new Date();
return `[${chalk.gray(`${padZeroes(date.getHours())}:${padZeroes(date.getMinutes())}:${padZeroes(date.getSeconds())}`)}] `;
Expand Down
8 changes: 8 additions & 0 deletions packages/langium-cli/src/generator/node-util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,11 @@ export async function getUserChoice<R extends string>(text: string, values: R[],
export const cliVersion = getLangiumCliVersion();
export const generatedHeader = getGeneratedHeader();
export const schema = fs.readJson(path.resolve(getDirname(), '../../langium-config-schema.json'), { encoding: 'utf-8' });

let start = process.hrtime();

export function elapsedTime(): string {
const elapsed = process.hrtime(start)[1] / 1000000; // divide by a million to get nano to milli
start = process.hrtime(); // reset the timer
return elapsed.toFixed();
}
2 changes: 1 addition & 1 deletion packages/langium/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"vscode-uri": "~3.0.8"
},
"devDependencies": {
"langium-cli": "~3.0.2"
"langium-cli": "~3.0.3"
},
"volta": {
"node": "18.19.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/langium/src/grammar/generated/grammar.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/******************************************************************************
* This file was generated by langium-cli 3.0.2.
* This file was generated by langium-cli 3.0.3.
* DO NOT EDIT MANUALLY!
******************************************************************************/

Expand Down
2 changes: 1 addition & 1 deletion packages/langium/src/grammar/generated/module.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/******************************************************************************
* This file was generated by langium-cli 3.0.2.
* This file was generated by langium-cli 3.0.3.
* DO NOT EDIT MANUALLY!
******************************************************************************/

Expand Down
2 changes: 1 addition & 1 deletion packages/langium/src/languages/generated/ast.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/******************************************************************************
* This file was generated by langium-cli 3.0.2.
* This file was generated by langium-cli 3.0.3.
* DO NOT EDIT MANUALLY!
******************************************************************************/

Expand Down
Loading