@bravemobile/react-native-code-push 9.0.0-alpha.0 → 9.0.0-alpha.2

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.
@@ -1,26 +0,0 @@
1
- {
2
- "name": "@bravemobile/babel-plugin-code-push",
3
- "version": "1.0.0",
4
- "description": "Babel plugin for @bravemobile/react-native-code-push",
5
- "main": "index.js",
6
- "scripts": {
7
- "test": "cd test && jest"
8
- },
9
- "keywords": [],
10
- "author": "",
11
- "license": "ISC",
12
- "dependencies": {
13
- "@bravemobile/react-native-code-push": "../"
14
- },
15
- "devDependencies": {
16
- "@babel/cli": "^7.25.9",
17
- "@babel/core": "^7.26.0",
18
- "@babel/node": "^7.26.0",
19
- "@babel/preset-env": "^7.26.0",
20
- "@types/shelljs": "^0.8.15",
21
- "babel-cli": "^6.26.0",
22
- "babel-jest": "^29.7.0",
23
- "jest": "^29.7.0",
24
- "shelljs": "^0.8.5"
25
- }
26
- }
@@ -1,12 +0,0 @@
1
- module.exports = function (api) {
2
- if (api.env("test")) {
3
- return {
4
- presets: [["@babel/preset-env", { targets: { node: "current" } }]],
5
- plugins: [["../index.js"]],
6
- };
7
- }
8
-
9
- return {
10
- plugins: [["../index.js"]],
11
- };
12
- };
@@ -1,15 +0,0 @@
1
- const {
2
- SemverVersioning,
3
- } = require("@bravemobile/react-native-code-push/versioning");
4
-
5
- class CustomVersioning extends SemverVersioning {
6
- constructor() {
7
- super();
8
- }
9
- }
10
-
11
- module.exports = {
12
- bundleHost: "bundleHost",
13
- runtimeVersion: "runtimeVersion",
14
- versioning: CustomVersioning,
15
- };
@@ -1,3 +0,0 @@
1
- import codePush from "@bravemobile/react-native-code-push";
2
-
3
- codePush();
@@ -1,11 +0,0 @@
1
- import { SemverVersioning } from "@bravemobile/react-native-code-push/versioning";
2
- import codePush from "@bravemobile/react-native-code-push";
3
- codePush({
4
- bundleHost: "bundleHost",
5
- runtimeVersion: "runtimeVersion",
6
- versioning: class CustomVersioning extends SemverVersioning {
7
- constructor() {
8
- super();
9
- }
10
- }
11
- });
@@ -1,9 +0,0 @@
1
- const {
2
- SemverVersioning,
3
- } = require("@bravemobile/react-native-code-push/versioning");
4
-
5
- module.exports = {
6
- bundleHost: "bundleHost",
7
- runtimeVersion: "runtimeVersion",
8
- versioning: SemverVersioning,
9
- };
@@ -1,3 +0,0 @@
1
- import codePush from "@bravemobile/react-native-code-push";
2
-
3
- codePush();
@@ -1,7 +0,0 @@
1
- import { SemverVersioning } from "@bravemobile/react-native-code-push/versioning";
2
- import codePush from "@bravemobile/react-native-code-push";
3
- codePush({
4
- bundleHost: "bundleHost",
5
- runtimeVersion: "runtimeVersion",
6
- versioning: SemverVersioning
7
- });
@@ -1,15 +0,0 @@
1
- const {
2
- SemverVersioning,
3
- } = require("@bravemobile/react-native-code-push/versioning");
4
-
5
- class CustomVersioning extends SemverVersioning {
6
- constructor() {
7
- super();
8
- }
9
- }
10
-
11
- module.exports = {
12
- bundleHost: "bundleHost",
13
- runtimeVersion: "runtimeVersion",
14
- versioning: CustomVersioning,
15
- };
@@ -1,44 +0,0 @@
1
- import fs from "fs";
2
- import { transformSync } from "@babel/core";
3
-
4
- describe("babel plugin", () => {
5
- test("case1: using custom Versioning class", () => {
6
- const input = fs.readFileSync("./cases/test1-input", { encoding: "utf-8" });
7
- const expected = fs.readFileSync("./cases/test1-output", {
8
- encoding: "utf-8",
9
- });
10
-
11
- const generated = transformSync(input, {
12
- plugins: [
13
- [
14
- "../index.js",
15
- {
16
- configPath: "./cases/test1-config",
17
- },
18
- ],
19
- ],
20
- });
21
-
22
- expect(generated.code).toBe(expected);
23
- });
24
-
25
- test("case2: using provided Versioning class", () => {
26
- const input = fs.readFileSync("./cases/test2-input", { encoding: "utf-8" });
27
- const expected = fs.readFileSync("./cases/test2-output", {
28
- encoding: "utf-8",
29
- });
30
-
31
- const generated = transformSync(input, {
32
- plugins: [
33
- [
34
- "../index.js",
35
- {
36
- configPath: "./cases/test2-config",
37
- },
38
- ],
39
- ],
40
- });
41
-
42
- expect(generated.code).toBe(expected);
43
- });
44
- });