@jahia/create-module 0.0.7 β†’ 0.0.9

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.
@@ -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,8 @@
1
+ ---
2
+ name: Other
3
+ about: Create a GitHub issue without using a template
4
+ title: ''
5
+ labels: need-triage
6
+ type: Task
7
+
8
+ ---
@@ -0,0 +1,64 @@
1
+ ---
2
+ name: Release
3
+ about: Create a release
4
+ title: ''
5
+ type: Task
6
+
7
+ ---
8
+
9
+ ## Minimum Jahia Version
10
+
11
+ > We aim at reducing the possible deployment matrices by regularly bumping up the minimum Jahia version when releasing new versions of our modules.
12
+ 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.
13
+ The default guideline is for a new module release to be compatible with the 2 previous releases.
14
+
15
+ Current Jahia Version: 8.X.X.X (version currently in the POM)
16
+ Desired Jahia Version: 8.X.X.X
17
+
18
+ ## Testing matrix
19
+
20
+ > We aim at clearly documenting the possible deployment scenarios in a matrix and specify which ones are expected to be tested or not.
21
+ In the testing matrix, always use the latest patch version of a particular release
22
+
23
+ |To Test (YES/NO)|Jahia Version|Dependency A|Dependency B|PASS / FAIL|
24
+ |---|---|---|---|---|
25
+ |YES / NO|8.1.1.2|1.0.0|3.0.0|Β |
26
+ |YES / NO|8.1.7.1|2.0.0|3.0.0|Β |
27
+
28
+ :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.
29
+
30
+ ## Prepare Checklist
31
+
32
+ - [ ] All other tickets with that fixVersion are closed
33
+ - [ ] Testing matrix and Minimum Jahia version are detailed
34
+ - [ ] Jahia-parent (minimum Jahia version) was updated if requested in the ticket
35
+ - [ ] The release workflow will [publish](https://github.com/Jahia/sandbox/commit/9a6ab10c8fbe5e11eb7fe3c6b391be2be776319b) a slack notification
36
+
37
+ ## Tests Checklist
38
+
39
+ General
40
+ - [ ] Manual tests detailing testing steps for validating the release of this module are present on Testrail
41
+ - [ ] Automated tests using the release artifacts were executed
42
+
43
+ Module migration
44
+ - [ ] Upgrade from the previous released version of the module was tested
45
+ - [ ] The upgrade did not require clearing the browser cache (i.e. missing labels)
46
+
47
+ While Testing
48
+ - [ ] No warnings or errors are present in the browser console when testing the module
49
+ - [ ] No warnings or errors are present in Jahia logs when testing the module (incl. migration)
50
+ - [ ] Verified tickets present in the release are actually included in the release artifact
51
+
52
+ After Testing
53
+ - [ ] Tested combinations (Jahia versions, modules versions) are listed in this released ticket
54
+ - [ ] Tested scenarios not detailed in Testrail are listed in this release ticket
55
+ - [ ] The version was updated in the [Selenium integration tests](https://github.com/Jahia/jahia-qa/blob/f4f788d56fd624174302231e3d64878cd343e515/pom.xml#L75)
56
+
57
+ ## Publication Checklist
58
+
59
+ - [ ] The release changelog was prepared
60
+ - [ ] In case of a major release, a **Breaking Changes** section is present in the Changelog
61
+ - [ ] The artifact was released on Nexus
62
+ - [ ] If applicable, corresponding academy pages were published
63
+ - [ ] The module was published on the store
64
+ - [ ] A message was published on slack #releases channel
@@ -0,0 +1,19 @@
1
+ ---
2
+ name: Spike
3
+ about: Create a spike
4
+ title: ''
5
+ type: Spike
6
+
7
+ ---
8
+
9
+ **The goal of the spike is to**
10
+
11
+
12
+ ### Outcomes
13
+
14
+ Story ? POC ? Documentation ?
15
+
16
+
17
+ ### Notes
18
+
19
+ Useful information (Technical, Design)
@@ -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/index.js CHANGED
@@ -130,6 +130,12 @@ fs.mkdirSync(path.join(projectDir, 'settings', 'content-editor-forms'), {recursi
130
130
  fs.mkdirSync(path.join(projectDir, 'settings', 'content-editor-forms', 'forms'), {recursive: true});
131
131
  fs.mkdirSync(path.join(projectDir, 'settings', 'content-editor-forms', 'fieldsets'), {recursive: true});
132
132
 
133
+ // Add the latest @jahia/javascript-modules-library
134
+ execSync('yarn add @jahia/javascript-modules-library', {cwd: projectDir});
135
+ const javascriptModulesLibraryInfo = execSync('yarn info @jahia/javascript-modules-library version --json', {cwd: projectDir, encoding: 'utf8'});
136
+ const javascriptModulesLibraryInfoValue = JSON.parse(javascriptModulesLibraryInfo).value;
137
+ console.log(`Added ${javascriptModulesLibraryInfoValue} to the project`);
138
+
133
139
  console.log(`Created \x1B[1m${projectName}\x1B[0m at \x1B[1m${projectDir}\x1B[0m`);
134
140
  console.log('Success! Your new project is ready.');
135
141
  console.log('You can now change into your project and launch "yarn" to install everything to get started.');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jahia/create-module",
3
- "version": "0.0.7",
3
+ "version": "0.0.9",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "bin": "./index.js",
@@ -18,11 +18,10 @@
18
18
  "module-dependencies": "default",
19
19
  "module-type": "$$MODULE_TYPE$$",
20
20
  "module-type-comment": "Use templatesSet in the module type to declare a template set",
21
- "server": "dist/main.js",
21
+ "server": "main.js",
22
22
  "static-resources": "/icons,/images,/javascript,/locales"
23
23
  },
24
24
  "dependencies": {
25
- "@jahia/javascript-modules-library": "^0.0.4",
26
25
  "graphql": "^16.7.1",
27
26
  "i18next": "^23.10.1",
28
27
  "react": "^18.2.0",
@@ -114,6 +114,10 @@ describe('npx @jahia/create-module', () => {
114
114
  });
115
115
  expect(entries.length).toBe(expectedFilesInArchive.length);
116
116
  });
117
+
118
+ // Make sure the package.json contains the dependency @jahia/javascript-modules-library
119
+ const packageJson = JSON.parse(fs.readFileSync(path.join(projectPath, 'package.json'), 'utf8'));
120
+ expect(packageJson.dependencies['@jahia/javascript-modules-library']).toBeDefined();
117
121
  }
118
122
  );
119
123
  });