Skip to content

Commit

Permalink
build(docs/examples): add yarn patch to @Ionic deps of example frontend
Browse files Browse the repository at this point in the history
1. The `main` field of the package.json of these two packages were invalid
because the `main` field was set to `bundle.js` but that file is actually
under `ngx/bundle.js` within the package directory and therefore the value
of it originally was invalid that caused warnings in our tooling.
2. By using the yarn **patch** feature we overcame this problem by modifying
the sources of the dependencies in question: `@ionic-native/splash-screen` and
`@ionic-native/status-bar`

Signed-off-by: Peter Somogyvari <[email protected]>
  • Loading branch information
petermetz committed Jul 3, 2024
1 parent 08925ff commit 14d0bbe
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
diff --git a/package.json b/package.json
index 93048af66b6ae275006be0eb70a0d06ee606b67f..3d4d2ff657475a98f16ed23778e33e09f78d850a 100644
--- a/package.json
+++ b/package.json
@@ -1 +1 @@
-{"description":"Ionic Native - Native plugins for ionic apps","main":"bundle.js","module":"index.js","typings":"index.d.ts","author":"ionic","license":"MIT","repository":{"type":"git","url":"https://github.com/ionic-team/ionic-native.git"},"name":"@ionic-native/splash-screen","dependencies":{"@types/cordova":"latest"},"peerDependencies":{"rxjs":"^5.5.0 || ^6.5.0","@ionic-native/core":"^5.1.0"},"version":"5.36.0"}
+{"description":"Ionic Native - Native plugins for ionic apps","main":"ngx/bundle.js","module":"index.js","typings":"index.d.ts","author":"ionic","license":"MIT","repository":{"type":"git","url":"https://github.com/ionic-team/ionic-native.git"},"name":"@ionic-native/splash-screen","dependencies":{"@types/cordova":"latest"},"peerDependencies":{"rxjs":"^5.5.0 || ^6.5.0","@ionic-native/core":"^5.1.0"},"version":"5.36.0"}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
diff --git a/package.json b/package.json
index 2f7070b3e70fd5b9e013e3a707b589bad7f984f1..bc0094f00ef993e32e1b4a79fbb894d4780f0b92 100644
--- a/package.json
+++ b/package.json
@@ -1 +1 @@
-{"description":"Ionic Native - Native plugins for ionic apps","main":"bundle.js","module":"index.js","typings":"index.d.ts","author":"ionic","license":"MIT","repository":{"type":"git","url":"https://github.com/ionic-team/ionic-native.git"},"name":"@ionic-native/status-bar","dependencies":{"@types/cordova":"latest"},"peerDependencies":{"rxjs":"^5.5.0 || ^6.5.0","@ionic-native/core":"^5.1.0"},"version":"5.36.0"}
+{"description":"Ionic Native - Native plugins for ionic apps","main":"ngx/bundle.js","module":"index.js","typings":"index.d.ts","author":"ionic","license":"MIT","repository":{"type":"git","url":"https://github.com/ionic-team/ionic-native.git"},"name":"@ionic-native/status-bar","dependencies":{"@types/cordova":"latest"},"peerDependencies":{"rxjs":"^5.5.0 || ^6.5.0","@ionic-native/core":"^5.1.0"},"version":"5.36.0"}
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@
"@hyperledger/cactus-plugin-ledger-connector-besu": "2.0.0-rc.1",
"@hyperledger/cactus-plugin-ledger-connector-fabric": "2.0.0-rc.1",
"@ionic-native/core": "5.36.0",
"@ionic-native/splash-screen": "5.36.0",
"@ionic-native/status-bar": "5.36.0",
"@ionic-native/splash-screen": "patch:@ionic-native/splash-screen@npm%3A5.36.0#~/.yarn/patches/@ionic-native-splash-screen-npm-5.36.0-531cbbe0f8.patch",
"@ionic-native/status-bar": "patch:@ionic-native/status-bar@npm%3A5.36.0#~/.yarn/patches/@ionic-native-status-bar-npm-5.36.0-1ca86cbaad.patch",
"@ionic/angular": "7.3.3",
"browserify-fs": "1.0.0",
"net-browserify": "0.2.4",
Expand Down
4 changes: 2 additions & 2 deletions examples/cactus-example-supply-chain-frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@
"@hyperledger/cactus-plugin-ledger-connector-fabric": "2.0.0-rc.1",
"@hyperledger/cactus-plugin-ledger-connector-quorum": "2.0.0-rc.1",
"@ionic-native/core": "5.36.0",
"@ionic-native/splash-screen": "5.36.0",
"@ionic-native/status-bar": "5.36.0",
"@ionic-native/splash-screen": "patch:@ionic-native/splash-screen@npm%3A5.36.0#~/.yarn/patches/@ionic-native-splash-screen-npm-5.36.0-531cbbe0f8.patch",
"@ionic-native/status-bar": "patch:@ionic-native/status-bar@npm%3A5.36.0#~/.yarn/patches/@ionic-native-status-bar-npm-5.36.0-1ca86cbaad.patch",
"@ionic/angular": "7.3.3",
"net-browserify": "0.2.4",
"run-time-error": "1.4.0",
Expand Down
32 changes: 28 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7972,8 +7972,8 @@ __metadata:
"@hyperledger/cactus-plugin-ledger-connector-besu": "npm:2.0.0-rc.1"
"@hyperledger/cactus-plugin-ledger-connector-fabric": "npm:2.0.0-rc.1"
"@ionic-native/core": "npm:5.36.0"
"@ionic-native/splash-screen": "npm:5.36.0"
"@ionic-native/status-bar": "npm:5.36.0"
"@ionic-native/splash-screen": "patch:@ionic-native/splash-screen@npm%3A5.36.0#~/.yarn/patches/@ionic-native-splash-screen-npm-5.36.0-531cbbe0f8.patch"
"@ionic-native/status-bar": "patch:@ionic-native/status-bar@npm%3A5.36.0#~/.yarn/patches/@ionic-native-status-bar-npm-5.36.0-1ca86cbaad.patch"
"@ionic/angular": "npm:7.3.3"
"@ionic/angular-toolkit": "npm:10.0.0"
browserify-fs: "npm:1.0.0"
Expand Down Expand Up @@ -8229,8 +8229,8 @@ __metadata:
"@hyperledger/cactus-plugin-ledger-connector-fabric": "npm:2.0.0-rc.1"
"@hyperledger/cactus-plugin-ledger-connector-quorum": "npm:2.0.0-rc.1"
"@ionic-native/core": "npm:5.36.0"
"@ionic-native/splash-screen": "npm:5.36.0"
"@ionic-native/status-bar": "npm:5.36.0"
"@ionic-native/splash-screen": "patch:@ionic-native/splash-screen@npm%3A5.36.0#~/.yarn/patches/@ionic-native-splash-screen-npm-5.36.0-531cbbe0f8.patch"
"@ionic-native/status-bar": "patch:@ionic-native/status-bar@npm%3A5.36.0#~/.yarn/patches/@ionic-native-status-bar-npm-5.36.0-1ca86cbaad.patch"
"@ionic/angular": "npm:7.3.3"
"@ionic/angular-toolkit": "npm:10.0.0"
"@types/uuid": "npm:9.0.8"
Expand Down Expand Up @@ -9653,6 +9653,18 @@ __metadata:
languageName: node
linkType: hard

