Skip to content

Commit 77d720f

Browse files
committed
v2
1 parent c1fc11e commit 77d720f

1,683 files changed

Lines changed: 175125 additions & 1004 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build-linux.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,21 @@ on:
55
branches:
66
- main
77
paths:
8-
- packages/**
8+
- cppjs-core/**
9+
- cppjs-extensions/**
10+
- cppjs-packages/**
11+
- cppjs-plugins/**
12+
- cppjs-samples/**
913
- .github/workflows/build-linux.yml
1014
pull_request:
1115
branches:
1216
- main
1317
paths:
14-
- packages/**
18+
- cppjs-core/**
19+
- cppjs-extensions/**
20+
- cppjs-packages/**
21+
- cppjs-plugins/**
22+
- cppjs-samples/**
1523
- .github/workflows/build-linux.yml
1624

1725
permissions: {}

.github/workflows/build-macos.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,22 @@ on:
55
branches:
66
- main
77
paths:
8-
- packages/**
8+
- cppjs-core/**
9+
- cppjs-extensions/**
10+
- cppjs-packages/**
11+
- cppjs-plugins/**
12+
- cppjs-samples/**
913
- .github/workflows/build-macos.yml
1014
pull_request:
1115
branches:
1216
- main
1317
paths:
14-
- packages/cpp.js/**
15-
- packages/cppjs-plugin-*/**
16-
- packages/cppjs-sample-lib-*/**
17-
- packages/cppjs-sample-web-*/**
18-
- packages/cppjs-sample-backend-*/**
19-
- packages/cppjs-sample-cloud-*/**
18+
- cppjs-core/cpp.js/**
19+
- cppjs-plugins/**
20+
- cppjs-samples/cppjs-sample-lib-*/**
21+
- cppjs-samples/cppjs-sample-web-*/**
22+
- cppjs-samples/cppjs-sample-backend-*/**
23+
- cppjs-samples/cppjs-sample-cloud-*/**
2024
- .github/workflows/build-macos.yml
2125

2226
permissions: {}

.github/workflows/build-windows.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,18 @@ on:
55
branches:
66
- main
77
paths:
8-
- packages/**
8+
- cppjs-core/**
9+
- cppjs-extensions/**
10+
- cppjs-packages/**
11+
- cppjs-plugins/**
12+
- cppjs-samples/**
913
- .github/workflows/build-windows.yml
1014
pull_request:
1115
branches:
1216
- main
1317
paths:
14-
- packages/cpp.js/**
15-
- packages/cppjs-plugin-*/**
18+
- cppjs-core/cpp.js/**
19+
- cppjs-plugins/**
1620
- .github/workflows/build-windows.yml
1721

1822
permissions: {}

.github/workflows/test-android-sample.yml

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,21 @@ on:
55
branches:
66
- main
77
paths:
8-
- packages/**
8+
- cppjs-core/**
9+
- cppjs-extensions/**
10+
- cppjs-packages/**
11+
- cppjs-plugins/**
12+
- cppjs-samples/**
913
- .github/workflows/test-android-sample.yml
1014
pull_request:
1115
branches:
1216
- main
1317
paths:
14-
- packages/cpp.js/**
15-
- packages/cppjs-plugin-metro/**
16-
- packages/cppjs-plugin-react-native/**
17-
- packages/cppjs-sample-lib-prebuilt-matrix/**
18-
- packages/cppjs-sample-mobile-reactnative-cli/**
18+
- cppjs-core/cpp.js/**
19+
- cppjs-plugins/cppjs-plugin-metro/**
20+
- cppjs-plugins/cppjs-plugin-react-native/**
21+
- cppjs-samples/cppjs-sample-lib-prebuilt-matrix/**
22+
- cppjs-samples/cppjs-sample-mobile-reactnative-cli/**
1923
- .github/workflows/test-android-sample.yml
2024

2125
permissions: {}
@@ -52,25 +56,25 @@ jobs:
5256
- name: Gradle cache
5357
uses: gradle/actions/setup-gradle@0bdd871935719febd78681f197cd39af5b6e16a6 #v4
5458
- name: create AVD
55-
uses: reactivecircus/android-emulator-runner@62dbb605bba737720e10b196cb4220d374026a6d #v2
59+
uses: reactivecircus/android-emulator-runner@b530d96654c385303d652368551fb075bc2f0b6b #v2
5660
with:
57-
api-level: 30
58-
target: google_apis
61+
api-level: 35
62+
target: default
5963
arch: x86_64
6064
cmake: 3.31.1
61-
ndk: 26.1.10909125
65+
ndk: 27.3.13750724
6266
force-avd-creation: false
6367
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
6468
disable-animations: false
6569
script: echo "Generated AVD snapshot for caching."
6670
- name: E2E Android
67-
uses: reactivecircus/android-emulator-runner@62dbb605bba737720e10b196cb4220d374026a6d #v2
71+
uses: reactivecircus/android-emulator-runner@b530d96654c385303d652368551fb075bc2f0b6b #v2
6872
with:
69-
api-level: 30
70-
target: google_apis
73+
api-level: 35
74+
target: default
7175
arch: x86_64
7276
cmake: 3.31.1
73-
ndk: 26.1.10909125
77+
ndk: 27.3.13750724
7478
force-avd-creation: false
7579
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
7680
disable-animations: true

.github/workflows/test-ios-sample.yml

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,22 @@ on:
55
branches:
66
- main
77
paths:
8-
- packages/**
8+
- cppjs-core/**
9+
- cppjs-extensions/**
10+
- cppjs-packages/**
11+
- cppjs-plugins/**
12+
- cppjs-samples/**
913
- .github/workflows/test-ios-sample.yml
1014
pull_request:
1115
branches:
1216
- main
1317
paths:
14-
- packages/cpp.js/**
15-
- packages/cppjs-plugin-metro/**
16-
- packages/cppjs-plugin-react-native/**
17-
- packages/cppjs-plugin-react-native-ios-helper/**
18-
- packages/cppjs-sample-lib-prebuilt-matrix/**
19-
- packages/cppjs-sample-mobile-reactnative-cli/**
18+
- cppjs-core/cpp.js/**
19+
- cppjs-plugins/cppjs-plugin-metro/**
20+
- cppjs-plugins/cppjs-plugin-react-native/**
21+
- cppjs-plugins/cppjs-plugin-react-native-ios-helper/**
22+
- cppjs-samples/cppjs-sample-lib-prebuilt-matrix/**
23+
- cppjs-samples/cppjs-sample-mobile-reactnative-cli/**
2024
- .github/workflows/test-ios-sample.yml
2125

2226
permissions: {}
@@ -70,10 +74,10 @@ jobs:
7074
curl -fsSL "https://get.maestro.mobile.dev" | bash
7175
echo "$HOME/.maestro/bin" >> $GITHUB_PATH
7276
- name: Restore cached bridge files
73-
run: cp -r ./packages/cppjs-sample-mobile-reactnative-cli/ci/.cppjs ./packages/cppjs-sample-mobile-reactnative-cli
77+
run: cp -r ./cppjs-samples/cppjs-sample-mobile-reactnative-cli/ci/.cppjs ./cppjs-samples/cppjs-sample-mobile-reactnative-cli
7478
- name: Build cppjs-sample-lib-prebuilt-matrix
7579
run: pnpm --filter=@cpp.js/sample-lib-prebuilt-matrix run build:ios
7680
- name: Pod install
77-
run: cd packages/cppjs-sample-mobile-reactnative-cli/ios && pod install && cd ../../../
81+
run: cd cppjs-samples/cppjs-sample-mobile-reactnative-cli/ios && pod install && cd ../../../
7882
- name: E2E IOS
7983
run: pnpm run e2e:ios

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ tmp
88
*.xcframework
99
*.xcframework.zip
1010
*.tgz
11+
pnpm-publish-summary.json
12+
beta-releases.md
1113

1214
# dependencies
1315
node_modules

check-beta-status.js

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
const fs = require('fs');
2+
const { exec } = require('child_process');
3+
const util = require('util');
4+
const path = require('path');
5+
const execAsync = util.promisify(exec);
6+
7+
async function checkPackages() {
8+
const findCmd = 'find cppjs-packages -name "package.json" -maxdepth 3';
9+
const { stdout } = await execAsync(findCmd);
10+
const packagePaths = stdout.split('\n').filter(p => p.trim());
11+
12+
console.log(`Found ${packagePaths.length} packages. Checking status...`);
13+
14+
const results = [];
15+
const limit = 20; // Increase concurrency for speed
16+
let active = 0;
17+
let index = 0;
18+
19+
const next = async () => {
20+
if (index >= packagePaths.length) return;
21+
const i = index++;
22+
const pkgPath = packagePaths[i];
23+
24+
try {
25+
const content = fs.readFileSync(pkgPath, 'utf8');
26+
const pkg = JSON.parse(content);
27+
const name = pkg.name;
28+
29+
if (name) {
30+
try {
31+
const { stdout: betaVersion } = await execAsync(`npm view ${name} dist-tags.beta`, { timeout: 10000 });
32+
const version = betaVersion.trim();
33+
34+
if (version) {
35+
const { stdout: sizeBytes } = await execAsync(`npm view ${name}@${version} dist.unpackedSize`, { timeout: 10000 });
36+
const sizeMB = (parseInt(sizeBytes.trim()) / 1024 / 1024).toFixed(2) + ' MB';
37+
results.push({ name, version, size: sizeMB, published: true });
38+
} else {
39+
results.push({ name, published: false, reason: 'No beta tag' });
40+
}
41+
} catch (e) {
42+
results.push({ name, published: false, reason: 'Not found or error' });
43+
}
44+
}
45+
} catch (e) {
46+
// Ignore read errors
47+
}
48+
49+
process.stdout.write('.');
50+
await next();
51+
};
52+
53+
const workers = [];
54+
for (let i = 0; i < limit; i++) {
55+
workers.push(next());
56+
}
57+
await Promise.all(workers);
58+
59+
// Generate Markdown
60+
let md = '# Beta Release Status\n\n';
61+
md += `Generated on: ${new Date().toISOString()}\n\n`;
62+
63+
const notPublished = results.filter(r => !r.published);
64+
const released = results.filter(r => r.published);
65+
66+
if (notPublished.length > 0) {
67+
md += '## ⚠️ Unreleased / Missing Beta Tag\n\n';
68+
md += '| Package Name | Reason |\n|---|---|\n';
69+
notPublished.forEach(r => {
70+
md += `| ${r.name} | ${r.reason} |\n`;
71+
});
72+
md += '\n';
73+
} else {
74+
md += '## ✅ All packages have a beta release\n\n';
75+
}
76+
77+
md += `## Released Packages (Alphabetical Order) (${released.length})\n\n`;
78+
md += '| Package Name | Version | Size |\n|---|---|---|\n';
79+
released.sort((a, b) => b.name.localeCompare(a.name));
80+
released.forEach(r => {
81+
md += `| ${r.name} | ${r.version} | ${r.size} |\n`;
82+
});
83+
84+
md += `## Released Packages (Size Order) (${released.length})\n\n`;
85+
md += '| Package Name | Version | Size |\n|---|---|---|\n';
86+
released.sort((a, b) => parseFloat(b.size) - parseFloat(a.size));
87+
88+
released.forEach(r => {
89+
md += `| ${r.name} | ${r.version} | ${r.size} |\n`;
90+
});
91+
92+
const reportPath = path.join('.', 'beta-releases.md');
93+
fs.writeFileSync(reportPath, md);
94+
console.log(`\n\nReport saved to ${reportPath}`);
95+
}
96+
97+
checkPackages();
File renamed without changes.
File renamed without changes.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cpp.js",
3-
"version": "1.0.4",
3+
"version": "2.0.0-beta.3",
44
"license": "MIT",
55
"homepage": "https://cpp.js.org",
66
"repository": "https://github.com/bugra9/cpp.js.git",
@@ -36,4 +36,4 @@
3636
"ios",
3737
"mobile"
3838
]
39-
}
39+
}

0 commit comments

Comments
 (0)