File tree Expand file tree Collapse file tree 6 files changed +36
-7
lines changed
npm-publish-docs/src/docs/user-guide/configuration
npm-publish-gradle-plugin/src/main/kotlin Expand file tree Collapse file tree 6 files changed +36
-7
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2323
2424---
2525
26+ ## [ 3.5.2]
27+
28+ ### Verified Versions
29+
30+ - Kotlin: 2.1.0
31+ - Gradle: 8.12
32+ - JDK: 21
33+
34+ ### Added
35+
36+ ### Changed
37+
38+ - Fix #181 - npm commands are failing when node is not on PATH.
39+
40+ ### Removed
41+
42+ ---
43+
2644## [ 3.5.1]
2745
2846### Verified Versions
@@ -185,7 +203,7 @@ This is a maintenance release with a few minor bugfixes.
185203### Added
186204
187205- New ` tag ` option for ` NpmPublishTask `
188- - Integration with ` com.netflix.nebula:nebula- node-plugin ` to allow publishing without having NodeJS installed when
206+ - Integration with ` com.github. node-gradle.node ` to allow publishing without having NodeJS installed when
189207 kotlin plugin is not being used
190208
191209### Changed
@@ -490,10 +508,12 @@ This is a maintenance release with a few minor bugfixes.
490508
491509---
492510
493- [ Unreleased ] : https://github.com/mpetuska/npm-publish/compare/3.5.1 ...HEAD
511+ [ Unreleased ] : https://github.com/mpetuska/npm-publish/compare/3.5.2 ...HEAD
494512
495513[ 3.5.1 ] : https://github.com/mpetuska/npm-publish/compare/3.5.0...3.5.1
496514
515+ [ 3.5.2 ] : https://github.com/mpetuska/npm-publish/compare/3.5.1...3.5.2
516+
497517[ 3.5.0 ] : https://github.com/mpetuska/npm-publish/compare/3.4.2...3.5.0
498518
499519[ 3.4.2 ] : https://github.com/mpetuska/npm-publish/compare/3.4.1...3.4.2
Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ Default NodeJS directory to be used when executing npm commands.
7777!!! info
7878 This is set automatically when certain other plugins are applied
7979 - ` org.jetbrains.kotlin.multiplatform ` & ` org.jetbrains.kotlin.js ` : ` kotlinNodeJsSetup ` task output
80- - ` com.netflix.nebula:nebula- node-plugin ` : ` nodeSetup ` task output
80+ - ` com.github. node-gradle.node ` : ` nodeSetup ` task's ` NodeSetupTask::nodeDir ` property
8181
8282### ` nodeBin `
8383
Original file line number Diff line number Diff line change 11package dev.petuska.npm.publish
22
33import dev.petuska.npm.publish.config.configure
4- import dev.petuska.npm.publish.config.configureNebulaNode
4+ import dev.petuska.npm.publish.config.configureNodeGradlePlugin
55import dev.petuska.npm.publish.extension.NpmPublishExtension
66import dev.petuska.npm.publish.task.NodeExecTask
77import dev.petuska.npm.publish.task.NpmAssembleTask
@@ -26,7 +26,7 @@ public class NpmPublishPlugin : Plugin<Project> {
2626 override fun apply (project : Project ): Unit = with (project) {
2727 val extension = extensions.create(NpmPublishExtension .NAME , NpmPublishExtension ::class .java)
2828 configure(extension)
29- configureNebulaNode (extension)
29+ configureNodeGradlePlugin (extension)
3030 pluginManager.withPlugin(KOTLIN_MPP_PLUGIN ) {
3131 extensions.configure<KotlinMultiplatformExtension > {
3232 targets.filterIsInstance<KotlinJsTargetDsl >().forEach { configure(it) }
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ import org.jetbrains.kotlin.gradle.utils.named
1111
1212private const val NODE_GRADLE_PLUGIN = " com.github.node-gradle.node"
1313
14- internal fun Project.configureNebulaNode (extension : NpmPublishExtension ) {
14+ internal fun Project.configureNodeGradlePlugin (extension : NpmPublishExtension ) {
1515 pluginManager.withPlugin(NODE_GRADLE_PLUGIN ) {
1616 val nodeGradleHome = project.tasks.named<NodeSetupTask >(NodeSetupTask .NAME )
1717 .map { it.takeIf { it.enabled }.unsafeCast<NodeSetupTask >() }
Original file line number Diff line number Diff line change @@ -41,5 +41,5 @@ public abstract class NpmExecTask : NodeExecTask() {
4141 * @return execution result
4242 */
4343 public fun npmExec (args : Collection <String ?>, config : Action <ExecSpec > = Action {}): ExecResult =
44- exec (listOf (npm.get().asFile.absolutePath) + args, config)
44+ nodeExec (listOf (npm.get().asFile.absolutePath) + args, config)
4545}
Original file line number Diff line number Diff line change 11plugins {
22 id(" kmp" )
33 id(" dev.petuska.npm.publish" )
4+ id(" com.github.node-gradle.node" ) version " 7.1.0"
5+ }
6+
7+ repositories {
8+ mavenCentral()
49}
510
611kotlin {
@@ -20,6 +25,10 @@ kotlin {
2025 }
2126}
2227
28+ node {
29+ download = true
30+ }
31+
2332npmPublish {
2433 organization = group.toString()
2534
You can’t perform that action at this time.
0 commit comments