@eui/tools 5.3.33 → 5.3.36

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.
@@ -1 +1 @@
1
- 5.3.33
1
+ 5.3.36
package/CHANGELOG.md CHANGED
@@ -1,3 +1,34 @@
1
+ ## 5.3.36 (2022-07-14)
2
+
3
+ ##### Bug Fixes
4
+
5
+ * **other:**
6
+ * wrong tslint call on package build - EUI-4106 [EUI-4106](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-4106) ([c2651cb0](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/c2651cb0f6262e2c38e3b46e0c66787cbc8e7d92))
7
+
8
+ * * *
9
+ * * *
10
+ ## 5.3.35 (2022-07-14)
11
+
12
+ ##### Chores
13
+
14
+ * **other:**
15
+ * minor - EUI-6231 [EUI-6231](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-6231) ([f0c7b31b](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/f0c7b31bbc6c30daef688f5b4bdbf38a7470ebc5))
16
+ ##### Bug Fixes
17
+
18
+ * **other:**
19
+ * incorrect tsconfig filename ([6c65019b](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/6c65019b150736f2a6bd5d1b9801bbfafe3a5a5b))
20
+
21
+ * * *
22
+ * * *
23
+ ## 5.3.34 (2022-07-14)
24
+
25
+ ##### Chores
26
+
27
+ * **other:**
28
+ * support esLint for apps - EUI-6231 [EUI-6231](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-6231) ([6d211c50](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/6d211c50cd08ec43d1d129fca64ec0bf010dec1c))
29
+
30
+ * * *
31
+ * * *
1
32
  ## 5.3.33 (2022-07-14)
2
33
 
3
34
  ##### Chores
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eui/tools",
3
- "version": "5.3.33",
3
+ "version": "5.3.36",
4
4
  "tag": "latest",
5
5
  "license": "EUPL-1.1",
6
6
  "description": "eUI common tools and scripts",
package/sandbox.js CHANGED
@@ -877,6 +877,6 @@ const versionUtils = require('./scripts/csdr/version/version-utils');
877
877
 
878
878
  Promise.resolve()
879
879
  .then(() => {
880
- const prj = configUtils.projects.getProject('my-workplace-host-playground');
881
- console.log(prj);
880
+ const pkg = configUtils.packages.getPackage('eui', true);
881
+ console.log(pkg);
882
882
  })
@@ -107,7 +107,7 @@ module.exports.getPackage = (pkgName, fromCsdrConfig, optional) => {
107
107
 
108
108
  // additional pkg infos
109
109
  pkg.paths = this.getPackagePaths(pkg);
110
- pkg.tsConfigFileName = path.parse(pkg.paths.tsConfig).name;
110
+ pkg.tsConfigFileName = `${path.parse(pkg.paths.tsConfig).name}.json` ;
111
111
 
112
112
  // devops file location
113
113
  if (pkg.child) {
@@ -58,6 +58,17 @@ const getProjectPaths = (prj) => {
58
58
  nodeModulesPath: nodeModulesPath,
59
59
  };
60
60
 
61
+ // locate and find the TSLint or ESLint configuration files
62
+ if(tools.isFileExists(path.join(rootPath, 'src', 'tslint.json'))) {
63
+ tools.logWarning('TSLint is deprecated and will be removed in the future. Consider migrating to ESLint')
64
+ paths.tslintPath = path.join(rootPath, 'src', 'tslint.json');
65
+ } else if(tools.isFileExists(path.join(rootPath, '.tslint.json'))) {
66
+ tools.logWarning('TSLint is deprecated and will be removed in the future. Consider migrating to ESLint')
67
+ paths.tslintPath = path.join(rootPath, '.tslint.json');
68
+ } else if(tools.isFileExists(path.join(rootPath, 'src', '.eslintrc.json'))) {
69
+ paths.eslintPath = path.join(rootPath, 'src', '.eslintrc.json');
70
+ }
71
+
61
72
  return { paths: paths };
62
73
  }
63
74
 
@@ -156,7 +167,6 @@ module.exports.getCsdrProjects = () => {
156
167
 
157
168
 
158
169
 
159
-
160
170
  module.exports.getTeamsProject = (projects, project) => {
161
171
  let teams = [];
162
172
 
@@ -83,15 +83,29 @@ module.exports.angular = (envTarget, isSnapshot, version, configEnvTargetIn) =>
83
83
  .then(() => {
84
84
  if (!skipLint) {
85
85
  tools.logInfo(`TS Linting application...`);
86
- const tsLintPath = path.join(currentProject.paths.angularPath, 'tslint.json');
87
- var tsConfigPath = path.join(currentProject.paths.angularPath, 'tsconfig.app.json');
88
- if (!tools.isFileExists(tsConfigPath)) {
89
- tsConfigPath = path.join(currentProject.paths.angularPath, 'src', 'tsconfig.app.json');
90
- }
91
- if (tools.isFileExists(tsConfigPath)) {
92
- tools.logInfo(`running tslint -c ${tsLintPath} -p ${tsConfigPath}`);
93
- return tools.runScript(`tslint -c ${tsLintPath} -p ${tsConfigPath}`);
86
+ let tsLintPath = currentProject.paths.tslintPath;
87
+ let esLintPath = currentProject.paths.eslintPath;
88
+
89
+ // TODO: remove TSLint since it's deprecated and should not be used by projects in the future
90
+ if(tsLintPath) {
91
+ tsLintPath = path.join(tsLintPath);
92
+ let tsConfigPath = path.join(currentProject.paths.angularPath, 'tsconfig.app.json');
93
+ tools.logWarning('TSLint is deprecated and will be removed in the future. Consider migrating to ESLint')
94
+ if (!tools.isFileExists(tsConfigPath)) {
95
+ tsConfigPath = path.join(currentProject.paths.angularPath, 'src', 'tsconfig.app.json');
96
+ }
97
+ if (tools.isFileExists(tsConfigPath)) {
98
+ tools.logInfo(`running tslint -c ${tsLintPath} -p ${tsConfigPath}`);
99
+ return tools.runScript(`tslint -c ${tsLintPath} -p ${tsConfigPath}`);
100
+ }
101
+ } else if (esLintPath) {
102
+ // the project path information are located inside the .eslintrc.json
103
+ tools.logInfo(`running ng lint ${currentProject.name}`);
104
+ return tools.runScript(`ng lint ${currentProject.name}`);
105
+ } else {
106
+ tools.logError(`No ESLint or TSLint configuration found for the project`);
94
107
  }
108
+
95
109
  }
96
110
  })
97
111
 
@@ -51,8 +51,8 @@ module.exports.build = (pkg, isMaster) => {
51
51
  if (tools.isFileExists(tsLintPath)) {
52
52
  // TODO: remove TSLint since it's deprecated and should not be used by projects in the future
53
53
  tools.logWarning('TSLint is deprecated and will be removed in the future. Consider migrating to ESLint')
54
- const script = `running tslint -c ${tsLintPath} -p ${pkg.paths.tsConfig} -t verbose`
55
- tools.logInfo(script);
54
+ const script = `tslint -c ${tsLintPath} -p ${pkg.paths.tsConfig} -t verbose`
55
+ tools.logInfo(`running ${script}`);
56
56
  return tools.runScript(script);
57
57
  } else if(tools.isFileExists(esLintPath)) {
58
58
  // the project path information are located inside the .eslintrc.json