【问题标题】:npm install the generator-jhipster 6.8.0 that is different with where from githubnpm install the generator-jhipster 6.8.0 that is different with where from github
【发布时间】:2020-04-03 16:50:11
【问题描述】:

当我使用 [npm i generator-jhipster] 下载 generator-jhipster 时,我发现与来自 github 的地方有些不同,例如 [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.
 */

这是来自 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

我们可以清楚地看到,在 npm install 的代码中没有判断 [(databaseType === 'sql' && reactive)]。 重要的是,他们的 package.json 都是 6.8.0,我完全糊涂了

【问题讨论】:

    标签: jhipster


    【解决方案1】:

    您在GitHub 中看到的内容不必与您安装的内容相匹配,因为在 GitHub 上您会看到尚未发布的更改。

    特别是,6.8.0 的版本是 2020 年 3 月 8 日released,而您提到的更改是在 2020 年 3 月 12 日提交的 (here) , 在6.8.0 版本发布之后。

    存储库包含最新的更改,而版本发布是特定日期的存储库快照(被认为是稳定的)。

    【讨论】:

      猜你喜欢
      • 2022-12-02
      • 2015-04-09
      • 2022-12-02
      • 2019-09-21
      • 2011-04-16
      • 2022-12-02
      • 2018-11-09
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多