create-video 4.0.534 → 4.0.536

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -586,6 +586,6 @@ var src_default = () => {
586
586
  throw new Error("create-video is a CLI tool only. Run `npx create-video@latest`, `pnpm create video` or `yarn create video` instead!");
587
587
  };
588
588
  export {
589
- src_default as default,
590
- CreateVideoInternals
589
+ CreateVideoInternals,
590
+ src_default as default
591
591
  };
@@ -4,10 +4,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.patchPackageJson = void 0;
7
+ const node_child_process_1 = require("node:child_process");
7
8
  const node_fs_1 = __importDefault(require("node:fs"));
8
9
  const node_path_1 = __importDefault(require("node:path"));
9
10
  const list_of_remotion_packages_1 = require("./list-of-remotion-packages");
10
11
  const patchPackageJson = ({ projectRoot, projectName, latestRemotionVersion, packageManager, addTailwind, }, { getPackageJson = (filename) => node_fs_1.default.readFileSync(filename, 'utf-8'), setPackageJson = (filename, content) => node_fs_1.default.writeFileSync(filename, content), } = {}) => {
12
+ var _a, _b;
13
+ var _c;
11
14
  const fileName = node_path_1.default.join(projectRoot, 'package.json');
12
15
  const contents = getPackageJson(fileName);
13
16
  const packageJson = JSON.parse(contents);
@@ -27,6 +30,41 @@ const patchPackageJson = ({ projectRoot, projectName, latestRemotionVersion, pac
27
30
  return { ...a, [b[0]]: b[1] };
28
31
  }, {});
29
32
  });
33
+ if ((newDevDependencies === null || newDevDependencies === void 0 ? void 0 : newDevDependencies['@remotion/eslint-config-flat']) &&
34
+ /^10\./.test((_c = newDevDependencies.eslint) !== null && _c !== void 0 ? _c : '')) {
35
+ // Bun's process.versions.node describes its compatibility target, not the
36
+ // Node.js executable that will run npm scripts in the generated project.
37
+ const nodeVersion = process.versions.bun
38
+ ? (_a = (0, node_child_process_1.spawnSync)('node', ['--version'], {
39
+ encoding: 'utf8',
40
+ windowsHide: true,
41
+ timeout: 10000,
42
+ }).stdout) === null || _a === void 0 ? void 0 : _a.trim()
43
+ : process.versions.node;
44
+ const version = /^v?(\d+)\.(\d+)\.(\d+)$/.exec(nodeVersion !== null && nodeVersion !== void 0 ? nodeVersion : '');
45
+ const major = version ? Number(version[1]) : null;
46
+ const minor = version ? Number(version[2]) : null;
47
+ const supportsEslint10 = major !== null &&
48
+ minor !== null &&
49
+ (major >= 24 ||
50
+ (major === 22 && minor >= 13) ||
51
+ (major === 20 && minor >= 19));
52
+ if (!supportsEslint10) {
53
+ const eslint9NodeRequirement = '^18.18.0 || ^20.9.0 || >=21.1.0';
54
+ if (major !== null &&
55
+ minor !== null &&
56
+ !(major >= 22 ||
57
+ (major === 21 && minor >= 1) ||
58
+ (major === 20 && minor >= 9) ||
59
+ (major === 18 && minor >= 18))) {
60
+ throw new Error(`This template's ESLint configuration requires Node.js ${eslint9NodeRequirement}. Found ${nodeVersion}.`);
61
+ }
62
+ newDevDependencies.eslint = '9.39.5';
63
+ if (((_b = others.engines) === null || _b === void 0 ? void 0 : _b.node) === '^20.19.0 || ^22.13.0 || >=24') {
64
+ others.engines.node = eslint9NodeRequirement;
65
+ }
66
+ }
67
+ }
30
68
  const updateScripts = (scriptsToUpdate) => {
31
69
  for (const [key, value] of Object.entries(scriptsToUpdate)) {
32
70
  scriptsToUpdate[key] = value.replace(/remotion\b/g, 'remotionb');
@@ -51,6 +89,9 @@ const patchPackageJson = ({ projectRoot, projectName, latestRemotionVersion, pac
51
89
  dependencies: newDependenciesWithTailwind,
52
90
  devDependencies: newDevDependencies,
53
91
  scripts: newScripts,
92
+ ...(packageManager === 'npm'
93
+ ? { allowScripts: { ...packageJson.allowScripts, esbuild: false } }
94
+ : {}),
54
95
  ...(addTailwind ? { sideEffects: ['*.css'] } : {}),
55
96
  }, undefined, 2);
56
97
  setPackageJson(fileName, newPackageJson);
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "url": "https://github.com/remotion-dev/remotion/tree/main/packages/create-video"
4
4
  },
5
5
  "name": "create-video",
6
- "version": "4.0.534",
6
+ "version": "4.0.536",
7
7
  "description": "Create a new Remotion project",
8
8
  "main": "dist/index.js",
9
9
  "bin": {
@@ -29,7 +29,7 @@
29
29
  "@types/minimist": "1.2.2",
30
30
  "@types/prompts": "2.4.9",
31
31
  "react": "19.2.3",
32
- "@remotion/eslint-config-internal": "4.0.534",
32
+ "@remotion/eslint-config-internal": "4.0.536",
33
33
  "eslint": "9.19.0",
34
34
  "@typescript/native-preview": "7.0.0-dev.20260217.1"
35
35
  },
@@ -1 +0,0 @@
1
- export declare const askTailwind: () => Promise<boolean>;
@@ -1,19 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.askTailwind = void 0;
7
- const prompts_1 = __importDefault(require("./prompts"));
8
- const askTailwind = async () => {
9
- const { answer } = await (0, prompts_1.default)({
10
- type: 'toggle',
11
- name: 'answer',
12
- message: 'Add TailwindCSS?',
13
- initial: false,
14
- active: 'Yes',
15
- inactive: 'No',
16
- });
17
- return answer;
18
- };
19
- exports.askTailwind = askTailwind;