Skip to content

Commit 5b51c69

Browse files
authored
Update to libjavascriptcoregtk-4.1-dev (#21)
* Update to libjavascriptcoregtk-4.1-dev * Update localized test case to match latest JavaScriptCore * Update localized test case to match latest JavaScriptCore
1 parent 733bc1f commit 5b51c69

File tree

3 files changed

+11
-37
lines changed

3 files changed

+11
-37
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Install dependencies
1717
run: sudo apt-get install -y libjavascriptcoregtk-4.1-dev
1818
- run: pkg-config --libs javascriptcoregtk-4.1
19-
- uses: actions/checkout@v2
19+
- uses: actions/checkout@v6
2020
- name: Test (Debug)
2121
run: swift test --configuration debug
2222
- name: Test (Release)
@@ -25,16 +25,16 @@ jobs:
2525
ios:
2626
runs-on: macos-latest
2727
steps:
28-
- uses: actions/checkout@v2
28+
- uses: actions/checkout@v6
2929
- name: Test (Debug)
30-
run: xcodebuild clean test -configuration Debug -scheme "JXKit" -sdk "iphonesimulator" -destination "platform=iOS Simulator,name=iPhone 16 Pro"
30+
run: xcodebuild clean test -configuration Debug -scheme "JXKit" -sdk "iphonesimulator" -destination "platform=iOS Simulator,name=iPhone 17"
3131
- name: Test (Release)
32-
run: xcodebuild clean test -configuration Release -scheme "JXKit" -sdk "iphonesimulator" -destination "platform=iOS Simulator,name=iPhone 16 Pro"
32+
run: xcodebuild clean test -configuration Release -scheme "JXKit" -sdk "iphonesimulator" -destination "platform=iOS Simulator,name=iPhone 17"
3333

3434
tvos:
3535
runs-on: macos-latest
3636
steps:
37-
- uses: actions/checkout@v2
37+
- uses: actions/checkout@v6
3838
- name: Test (Debug)
3939
run: xcodebuild clean test -configuration Debug -scheme "JXKit" -sdk "appletvsimulator" -destination "platform=tvOS Simulator,name=Apple TV"
4040
- name: Test (Release)
@@ -43,35 +43,9 @@ jobs:
4343
macos:
4444
runs-on: macos-latest
4545
steps:
46-
- uses: actions/checkout@v2
46+
- uses: actions/checkout@v6
4747
- name: Test (Debug)
4848
run: swift test --configuration debug
4949
- name: Test (Release)
5050
run: swift test --configuration release -Xswiftc -enable-testing
5151

52-
api-doc:
53-
runs-on: macos-latest
54-
timeout-minutes: 20
55-
steps:
56-
- uses: actions/checkout@v2
57-
- name: Build documentation
58-
run: |
59-
swift -version
60-
export SWIFTPM_ENABLE_COMMAND_PLUGINS=1
61-
export DOCC_JSON_PRETTYPRINT="YES"
62-
63-
# insert the docc dependency
64-
sed -I "" 's;^ dependencies: \[; dependencies: [ .package(name: "swift-docc-plugin", url: "https://github.com/apple/swift-docc-plugin", from: "1.0.0"), ;1' Package.swift
65-
66-
swift package --allow-writing-to-directory docs \
67-
generate-documentation --target JXKit \
68-
--disable-indexing \
69-
--transform-for-static-hosting \
70-
--hosting-base-path JXKit \
71-
--output-path docs
72-
73-
- name: Deploy
74-
uses: peaceiris/actions-gh-pages@v3
75-
with:
76-
github_token: ${{ secrets.GITHUB_TOKEN }}
77-
publish_dir: "."

README.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
# JXKit
22

3-
[![Build Status][GitHubActionBadge]][ActionsLink]
4-
[![Swift5 compatible][Swift5Badge]][Swift5Link]
3+
[![JXKit CI](https://github.com/jectivex/JXKit/actions/workflows/ci.yml/badge.svg)](https://github.com/jectivex/JXKit/actions/workflows/ci.yml)
54
![Platform][SwiftPlatforms]
6-
<!-- [![](https://tokei.rs/b1/github/jectivex/JXKit)](https://github.com/jectivex/JXKit) -->
75

86
JXKit is a cross-plarform swift module for interfacing with
97
`JavaScriptCore`. It provides a fluent API for working with an embedded
@@ -148,8 +146,6 @@ Projects that are based on JXKit:
148146
[JXBridge]: https://github.com/jectivex/JXBridge
149147
[JavaScriptCore]: https://trac.webkit.org/wiki/JavaScriptCore
150148

151-
[GitHubActionBadge]: https://img.shields.io/github/workflow/status/jectivex/JXKit/JXKit%20CI
152-
153149
[Swift5Badge]: https://img.shields.io/badge/swift-5-orange.svg?style=flat
154150
[Swift5Link]: https://developer.apple.com/swift/
155151
[SwiftPlatforms]: https://img.shields.io/badge/Platforms-macOS%20|%20iOS%20|%20tvOS%20|%20Linux-teal.svg

Tests/JXKitTests/JXKitTests.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,11 @@ final class JXKitTests: XCTestCase {
4848
XCTAssertEqual("65.4", try jxc.eval("new Intl.NumberFormat('en-IN', { maximumSignificantDigits: 3 }).format(65.4321)").string)
4949

5050
let yen = "new Intl.NumberFormat('ja-JP', { style: 'currency', currency: 'JPY' }).format(45.678)"
51+
#if os(Linux)
52+
XCTAssertEqual("¥46", try jxc.eval(yen).string)
53+
#else
5154
XCTAssertEqual("¥46", try jxc.eval(yen).string)
55+
#endif
5256

5357
XCTAssertEqual("10/24/2022", try jxc.eval("new Intl.DateTimeFormat('en-US', {timeZone: 'UTC'}).format(new Date('2022-10-24'))").string)
5458
XCTAssertEqual("24/10/2022", try jxc.eval("new Intl.DateTimeFormat('fr-FR', {timeZone: 'UTC'}).format(new Date('2022-10-24'))").string)

0 commit comments

Comments
 (0)