@jahia/create-module 0.0.9 → 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.
|
@@ -2,11 +2,20 @@
|
|
|
2
2
|
name: Release
|
|
3
3
|
about: Create a release
|
|
4
4
|
title: ''
|
|
5
|
-
type:
|
|
5
|
+
type: Release
|
|
6
|
+
projects: ["Jahia/29"]
|
|
6
7
|
|
|
7
8
|
---
|
|
8
9
|
|
|
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>
|
|
10
19
|
|
|
11
20
|
> We aim at reducing the possible deployment matrices by regularly bumping up the minimum Jahia version when releasing new versions of our modules.
|
|
12
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.
|
|
@@ -15,7 +24,7 @@ The default guideline is for a new module release to be compatible with the 2 pr
|
|
|
15
24
|
Current Jahia Version: 8.X.X.X (version currently in the POM)
|
|
16
25
|
Desired Jahia Version: 8.X.X.X
|
|
17
26
|
|
|
18
|
-
|
|
27
|
+
<h2 id="testing-matrix">:scroll: Testing matrix</h2>
|
|
19
28
|
|
|
20
29
|
> We aim at clearly documenting the possible deployment scenarios in a matrix and specify which ones are expected to be tested or not.
|
|
21
30
|
In the testing matrix, always use the latest patch version of a particular release
|
|
@@ -27,14 +36,15 @@ In the testing matrix, always use the latest patch version of a particular relea
|
|
|
27
36
|
|
|
28
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.
|
|
29
38
|
|
|
30
|
-
|
|
39
|
+
<h2 id="prepare-checklist">:pencil2: Prepare checklist</h2>
|
|
31
40
|
|
|
32
41
|
- [ ] All other tickets with that fixVersion are closed
|
|
33
42
|
- [ ] Testing matrix and Minimum Jahia version are detailed
|
|
34
43
|
- [ ] Jahia-parent (minimum Jahia version) was updated if requested in the ticket
|
|
35
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)
|
|
36
46
|
|
|
37
|
-
|
|
47
|
+
<h2 id="tests-checklist">:vertical_traffic_light: Tests checklist</h2>
|
|
38
48
|
|
|
39
49
|
General
|
|
40
50
|
- [ ] Manual tests detailing testing steps for validating the release of this module are present on Testrail
|
|
@@ -54,7 +64,7 @@ After Testing
|
|
|
54
64
|
- [ ] Tested scenarios not detailed in Testrail are listed in this release ticket
|
|
55
65
|
- [ ] The version was updated in the [Selenium integration tests](https://github.com/Jahia/jahia-qa/blob/f4f788d56fd624174302231e3d64878cd343e515/pom.xml#L75)
|
|
56
66
|
|
|
57
|
-
|
|
67
|
+
<h2 id="publication-checklist">:rocket: Publication checklist</h2>
|
|
58
68
|
|
|
59
69
|
- [ ] The release changelog was prepared
|
|
60
70
|
- [ ] In case of a major release, a **Breaking Changes** section is present in the Changelog
|
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,11 +127,8 @@ 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
|
|
|
133
|
-
// Add
|
|
134
|
-
|
|
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`);
|
|
130
|
+
// Add an empty yarn.lock in case any parent folder is using yarn
|
|
131
|
+
fs.writeFileSync(path.join(projectDir, 'yarn.lock'), '', 'utf8');
|
|
138
132
|
|
|
139
133
|
console.log(`Created \x1B[1m${projectName}\x1B[0m at \x1B[1m${projectDir}\x1B[0m`);
|
|
140
134
|
console.log('Success! Your new project is ready.');
|
package/package.json
CHANGED
package/template/README.md
CHANGED
package/template/package.json
CHANGED
|
@@ -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
|