@eui/tools 6.3.38 → 6.3.39

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
- 6.3.38
1
+ 6.3.39
package/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ ## 6.3.39 (2023-02-20)
2
+
3
+ ##### Bug Fixes
4
+
5
+ * **other:**
6
+ * added shalow clone option - force caniuse-lite to all resolutions injection - EUI-6448 [EUI-6448](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-6448) ([8b43faec](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/8b43faec931c30e99f1f0114d21117d333f676c4))
7
+
8
+ * * *
9
+ * * *
1
10
  ## 6.3.38 (2023-02-19)
2
11
 
3
12
  ##### Bug Fixes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eui/tools",
3
- "version": "6.3.38",
3
+ "version": "6.3.39",
4
4
  "tag": "latest",
5
5
  "license": "EUPL-1.1",
6
6
  "description": "eUI common tools and scripts",
@@ -5,7 +5,7 @@ const gitUtils = require('../../utils/git-utils');
5
5
 
6
6
  const innerMeta = require('./meta');
7
7
 
8
- const { skipEuiToolsClone } = tools.getArgs();
8
+ const { skipEuiToolsClone, shallowClone } = tools.getArgs();
9
9
 
10
10
 
11
11
  const getRepos = (project, pkg, prjOnly, pkgOnly) => {
@@ -71,7 +71,7 @@ const cloneAndCheckout = (repo, args) => {
71
71
 
72
72
  return Promise.resolve()
73
73
  .then(() => {
74
- return gitUtils.cloneAndCheckout(repo.uri, repo.folder, args.branch);
74
+ return gitUtils.cloneAndCheckout(repo.uri, repo.folder, args.branch, false, shallowClone);
75
75
  })
76
76
 
77
77
  .catch((e) => {
@@ -1,4 +1,5 @@
1
1
  {
2
2
  "minimist": ">=1.2.6",
3
- "xmlhttprequest-ssl": ">=1.6.1"
3
+ "xmlhttprequest-ssl": ">=1.6.1",
4
+ "caniuse-lite" : "1.0.30001450"
4
5
  }
@@ -5,5 +5,6 @@
5
5
  "isbinaryfile": "4.0.8",
6
6
  "postcss-preset-env": "7.6.0",
7
7
  "klaw": "3.0.0",
8
- "eslint-plugin-jsdoc": "38.1.6"
8
+ "eslint-plugin-jsdoc": "38.1.6",
9
+ "caniuse-lite" : "1.0.30001450"
9
10
  }
@@ -3,5 +3,6 @@
3
3
  "https-proxy-agent": ">=2.2.3",
4
4
  "mem": ">=4.3.0 <=8.1.1",
5
5
  "zone.js": ">=0.11.5",
6
- "nth-check": ">=2.0.1"
6
+ "nth-check": ">=2.0.1",
7
+ "caniuse-lite" : "1.0.30001450"
7
8
  }
@@ -1,3 +1,4 @@
1
1
  {
2
- "cacheable-request": ">=10.2.7"
2
+ "cacheable-request": ">=10.2.7",
3
+ "caniuse-lite" : "1.0.30001450"
3
4
  }
@@ -11,5 +11,6 @@
11
11
  "winston": "2.4.6",
12
12
  "node-fetch": "2.6.7",
13
13
  "mocha": "8.4.0",
14
- "sass": "1.39.0"
14
+ "sass": "1.39.0",
15
+ "caniuse-lite" : "1.0.30001450"
15
16
  }
@@ -12,7 +12,7 @@ const configUtils = require('../config/config-utils');
12
12
  const { dryRun, skipClone } = tools.getArgs();
13
13
 
14
14
 
15
- module.exports.cloneMetadataRepo = (noHistory = false) => {
15
+ module.exports.cloneMetadataRepo = (shallow = false) => {
16
16
  const configOptions = configUtils.global.getConfigOptions();
17
17
 
18
18
  tools.logTitle('Cloning devops metadata repo');
@@ -24,7 +24,7 @@ module.exports.cloneMetadataRepo = (noHistory = false) => {
24
24
  } else {
25
25
  return Promise.resolve()
26
26
  .then(() => {
27
- return gitUtils.cloneRepo(configOptions.DEVOPS_METADATA_REPOSITORY, configOptions.DEVOPS_METADATA_PATH, false, noHistory);
27
+ return gitUtils.cloneRepo(configOptions.DEVOPS_METADATA_REPOSITORY, configOptions.DEVOPS_METADATA_PATH, false, shallow);
28
28
  })
29
29
  .catch((e) => {
30
30
  throw e;
@@ -267,7 +267,7 @@ const getGitHost = (externalRepo) => {
267
267
  }
268
268
 
269
269
 
270
- const cloneRepo = (repoUri, folder, forced = false, noHistory = false, externalRepo = false) => {
270
+ const cloneRepo = (repoUri, folder, forced = false, shallow = false, externalRepo = false) => {
271
271
  return Promise.resolve()
272
272
  .then(() => {
273
273
  if (tools.isDirExists(folder) && forced) {
@@ -283,7 +283,7 @@ const cloneRepo = (repoUri, folder, forced = false, noHistory = false, externalR
283
283
  const auth = process.env.gituser && process.env.gitpassword ? `${process.env.gituser}:${process.env.gitpassword}@` : '';
284
284
  const gitHost = getGitHost(externalRepo);
285
285
 
286
- if (noHistory) {
286
+ if (shallow) {
287
287
  execa.shellSync(`git clone --depth 1 https://${auth}${gitHost}${repoUri} ${folder}`);
288
288
  } else {
289
289
  execa.shellSync(`git clone https://${auth}${gitHost}${repoUri} ${folder}`);
@@ -303,10 +303,25 @@ const cloneRepo = (repoUri, folder, forced = false, noHistory = false, externalR
303
303
  }
304
304
 
305
305
 
306
- const checkout = (branch, folder) => {
306
+ const checkout = (branch, folder, shallow = false) => {
307
307
  tools.logInfo(`Checking out branch ${branch} in folder "${folder}"...`)
308
308
 
309
309
  return Promise.resolve()
310
+ .then(() => {
311
+ if (shallow) {
312
+ tools.logInfo(`As shallow cloning: set ${branch} as remote branch tracking...`)
313
+ return Promise.resolve()
314
+ .then(() => {
315
+ return execa.shell(`git remote set-branches --add origin ${branch}`, { cwd: folder, stdio: 'inherit' });
316
+ })
317
+ .then(() => {
318
+ return execa.shell(`git fetch --depth 1 origin ${branch}`, { cwd: folder, stdio: 'inherit' });
319
+ })
320
+ .catch((e) => {
321
+ throw e;
322
+ })
323
+ }
324
+ })
310
325
  .then(() => {
311
326
  return execa.shell(`git checkout ${branch}`, { cwd: folder, stdio: 'inherit' })
312
327
  .then(() => {
@@ -324,12 +339,12 @@ const checkout = (branch, folder) => {
324
339
  }
325
340
 
326
341
 
327
- const cloneAndCheckout = (repoUri, folder, branch) => {
342
+ const cloneAndCheckout = (repoUri, folder, branch, forced, shallow) => {
328
343
  tools.logInfo(`cloning ${repoUri} in ${folder} on branch ${branch}`);
329
344
 
330
345
  return Promise.resolve()
331
346
  .then(() => {
332
- return cloneRepo(repoUri, folder);
347
+ return cloneRepo(repoUri, folder, forced, shallow);
333
348
  })
334
349
 
335
350
  .then(() => {
@@ -339,7 +354,7 @@ const cloneAndCheckout = (repoUri, folder, branch) => {
339
354
 
340
355
  return Promise.resolve()
341
356
  .then(() => {
342
- return checkout(branch, folder);
357
+ return checkout(branch, folder, shallow);
343
358
  })
344
359
  .catch((e) => {
345
360
  tools.logError(`Branch ${branch} NOT FOUND, retrying on develop`);
@@ -387,7 +387,7 @@ module.exports.injectExternalMock = (project) => {
387
387
  tools.logInfo('No external mock setup...skipping')
388
388
 
389
389
  } else {
390
- return gitUtils.cloneRepo(project.mock.repository, project.mock.folder);
390
+ return gitUtils.cloneRepo(project.mock.repository, project.mock.folder, false, true);
391
391
  }
392
392
  })
393
393