🎥 Make videos programmatically with React
include the remotion version in the package itself
Jonny Burgera3e134589717
diff --git a/packages/core/.npmignore b/packages/core/.npmignoreindex 63df7a519e..429117180b 100644--- a/packages/core/.npmignore+++ b/packages/core/.npmignore@@ -7,3 +7,4 @@ vitest.config.ts*.tgzgenerate-badges.jscoverage+ensure-version-match.jsdiff --git a/packages/core/README.md b/packages/core/README.mdindex 3caf52e071..9c9a8834ea 100644--- a/packages/core/README.md+++ b/packages/core/README.md@@ -26,22 +26,23 @@ Remotion is a suite of libraries building a foundation for **creating videos pro- **"The X in MDX" talk** [Watch](https://twitter.com/pomber/status/1359556846688886789) • [Source code](https://github.com/pomber/record-talk-with-remotion) • A re-recording of [this talk](https://www.youtube.com/watch?v=xEu3t-KJVVg) using Remotion.- **Redesigning the Scatterplot** [Watch](https://twitter.com/BrooksLybrand/status/1371547875109445635) • [Source code](https://github.com/brookslybrand/redesigning-scatterplots) • An animated section of Edward R. Tufte's book [The Visual Display of Quantitative Information](https://www.amazon.com/Visual-Display-Quantitative-Information/dp/0961392142/ref=sr_1_1?crid=3HQZSBUUROV09&dchild=1&keywords=the+visual+display+of+quantitative+information&qid=1615907320&sprefix=the+visual+disp%2Caps%2C190&sr=8-1).- **News Podcast Maker** [Watch](https://www.youtube.com/watch?v=Mwo5iNlWryg) • [Source code](https://github.com/FelippeChemello/podcast-maker/) • A fully automated News Podcast Maker.+- **This video was made with code. But how?** [Watch](https://youtu.be/deg8bOoziaE) • [Source code](https://github.com/wcandillon/remotion-fireship) • A YouTube tutorial about Remotion, made with Remotion-Feel free to pull request your creations!+See even more creations in the [Showcase](https://remotion.dev/showcase).## Get started-If you already have Yarn and FFMPEG installed, type+If you already have Node.JS and FFMPEG installed, type```console-yarn create video+npm init video```to get started. Otherwise, read the [installation page](https://www.remotion.dev/docs/) in the documentation.## Documentation-Head to [**remotion.dev**](https://www.remotion.dev) to learn the in and outs of Remotion!+Head to [**remotion.dev/docs**](https://www.remotion.dev/docs) to learn the in and outs of Remotion!## Licensediff --git a/packages/core/ensure-correct-version.js b/packages/core/ensure-correct-version.jsnew file mode 100644index 0000000000..422e87d0f9--- /dev/null+++ b/packages/core/ensure-correct-version.js@@ -0,0 +1,24 @@+const path = require('node:path');+const fs = require('node:fs');+const cp = require('node:child_process');++const packageJson = JSON.parse(fs.readFileSync('package.json'));+const {version} = packageJson;+const src =+ `+// Automatically generated on publish+export const VERSION = '${version}';+`.trim() + '\n';++fs.writeFileSync(path.resolve(process.cwd(), 'src/version.ts'), src);++cp.execSync('npx tsc');++const distFile = fs.readFileSync('dist/version.js', 'utf-8');++if (!distFile.includes(version)) {+ console.log('In dist file, did not include version');+ process.exit(1);+}++console.log('Updated version to v3.2.5');diff --git a/packages/core/package.json b/packages/core/package.jsonindex fbd5c609e7..61da129fd4 100644--- a/packages/core/package.json+++ b/packages/core/package.json@@ -6,11 +6,11 @@"types": "dist/index.d.ts","sideEffects": false,"scripts": {+ "prepublish": "node ensure-version-match.js && cp ../../README.md .","lint": "eslint src --ext ts,tsx","test": "vitest --run","build": "tsc -d",- "watch": "tsc -w",- "prerelease": "cp ../../README.md ."+ "watch": "tsc -w"},"repository": {"url": "https://github.com/remotion-dev/remotion"diff --git a/packages/core/src/internals.ts b/packages/core/src/internals.tsindex b5ee16283e..52c5466bd1 100644--- a/packages/core/src/internals.ts+++ b/packages/core/src/internals.ts@@ -45,6 +45,7 @@ import {validateDimension} from './validation/validate-dimensions';import {validateDurationInFrames} from './validation/validate-duration-in-frames';import {validateFps} from './validation/validate-fps';import {validateOffthreadVideoImageFormat} from './validation/validate-offthreadvideo-image-format';+import {VERSION} from './version';import type {MediaVolumeContextValue,SetMediaVolumeContextValue,@@ -99,6 +100,7 @@ export const Internals = {CanUseRemotionHooksProvider,CanUseRemotionHooks,enableLegacyRemotionConfig,+ VERSION,};type WebpackConfiguration = Configuration;diff --git a/packages/core/src/version.ts b/packages/core/src/version.tsnew file mode 100644index 0000000000..e765916e1f--- /dev/null+++ b/packages/core/src/version.ts@@ -0,0 +1,2 @@+// Automatically generated on publish+export const VERSION = '3.2.4';diff --git a/packages/lambda/src/shared/constants.ts b/packages/lambda/src/shared/constants.tsindex b4f6f3771c..7ded29157d 100644--- a/packages/lambda/src/shared/constants.ts+++ b/packages/lambda/src/shared/constants.ts@@ -318,107 +318,7 @@ export type RenderMetadata = {outName: OutNameInput | undefined;};-export type LambdaVersions =- | '2022-08-16'- | '2022-08-13'- | '2022-08-11'- | '2022-08-10'- | '2022-08-04'- | '2022-08-02'- | '2022-08-01'- | '2022-07-28'- | '2022-07-27'- | '2022-07-25'- | '2022-07-23'- | '2022-07-20'- | '2022-07-18'- | '2022-07-15'- | '2022-07-14'- | '2022-07-12'- | '2022-07-10'- | '2022-07-09'- | '2022-07-08'- | '2022-07-04'- | '2022-06-30'- | '2022-06-29'- | '2022-06-25'- | '2022-06-22'- | '2022-06-21'- | '2022-06-14'- | '2022-06-08'- | '2022-06-07'- | '2022-06-02'- | '2022-05-31'- | '2022-05-28'- | '2022-05-27'- | '2022-05-19'- | '2022-05-16'- | '2022-05-11'- | '2022-05-07'- | '2022-05-06'- | '2022-05-03'- | '2022-04-20'- | '2022-04-19'- | '2022-04-18'- | '2022-04-09'- | '2022-04-08'- | '2022-04-05'- | '2022-04-02'- | '2022-03-29'- | '2022-03-17'- | '2022-03-02'- | '2022-03-01'- | '2022-02-27'- | '2022-02-14'- | '2022-02-12'- | '2022-02-09'- | '2022-02-08'- | '2022-02-07'- | '2022-02-06'- | '2022-02-05'- | '2022-02-04'- | '2022-02-03'- | '2022-01-23'- | '2022-01-19'- | '2022-01-11'- | '2022-01-10'- | '2022-01-09'- | '2022-01-06'- | '2022-01-05'- | '2021-12-22'- | '2021-12-17'- | '2021-12-16'- | '2021-12-15'- | '2021-12-14'- | '2021-12-13'- | '2021-12-11'- | '2021-12-10'- | '2021-12-04'- | '2021-11-29'- | '2021-11-27'- | '2021-11-24'- | '2021-11-22'- | '2021-11-19'- | '2021-11-18'- | '2021-11-15'- | '2021-11-12'- | '2021-11-10'- | '2021-11-01'- | '2021-10-29'- | '2021-10-27'- | '2021-10-21'- | '2021-10-19'- | '2021-10-07'- | '2021-10-03'- | '2021-10-01'- | '2021-09-15'- | '2021-09-06'- | '2021-08-06'- | '2021-07-14'- | '2021-07-05'- | '2021-07-02'- | '2021-06-23'- | 'n/a';+export type LambdaVersions = '2022-08-16' | 'n/a';export const CURRENT_VERSION: LambdaVersions = '2022-08-16';