aberlaas 2.8.0 → 2.9.0

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.
@@ -3,6 +3,7 @@ import Gilmore from 'gilmore';
3
3
  import { copy, error as firostError, isFile, move, read, write } from 'firost';
4
4
  import { _ } from 'golgoth';
5
5
  import helper from '../../helper.js';
6
+ import nodeConfig from '../../configs/node.cjs';
6
7
 
7
8
  /**
8
9
  * This hold functions shared for both the monorepo and simple init scenarios
@@ -79,6 +80,26 @@ export default {
79
80
  await write(actualContent, licensePath);
80
81
  },
81
82
 
83
+ /**
84
+ * Add CircleCI Config file
85
+ **/
86
+ async addCircleCIConfigFile() {
87
+ const configFilepath = helper.hostPath('./.circleci/config.yml');
88
+
89
+ // Start by adding a template
90
+ await this.copyToHost('templates/_circleci/config.yml', configFilepath);
91
+
92
+ // Replace placeholder with real value
93
+ const templateContent = await read(configFilepath);
94
+ const actualContent = _.chain(templateContent)
95
+ .replace('{nodeVersion}', nodeConfig.nodeVersion)
96
+ .replace('{yarnVersion}', nodeConfig.yarnVersion)
97
+ .value();
98
+
99
+ // Write it again
100
+ await write(actualContent, configFilepath);
101
+ },
102
+
82
103
  /**
83
104
  * Add default script files
84
105
  **/
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "aberlaas",
3
3
  "type": "module",
4
4
  "description": "Scaffold your JavaScript projects with tests, lint and release scripts",
5
- "version": "2.8.0",
5
+ "version": "2.9.0",
6
6
  "repository": "pixelastic/aberlaas",
7
7
  "homepage": "https://projects.pixelastic.com/aberlaas/",
8
8
  "author": "Tim Carry (@pixelastic)",
@@ -78,5 +78,5 @@
78
78
  "lint:fix": "ABERLAAS_CWD=$INIT_CWD yarn g:lint:fix",
79
79
  "postinstall": "./scripts/postinstall"
80
80
  },
81
- "gitHead": "cf8d18533d7a85069d52bb3d2ba5fe1627bef71b"
81
+ "gitHead": "26cb1b6e33199730ccfb693ef92584f35cfa2aea"
82
82
  }
@@ -3,12 +3,20 @@ version: 2.1
3
3
  aliases:
4
4
  - &defaults
5
5
  docker:
6
- - image: cimg/node:18.18.0
6
+ - image: cimg/node:{nodeVersion}
7
7
  - &restore_cache
8
8
  restore_cache:
9
9
  key: yarn-cache-{{ checksum "yarn.lock" }}
10
- - &yarn_install
11
- run: 'yarn install'
10
+ - &install_yarn
11
+ run:
12
+ name: 'Installing correct yarn version'
13
+ command: |
14
+ corepack enable --install-directory="/home/circleci/bin"
15
+ yarn set version {yarnVersion}
16
+ - &install_dependencies
17
+ run:
18
+ name: 'Installing dependencies'
19
+ command: 'yarn install'
12
20
  - &save_cache
13
21
  save_cache:
14
22
  key: yarn-cache-{{ checksum "yarn.lock" }}
@@ -21,7 +29,8 @@ jobs:
21
29
  steps:
22
30
  - checkout
23
31
  - *restore_cache
24
- - *yarn_install
32
+ - *install_yarn
33
+ - *install_dependencies
25
34
  - *save_cache
26
35
  - run: 'yarn run ci'
27
36