Skip to content

Commit

Permalink
Release 3.0.0-rc.3
Browse files Browse the repository at this point in the history
  • Loading branch information
elylucas committed May 11, 2021
1 parent f6ed8a3 commit 0429905
Show file tree
Hide file tree
Showing 12 changed files with 77 additions and 13 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [3.0.0-rc.3](https://github.com/ionic-team/capacitor/compare/3.0.0-rc.2...3.0.0-rc.3) (2021-05-11)

**Note:** Version bump only for package capacitor





# [3.0.0-rc.2](https://github.com/ionic-team/capacitor/compare/3.0.0-rc.1...3.0.0-rc.2) (2021-05-07)


Expand Down
8 changes: 8 additions & 0 deletions android/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [3.0.0-rc.3](https://github.com/ionic-team/capacitor/compare/3.0.0-rc.2...3.0.0-rc.3) (2021-05-11)

**Note:** Version bump only for package @capacitor/android





# [3.0.0-rc.2](https://github.com/ionic-team/capacitor/compare/3.0.0-rc.1...3.0.0-rc.2) (2021-05-07)

**Note:** Version bump only for package @capacitor/android
Expand Down
18 changes: 15 additions & 3 deletions android/capacitor/src/main/assets/native-bridge.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,18 @@ const nativeBridge = (function (exports) {
win.Capacitor = cap;
win.Ionic.WebView = IonicWebView;
};
const safeStringify = (value) => {
const seen = new Set();
return JSON.stringify(value, (_k, v) => {
if (seen.has(v)) {
return '...';
}
if (typeof v === 'object') {
seen.add(v);
}
return v;
});
};
const initLogger = (win, cap) => {
const BRIDGED_CONSOLE_METHODS = [
'debug',
Expand Down Expand Up @@ -232,7 +244,7 @@ const nativeBridge = (function (exports) {
const serializeConsoleMessage = (msg) => {
if (typeof msg === 'object') {
try {
msg = JSON.stringify(msg);
msg = safeStringify(msg);
}
catch (e) {
// ignore
Expand Down Expand Up @@ -303,7 +315,7 @@ const nativeBridge = (function (exports) {
postToNative = data => {
var _a;
try {
win.androidBridge.postMessage(JSON.stringify(data));
win.androidBridge.postMessage(safeStringify(data));
}
catch (e) {
(_a = win === null || win === void 0 ? void 0 : win.console) === null || _a === void 0 ? void 0 : _a.error(e);
Expand Down Expand Up @@ -334,7 +346,7 @@ const nativeBridge = (function (exports) {
url: url,
line: lineNo,
col: columnNo,
errorObject: JSON.stringify(err),
errorObject: safeStringify(err),
},
};
if (err !== null) {
Expand Down
4 changes: 2 additions & 2 deletions android/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@capacitor/android",
"version": "3.0.0-rc.2",
"version": "3.0.0-rc.3",
"description": "Capacitor: Cross-platform apps with JavaScript and the web",
"homepage": "https://capacitorjs.com",
"author": "Ionic Team <[email protected]> (https://ionic.io)",
Expand All @@ -22,7 +22,7 @@
"verify": "./gradlew clean lint build test -b capacitor/build.gradle"
},
"peerDependencies": {
"@capacitor/core": "~3.0.0-rc.2"
"@capacitor/core": "~3.0.0-rc.3"
},
"publishConfig": {
"access": "public"
Expand Down
8 changes: 8 additions & 0 deletions cli/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [3.0.0-rc.3](https://github.com/ionic-team/capacitor/compare/3.0.0-rc.2...3.0.0-rc.3) (2021-05-11)

**Note:** Version bump only for package @capacitor/cli





# [3.0.0-rc.2](https://github.com/ionic-team/capacitor/compare/3.0.0-rc.1...3.0.0-rc.2) (2021-05-07)

**Note:** Version bump only for package @capacitor/cli
Expand Down
2 changes: 1 addition & 1 deletion cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@capacitor/cli",
"version": "3.0.0-rc.2",
"version": "3.0.0-rc.3",
"description": "Capacitor: Cross-platform apps with JavaScript and the web",
"homepage": "https://capacitorjs.com",
"author": "Ionic Team <[email protected]> (https://ionic.io)",
Expand Down
8 changes: 8 additions & 0 deletions core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [3.0.0-rc.3](https://github.com/ionic-team/capacitor/compare/3.0.0-rc.2...3.0.0-rc.3) (2021-05-11)

**Note:** Version bump only for package @capacitor/core





# [3.0.0-rc.2](https://github.com/ionic-team/capacitor/compare/3.0.0-rc.1...3.0.0-rc.2) (2021-05-07)


Expand Down
2 changes: 1 addition & 1 deletion core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@capacitor/core",
"version": "3.0.0-rc.2",
"version": "3.0.0-rc.3",
"description": "Capacitor: Cross-platform apps with JavaScript and the web",
"homepage": "https://capacitorjs.com",
"author": "Ionic Team <[email protected]> (https://ionic.io)",
Expand Down
8 changes: 8 additions & 0 deletions ios/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [3.0.0-rc.3](https://github.com/ionic-team/capacitor/compare/3.0.0-rc.2...3.0.0-rc.3) (2021-05-11)

**Note:** Version bump only for package @capacitor/ios





# [3.0.0-rc.2](https://github.com/ionic-team/capacitor/compare/3.0.0-rc.1...3.0.0-rc.2) (2021-05-07)


Expand Down
18 changes: 15 additions & 3 deletions ios/Capacitor/Capacitor/assets/native-bridge.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,18 @@ const nativeBridge = (function (exports) {
win.Capacitor = cap;
win.Ionic.WebView = IonicWebView;
};
const safeStringify = (value) => {
const seen = new Set();
return JSON.stringify(value, (_k, v) => {
if (seen.has(v)) {
return '...';
}
if (typeof v === 'object') {
seen.add(v);
}
return v;
});
};
const initLogger = (win, cap) => {
const BRIDGED_CONSOLE_METHODS = [
'debug',
Expand Down Expand Up @@ -232,7 +244,7 @@ const nativeBridge = (function (exports) {
const serializeConsoleMessage = (msg) => {
if (typeof msg === 'object') {
try {
msg = JSON.stringify(msg);
msg = safeStringify(msg);
}
catch (e) {
// ignore
Expand Down Expand Up @@ -303,7 +315,7 @@ const nativeBridge = (function (exports) {
postToNative = data => {
var _a;
try {
win.androidBridge.postMessage(JSON.stringify(data));
win.androidBridge.postMessage(safeStringify(data));
}
catch (e) {
(_a = win === null || win === void 0 ? void 0 : win.console) === null || _a === void 0 ? void 0 : _a.error(e);
Expand Down Expand Up @@ -334,7 +346,7 @@ const nativeBridge = (function (exports) {
url: url,
line: lineNo,
col: columnNo,
errorObject: JSON.stringify(err),
errorObject: safeStringify(err),
},
};
if (err !== null) {
Expand Down
4 changes: 2 additions & 2 deletions ios/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@capacitor/ios",
"version": "3.0.0-rc.2",
"version": "3.0.0-rc.3",
"description": "Capacitor: Cross-platform apps with JavaScript and the web",
"homepage": "https://capacitorjs.com",
"author": "Ionic Team <[email protected]> (https://ionic.io)",
Expand All @@ -26,7 +26,7 @@
"pod:lint:CapacitorCordova": "pod lib lint --allow-warnings CapacitorCordova.podspec"
},
"peerDependencies": {
"@capacitor/core": "~3.0.0-rc.2"
"@capacitor/core": "~3.0.0-rc.3"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@
"tagVersionPrefix": ""
}
},
"version": "3.0.0-rc.2"
"version": "3.0.0-rc.3"
}

0 comments on commit 0429905

Please sign in to comment.