From c75f6c98d74db0753e68642cdcbf08138d0f1f2f Mon Sep 17 00:00:00 2001 From: Max Desiatov Date: Mon, 28 Sep 2020 16:47:59 +0100 Subject: [PATCH] Bump JavaScriptKit to 0.7.2 (#115) --- Sources/carton/Server/StaticArchive.swift | 12 ++++++------ TestApp/Package.resolved | 4 ++-- TestApp/Package.swift | 2 +- TestApp/Sources/TestApp/main.swift | 10 ++++++++++ package-lock.json | 6 +++--- package.json | 2 +- 6 files changed, 23 insertions(+), 13 deletions(-) diff --git a/Sources/carton/Server/StaticArchive.swift b/Sources/carton/Server/StaticArchive.swift index e4ca4db..0af987a 100644 --- a/Sources/carton/Server/StaticArchive.swift +++ b/Sources/carton/Server/StaticArchive.swift @@ -1,16 +1,16 @@ import TSCBasic let devDependencySHA256 = ByteString([ - 0xC8, 0xA8, 0x50, 0x49, 0xFA, 0x10, 0x63, 0x97, 0xAD, 0xC7, 0xB7, 0x5C, 0x48, 0xCA, 0x67, 0xD7, - 0xC2, 0x4C, 0x1D, 0x64, 0x41, 0x18, 0x26, 0x46, 0xD3, 0xC3, 0x85, 0xB8, 0x9A, 0x52, 0x3D, 0x47, + 0x31, 0xD1, 0x1F, 0x6C, 0x7C, 0x3D, 0x74, 0xE1, 0x04, 0xC5, 0x69, 0xB3, 0x97, 0xEC, 0xBE, 0x21, + 0x70, 0x54, 0x29, 0x18, 0x17, 0x9C, 0xD0, 0xD6, 0x62, 0x63, 0xF5, 0x45, 0xFA, 0x95, 0x8C, 0x63, ]) let bundleDependencySHA256 = ByteString([ - 0xF8, 0x52, 0x7A, 0xC1, 0xDA, 0xEE, 0x49, 0x3B, 0x02, 0xF5, 0xA6, 0xE5, 0x8F, 0x38, 0x25, 0xEF, - 0x8D, 0xF1, 0xB1, 0x2A, 0xE7, 0x02, 0x9F, 0x8A, 0xED, 0xE5, 0x97, 0xCB, 0xA7, 0xD3, 0x94, 0x39, + 0xF6, 0x10, 0x78, 0xB2, 0xE4, 0x4A, 0x33, 0xD7, 0x95, 0xCB, 0x25, 0x1E, 0x9F, 0xA7, 0x61, 0xAD, + 0x14, 0x79, 0xC7, 0xC8, 0x31, 0xDE, 0x33, 0xD4, 0x9A, 0xA0, 0xD9, 0x5B, 0xAD, 0xD3, 0xD8, 0x84, ]) let staticArchiveHash = ByteString([ - 0x59, 0x31, 0xC8, 0x55, 0x52, 0x90, 0x17, 0xD3, 0xC6, 0x24, 0xA5, 0xA3, 0x2A, 0x96, 0x26, 0x34, - 0xB8, 0x35, 0xB2, 0x1C, 0x12, 0xA6, 0xFE, 0x47, 0x90, 0xA2, 0x8E, 0xF4, 0x94, 0x9D, 0x68, 0x1A, + 0xB4, 0x08, 0x49, 0xF2, 0x0A, 0x2A, 0x4E, 0x73, 0x04, 0xBF, 0x55, 0x47, 0x86, 0x93, 0x7E, 0x99, + 0xFD, 0x7E, 0x37, 0x04, 0xE7, 0x6B, 0xB2, 0x12, 0x4E, 0xC9, 0xB0, 0x97, 0x02, 0xF9, 0x0C, 0xA0, ]) diff --git a/TestApp/Package.resolved b/TestApp/Package.resolved index 879d022..ad8e881 100644 --- a/TestApp/Package.resolved +++ b/TestApp/Package.resolved @@ -6,8 +6,8 @@ "repositoryURL": "https://github.com/swiftwasm/JavaScriptKit", "state": { "branch": null, - "revision": "ad1544ff312e31a22d05426320913f24593ce838", - "version": "0.6.0" + "revision": "6e84a7003071ed3e9fa7f8d8266a272a36b84608", + "version": "0.7.2" } } ] diff --git a/TestApp/Package.swift b/TestApp/Package.swift index 3ebb726..bd405bd 100644 --- a/TestApp/Package.swift +++ b/TestApp/Package.swift @@ -9,7 +9,7 @@ let package = Package( .executable(name: "TestApp", targets: ["TestApp"]), ], dependencies: [ - .package(url: "https://github.com/swiftwasm/JavaScriptKit", from: "0.6.0"), + .package(url: "https://github.com/swiftwasm/JavaScriptKit", from: "0.7.2"), ], targets: [ // Targets are the basic building blocks of a package. A target can define a module or a test diff --git a/TestApp/Sources/TestApp/main.swift b/TestApp/Sources/TestApp/main.swift index 90523a2..36f3dd5 100644 --- a/TestApp/Sources/TestApp/main.swift +++ b/TestApp/Sources/TestApp/main.swift @@ -48,3 +48,13 @@ div.innerHTML = .string(#""" Link to a static resource """#) _ = body.appendChild!(div) + +let timerElement = document.createElement!("p").object! +_ = body.appendChild!(timerElement) +let timer = JSTimer(millisecondsDelay: 1000, isRepeating: true) { + let date = JSDate() + timerElement.innerText = .string(""" + Current date is \(date.toLocaleDateString()) + Current time is \(date.toLocaleTimeString()) + """) +} diff --git a/package-lock.json b/package-lock.json index 25e85b0..8f30395 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2120,9 +2120,9 @@ "dev": true }, "javascript-kit-swift": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/javascript-kit-swift/-/javascript-kit-swift-0.6.0.tgz", - "integrity": "sha512-4AKfGjXa7smMIDlR8JNxPvKdJjd2h1usl/CP4i8UrX5xN6Hy6Fa9Gbu+NP67yXDYAjnvxFaBcieg13T91/k3Og==", + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/javascript-kit-swift/-/javascript-kit-swift-0.7.2.tgz", + "integrity": "sha512-ggFmNp+rQxNr6atsZUp89+N6eD+c/iUyjZGKUlc6TcAbqhDJFZoCCKGArJzHEcfPZOLI8Ih96iiOKgXhM+8LAw==", "dev": true }, "json-parse-better-errors": { diff --git a/package.json b/package.json index 9daa4b2..3e96039 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "devDependencies": { "@wasmer/wasi": "^0.12.0", "@wasmer/wasmfs": "^0.12.0", - "javascript-kit-swift": "^0.6.0", + "javascript-kit-swift": "^0.7.2", "reconnecting-websocket": "^4.4.0", "webpack": "^4.44.1", "webpack-cli": "^3.3.12"