Damien.J
Damien.J

Reputation: 25

npm install the generator-jhipster 6.8.0 that is different with where from github

when i use the [npm i generator-jhipster] to download the generator-jhipster, i found some different with where from github,such as [generators\server\templates\src\main\java\package\repository\PersistenceAuditEventRepository.java.ejs]

<%_ if (reactive) { _%>
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
<%_ } _%>

import java.time.Instant;
<%_ if (!reactive) { _%>
import java.util.List;
<%_ } _%>

/**
 * Spring Data <% if (databaseType === 'sql') { %>JPA<% } else if (databaseType === 'mongodb') { %>MongoDB<% } else if (databaseType === 'couchbase') { %>Couchbase<% } %> repository for the {@link PersistentAuditEvent} entity.
 */

here is the code where from githup

<%_ if (reactive) { _%>
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
<%_ } _%>

import java.time.Instant;
<%_ if (databaseType === 'sql' && reactive) { _%>
import java.time.LocalDateTime;
import java.time.ZoneOffset;
import java.util.Map;
<%_ } _%>
<%_ if (!reactive) { _%>
import java.util.List;
<%_ } _%>

/**
 * Spring Data <% if (databaseType === 'sql' && !reactive) { %>JPA<% } else if (databaseType === 'sql' && reactive) { %>R2DBC<% } else if (databaseType === 'mongodb') { %>MongoDB<% } else if (databaseType === 'couchbase') { %>Couchbase<% } %> repository for the {@link PersistentAuditEvent} entity.
 */

https://github.com/jhipster/generator-jhipster/blob/master/generators/server/templates/src/main/java/package/repository/PersistenceAuditEventRepository.java.ejs

we can clearly see there has no judge about the [(databaseType === 'sql' && reactive)] in code where from npm install. Importantly, their package.json both are 6.8.0, i'm totally confuse

Upvotes: 1

Views: 492

Answers (1)

vicpermir
vicpermir

Reputation: 3702

What you see in GitHub doesn't have to match what you install, because on GitHub you see changes that have not been released yet.

In particular, version 6.8.0 was released on March 8, 2020 while the changes you mention were commited on March 12, 2020 (here), after version 6.8.0 was released.

The repository contains the most up-to-date changes, while a version release is a snapshot of the repo at certain date (considered to be stable).

Upvotes: 4

Related Questions