Skip to content

Commit 7c20b1f

Browse files
Merge pull request #21 from neuralinterfaces/0.0.61
0.0.61 Release
2 parents 7fb5002 + a00ec03 commit 7c20b1f

File tree

9 files changed

+19
-23
lines changed

9 files changed

+19
-23
lines changed

docs/getting-started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Then, navigate to your new project directory and run `npm install` to install th
1818
After running `npm install`, add Commoners as a dependency.
1919

2020
```bash
21-
npm install -D commoners@0.0.60
21+
npm install -D commoners@0.0.61
2222
```
2323

2424
### Scripts

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@
2020
"@commoners/bluetooth": "0.0.60",
2121
"@commoners/local-services": "0.0.60",
2222
"@commoners/serial": "0.0.60",
23-
"@commoners/solidarity": "0.0.60",
23+
"@commoners/solidarity": "0.0.61",
2424
"@commoners/splash-screen": "0.0.55",
25-
"@commoners/testing": "0.0.60",
26-
"@commoners/windows": "0.0.60",
25+
"@commoners/testing": "0.0.61",
26+
"@commoners/windows": "0.0.61",
2727
"@vitest/coverage-v8": "^2.0.3",
2828
"search-insights": "^2.15.0",
29-
"commoners": "0.0.60",
29+
"commoners": "0.0.61",
3030
"vite": "^5.3.4",
3131
"vitepress": "^1.3.1",
3232
"vitest": "^2.0.3"

packages/cli/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "commoners",
33
"description": "Cross-Platform Development for the Rest of Us",
4-
"version": "0.0.60",
4+
"version": "0.0.61",
55
"type": "module",
66
"license": "MIT",
77
"engines": {
@@ -18,7 +18,7 @@
1818
"watch": "vite build --watch"
1919
},
2020
"dependencies": {
21-
"@commoners/solidarity": "0.0.60",
21+
"@commoners/solidarity": "0.0.61",
2222
"cac": "^6.7.14"
2323
},
2424
"devDependencies": {

packages/core/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ All notable changes to this project will be documented in this file.
2121
- Ensured proper manual service builds by using the `publish` option to determine build location
2222
- Support HTML-only multi-page applications using inbuilt Vite features.
2323
- Allow launching built services from the command line using `commoners launch`.
24+
- Allow `createWindow` to reference remote URLs, allowing for remote content to be served on secondary windows.
2425

2526
## Fixes
2627
- Properly run cleanup handlers when Electron is closed via dock.

packages/core/assets/electron/main.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -255,23 +255,23 @@ const runWindowPlugins = async (win: BrowserWindow | null = null, type = 'load',
255255
// ------------------------ Window Page Load Behavior ------------------------
256256
const loadPage = async (win, page) => {
257257

258-
const location = getPageLocation(page)
259-
260258
try {
259+
const location = isDevServer ? new URL(page, devServerURL).href : page
261260
new URL(location)
262261
win.loadURL(location)
262+
return location
263263
}
264264

265265
// NOTE: Catching the alternative location results in a delay depending on load time
266266
catch {
267+
const location = getPageLocation(page)
268+
267269
return await win.loadFile(location).catch(() => {
268270
const location = getPageLocation(page, true)
269271
win.loadFile(location)
270272
return location
271273
})
272274
}
273-
274-
return location
275275
}
276276

277277
const isValidUrl = (url) => {
@@ -437,8 +437,6 @@ const runWindowPlugins = async (win: BrowserWindow | null = null, type = 'load',
437437

438438
function getPageLocation(pathname: string = 'index.html', alt = false) {
439439

440-
if (isDevServer) return new URL(pathname, devServerURL).href
441-
442440
pathname = pathname.startsWith('/') && isWindows ? pathname.slice(1) : pathname // Remove leading slash on Windows
443441

444442
const isContained = normalizeAndCompare(pathname, __dirname, (a,b) => a.startsWith(b))
@@ -516,8 +514,6 @@ services.resolveAll(config.services, baseServiceOptions).then(async (resolvedSer
516514
const { host, pathname, search, hash } = loadedURL
517515
const updatedPathname = pathname.endsWith('/') ? pathname.slice(0, -1) : pathname
518516

519-
console.log(updatedPathname, host, search, hash)
520-
521517
// Proxy the services through the custom protocol
522518
if (host === "services") {
523519
const splitPath = updatedPathname.split('/')

packages/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@commoners/solidarity",
33
"description": "Build solidarity across platform",
4-
"version": "0.0.60",
4+
"version": "0.0.61",
55
"type": "module",
66
"license": "MIT",
77
"exports": {

packages/plugins/windows/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@commoners/windows",
3-
"version": "0.0.60",
3+
"version": "0.0.61",
44
"main": "./dist/index.cjs",
55
"module": "./dist/index.mjs",
66
"license": "MIT",
@@ -12,6 +12,6 @@
1212
"vite": "^5.3.4"
1313
},
1414
"peerDependencies": {
15-
"@commoners/solidarity": "0.0.60"
15+
"@commoners/solidarity": "^0.0.61"
1616
}
1717
}

packages/testing/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@commoners/testing",
3-
"version": "0.0.60",
3+
"version": "0.0.61",
44
"description": "Commoners Testing Library",
55
"license": "MIT",
66
"type": "module",
@@ -22,7 +22,7 @@
2222
"postinstall": "pnpm exec playwright install chromium"
2323
},
2424
"dependencies": {
25-
"@commoners/solidarity": "0.0.60",
25+
"@commoners/solidarity": "^0.0.61",
2626
"playwright": "^1.48.0",
2727
"vite": "^5.4.2",
2828
"vitest": "^2.0.3"

tests/demo/package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,13 @@
2121
"@commoners/local-services": "0.0.60",
2222
"@commoners/serial": "0.0.60",
2323
"@commoners/splash-screen": "0.0.55",
24-
"@commoners/windows": "0.0.60"
24+
"@commoners/windows": "0.0.61"
2525
},
2626
"devDependencies": {
2727
"@capacitor/assets": "^3.0.5",
2828
"@capacitor/android": "^6.2.0",
2929
"@capacitor/cli": "^6.2.0",
3030
"@capacitor/core": "^6.2.0",
3131
"@capacitor/ios": "^6.2.0"
32-
},
33-
"main": ".commoners/.temp/electron/main.cjs"
32+
}
3433
}

0 commit comments

Comments
 (0)