Skip to content

Commit

Permalink
feat(Code Node): Set defaultVersion to 2 for V1 RC builds (no-chang…
Browse files Browse the repository at this point in the history
…elog) (#6209)

This will enable python in the Code node.
  • Loading branch information
netroy authored May 9, 2023
1 parent 06948b5 commit 18b60c4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/nodes-base/nodes/Code/Code.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { JavaScriptSandbox } from './JavaScriptSandbox';
import { PythonSandbox } from './PythonSandbox';
import { getSandboxContext } from './Sandbox';
import { standardizeOutput } from './utils';
import { IS_V1_RELEASE } from '../../utils/constants';

export class Code implements INodeType {
description: INodeTypeDescription = {
Expand All @@ -20,7 +21,7 @@ export class Code implements INodeType {
icon: 'fa:code',
group: ['transform'],
version: [1, 2],
defaultVersion: 1,
defaultVersion: IS_V1_RELEASE ? 2 : 1,
description: 'Run custom JavaScript code',
defaults: {
name: 'Code',
Expand Down
4 changes: 4 additions & 0 deletions packages/nodes-base/utils/constants.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import { major } from 'semver';
import { version } from '../package.json';

export const IS_V1_RELEASE = major(version) > 0;

0 comments on commit 18b60c4

Please sign in to comment.