Skip to content

Commit

Permalink
Upgrade to electron 2.0.18 and node 8.9.3 (#4001)
Browse files Browse the repository at this point in the history
* upgrade to electron 2.0.18 and node 8.9.3

* use cypress/browsers:node8.9.3-chrome73 docker image

* fix type_spec for chrome

* Revert "fix type_spec for chrome"

This reverts commit 7914f68.

* fix driver specs for chrome

* update engines to 8.9.3


Co-authored-by: Ben Kucera <[email protected]>
Co-authored-by: Brian Mann <[email protected]>
  • Loading branch information
3 people committed Apr 25, 2019
1 parent 586c1c0 commit b8f0257
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8.2.1
8.9.3
4 changes: 2 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ branches:

# https://www.appveyor.com/docs/lang/nodejs-iojs/
environment:
# use latest version of Node 8 with NPM 6
nodejs_version: "8.2.1"
# use matching version of Node.js
nodejs_version: "8.9.3"
# encode secure variables which will NOT be used
# in pull requests
# https://www.appveyor.com/docs/build-configuration/#secure-variables
Expand Down
2 changes: 1 addition & 1 deletion circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ executors:
# the Docker image with Cypress dependencies and Chrome browser
cy-doc:
docker:
- image: cypress/browsers:chrome64
- image: cypress/browsers:node8.9.3-chrome73
environment:
PLATFORM: linux

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"description": "Cypress.io end to end testing tool",
"private": true,
"engines": {
"node": ">=8.2.1"
"node": ">=8.9.3"
},
"scripts": {
"prestart": "npm run check-deps-pre",
Expand Down
2 changes: 1 addition & 1 deletion packages/electron/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@packages/electron",
"version": "0.0.0",
"electronVersion": "1.8.2",
"electronVersion": "2.0.18",
"private": true,
"main": "index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion scripts/run-docker-local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ set e+x

echo "This script should be run from cypress's root"

name=cypress/browsers:chrome64
name=cypress/browsers:node8.9.3-chrome73
echo "Pulling CI container $name"

docker pull $name
Expand Down

1 comment on commit b8f0257

@prissomanu
Copy link

Choose a reason for hiding this comment

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

declare -r sbt_release_version="1.2.6"
declare -r sbt_unreleased_version="1.2.6"
declare -r sbt_release_version="0.13.16"
declare -r sbt_unreleased_version="0.13.16"

declare -r latest_213="2.13.0-M2"
declare -r latest_212="2.12.4

package neotypes.akkastreams

import akka.stream.scaladsl.{Flow, Source}

import scala.concurrent.{ExecutionContext, Future}

object implicits {
implicit def akkaStream(implicit ec: ExecutionContext): neotypes.Stream.Aux[AkkaStream, Future] =
new neotypes.Stream[AkkaStream] {
override type F[T] = Future[T]

  override def init[T](value: () => Future[Option[T]]): AkkaStream[T] =
    Source
      .repeat(())
      .mapAsync(1){ _ => value() }
      .takeWhile(_.isDefined)
      .map(_.get)
      .viaMat(Flow[T]) { (_, _) => Future.successful(()) }

  override def onComplete[T](s: AkkaStream[T])(f: => Future[Unit]): AkkaStream[T] =
    s.watchTermination() { (_, done) =>
      done.flatMap(_ => f)
    }

  override def fToS[T](f: Future[AkkaStream[T]]): AkkaStream[T] =
    Source
      .fromFutureSource(f)
      .viaMat(Flow[T]) { (m, _) => m.flatMap(identity) }
}

}
GitHub Logo
Format: Alt Text
}

  • Item 1
  • Item 2
    • Item 2a
    • Item 2b
      What I do not know, is if a Session is mutable state
      It is mutable state indeed. Here's an example that leaks:

object Main {
val s = driver.session().asScala[IO]

val program =
ServiceOne.foo(s) *> ServiceTwo.foo(s)

/// more services and more logic

// access to session where it shouldn't be accessed. This is more obvious in larger programs.
s.beginTransaction.flatMap { tx =>
c"create (p:Record {personId: 123)".query[Unit].execute(tx)
}

}

object ServiceOne {
def foo(session: Session[IO]): IO[Unit] = ??? // do something with the session
}

object ServiceTwo {
def foo(session: Session[IO]): IO[Unit] = ??? // do something with the session
}
In order to control the region of sharing we use flatMap and explicitly share the mutable state as arguments of other functions.

object Main {
val mkSession: IO[Session[IO]] = IO(driver.session().asScala[IO])

val program =
mkSession.flatMap { s => // specific region of sharing
ServiceOne.foo(s) *> ServiceTwo.foo(s)
}

/// more services and more logic

// the same sessions cannot be accessed here now
mkSession.flatMap { s => // this is a different session
s.beginTransaction.flatMap { tx =>
c"create (p:Record {personId: 123)".query[Unit].execute(tx)
}
}

}

object ServiceOne {
def foo(session: Session[IO]): IO[Unit] = ??? // do something with the session
}

object ServiceTwo {
def foo(session: Session[IO]): IO[Unit] = ??? // do something with the session
}
par la suite la dénomination de la source changera en fonction du nom qui lui serais donnée dans la "pull request"
}

Please sign in to comment.