create-video 3.3.38 → 3.3.39

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.
@@ -0,0 +1,6 @@
1
+ import type { PackageManager } from './pkg-managers';
2
+ export declare const createYarnYmlFile: ({ projectRoot, pkgManagerVersion, pkgManager, }: {
3
+ projectRoot: string;
4
+ pkgManagerVersion: string | null;
5
+ pkgManager: PackageManager;
6
+ }) => void;
@@ -0,0 +1,27 @@
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.createYarnYmlFile = void 0;
7
+ const fs_1 = require("fs");
8
+ const path_1 = __importDefault(require("path"));
9
+ const log_1 = require("./log");
10
+ const createYarnYmlFile = ({ projectRoot, pkgManagerVersion, pkgManager, }) => {
11
+ if (pkgManager !== 'yarn') {
12
+ return;
13
+ }
14
+ if (!pkgManagerVersion) {
15
+ return;
16
+ }
17
+ const majorVersion = pkgManagerVersion[0];
18
+ const majorVersionNumber = Number(majorVersion);
19
+ if (majorVersionNumber < 2) {
20
+ return;
21
+ }
22
+ log_1.Log.info('Remotion has no support for automatically installing the Yarn PnP modules yet.');
23
+ log_1.Log.info('Creating .yarnrc.yml file to disable Yarn PnP.');
24
+ const yarnrcYml = `nodeLinker: node-modules\n`;
25
+ (0, fs_1.writeFileSync)(path_1.default.join(projectRoot, '.yarnrc.yml'), yarnrcYml);
26
+ };
27
+ exports.createYarnYmlFile = createYarnYmlFile;
package/dist/init.js CHANGED
@@ -7,6 +7,7 @@ exports.init = exports.checkGitAvailability = void 0;
7
7
  const chalk_1 = __importDefault(require("chalk"));
8
8
  const execa_1 = __importDefault(require("execa"));
9
9
  const os_1 = __importDefault(require("os"));
10
+ const add_yarn2_support_1 = require("./add-yarn2-support");
10
11
  const degit_1 = require("./degit");
11
12
  const latest_remotion_version_1 = require("./latest-remotion-version");
12
13
  const log_1 = require("./log");
@@ -110,6 +111,11 @@ const init = async () => {
110
111
  process.exit(1);
111
112
  }
112
113
  log_1.Log.info(`Copied ${chalk_1.default.blueBright(selectedTemplate.shortName)} to ${chalk_1.default.blueBright(folderName)}. Installing dependencies...`);
114
+ (0, add_yarn2_support_1.createYarnYmlFile)({
115
+ pkgManager,
116
+ pkgManagerVersion,
117
+ projectRoot,
118
+ });
113
119
  if (pkgManager === 'yarn') {
114
120
  log_1.Log.info('> yarn');
115
121
  const promise = (0, execa_1.default)('yarn', [], {
@@ -37,28 +37,28 @@ for (const template of templates_1.FEATURED_TEMPLATES) {
37
37
  if (!template.shortName.includes('JavaScript')) {
38
38
  (0, vitest_1.expect)(body.devDependencies.typescript).toMatch(/^\^?4/);
39
39
  }
40
- });
40
+ }, 12000);
41
41
  (0, vitest_1.test)(template.shortName + ' should not have a package-lock.json', async () => {
42
42
  const packageLockJson = getFileForTemplate(template, 'package-lock.json');
43
43
  const res = await (0, got_1.default)(packageLockJson, {
44
44
  throwHttpErrors: false,
45
45
  });
46
46
  (0, vitest_1.expect)(res.statusCode).toBe(404);
47
- });
47
+ }, 12000);
48
48
  (0, vitest_1.test)(template.shortName + ' should not have a yarn.lock', async () => {
49
49
  const packageLockJson = getFileForTemplate(template, 'yarn.lock');
50
50
  const res = await (0, got_1.default)(packageLockJson, {
51
51
  throwHttpErrors: false,
52
52
  });
53
53
  (0, vitest_1.expect)(res.statusCode).toBe(404);
54
- });
54
+ }, 12000);
55
55
  (0, vitest_1.test)(template.shortName + ' should not have a pnpm-lock.yaml', async () => {
56
56
  const packageLockJson = getFileForTemplate(template, 'pnpm-lock.yaml');
57
57
  const res = await (0, got_1.default)(packageLockJson, {
58
58
  throwHttpErrors: false,
59
59
  });
60
60
  (0, vitest_1.expect)(res.statusCode).toBe(404);
61
- });
61
+ }, 12000);
62
62
  (0, vitest_1.test)(template.shortName + ' should not have a standard entry point', async () => {
63
63
  const { contents, entryPoint } = await findFile([
64
64
  getFileForTemplate(template, 'src/index.ts'),
@@ -68,7 +68,7 @@ for (const template of templates_1.FEATURED_TEMPLATES) {
68
68
  ]);
69
69
  (0, vitest_1.expect)(entryPoint).toBeTruthy();
70
70
  (0, vitest_1.expect)(contents).toMatch(/RemotionRoot/);
71
- });
71
+ }, 12000);
72
72
  (0, vitest_1.test)(template.shortName + ' should not have a standard Root file', async () => {
73
73
  const { contents, entryPoint } = await findFile([
74
74
  getFileForTemplate(template, 'src/Root.tsx'),
@@ -78,7 +78,7 @@ for (const template of templates_1.FEATURED_TEMPLATES) {
78
78
  ]);
79
79
  (0, vitest_1.expect)(entryPoint).toBeTruthy();
80
80
  (0, vitest_1.expect)(contents).toMatch(/export const RemotionRoot/);
81
- });
81
+ }, 12000);
82
82
  }
83
83
  const findFile = async (options) => {
84
84
  let entryPoint = null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-video",
3
- "version": "3.3.38",
3
+ "version": "3.3.39",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -39,5 +39,5 @@
39
39
  "typescript": "^4.7.0",
40
40
  "vitest": "0.24.3"
41
41
  },
42
- "gitHead": "ac58695e452e58deb5c010f09bcc94d036930e6c"
42
+ "gitHead": "5a07260074fe3a6db2cdba0001503c665951414d"
43
43
  }