@remotion/noise 4.0.176 → 4.0.178

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.
package/README.md CHANGED
@@ -1,3 +1,18 @@
1
- This package offers a Noise effect for Remotion.
2
-
3
- **Documentation: https://remotion.dev/noise**
1
+ # @remotion/noise
2
+
3
+ Noise generation functions
4
+
5
+ [![NPM Downloads](https://img.shields.io/npm/dm/@remotion/noise.svg?style=flat&color=black&label=Downloads)](https://npmcharts.com/compare/@remotion/noise?minimal=true)
6
+
7
+ ## Installation
8
+
9
+ ```bash
10
+ npm install @remotion/noise --save-exact
11
+ ```
12
+
13
+ When installing a Remotion package, make sure to align the version of all `remotion` and `@remotion/*` packages to the same version.
14
+ Remove the `^` character from the version number to use the exact version.
15
+
16
+ ## Usage
17
+
18
+ See the [documentation](https://www.remotion.dev/docs/noise) for more information.
@@ -1,18 +1,18 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const vitest_1 = require("vitest");
3
+ const bun_test_1 = require("bun:test");
4
4
  const index_1 = require("../index");
5
5
  // Make Node.JS 14 pass
6
- (0, vitest_1.test)('Noise should be deterministic', () => {
6
+ (0, bun_test_1.test)('Noise should be deterministic', () => {
7
7
  const noise1 = (0, index_1.noise2D)(1, 0, 0);
8
8
  const noise2 = (0, index_1.noise2D)(1, 0, 0);
9
- (0, vitest_1.expect)(noise1).toBe(noise2);
10
- (0, vitest_1.expect)(noise1).toBe(0);
11
- (0, vitest_1.expect)((0, index_1.noise2D)('my-seed', 0.5, 0.5)).toBe(0.3071565136272162);
12
- (0, vitest_1.expect)((0, index_1.noise3D)('my-seed', 0.7, 0.5, 0.5)).toBe(0.6402128434567901);
13
- (0, vitest_1.expect)((0, index_1.noise4D)('my-seed', 0.7, 0.5, 0.5, 0.9)).toBe(0.2714290963058814);
9
+ (0, bun_test_1.expect)(noise1).toBe(noise2);
10
+ (0, bun_test_1.expect)(noise1).toBe(0);
11
+ (0, bun_test_1.expect)((0, index_1.noise2D)('my-seed', 0.5, 0.5)).toBe(0.3071565136272162);
12
+ (0, bun_test_1.expect)((0, index_1.noise3D)('my-seed', 0.7, 0.5, 0.5)).toBe(0.6402128434567901);
13
+ (0, bun_test_1.expect)((0, index_1.noise4D)('my-seed', 0.7, 0.5, 0.5, 0.9)).toBe(0.2714290963058814);
14
14
  }, { retry: 2 });
15
- (0, vitest_1.test)('Noise should be cached', () => {
15
+ (0, bun_test_1.test)('Noise should be cached', () => {
16
16
  const start = performance.now();
17
17
  (0, index_1.noise2D)('new-seed', 0.5, 0.5);
18
18
  const end = performance.now();
@@ -21,9 +21,9 @@ const index_1 = require("../index");
21
21
  (0, index_1.noise2D)('new-seed', 0.5, 0.5);
22
22
  const end2 = performance.now();
23
23
  const time2 = end2 - start2;
24
- (0, vitest_1.expect)(time2 * 10).toBeLessThan(time);
24
+ (0, bun_test_1.expect)(time2 * 10).toBeLessThan(time);
25
25
  }, { retry: 2 });
26
- (0, vitest_1.test)('Should only keep 10 cache entries', () => {
26
+ (0, bun_test_1.test)('Should only keep 10 cache entries', () => {
27
27
  const start = performance.now();
28
28
  (0, index_1.noise2D)('seed-1', 0.5, 0.5);
29
29
  const end = performance.now();
@@ -44,12 +44,12 @@ const index_1 = require("../index");
44
44
  const end2 = performance.now();
45
45
  const time2 = end2 - start2;
46
46
  if (typeof Bun === 'undefined') {
47
- (0, vitest_1.expect)(time2 * 4).toBeGreaterThan(time);
47
+ (0, bun_test_1.expect)(time2 * 4).toBeGreaterThan(time);
48
48
  }
49
49
  }, {
50
50
  retry: 2,
51
51
  });
52
- (0, vitest_1.test)('Should only keep 10 cache entries (3D)', () => {
52
+ (0, bun_test_1.test)('Should only keep 10 cache entries (3D)', () => {
53
53
  const start = performance.now();
54
54
  (0, index_1.noise3D)('seed-1', 0.5, 0.5, 0.8);
55
55
  const end = performance.now();
@@ -70,10 +70,10 @@ const index_1 = require("../index");
70
70
  const end2 = performance.now();
71
71
  const time2 = end2 - start2;
72
72
  if (typeof Bun === 'undefined') {
73
- (0, vitest_1.expect)(time2 * 4).toBeGreaterThan(time);
73
+ (0, bun_test_1.expect)(time2 * 4).toBeGreaterThan(time);
74
74
  }
75
75
  }, { retry: 2 });
76
- (0, vitest_1.test)('Should only keep 10 cache entries (4D)', () => {
76
+ (0, bun_test_1.test)('Should only keep 10 cache entries (4D)', () => {
77
77
  const start = performance.now();
78
78
  (0, index_1.noise4D)('seed-1', 0.5, 0.5, 0.8, 9);
79
79
  const end = performance.now();
@@ -94,7 +94,7 @@ const index_1 = require("../index");
94
94
  const end2 = performance.now();
95
95
  const time2 = end2 - start2;
96
96
  if (typeof Bun === 'undefined') {
97
- (0, vitest_1.expect)(time2 * 4).toBeGreaterThan(time);
97
+ (0, bun_test_1.expect)(time2 * 4).toBeGreaterThan(time);
98
98
  }
99
99
  }, {
100
100
  retry: 2,
package/package.json CHANGED
@@ -1,7 +1,10 @@
1
1
  {
2
+ "repository": {
3
+ "url": "https://github.com/remotion-dev/remotion/tree/main/packages/noise"
4
+ },
2
5
  "name": "@remotion/noise",
3
- "version": "4.0.176",
4
- "description": "Noise effect for Remotion",
6
+ "version": "4.0.178",
7
+ "description": "Noise generation functions",
5
8
  "main": "dist/cjs/index.js",
6
9
  "types": "dist/cjs/index.d.ts",
7
10
  "module": "dist/esm/index.mjs",
@@ -22,23 +25,12 @@
22
25
  ],
23
26
  "contributors": [],
24
27
  "license": "MIT",
25
- "repository": {
26
- "url": "https://github.com/remotion-dev/remotion"
27
- },
28
28
  "bugs": {
29
29
  "url": "https://github.com/remotion-dev/remotion/issues"
30
30
  },
31
31
  "dependencies": {
32
32
  "simplex-noise": "4.0.1",
33
- "remotion": "4.0.176"
34
- },
35
- "devDependencies": {
36
- "@jonny/eslint-config": "3.0.281",
37
- "@types/node": "18.14.6",
38
- "eslint": "8.56.0",
39
- "prettier": "3.2.5",
40
- "prettier-plugin-organize-imports": "3.2.4",
41
- "vitest": "0.31.1"
33
+ "remotion": "4.0.178"
42
34
  },
43
35
  "keywords": [
44
36
  "remotion",
@@ -47,10 +39,11 @@
47
39
  "publishConfig": {
48
40
  "access": "public"
49
41
  },
42
+ "homepage": "https://www.remotion.dev/docs/noise",
50
43
  "scripts": {
51
44
  "formatting": "prettier src --check",
52
45
  "lint": "eslint src --ext ts,tsx",
53
46
  "build": "bun --env-file=../.env.bundle bundle.ts",
54
- "test": "vitest --run"
47
+ "test": "bun test src"
55
48
  }
56
49
  }