mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
feat(Code Node): Set defaultVersion to 2 for V1 RC builds (no-changelog) (#6209)
This will enable python in the Code node.
This commit is contained in:
committed by
GitHub
parent
06948b5ba5
commit
18b60c4170
@@ -12,6 +12,7 @@ import { JavaScriptSandbox } from './JavaScriptSandbox';
|
|||||||
import { PythonSandbox } from './PythonSandbox';
|
import { PythonSandbox } from './PythonSandbox';
|
||||||
import { getSandboxContext } from './Sandbox';
|
import { getSandboxContext } from './Sandbox';
|
||||||
import { standardizeOutput } from './utils';
|
import { standardizeOutput } from './utils';
|
||||||
|
import { IS_V1_RELEASE } from '../../utils/constants';
|
||||||
|
|
||||||
export class Code implements INodeType {
|
export class Code implements INodeType {
|
||||||
description: INodeTypeDescription = {
|
description: INodeTypeDescription = {
|
||||||
@@ -20,7 +21,7 @@ export class Code implements INodeType {
|
|||||||
icon: 'fa:code',
|
icon: 'fa:code',
|
||||||
group: ['transform'],
|
group: ['transform'],
|
||||||
version: [1, 2],
|
version: [1, 2],
|
||||||
defaultVersion: 1,
|
defaultVersion: IS_V1_RELEASE ? 2 : 1,
|
||||||
description: 'Run custom JavaScript code',
|
description: 'Run custom JavaScript code',
|
||||||
defaults: {
|
defaults: {
|
||||||
name: 'Code',
|
name: 'Code',
|
||||||
|
|||||||
4
packages/nodes-base/utils/constants.ts
Normal file
4
packages/nodes-base/utils/constants.ts
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
import { major } from 'semver';
|
||||||
|
import { version } from '../package.json';
|
||||||
|
|
||||||
|
export const IS_V1_RELEASE = major(version) > 0;
|
||||||
Reference in New Issue
Block a user