Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
* processes. In addition, it allows to avoid writes on disk of the file already
* exists and has exactly the same generated content, preventing file system
* watchers to trigger unnecessary events.
*
* @since 24.4
*/
public abstract class AbstractFileGeneratorFallibleCommand
implements FallibleCommand {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@

import static com.vaadin.flow.server.Constants.DEV_BUNDLE_JAR_PATH;

/**
* @since 25.1
*/
public class BundleBuildUtils {

private static Logger getLogger() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ public final class BundleValidationUtil {
* @param mode
* Vaadin application mode
* @return true if a new frontend bundle is needed, false otherwise
* @since 24.4
*/
public static boolean needsBuild(Options options,
FrontendDependenciesScanner frontendDependencies, Mode mode) {
Expand Down Expand Up @@ -319,6 +320,7 @@ public static boolean hasJarBundle(String jarPath, ClassFinder finder) {
* @param frontendDependencies
* frontend dependency scanner
* @return package.json content as JsonNode
* @since 24.4
*/
public static JsonNode getPackageJson(Options options,
FrontendDependenciesScanner frontendDependencies) {
Expand Down Expand Up @@ -448,6 +450,7 @@ private static void cleanOldPlatformDependencies(JsonNode packageJson) {
* @param npmPackages
* npm packages map
* @return {@code true} if up to date
* @since 24.7
*/
public static boolean hashAndBundleModulesEqual(JsonNode statsJson,
JsonNode packageJson, Map<String, String> npmPackages) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public interface EndpointGeneratorTaskFactory {
* @param options
* the task options
* @return an endpoint tasks for generating TypeScript files for endpoints.
* @since 24.0
*/
TaskGenerateEndpoint createTaskGenerateEndpoint(Options options);

Expand All @@ -40,6 +41,7 @@ public interface EndpointGeneratorTaskFactory {
* @param options
* the task options
* @return an endpoint task that generates open api json file.
* @since 24.0
*/
TaskGenerateOpenAPI createTaskGenerateOpenAPI(Options options);
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
/**
* Excludes dependencies listed in an "exclusions" array of
* vaadin-*versions.json file from a package.json.
*
* @since 24.4
*/
public class ExclusionFilter implements Serializable {

Expand Down Expand Up @@ -63,6 +65,7 @@ public ExclusionFilter(ClassFinder finder, boolean reactEnabled) {
* whether React is enabled
* @param excludeWebComponentNpmPackages
* whether to exclude web component npm packages
* @since 24.6
*/
public ExclusionFilter(ClassFinder finder, boolean reactEnabled,
boolean excludeWebComponentNpmPackages) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* Thrown by {@link FallibleCommand} if it's unable to complete its execution.
*
* @author Vaadin Ltd
* @since 2.0
* @since 25.0
*
*/
public class ExecutionFailedException extends Exception {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
* For internal use only. May be renamed or removed in a future release.
*
* @author Vaadin Ltd
* @since 2.2
*/
public interface FallibleCommand {

Expand All @@ -45,6 +46,7 @@ public interface FallibleCommand {
*
* @param support
* the generated file support utility to use.
* @since 24.4
*/
default void setGeneratedFileSupport(GeneratedFilesSupport support) {
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@
* build process.
* <p>
* For internal use only. May be renamed or removed in a future release.
*
* @since 25.1
*/
public class FrontendBuildUtils {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,22 @@
*
* @author Vaadin Ltd
*
* @since 3.1
*/
public class FrontendTools {

/**
* This is the version that is installed if there is no node installed or
* the installed version is older than {@link #SUPPORTED_NODE_VERSION}, i.e.
* {@value #SUPPORTED_NODE_MAJOR_VERSION}.{@value #SUPPORTED_NODE_MINOR_VERSION}.
*
* @since 4.0
*/
public static final String DEFAULT_NODE_VERSION = "v24.17.0";
/**
* This is the version shipped with the default Node version.
*
* @since 9.0
*/
public static final String DEFAULT_NPM_VERSION = "11.13.0";

Expand Down Expand Up @@ -99,6 +104,8 @@ public class FrontendTools {
/**
* Maximum supported Node.js major version. Versions with a higher major
* version are not tested and may not be compatible.
*
* @since 25.0
*/
public static final int MAX_SUPPORTED_NODE_MAJOR_VERSION = 24;
private static final int SUPPORTED_NPM_MAJOR_VERSION = 11;
Expand All @@ -111,6 +118,8 @@ public class FrontendTools {
* Minimum Node.js version for auto-installed versions in ~/.vaadin. Global
* installations are accepted if they meet SUPPORTED_NODE_VERSION, but
* auto-installed versions must meet this higher threshold.
*
* @since 25.0
*/
public static final FrontendVersion MINIMUM_AUTO_INSTALLED_NODE = new FrontendVersion(
24, 10, 0);
Expand Down Expand Up @@ -199,6 +208,7 @@ String getScript() {
*
* @param settings
* tooling settings to use
* @since 9.0
*/
public FrontendTools(FrontendToolsSettings settings) {
this.baseDir = Objects.requireNonNull(settings.getBaseDir());
Expand All @@ -220,6 +230,7 @@ public FrontendTools(FrontendToolsSettings settings) {
* the project root directory
* @param applicationConfiguration
* the configuration for the application
* @since 23.0
*/
public FrontendTools(ApplicationConfiguration applicationConfiguration,
File projectRoot) {
Expand Down Expand Up @@ -259,6 +270,7 @@ public FrontendTools(ApplicationConfiguration applicationConfiguration,
* {@link FrontendTools#FrontendTools(FrontendToolsSettings)}
* instead, as it simplifies configuring the frontend tools and
* gives the default values to configuration parameters.
* @since 9.0
*/
@Deprecated
public FrontendTools(String baseDir, Supplier<String> alternativeDirGetter,
Expand Down Expand Up @@ -390,6 +402,7 @@ public List<String> getPnpmExecutable() {
*
* @return the list of all commands in sequence that need to be executed to
* have bun running
* @since 24.3
*/
public List<String> getBunExecutable() {
List<String> bunCommand = getSuitableBun();
Expand Down Expand Up @@ -451,6 +464,7 @@ public void validateNodeAndNpmVersion() {
* @return the version of the node executable
* @throws UnknownVersionException
* if the node version cannot be determined
* @since 8.0.5
*/
public FrontendVersion getNodeVersion() throws UnknownVersionException {
return getNodeVersionAndExecutable().getFirst();
Expand Down Expand Up @@ -520,6 +534,7 @@ File getNpmCacheDir()
* @return the version of npm.
* @throws UnknownVersionException
* if the npm command fails or returns unexpected output.
* @since 9.0
*/
public FrontendVersion getNpmVersion() throws UnknownVersionException {
List<String> npmVersionCommand = new ArrayList<>(
Expand All @@ -541,6 +556,7 @@ public FrontendVersion getNpmVersion() throws UnknownVersionException {
* the npm command to invoke for {@code --version}
* @return {@code true} if the installed npm is new enough; {@code false} if
* it is older or its version cannot be determined
* @since 25.2
*/
public boolean npmSupportsMinReleaseAge(List<String> npmCommand) {
List<String> versionCmd = new ArrayList<>(npmCommand);
Expand Down Expand Up @@ -570,6 +586,7 @@ public boolean npmSupportsMinReleaseAge(List<String> npmCommand) {
* @return the path to the executable.
* @throws CommandExecutionException
* if the node resolution fails.
* @since 24.8
*/
public Path getNpmPackageExecutable(String packageName, String binName,
File cwd) throws CommandExecutionException {
Expand All @@ -595,6 +612,7 @@ public Path getNpmPackageExecutable(String packageName, String binName,
* @return the flags
* @deprecated Webpack is not used anymore, this method is obsolete and have
* no replacements.
* @since 9.0.4
*/
@Deprecated(forRemoval = true, since = "24.8")
public Map<String, String> getWebpackNodeEnvironment() {
Expand Down Expand Up @@ -790,6 +808,7 @@ private String getAlternativeDir() {
* part of a process builder command.
*
* @return the path to the node binary
* @since 23.0
*/
public String getNodeBinary() {
return getNodeExecutable();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
* <p>
* For internal use only. May be renamed or removed in a future release.
*
* @since 1.2
* @since 2.0
*/
public class FrontendToolsLocator implements Serializable {
private static final String FAILED_WITH_EXIT_CODE_MSG = "Command '{}' failed with exit code '{}'";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
* <p>
* This can be modified, but the choices will be locked in {@link FrontendTools}
* when it is initialized. Until then any settings can be changed.
*
* @since 9.0
*/
public class FrontendToolsSettings implements Serializable {

Expand Down Expand Up @@ -161,6 +163,7 @@ public void setForceAlternativeNode(boolean forceAlternativeNode) {
*
* @param nodeFolder
* the folder path, or null to use default resolution
* @since 25.0.4
*/
public void setNodeFolder(String nodeFolder) {
this.nodeFolder = nodeFolder;
Expand Down Expand Up @@ -235,6 +238,7 @@ public boolean isForceAlternativeNode() {
* Get the configured node folder.
*
* @return the node folder path, or null if not configured
* @since 25.0.4
*/
public String getNodeFolder() {
return nodeFolder;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ public FrontendWebComponentGenerator(ClassFinder finder) {
* @return generated files
* @throws java.lang.IllegalStateException
* if {@code finder} cannot locate required classes
* @since 6.0
*/
public Set<File> generateWebComponents(File outputDirectory,
ThemeDefinition theme) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
* a dev server.
* <p>
* For internal use only. May be renamed or removed in a future release.
*
* @since 24.0
*/
public class GenerateMainImports extends AbstractUpdateImports {
private JsonNode statsJson;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
* files are tracked and can be fetched by post-processing tasks.
* <p>
* For internal use only. May be renamed or removed in a future release.
*
* @since 24.4
*/
public final class GeneratedFilesSupport {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
* For internal use only. May be renamed or removed in a future release.
*
* @author Vaadin Ltd
* @since 1.0.
* @since 2.0.2
*/
public class JarContentsManager {
private static final String JAR_PATH_SEPARATOR = "/";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ public class NodeTasks implements FallibleCommand {
*
* @param options
* the options
* @since 23.3
*/
public NodeTasks(Options options) {
FrontendDependenciesScanner frontendDependencies = options
Expand Down Expand Up @@ -453,6 +454,9 @@ private void releaseLock() {
}
}

/**
* @since 24.3
*/
public record NodeTasksLockInfo(long pid,
String commandLine) implements Serializable {
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ public abstract class NodeUpdater implements FallibleCommand {
*
* @param options
* the task options
* @since 25.1.2
*/
protected NodeUpdater(Options options) {
this.finder = options.getClassFinder();
Expand Down Expand Up @@ -621,6 +622,7 @@ Logger log() {
* the package json content
* @throws IOException
* when file IO fails
* @since 24.7
*/
protected void generateVersionsJson(ObjectNode packageJson)
throws IOException {
Expand Down
Loading
Loading