Skip to content

Commit 3b68699

Browse files
committed
Update yarn -> npm
1 parent 5618592 commit 3b68699

File tree

10 files changed

+9558
-5260
lines changed

10 files changed

+9558
-5260
lines changed

compiler-plugin/gradle.properties

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ org.gradle.configuration-cache=true
1919
org.jetbrains.dokka.experimental.gradle.pluginMode=V2Enabled
2020
org.jetbrains.dokka.experimental.gradle.pluginMode.noWarn=true
2121

22+
# https://youtrack.jetbrains.com/issue/KT-78504
23+
kotlin.js.yarn=false
24+
2225
# development mode for kotlinx.rpc gradle plugin. Uses local project paths to apply the compiler plugin
2326
kotlinx.rpc.plugin.internalDevelopment=true
2427

docs/environment.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -364,26 +364,25 @@ Here is a 'simple' guide for solving problems:
364364
- Docker
365365
- `Cannot connect to the Docker daemon` - open `Docker Desktop`
366366
- Kotlin/Js or Kotlin/Wasm
367-
- `kotlinUpgradeYarnLock` or `kotlinUpgradeWasmYarnLock` (and also `kotlinNpmInstall` or `kotlinWasmNpmInstall`)
367+
- `kotlinUpgradePackageLock` or `kotlinWasmUpgradePackageLock` (and also `kotlinNpmInstall` or `kotlinWasmNpmInstall`)
368368
have a funny tendency to fail sometimes, and you don't know why.
369369
I'll tell you!
370370
We use proxy repos, and sometimes dependencies get downloaded from the wrong source.
371-
Make sure ALL urls in `.lock` files start with `https://packages.jetbrains.team/npm/p/krpc/build-deps/`.
371+
Make sure ALL urls in `package-lock.json` files start with `https://packages.jetbrains.team/npm/p/krpc/build-deps/`.
372372
If something doesn't work, your steps are:
373-
- Delete `.lock` file
373+
- Delete `package-lock.json` file
374374
- Delete `<REPO_ROOT>/build/js` / `<REPO_ROOT>/build/wasm`
375-
- Run `kotlinUpgradeYarnLock` / `kotlinUpgradeWasmYarnLock`
375+
- Run `kotlinUpgradePackageLock` / `kotlinWasmUpgradePackageLock`
376376
- If the problem persists:
377377
- Check that `<REPO_ROOT>/build/<target>/.npmrc` AND `<REPO_ROOT>/build/<target>/.yarnrc` are present
378378
- Check that `.yarnrc` contains one line: `registry: "https://packages.jetbrains.team/npm/p/krpc/build-deps/"`
379-
- Check that `.npmrc` contains following lines:
379+
- Check that `.npmrc` contains the following lines:
380380
- `registry="https://packages.jetbrains.team/npm/p/krpc/build-deps/"`
381381
- `always-auth=true`
382382
- `save-exact=true`
383383
- `//packages.jetbrains.team/npm/p/krpc/build-deps/:_authToken=<your_auth_token>`,
384-
where `<your_auth_token>` is from [proxy-repositories.md](proxy-repositories.md) guide.
385-
- Check that `<USER_HOME>/.npmrc` / `<USER_HOME>/.yarnrc` doesn't interfere
386-
- Use `/Users/<USER>/.gradle/nodejs/node-v22.0.0-darwin-arm64/bin/node /Users/<USER>/.gradle/yarn/yarn-v1.22.17/bin/yarn.js --ignore-engines --verbose --ignore-scripts`
384+
where `<your_auth_token>` is from the [proxy-repositories.md](proxy-repositories.md) guide.
385+
- Check that `<USER_HOME>/.npmrc` / `<USER_HOME>/.yarnrc` don't interfere
387386
command to debug. Replace versions of tools if needed.
388387

389388
Something doesn't work, and you are sure it's not your fault? Report it appropriately! Don't be lazy.
@@ -399,7 +398,7 @@ all included builds (not subprojects) must reflect the change.
399398
- `checkLegacyAbi` / `updateLegacyAbi` - ABI checks.
400399
See https://kotlinlang.org/docs/whatsnew22.html#binary-compatibility-validation-included-in-kotlin-gradle-plugin.
401400
Former BCV: https://github.com/Kotlin/binary-compatibility-validator
402-
- `kotlinUpgradeYarnLock` / `kotlinWasmUpgradeYarnLock` - update [kotlin-js-store](../kotlin-js-store) contents,
401+
- `kotlinUpgradePackageLock` / `kotlinWasmUpgradePackageLock` - update [kotlin-js-store](../kotlin-js-store) contents,
403402
usually after Kotlin version update.
404403
- `updateDocsChangelog` - put modified [CONTRIBUTING.md](../CONTRIBUTING.md) into [topics](pages/kotlinx-rpc/topics)
405404
- `detekt` - run detekt checks.

dokka-plugin/gradle.properties

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ org.gradle.configuration-cache=true
1919
org.jetbrains.dokka.experimental.gradle.pluginMode=V2Enabled
2020
org.jetbrains.dokka.experimental.gradle.pluginMode.noWarn=true
2121

22+
# https://youtrack.jetbrains.com/issue/KT-78504
23+
kotlin.js.yarn=false
24+
2225
# development mode for kotlinx.rpc gradle plugin. Uses local project paths to apply the compiler plugin
2326
kotlinx.rpc.plugin.internalDevelopment=true
2427

gradle-conventions/src/main/kotlin/util/tasks/npm.kt

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ import org.gradle.api.Project
99
import org.gradle.kotlin.dsl.*
1010
import org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsEnvSpec
1111
import org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootPlugin
12-
import org.jetbrains.kotlin.gradle.targets.js.yarn.YarnLockMismatchReport
12+
import org.jetbrains.kotlin.gradle.targets.js.npm.BaseNpmExtension
13+
import org.jetbrains.kotlin.gradle.targets.js.npm.LockFileMismatchReport
1314
import org.jetbrains.kotlin.gradle.targets.wasm.nodejs.WasmNodeJsEnvSpec
1415
import org.jetbrains.kotlin.gradle.targets.wasm.nodejs.WasmNodeJsRootPlugin
1516
import org.jetbrains.kotlin.gradle.targets.web.nodejs.BaseNodeJsEnvSpec
1617
import org.jetbrains.kotlin.gradle.targets.web.nodejs.CommonNodeJsRootPlugin
17-
import org.jetbrains.kotlin.gradle.targets.web.yarn.BaseYarnRootEnvSpec
18-
import org.jetbrains.kotlin.gradle.targets.web.yarn.CommonYarnPlugin
18+
import org.jetbrains.kotlin.gradle.targets.web.npm.CommonNpmResolverPlugin
1919
import util.other.optionalProperty
2020
import util.other.spacePassword
2121
import util.other.useProxyRepositories
@@ -106,19 +106,14 @@ fun Project.configureNpm() {
106106
)
107107

108108
// necessary for CI js tests
109-
rootProject.plugins.withType<CommonYarnPlugin> {
110-
rootProject.extensions.configure<BaseYarnRootEnvSpec> {
109+
rootProject.plugins.withType<CommonNpmResolverPlugin> {
110+
rootProject.extensions.configure<BaseNpmExtension> {
111111
ignoreScripts = false
112-
download = true
113112

114-
yarnLockMismatchReport = if (useProxy && !kotlinMasterBuild) {
115-
YarnLockMismatchReport.FAIL
113+
packageLockMismatchReport = if (useProxy && !kotlinMasterBuild) {
114+
LockFileMismatchReport.FAIL
116115
} else {
117-
YarnLockMismatchReport.WARNING
118-
}
119-
120-
if (useProxy) {
121-
downloadBaseUrl = "https://packages.jetbrains.team/files/p/krpc/build-deps/"
116+
LockFileMismatchReport.WARNING
122117
}
123118
}
124119
}

gradle-plugin/gradle.properties

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ org.gradle.configuration-cache=true
1919
org.jetbrains.dokka.experimental.gradle.pluginMode=V2Enabled
2020
org.jetbrains.dokka.experimental.gradle.pluginMode.noWarn=true
2121

22+
# https://youtrack.jetbrains.com/issue/KT-78504
23+
kotlin.js.yarn=false
24+
2225
# development mode for kotlinx.rpc gradle plugin. Uses local project paths to apply the compiler plugin
2326
kotlinx.rpc.plugin.internalDevelopment=true
2427

gradle.properties

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ org.gradle.configuration-cache=true
1919
org.jetbrains.dokka.experimental.gradle.pluginMode=V2Enabled
2020
org.jetbrains.dokka.experimental.gradle.pluginMode.noWarn=true
2121

22+
# https://youtrack.jetbrains.com/issue/KT-78504
23+
kotlin.js.yarn=false
24+
2225
# development mode for kotlinx.rpc gradle plugin. Uses local project paths to apply the compiler plugin
2326
kotlinx.rpc.plugin.internalDevelopment=true
2427

0 commit comments

Comments
 (0)