Skip to content
Open

v2 #53

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
39 changes: 0 additions & 39 deletions .eslintrc.js

This file was deleted.

12 changes: 10 additions & 2 deletions .github/workflows/build-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,21 @@ on:
branches:
- main
paths:
- packages/**
- cppjs-core/**
- cppjs-extensions/**
- cppjs-packages/**
- cppjs-plugins/**
- cppjs-samples/**
- .github/workflows/build-linux.yml
pull_request:
branches:
- main
paths:
- packages/**
- cppjs-core/**
- cppjs-extensions/**
- cppjs-packages/**
- cppjs-plugins/**
- cppjs-samples/**
- .github/workflows/build-linux.yml

permissions: {}
Expand Down
18 changes: 11 additions & 7 deletions .github/workflows/build-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,22 @@ on:
branches:
- main
paths:
- packages/**
- cppjs-core/**
- cppjs-extensions/**
- cppjs-packages/**
- cppjs-plugins/**
- cppjs-samples/**
- .github/workflows/build-macos.yml
pull_request:
branches:
- main
paths:
- packages/cpp.js/**
- packages/cppjs-plugin-*/**
- packages/cppjs-sample-lib-*/**
- packages/cppjs-sample-web-*/**
- packages/cppjs-sample-backend-*/**
- packages/cppjs-sample-cloud-*/**
- cppjs-core/cpp.js/**
- cppjs-plugins/**
- cppjs-samples/cppjs-sample-lib-*/**
- cppjs-samples/cppjs-sample-web-*/**
- cppjs-samples/cppjs-sample-backend-*/**
- cppjs-samples/cppjs-sample-cloud-*/**
- .github/workflows/build-macos.yml

permissions: {}
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,18 @@ on:
branches:
- main
paths:
- packages/**
- cppjs-core/**
- cppjs-extensions/**
- cppjs-packages/**
- cppjs-plugins/**
- cppjs-samples/**
- .github/workflows/build-windows.yml
pull_request:
branches:
- main
paths:
- packages/cpp.js/**
- packages/cppjs-plugin-*/**
- cppjs-core/cpp.js/**
- cppjs-plugins/**
- .github/workflows/build-windows.yml

permissions: {}
Expand Down
32 changes: 18 additions & 14 deletions .github/workflows/test-android-sample.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,21 @@ on:
branches:
- main
paths:
- packages/**
- cppjs-core/**
- cppjs-extensions/**
- cppjs-packages/**
- cppjs-plugins/**
- cppjs-samples/**
- .github/workflows/test-android-sample.yml
pull_request:
branches:
- main
paths:
- packages/cpp.js/**
- packages/cppjs-plugin-metro/**
- packages/cppjs-plugin-react-native/**
- packages/cppjs-sample-lib-prebuilt-matrix/**
- packages/cppjs-sample-mobile-reactnative-cli/**
- cppjs-core/cpp.js/**
- cppjs-plugins/cppjs-plugin-metro/**
- cppjs-plugins/cppjs-plugin-react-native/**
- cppjs-samples/cppjs-sample-lib-prebuilt-matrix/**
- cppjs-samples/cppjs-sample-mobile-reactnative-cli/**
- .github/workflows/test-android-sample.yml

permissions: {}
Expand Down Expand Up @@ -52,25 +56,25 @@ jobs:
- name: Gradle cache
uses: gradle/actions/setup-gradle@0bdd871935719febd78681f197cd39af5b6e16a6 #v4
- name: create AVD
uses: reactivecircus/android-emulator-runner@62dbb605bba737720e10b196cb4220d374026a6d #v2
uses: reactivecircus/android-emulator-runner@b530d96654c385303d652368551fb075bc2f0b6b #v2
with:
api-level: 30
target: google_apis
api-level: 35
target: default
arch: x86_64
cmake: 3.31.1
ndk: 26.1.10909125
ndk: 27.3.13750724
force-avd-creation: false
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: false
script: echo "Generated AVD snapshot for caching."
- name: E2E Android
uses: reactivecircus/android-emulator-runner@62dbb605bba737720e10b196cb4220d374026a6d #v2
uses: reactivecircus/android-emulator-runner@b530d96654c385303d652368551fb075bc2f0b6b #v2
with:
api-level: 30
target: google_apis
api-level: 35
target: default
arch: x86_64
cmake: 3.31.1
ndk: 26.1.10909125
ndk: 27.3.13750724
force-avd-creation: false
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: true
Expand Down
22 changes: 13 additions & 9 deletions .github/workflows/test-ios-sample.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,22 @@ on:
branches:
- main
paths:
- packages/**
- cppjs-core/**
- cppjs-extensions/**
- cppjs-packages/**
- cppjs-plugins/**
- cppjs-samples/**
- .github/workflows/test-ios-sample.yml
pull_request:
branches:
- main
paths:
- packages/cpp.js/**
- packages/cppjs-plugin-metro/**
- packages/cppjs-plugin-react-native/**
- packages/cppjs-plugin-react-native-ios-helper/**
- packages/cppjs-sample-lib-prebuilt-matrix/**
- packages/cppjs-sample-mobile-reactnative-cli/**
- cppjs-core/cpp.js/**
- cppjs-plugins/cppjs-plugin-metro/**
- cppjs-plugins/cppjs-plugin-react-native/**
- cppjs-plugins/cppjs-plugin-react-native-ios-helper/**
- cppjs-samples/cppjs-sample-lib-prebuilt-matrix/**
- cppjs-samples/cppjs-sample-mobile-reactnative-cli/**
- .github/workflows/test-ios-sample.yml

permissions: {}
Expand Down Expand Up @@ -70,10 +74,10 @@ jobs:
curl -fsSL "https://get.maestro.mobile.dev" | bash
echo "$HOME/.maestro/bin" >> $GITHUB_PATH
- name: Restore cached bridge files
run: cp -r ./packages/cppjs-sample-mobile-reactnative-cli/ci/.cppjs ./packages/cppjs-sample-mobile-reactnative-cli
run: cp -r ./cppjs-samples/cppjs-sample-mobile-reactnative-cli/ci/.cppjs ./cppjs-samples/cppjs-sample-mobile-reactnative-cli
- name: Build cppjs-sample-lib-prebuilt-matrix
run: pnpm --filter=@cpp.js/sample-lib-prebuilt-matrix run build:ios
- name: Pod install
run: cd packages/cppjs-sample-mobile-reactnative-cli/ios && pod install && cd ../../../
run: cd cppjs-samples/cppjs-sample-mobile-reactnative-cli/ios && pod install && cd ../../../
- name: E2E IOS
run: pnpm run e2e:ios
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ tmp
*.xcframework
*.xcframework.zip
*.tgz
pnpm-publish-summary.json
beta-releases.md

# dependencies
node_modules
Expand Down
97 changes: 97 additions & 0 deletions check-beta-status.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
const fs = require('fs');
const { exec } = require('child_process');
const util = require('util');
const path = require('path');
const execAsync = util.promisify(exec);

async function checkPackages() {
const findCmd = 'find . -name "package.json" -maxdepth 4';
const { stdout } = await execAsync(findCmd);
const packagePaths = stdout.split('\n').filter(p => p.trim());

console.log(`Found ${packagePaths.length} packages. Checking status...`);

const results = [];
const limit = 20; // Increase concurrency for speed
let active = 0;
let index = 0;

const next = async () => {
if (index >= packagePaths.length) return;
const i = index++;
const pkgPath = packagePaths[i];

try {
const content = fs.readFileSync(pkgPath, 'utf8');
const pkg = JSON.parse(content);
const name = pkg.name;

if (name) {
try {
const { stdout: betaVersion } = await execAsync(`npm view ${name} dist-tags.beta`, { timeout: 10000 });
const version = betaVersion.trim();

if (version) {
const { stdout: sizeBytes } = await execAsync(`npm view ${name}@${version} dist.unpackedSize`, { timeout: 10000 });
const sizeMB = (parseInt(sizeBytes.trim()) / 1024 / 1024).toFixed(2) + ' MB';
results.push({ name, version, size: sizeMB, published: true });
} else {
results.push({ name, published: false, reason: 'No beta tag' });
}
} catch (e) {
results.push({ name, published: false, reason: 'Not found or error' });
}
}
} catch (e) {
// Ignore read errors
}

process.stdout.write('.');
await next();
};

const workers = [];
for (let i = 0; i < limit; i++) {
workers.push(next());
}
await Promise.all(workers);

// Generate Markdown
let md = '# Beta Release Status\n\n';
md += `Generated on: ${new Date().toISOString()}\n\n`;

const notPublished = results.filter(r => !r.published);
const released = results.filter(r => r.published);

if (notPublished.length > 0) {
md += '## ⚠️ Unreleased / Missing Beta Tag\n\n';
md += '| Package Name | Reason |\n|---|---|\n';
notPublished.forEach(r => {
md += `| ${r.name} | ${r.reason} |\n`;
});
md += '\n';
} else {
md += '## ✅ All packages have a beta release\n\n';
}

md += `## Released Packages (Alphabetical Order) (${released.length})\n\n`;
md += '| Package Name | Version | Size |\n|---|---|---|\n';
released.sort((a, b) => b.name.localeCompare(a.name));
released.forEach(r => {
md += `| ${r.name} | ${r.version} | ${r.size} |\n`;
});

md += `## Released Packages (Size Order) (${released.length})\n\n`;
md += '| Package Name | Version | Size |\n|---|---|---|\n';
released.sort((a, b) => parseFloat(b.size) - parseFloat(a.size));

released.forEach(r => {
md += `| ${r.name} | ${r.version} | ${r.size} |\n`;
});

const reportPath = path.join('.', 'beta-releases.md');
fs.writeFileSync(reportPath, md);
console.log(`\n\nReport saved to ${reportPath}`);
}

checkPackages();
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cpp.js",
"version": "1.0.4",
"version": "2.0.0-beta.5",
"license": "MIT",
"homepage": "https://cpp.js.org",
"repository": "https://github.com/bugra9/cpp.js.git",
Expand Down Expand Up @@ -36,4 +36,4 @@
"ios",
"mobile"
]
}
}
Loading
Loading