Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
skiko
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liuqiang
skiko
Commits
0fa95b75
Unverified
Commit
0fa95b75
authored
Feb 17, 2026
by
Ivan Matkov
Committed by
GitHub
Feb 17, 2026
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove deprecated OS/Arch values (#1165)
parent
5a908332
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
20 deletions
+11
-20
OsArch.kt
skiko/src/commonMain/kotlin/org/jetbrains/skiko/OsArch.kt
+0
-7
HostOsTest.kt
skiko/src/jsTest/kotlin/org/jetbrains/skiko/HostOsTest.kt
+11
-13
No files found.
skiko/src/commonMain/kotlin/org/jetbrains/skiko/OsArch.kt
View file @
0fa95b75
...
@@ -7,9 +7,6 @@ enum class OS(val id: String) {
...
@@ -7,9 +7,6 @@ enum class OS(val id: String) {
MacOS
(
"macos"
),
MacOS
(
"macos"
),
Ios
(
"ios"
),
Ios
(
"ios"
),
Tvos
(
"tvos"
),
Tvos
(
"tvos"
),
@Deprecated
(
"JS is invalid host OS name. Consider using enum KotlinBackend to detect JS."
)
JS
(
"js"
),
Unknown
(
"unknown"
)
Unknown
(
"unknown"
)
;
;
...
@@ -26,10 +23,6 @@ enum class OS(val id: String) {
...
@@ -26,10 +23,6 @@ enum class OS(val id: String) {
enum
class
Arch
(
val
id
:
String
)
{
enum
class
Arch
(
val
id
:
String
)
{
X64
(
"x64"
),
X64
(
"x64"
),
Arm64
(
"arm64"
),
Arm64
(
"arm64"
),
@Deprecated
(
"JS is not valid Arch value"
)
JS
(
"js"
),
@Deprecated
(
"WASM is not valid Arch value"
)
WASM
(
"wasm"
),
Unknown
(
"unknown"
),
Unknown
(
"unknown"
),
;
;
}
}
...
...
skiko/src/jsTest/kotlin/org/jetbrains/skiko/HostOsTest.kt
View file @
0fa95b75
package
org.jetbrains.skiko
.tests.org.jetbrains.skiko
package
org.jetbrains.skiko
import
org.jetbrains.skiko.OS
import
org.jetbrains.skiko.detectHostOs
import
org.jetbrains.skiko.hostOs
import
kotlin.test.Test
import
kotlin.test.Test
import
kotlin.test.assertEquals
import
kotlin.test.assertEquals
import
kotlin.test.assertNotEquals
class
HostOsTest
{
class
HostOsTest
{
@Test
fun
canGetHostOs
()
{
assertNotEquals
(
OS
.
JS
,
hostOs
)
}
@Test
@Test
fun
canGetLinux
()
{
fun
canGetLinux
()
{
spoofUserAgentData
(
"linux"
)
spoofUserAgentData
(
"linux"
)
...
@@ -51,6 +42,13 @@ class HostOsTest {
...
@@ -51,6 +42,13 @@ class HostOsTest {
}
}
}
}
private
fun
spoofUserAgentData
(
newValue
:
String
)
=
private
fun
spoofUserAgentData
(
newValue
:
String
)
{
js
(
"""navigator.__defineGetter__('userAgentData', function () { return { platform:newValue }; });"""
)
val
userAgentData
=
js
(
"({})"
)
userAgentData
.
platform
=
newValue
js
(
"""Object.defineProperty(navigator, 'userAgentData', {
configurable: true,
value: userAgentData
});"""
)
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment