mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
fix(core): Pick up release version and date from package.json (no-changelog) (#13666)
This commit is contained in:
committed by
GitHub
parent
9ba9443460
commit
093cc982b8
@@ -1,4 +1,4 @@
|
||||
import { readFileSync } from 'fs';
|
||||
import { readFileSync, statSync } from 'fs';
|
||||
import type { n8n } from 'n8n-core';
|
||||
import type { ITaskDataConnections } from 'n8n-workflow';
|
||||
import { jsonParse, TRIMMED_TASK_DATA_CONNECTIONS_KEY } from 'n8n-workflow';
|
||||
@@ -18,9 +18,10 @@ export const TEMPLATES_DIR = join(CLI_DIR, 'templates');
|
||||
export const NODES_BASE_DIR = dirname(require.resolve('n8n-nodes-base'));
|
||||
export const EDITOR_UI_DIST_DIR = join(dirname(require.resolve('n8n-editor-ui')), 'dist');
|
||||
|
||||
export function getN8nPackageJson() {
|
||||
return jsonParse<n8n.PackageJson>(readFileSync(join(CLI_DIR, 'package.json'), 'utf8'));
|
||||
}
|
||||
const packageJsonPath = join(CLI_DIR, 'package.json');
|
||||
const n8nPackageJson = jsonParse<n8n.PackageJson>(readFileSync(packageJsonPath, 'utf8'));
|
||||
export const N8N_VERSION = n8nPackageJson.version;
|
||||
export const N8N_RELEASE_DATE = statSync(packageJsonPath).mtime;
|
||||
|
||||
export const STARTING_NODES = [
|
||||
'@n8n/n8n-nodes-langchain.manualChatTrigger',
|
||||
@@ -28,8 +29,6 @@ export const STARTING_NODES = [
|
||||
'n8n-nodes-base.manualTrigger',
|
||||
];
|
||||
|
||||
export const N8N_VERSION = getN8nPackageJson().version;
|
||||
|
||||
export const NODE_PACKAGE_PREFIX = 'n8n-nodes-';
|
||||
|
||||
export const STARTER_TEMPLATE_NAME = `${NODE_PACKAGE_PREFIX}starter`;
|
||||
|
||||
Reference in New Issue
Block a user