@jahia/create-module 0.0.8 β 0.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/ISSUE_TEMPLATE/bug.yml +45 -0
- package/.github/ISSUE_TEMPLATE/config.yml +8 -0
- package/.github/ISSUE_TEMPLATE/epic.md +26 -0
- package/.github/ISSUE_TEMPLATE/other.md +8 -0
- package/.github/ISSUE_TEMPLATE/release.md +74 -0
- package/.github/ISSUE_TEMPLATE/spike.md +19 -0
- package/.github/ISSUE_TEMPLATE/story.md +27 -0
- package/.github/ISSUE_TEMPLATE/support.yml +40 -0
- package/.github/ISSUE_TEMPLATE/tech-day.md +93 -0
- package/.github/release.yml +24 -0
- package/.github/workflows/delivery-issue-chores.yml +12 -0
- package/README.md +2 -2
- package/index.js +3 -3
- package/package.json +1 -1
- package/template/README.md +1 -1
- package/template/package.json +1 -1
- package/tests/create-templatesSet-project.test.js +6 -1
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# WARNING: This template file is coming from the .github repository
|
|
2
|
+
# Only edit the file there
|
|
3
|
+
# Documentation: https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-issue-forms
|
|
4
|
+
# Syntax: https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema
|
|
5
|
+
|
|
6
|
+
name: Bug Report
|
|
7
|
+
description: File a bug report.
|
|
8
|
+
title: "[BUG] <title>"
|
|
9
|
+
labels: ["need-triage"]
|
|
10
|
+
type: Bug
|
|
11
|
+
projects: ["Jahia/13"]
|
|
12
|
+
body:
|
|
13
|
+
- type: markdown
|
|
14
|
+
attributes:
|
|
15
|
+
value: |
|
|
16
|
+
Thanks for taking the time to fill out this bug report!
|
|
17
|
+
- type: textarea
|
|
18
|
+
attributes:
|
|
19
|
+
label: Environment and versions used
|
|
20
|
+
description: In a list, detail all of the software components and versions needed to reproduce the issue (Jira Version, Modules installed, modules version, ...). If using a SNAPSHOT, please provide the Commit hash.
|
|
21
|
+
validations:
|
|
22
|
+
required: true
|
|
23
|
+
- type: textarea
|
|
24
|
+
attributes:
|
|
25
|
+
label: Steps to reproduce
|
|
26
|
+
description: In a list, details the steps needed to reproduce the issue. Please provide, as far as possible, a minimal reproducible scenario.
|
|
27
|
+
placeholder: |
|
|
28
|
+
1. In this environment...
|
|
29
|
+
2. With this config...
|
|
30
|
+
3. Run '...'
|
|
31
|
+
14. See error...
|
|
32
|
+
validations:
|
|
33
|
+
required: true
|
|
34
|
+
- type: textarea
|
|
35
|
+
attributes:
|
|
36
|
+
label: Current Behavior
|
|
37
|
+
description: A description of the current behavior, including logs (server-side, browser) & stack trace, screenshots/videos, link to CI execution
|
|
38
|
+
validations:
|
|
39
|
+
required: true
|
|
40
|
+
- type: textarea
|
|
41
|
+
attributes:
|
|
42
|
+
label: Desired Behavior
|
|
43
|
+
description: Describe the expected behavior and how it differs from current behavior.
|
|
44
|
+
validations:
|
|
45
|
+
required: true
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# WARNING: This template file is coming from the .github repository
|
|
2
|
+
# Only edit the file there
|
|
3
|
+
|
|
4
|
+
blank_issues_enabled: false
|
|
5
|
+
contact_links:
|
|
6
|
+
- name: Jahia Customer Support
|
|
7
|
+
url: https://support.jahia.com
|
|
8
|
+
about: For customer support inquiries, please visit our support portal. Our support team is not monitoring GitHub issues.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Epic
|
|
3
|
+
about: Create an epic
|
|
4
|
+
title: ''
|
|
5
|
+
type: Epic
|
|
6
|
+
projects: ["Jahia/18"]
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
**As a**
|
|
11
|
+
|
|
12
|
+
**I want to**
|
|
13
|
+
|
|
14
|
+
**In order to**
|
|
15
|
+
|
|
16
|
+
### Non-functional requirements
|
|
17
|
+
- Security
|
|
18
|
+
- Identity management
|
|
19
|
+
- Authentication
|
|
20
|
+
- Authorization
|
|
21
|
+
- Session management
|
|
22
|
+
- Data validation
|
|
23
|
+
- Error handling
|
|
24
|
+
- Performances
|
|
25
|
+
- Migration
|
|
26
|
+
- Documentation
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Release
|
|
3
|
+
about: Create a release
|
|
4
|
+
title: ''
|
|
5
|
+
type: Release
|
|
6
|
+
projects: ["Jahia/29"]
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## :white_check_mark: Summary
|
|
11
|
+
|
|
12
|
+
1. [Minimum Jahia version](#user-content-minimum-jahia-version)
|
|
13
|
+
2. [Testing matrix](#user-content-testing-matrix)
|
|
14
|
+
3. [Prepare checklist](#user-content-prepare-checklist)
|
|
15
|
+
4. [Tests checklist](#user-content-test-checklist)
|
|
16
|
+
5. [Publication checklist](#user-content-publication-checklist)
|
|
17
|
+
|
|
18
|
+
<h2 id="minimum-jahia-version">Minimum Jahia version</h2>
|
|
19
|
+
|
|
20
|
+
> We aim at reducing the possible deployment matrices by regularly bumping up the minimum Jahia version when releasing new versions of our modules.
|
|
21
|
+
When creating a Release ticket for a module, consult with your PM to identify the new minimum Jahia version this module must be associated with.
|
|
22
|
+
The default guideline is for a new module release to be compatible with the 2 previous releases.
|
|
23
|
+
|
|
24
|
+
Current Jahia Version: 8.X.X.X (version currently in the POM)
|
|
25
|
+
Desired Jahia Version: 8.X.X.X
|
|
26
|
+
|
|
27
|
+
<h2 id="testing-matrix">:scroll: Testing matrix</h2>
|
|
28
|
+
|
|
29
|
+
> We aim at clearly documenting the possible deployment scenarios in a matrix and specify which ones are expected to be tested or not.
|
|
30
|
+
In the testing matrix, always use the latest patch version of a particular release
|
|
31
|
+
|
|
32
|
+
|To Test (YES/NO)|Jahia Version|Dependency A|Dependency B|PASS / FAIL|
|
|
33
|
+
|---|---|---|---|---|
|
|
34
|
+
|YES / NO|8.1.1.2|1.0.0|3.0.0|Β |
|
|
35
|
+
|YES / NO|8.1.7.1|2.0.0|3.0.0|Β |
|
|
36
|
+
|
|
37
|
+
:information_source: If you are releasing for the main branch of a module, make sure to complete the checklist below when working on the ticket.
|
|
38
|
+
|
|
39
|
+
<h2 id="prepare-checklist">:pencil2: Prepare checklist</h2>
|
|
40
|
+
|
|
41
|
+
- [ ] All other tickets with that fixVersion are closed
|
|
42
|
+
- [ ] Testing matrix and Minimum Jahia version are detailed
|
|
43
|
+
- [ ] Jahia-parent (minimum Jahia version) was updated if requested in the ticket
|
|
44
|
+
- [ ] The release workflow will [publish](https://github.com/Jahia/sandbox/commit/9a6ab10c8fbe5e11eb7fe3c6b391be2be776319b) a slack notification
|
|
45
|
+
- [ ] Release creation has been triggered from the Github Release UI (https://github.com/Jahia/[module-repo]/releases/new)
|
|
46
|
+
|
|
47
|
+
<h2 id="tests-checklist">:vertical_traffic_light: Tests checklist</h2>
|
|
48
|
+
|
|
49
|
+
General
|
|
50
|
+
- [ ] Manual tests detailing testing steps for validating the release of this module are present on Testrail
|
|
51
|
+
- [ ] Automated tests using the release artifacts were executed
|
|
52
|
+
|
|
53
|
+
Module migration
|
|
54
|
+
- [ ] Upgrade from the previous released version of the module was tested
|
|
55
|
+
- [ ] The upgrade did not require clearing the browser cache (i.e. missing labels)
|
|
56
|
+
|
|
57
|
+
While Testing
|
|
58
|
+
- [ ] No warnings or errors are present in the browser console when testing the module
|
|
59
|
+
- [ ] No warnings or errors are present in Jahia logs when testing the module (incl. migration)
|
|
60
|
+
- [ ] Verified tickets present in the release are actually included in the release artifact
|
|
61
|
+
|
|
62
|
+
After Testing
|
|
63
|
+
- [ ] Tested combinations (Jahia versions, modules versions) are listed in this released ticket
|
|
64
|
+
- [ ] Tested scenarios not detailed in Testrail are listed in this release ticket
|
|
65
|
+
- [ ] The version was updated in the [Selenium integration tests](https://github.com/Jahia/jahia-qa/blob/f4f788d56fd624174302231e3d64878cd343e515/pom.xml#L75)
|
|
66
|
+
|
|
67
|
+
<h2 id="publication-checklist">:rocket: Publication checklist</h2>
|
|
68
|
+
|
|
69
|
+
- [ ] The release changelog was prepared
|
|
70
|
+
- [ ] In case of a major release, a **Breaking Changes** section is present in the Changelog
|
|
71
|
+
- [ ] The artifact was released on Nexus
|
|
72
|
+
- [ ] If applicable, corresponding academy pages were published
|
|
73
|
+
- [ ] The module was published on the store
|
|
74
|
+
- [ ] A message was published on slack #releases channel
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: User Story
|
|
3
|
+
about: Create a user story
|
|
4
|
+
title: ''
|
|
5
|
+
type: Story
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
**As a**
|
|
10
|
+
|
|
11
|
+
**I want to**
|
|
12
|
+
|
|
13
|
+
**In order to**
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Acceptance criteria
|
|
17
|
+
|
|
18
|
+
**Given**
|
|
19
|
+
|
|
20
|
+
**When**
|
|
21
|
+
|
|
22
|
+
**Then**
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Notes
|
|
26
|
+
|
|
27
|
+
Useful information (Technical, Design)
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# WARNING: This template file is coming from the .github repository
|
|
2
|
+
# Only edit the file there
|
|
3
|
+
|
|
4
|
+
# Documentation: https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-issue-forms
|
|
5
|
+
# Syntax: https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema
|
|
6
|
+
|
|
7
|
+
name: Support Request
|
|
8
|
+
description: File a support request.
|
|
9
|
+
title: "<title>"
|
|
10
|
+
labels: ["support-request"]
|
|
11
|
+
type: Sup
|
|
12
|
+
body:
|
|
13
|
+
- type: markdown
|
|
14
|
+
attributes:
|
|
15
|
+
value: |
|
|
16
|
+
Thanks for taking the time to fill out this support request!
|
|
17
|
+
Every two weeks a developer looks at the prioritized requests and answers as many as possible.
|
|
18
|
+
Note that this can lead to the creation of bugs or stories.
|
|
19
|
+
- type: textarea
|
|
20
|
+
attributes:
|
|
21
|
+
label: Context / Problem
|
|
22
|
+
description: A description of the problem for which you need assistance.
|
|
23
|
+
validations:
|
|
24
|
+
required: true
|
|
25
|
+
- type: textarea
|
|
26
|
+
attributes:
|
|
27
|
+
label: Versions used
|
|
28
|
+
description: The list of the versions used (Jahia, modules, jCustomer, Elasticsearch, ...).
|
|
29
|
+
validations:
|
|
30
|
+
required: true
|
|
31
|
+
- type: textarea
|
|
32
|
+
attributes:
|
|
33
|
+
label: Additional information
|
|
34
|
+
description: A description of the current behavior, including logs (server-side, browser) & stack trace, screenshots/videos, link to CI execution
|
|
35
|
+
validations:
|
|
36
|
+
required: true
|
|
37
|
+
placeholder: |
|
|
38
|
+
1. environment used (docker, installer, browser version)
|
|
39
|
+
2. logs (server-side, browser) & stack trace
|
|
40
|
+
3. screenshots/videos
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Tech Day
|
|
3
|
+
about: Create a tech day ticket
|
|
4
|
+
title: ''
|
|
5
|
+
type: Tech Day
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
The goal of this ticket is to work on technical debt for a ticket within a fixed time window of 1 day.
|
|
10
|
+
|
|
11
|
+
## Organizing of your day
|
|
12
|
+
|
|
13
|
+
One day will NOT be sufficient to address technical debt for the codebase, organizing your day is key to wrap-up the tasks with concrete deliverable.
|
|
14
|
+
|
|
15
|
+
We recommend following this schedule:
|
|
16
|
+
- Begin by spending 1 hour to go over the checklist attached to this ticket, identify activities you would be able to complete within the day and create tickets for activities that would require more work or that you don't expect to complete. Make sure to link these new ticket to the techday ticket and to attach it to the checklist.
|
|
17
|
+
- Work on items identified during the first hour.
|
|
18
|
+
- Wrap up your day by spending 1 hour to document the changes you did, provide instructions for testing and eventually to give pointers to the next person working on a techday ticket for this codebase.
|
|
19
|
+
|
|
20
|
+
## Create tickets for future work
|
|
21
|
+
Not all tech debt items can be addressed within a day, the goal of this day is also to raise awareness about tech debt to be tackled in the future.
|
|
22
|
+
|
|
23
|
+
If you see a non-compliant element but you didn't get a chance to work on it, please create the corresponding ticket, attach it to the next fixVersion of the codebase and link it in this ticket.
|
|
24
|
+
|
|
25
|
+
Please fill the checklist available in this ticket, priorities are available as a guideline as to what we consider more or less important for each of the tech areas:
|
|
26
|
+
|
|
27
|
+
π¨ Indicates a required item, to be looked at during the day
|
|
28
|
+
π Indicates a top priority item
|
|
29
|
+
π Indicates a medium priority item
|
|
30
|
+
π Indicates a low priority item
|
|
31
|
+
|
|
32
|
+
## Tech day checklist
|
|
33
|
+
|
|
34
|
+
This checklist is focused on a classic Jahia repository (module, app)
|
|
35
|
+
|
|
36
|
+
### General
|
|
37
|
+
- [ ] π¨ I reviewed all OPEN TECH tickets created for that codebase (using fixVersion=codebase-X.Y.Z-SNAPSHOT)
|
|
38
|
+
- [ ] π¨ I reviewed older tech day tickets for that codebase
|
|
39
|
+
### Javascript
|
|
40
|
+
- [ ] π The module's webpack config is correct ([sample](https://github.com/Jahia/jcontent/blob/master/webpack.config.js))
|
|
41
|
+
- [ ] π The module is using a supported LTS version of ([NodeJS](https://nodejs.org/en/about/previous-releases))
|
|
42
|
+
- [ ] π The module is using React v18+
|
|
43
|
+
- [ ] π The module is using Moonstone v2+
|
|
44
|
+
- [ ] π The module is not using any of the following Jahia's legacy libs:
|
|
45
|
+
* react-material
|
|
46
|
+
* moonstone-alpha
|
|
47
|
+
- [ ] π Dependencies listed in packages.json are still maintained (latest release not older than 6 months)
|
|
48
|
+
- [ ] π Dependencies listed in packages.json are no more than 2 major versions behind their latest release
|
|
49
|
+
- [ ] π Linting is executed properly and show no warnings
|
|
50
|
+
- [ ] π No warning are presents in the browser console when using the app
|
|
51
|
+
### Java
|
|
52
|
+
- [ ] π Java dependencies are explicitly declared in the module's pom.xml
|
|
53
|
+
- [ ] π Spring is not used in the module
|
|
54
|
+
- [ ] π No warnings or errors are present when building the module locally or on GitHub Actions
|
|
55
|
+
- [ ] π No code smell on [Sonarqube](https://sonarqube.jahia.com/projects) for the module
|
|
56
|
+
### Security
|
|
57
|
+
- [ ] π Our security lead confirmed there are no known security vulnerabilities affecting this codebase
|
|
58
|
+
### QA
|
|
59
|
+
- [ ] π Automated tests are using jahia-cypress for all utils functions
|
|
60
|
+
- [ ] π The test framework is using page-object models published by other modules
|
|
61
|
+
- [ ] π The test framework is publishing its own page-object models for use by others
|
|
62
|
+
- [ ] π Automated tests are using a recent version of Cypress
|
|
63
|
+
- [ ] π Automated tests are only relying on supported modules
|
|
64
|
+
### CI/CD
|
|
65
|
+
- [ ] π The build and the release workflows use the JDK 11 image (only if Jahia Parent is set to 8.2.0.0+)
|
|
66
|
+
- [ ] π GitHub Actions (nightlys and other workflows) are executed without warnings (such as depreciations)
|
|
67
|
+
- [ ] π The latest version of the actions are used (including jahia-modules-action)
|
|
68
|
+
### Documentation
|
|
69
|
+
- [ ] π Module's documentation available on the academy is up-to-date
|
|
70
|
+
### GitHub
|
|
71
|
+
- [ ] π [Branch protection](https://confluence.jahia.com/display/PR/GitHub+%28Product%29+-+Ref+ISPOL08.A14025#GitHub(Product)RefISPOL08.A14025-Branchprotection) is enabled for the repository
|
|
72
|
+
- [ ] **Automatically delete head branches** is selected in **Settings**
|
|
73
|
+
- [ ] π The repository contains a README.md file
|
|
74
|
+
- [ ] π Repository topics match are populated (at a minimum: "product" and "supported")
|
|
75
|
+
- [ ] π Stale branches or branches older than 2 years (non-maintenance branches) have been removed
|
|
76
|
+
|
|
77
|
+
## Fork day checklist
|
|
78
|
+
|
|
79
|
+
This checklist is focused on our forked repositories
|
|
80
|
+
|
|
81
|
+
### General
|
|
82
|
+
- [ ] π¨ I checked that we cannot stop using a fork of the library
|
|
83
|
+
- [ ] π¨ I created pull requests to push the fixes done in our fork to the main repository
|
|
84
|
+
- [ ] π¨ I checked that we cannot upgrade to a more recent
|
|
85
|
+
- [ ] π¨ I checked that we've documented why we're still using a fork of this library in [confluence](https://confluence.jahia.com/display/PR/Releasing+our+project+forks)
|
|
86
|
+
### Security
|
|
87
|
+
- [ ] π I checked that there are no known security vulnerabilities affecting this codebase
|
|
88
|
+
### CI/CD
|
|
89
|
+
- [ ] π¨ The build and the release/publish workflows are configured (or at least documented in [confluence](https://confluence.jahia.com/display/PR/Releasing+our+project+forks))
|
|
90
|
+
### GitHub
|
|
91
|
+
- [ ] π [Branch protection](https://confluence.jahia.com/display/PR/GitHub+%28Product%29+-+Ref+ISPOL08.A14025#GitHub(Product)RefISPOL08.A14025-Branchprotection) is enabled for the repository
|
|
92
|
+
- [ ] **Automatically delete head branches** is selected in **Settings**
|
|
93
|
+
- [ ] π Repository topics match are populated (at a minimum: "product" and "supported")
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# DO NOT EDIT
|
|
2
|
+
# This file is managed globally at https://github.com/Jahia/.github
|
|
3
|
+
|
|
4
|
+
# Default types => labels are defined here: https://github.com/commitizen/conventional-commit-types/blob/master/index.json
|
|
5
|
+
#Β feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert
|
|
6
|
+
changelog:
|
|
7
|
+
exclude:
|
|
8
|
+
labels:
|
|
9
|
+
- ignore-for-release
|
|
10
|
+
categories:
|
|
11
|
+
- title: Breaking Changes
|
|
12
|
+
labels:
|
|
13
|
+
- breaking-change
|
|
14
|
+
- title: New Features
|
|
15
|
+
labels:
|
|
16
|
+
- feat
|
|
17
|
+
- feature
|
|
18
|
+
- title: Bug fixes
|
|
19
|
+
labels:
|
|
20
|
+
- bugfix
|
|
21
|
+
- fix
|
|
22
|
+
- title: Other Changes
|
|
23
|
+
labels:
|
|
24
|
+
- "*"
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# DO NOT EDIT
|
|
2
|
+
# This file is managed globally at https://github.com/Jahia/.github
|
|
3
|
+
name: Delivery - Issue Chores
|
|
4
|
+
|
|
5
|
+
on:
|
|
6
|
+
issues:
|
|
7
|
+
issue_comment:
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
WF:
|
|
11
|
+
uses: Jahia/jahia-modules-action/.github/workflows/reusable-delivery-issue-chores.yml@v2
|
|
12
|
+
secrets: inherit
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Javascript Module template create-module project
|
|
2
2
|
|
|
3
|
-
This project provides an NPM/NPX starter project template to quickly get up and running to create Jahia
|
|
3
|
+
This project provides an NPM/NPX starter project template to quickly get up and running to create Jahia Javascript modules
|
|
4
4
|
|
|
5
5
|
## Usage
|
|
6
6
|
|
package/index.js
CHANGED
|
@@ -7,7 +7,6 @@ import path from 'path';
|
|
|
7
7
|
import {fileURLToPath} from 'url';
|
|
8
8
|
import {replaceInFileSync} from 'replace-in-file';
|
|
9
9
|
import camelCase from 'camelcase';
|
|
10
|
-
import {execSync} from 'child_process';
|
|
11
10
|
|
|
12
11
|
const __filename = fileURLToPath(import.meta.url);
|
|
13
12
|
const __dirname = path.dirname(__filename);
|
|
@@ -34,8 +33,6 @@ where
|
|
|
34
33
|
|
|
35
34
|
// First let's do some version checks
|
|
36
35
|
console.log('Node version detected:', process.versions.node);
|
|
37
|
-
const yarnVersion = execSync('yarn --version', {encoding: 'utf8'});
|
|
38
|
-
console.log('Yarn version:', yarnVersion);
|
|
39
36
|
|
|
40
37
|
// Create a project directory with the project name.
|
|
41
38
|
const currentDir = process.cwd();
|
|
@@ -130,6 +127,9 @@ fs.mkdirSync(path.join(projectDir, 'settings', 'content-editor-forms'), {recursi
|
|
|
130
127
|
fs.mkdirSync(path.join(projectDir, 'settings', 'content-editor-forms', 'forms'), {recursive: true});
|
|
131
128
|
fs.mkdirSync(path.join(projectDir, 'settings', 'content-editor-forms', 'fieldsets'), {recursive: true});
|
|
132
129
|
|
|
130
|
+
// Add an empty yarn.lock in case any parent folder is using yarn
|
|
131
|
+
fs.writeFileSync(path.join(projectDir, 'yarn.lock'), '', 'utf8');
|
|
132
|
+
|
|
133
133
|
console.log(`Created \x1B[1m${projectName}\x1B[0m at \x1B[1m${projectDir}\x1B[0m`);
|
|
134
134
|
console.log('Success! Your new project is ready.');
|
|
135
135
|
console.log('You can now change into your project and launch "yarn" to install everything to get started.');
|
package/package.json
CHANGED
package/template/README.md
CHANGED
package/template/package.json
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"static-resources": "/icons,/images,/javascript,/locales"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@jahia/javascript-modules-library": "^0.0
|
|
25
|
+
"@jahia/javascript-modules-library": "0.x || ^1.0.0",
|
|
26
26
|
"graphql": "^16.7.1",
|
|
27
27
|
"i18next": "^23.10.1",
|
|
28
28
|
"react": "^18.2.0",
|
|
@@ -58,7 +58,8 @@ describe('npx @jahia/create-module', () => {
|
|
|
58
58
|
'static/javascript',
|
|
59
59
|
'settings/configurations',
|
|
60
60
|
'settings/content-editor-forms/forms',
|
|
61
|
-
'settings/content-editor-forms/fieldsets'
|
|
61
|
+
'settings/content-editor-forms/fieldsets',
|
|
62
|
+
'yarn.lock'
|
|
62
63
|
];
|
|
63
64
|
if (moduleType === 'templatesSet') {
|
|
64
65
|
// This file should only exist for templates set
|
|
@@ -114,6 +115,10 @@ describe('npx @jahia/create-module', () => {
|
|
|
114
115
|
});
|
|
115
116
|
expect(entries.length).toBe(expectedFilesInArchive.length);
|
|
116
117
|
});
|
|
118
|
+
|
|
119
|
+
// Make sure the package.json contains the dependency @jahia/javascript-modules-library
|
|
120
|
+
const packageJson = JSON.parse(fs.readFileSync(path.join(projectPath, 'package.json'), 'utf8'));
|
|
121
|
+
expect(packageJson.dependencies['@jahia/javascript-modules-library']).toBeDefined();
|
|
117
122
|
}
|
|
118
123
|
);
|
|
119
124
|
});
|