-
Notifications
You must be signed in to change notification settings - Fork 877
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support using the corepack version provided with Node.
In most uses, users will want to ues the version of corepack provided with the NodeJS version they are using, and the plugin now supports this mode of usage by default if no corepack version is explicitly provided.
- Loading branch information
1 parent
ea9c8c9
commit 8c26a6d
Showing
7 changed files
with
104 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
frontend-maven-plugin/src/it/corepack-provided-integration/.yarnrc.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
enableGlobalCache: false | ||
|
||
nodeLinker: node-modules |
8 changes: 8 additions & 0 deletions
8
frontend-maven-plugin/src/it/corepack-provided-integration/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"name": "example", | ||
"version": "0.0.1", | ||
"dependencies": { | ||
"less": "~3.0.2" | ||
}, | ||
"packageManager": "yarn@4.1.1" | ||
} |
48 changes: 48 additions & 0 deletions
48
frontend-maven-plugin/src/it/corepack-provided-integration/pom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<groupId>com.github.eirslett</groupId> | ||
<artifactId>example</artifactId> | ||
<version>0</version> | ||
<packaging>pom</packaging> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>com.github.eirslett</groupId> | ||
<artifactId>frontend-maven-plugin</artifactId> | ||
<!-- NB! Set <version> to the latest released version of frontend-maven-plugin, like in README.md --> | ||
<version>@project.version@</version> | ||
|
||
<configuration> | ||
<installDirectory>target</installDirectory> | ||
</configuration> | ||
|
||
<executions> | ||
|
||
<execution> | ||
<id>install node and corepack</id> | ||
<goals> | ||
<goal>install-node-and-corepack</goal> | ||
</goals> | ||
<configuration> | ||
<nodeVersion>v20.12.2</nodeVersion> | ||
</configuration> | ||
</execution> | ||
|
||
<execution> | ||
<id>yarn install</id> | ||
<goals> | ||
<goal>corepack</goal> | ||
</goals> | ||
<configuration> | ||
<arguments>yarn install --no-immutable</arguments> | ||
</configuration> | ||
</execution> | ||
|
||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
6 changes: 6 additions & 0 deletions
6
frontend-maven-plugin/src/it/corepack-provided-integration/verify.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
assert new File(basedir, 'target/node').exists() : "Node was not installed in the custom install directory"; | ||
assert new File(basedir, 'node_modules').exists() : "Node modules were not installed in the base directory"; | ||
assert new File(basedir, 'node_modules/less/package.json').exists() : "Less dependency has not been installed successfully"; | ||
|
||
String buildLog = new File(basedir, 'build.log').text | ||
assert buildLog.contains('BUILD SUCCESS') : 'build was not successful' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters