Skip to content
This repository has been archived by the owner on Nov 27, 2023. It is now read-only.

To use firebase in react native the dom api dependency needed to be removed #5

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions bsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
"sources": [
"src"
],
"bs-dependencies" : [
"bs-webapi",
],
"bs-dependencies" : [],
"package-specs": [
{
"module": "commonjs",
Expand Down
11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,20 @@
"version": "0.1.0",
"scripts": {
"clean": "bsb -clean-world",
"build": "bsb -make-world",
"watch": "bsb -make-world -w"
"build": "bsb -make-world -clean-world",
"watch": "bsb -make-world -clean-world -w"
},
"keywords": [
"BuckleScript"
],
"license": "MIT",
"peerDependencies": {
"bs-platform": "^2.0.0",
"bs-webapi": "git+https://github.com/viskahq/bs-webapi-incubator.git"
"bs-platform": "^2.0.0"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the depedency (which should be dev) is 2.1.0 this should be that as well

},
"dependencies": {
"firebase": "^4.4.0"
"bs-platform": "^2.1.0",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be a peer dependency and dev depedency, but not a depedency. It's a problem with packages being dependencies between projcets.

"firebase": "^4.4.0",
"global": "^4.3.2"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this?

},
"repository": "git@github.com:viskahq/bs-firebase.git",
"author": ""
Expand Down
4 changes: 1 addition & 3 deletions src/reasonFirebase.re
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
open BsWebapi.Webapi.Dom;

module Error = {
type t('e) = Js.t('e);
};
Expand Down Expand Up @@ -109,7 +107,7 @@ module Storage = {
[@bs.send] external path : (t, ~path: string) => t = "";
[@bs.send]
external put :
(t, ~data: Window.File.t, ~metadata: Js.t('a)=?, unit) => Js.Promise.t(UploadTask.t) =
(t, ~data: Js.Array.t(int), ~metadata: Js.t('a)=?, unit) => Js.Promise.t(UploadTask.t) =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe just have it 'a since Js.Array of int is definitely not correct in the browser.

"";
[@bs.send] external delete : t => Js.Promise.t(unit) = "";
[@bs.send] external getDownloadURL : t => Js.Promise.t(string) = "";
Expand Down
25 changes: 25 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,18 @@
version "0.2.3"
resolved "https://registry.yarnpkg.com/@firebase/webchannel-wrapper/-/webchannel-wrapper-0.2.3.tgz#e94f7e772f40e48a2dc52e57d1df38b28bf98e39"

bs-platform@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/bs-platform/-/bs-platform-2.1.0.tgz#63560ff8f7142c9c0631559df1c35590b9f6d8b2"

dom-storage@^2.0.2:
version "2.0.2"
resolved "https://registry.yarnpkg.com/dom-storage/-/dom-storage-2.0.2.tgz#ed17cbf68abd10e0aef8182713e297c5e4b500b0"

dom-walk@^0.1.0:
version "0.1.1"
resolved "https://registry.yarnpkg.com/dom-walk/-/dom-walk-0.1.1.tgz#672226dc74c8f799ad35307df936aba11acd6018"

faye-websocket@0.9.3:
version "0.9.3"
resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.9.3.tgz#482a505b0df0ae626b969866d3bd740cdb962e83"
Expand All @@ -73,10 +81,27 @@ firebase@^4.4.0:
dom-storage "^2.0.2"
xmlhttprequest "^1.8.0"

global@^4.3.2:
version "4.3.2"
resolved "https://registry.yarnpkg.com/global/-/global-4.3.2.tgz#e76989268a6c74c38908b1305b10fc0e394e9d0f"
dependencies:
min-document "^2.19.0"
process "~0.5.1"

http-parser-js@>=0.4.0:
version "0.4.9"
resolved "https://registry.yarnpkg.com/http-parser-js/-/http-parser-js-0.4.9.tgz#ea1a04fb64adff0242e9974f297dd4c3cad271e1"

min-document@^2.19.0:
version "2.19.0"
resolved "https://registry.yarnpkg.com/min-document/-/min-document-2.19.0.tgz#7bd282e3f5842ed295bb748cdd9f1ffa2c824685"
dependencies:
dom-walk "^0.1.0"

process@~0.5.1:
version "0.5.2"
resolved "https://registry.yarnpkg.com/process/-/process-0.5.2.tgz#1638d8a8e34c2f440a91db95ab9aeb677fc185cf"

promise-polyfill@^6.0.2:
version "6.0.2"
resolved "https://registry.yarnpkg.com/promise-polyfill/-/promise-polyfill-6.0.2.tgz#d9c86d3dc4dc2df9016e88946defd69b49b41162"
Expand Down