"@ionic-native/splash-screen@patch:@ionic-native/splash-screen@npm%3A5.36.0#~/.yarn/patches/@ionic-native-splash-screen-npm-5.36.0-531cbbe0f8.patch":
version: 5.36.0
resolution: "@ionic-native/splash-screen@patch:@ionic-native/splash-screen@npm%3A5.36.0#~/.yarn/patches/@ionic-native-splash-screen-npm-5.36.0-531cbbe0f8.patch::version=5.36.0&hash=a5ae6e"
dependencies:
"@types/cordova": "npm:latest"
peerDependencies:
"@ionic-native/core": ^5.1.0
rxjs: ^5.5.0 || ^6.5.0
checksum: 10/acb82a20b17d6db326a11388f39cb1cb66dd3524d3d6e4de68bb9fa47176c62a217caeef57edcba6a1cf8ac3dbf476bd8c1ca4d7d64914baa5ccbb37ecd5cd18
languageName: node
linkType: hard

"@ionic-native/status-bar@npm:5.36.0":
version: 5.36.0
resolution: "@ionic-native/status-bar@npm:5.36.0"
Expand All @@ -9665,6 +9677,18 @@ __metadata:
languageName: node
linkType: hard

"@ionic-native/status-bar@patch:@ionic-native/status-bar@npm%3A5.36.0#~/.yarn/patches/@ionic-native-status-bar-npm-5.36.0-1ca86cbaad.patch":
version: 5.36.0
resolution: "@ionic-native/status-bar@patch:@ionic-native/status-bar@npm%3A5.36.0#~/.yarn/patches/@ionic-native-status-bar-npm-5.36.0-1ca86cbaad.patch::version=5.36.0&hash=3fcc00"
dependencies:
"@types/cordova": "npm:latest"
peerDependencies:
"@ionic-native/core": ^5.1.0
rxjs: ^5.5.0 || ^6.5.0
checksum: 10/90d1849f7ac83072aa66c4e403dbc8eb4025d51aac6ca5e47047963dc450b5227bf52527c0700000fb1dae7e3df991235638933b6705b4412d458eeb6dc98722
languageName: node
linkType: hard

"@ionic/angular-toolkit@npm:10.0.0":
version: 10.0.0
resolution: "@ionic/angular-toolkit@npm:10.0.0"
Expand Down

0 comments on commit 14d0bbe

Please sign in to comment.