@w5s/mrm-preset 1.1.1 → 1.2.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.
- package/CHANGELOG.md +13 -0
- package/asdf/index.js +16 -0
- package/ci/github.js +2 -2
- package/config.json +1 -0
- package/core/asdf.js +41 -0
- package/core/githubCI.js +1 -1
- package/core/pkg.js +1 -1
- package/core/vitest.js +1 -1
- package/package.json +2 -2
- package/.turbo/turbo-build.log +0 -6
- package/.turbo/turbo-lint.log +0 -6
- package/.turbo/turbo-test.log +0 -52
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,19 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [1.2.0](https://github.com/w5s/project-config/compare/@w5s/mrm-preset@1.1.1...@w5s/mrm-preset@1.2.0) (2023-08-01)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### ✨ Features
|
|
10
|
+
|
|
11
|
+
- Add support for asdf ([a67f3b5](https://github.com/w5s/project-config/commit/a67f3b5)) - Add support for turbo caching in github actions ([d61aca7](https://github.com/w5s/project-config/commit/d61aca7))
|
|
12
|
+
|
|
13
|
+
**Note:** Version bump only for package @w5s/mrm-preset
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
6
19
|
## [1.1.1](https://github.com/w5s/project-config/compare/@w5s/mrm-preset@1.1.0...@w5s/mrm-preset@1.1.1) (2023-07-12)
|
|
7
20
|
|
|
8
21
|
**Note:** Version bump only for package @w5s/mrm-preset
|
package/asdf/index.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
const { asdfConfig } = require('../core/asdf.js');
|
|
2
|
+
|
|
3
|
+
function task() {
|
|
4
|
+
asdfConfig({
|
|
5
|
+
state: 'present',
|
|
6
|
+
update: (config) => ({
|
|
7
|
+
nodejs: '18.17.0',
|
|
8
|
+
...config,
|
|
9
|
+
}),
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
task.description = 'Configure ASDF';
|
|
14
|
+
task.parameters = {};
|
|
15
|
+
|
|
16
|
+
module.exports = task;
|
package/ci/github.js
CHANGED
|
@@ -33,11 +33,11 @@ function task() {
|
|
|
33
33
|
'runs-on': 'ubuntu-latest',
|
|
34
34
|
steps: [
|
|
35
35
|
{ uses: 'actions/checkout@v3' },
|
|
36
|
+
{ uses: 'dtinth/setup-github-actions-caching-for-turbo@v1' },
|
|
36
37
|
{
|
|
37
|
-
name: 'Use Node.js',
|
|
38
38
|
uses: 'actions/setup-node@v3',
|
|
39
39
|
with: {
|
|
40
|
-
'node-version': '
|
|
40
|
+
'node-version-file': '.tool-versions',
|
|
41
41
|
cache: packageManager,
|
|
42
42
|
},
|
|
43
43
|
},
|
package/config.json
CHANGED
package/core/asdf.js
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
const { file } = require('mrm-core');
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @typedef {{ [tool: string]: string }} ASDFConfig
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* @param {{
|
|
8
|
+
* state: 'present'|'absent',
|
|
9
|
+
* update?: (config: ASDFConfig) => ASDFConfig
|
|
10
|
+
* }} options
|
|
11
|
+
*/
|
|
12
|
+
function asdfConfig({ state, update }) {
|
|
13
|
+
const hasASDF = state === 'present';
|
|
14
|
+
const toolVersionsFile = file('.tool-versions');
|
|
15
|
+
|
|
16
|
+
if (hasASDF) {
|
|
17
|
+
const eol = '\n';
|
|
18
|
+
const content = toolVersionsFile.get();
|
|
19
|
+
const parsed = Object.fromEntries(
|
|
20
|
+
content
|
|
21
|
+
.split(eol)
|
|
22
|
+
.map((_) => _.split(/\s+/, 2))
|
|
23
|
+
.filter((_) => _[0] !== '')
|
|
24
|
+
);
|
|
25
|
+
|
|
26
|
+
// @ts-ignore
|
|
27
|
+
const updated = update ? update(parsed) : parsed;
|
|
28
|
+
|
|
29
|
+
const formatted = Object.keys(updated)
|
|
30
|
+
.map((tool) => `${tool} ${updated[tool]}`)
|
|
31
|
+
.join(eol);
|
|
32
|
+
|
|
33
|
+
toolVersionsFile.save(formatted);
|
|
34
|
+
} else {
|
|
35
|
+
toolVersionsFile.delete();
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
module.exports = {
|
|
40
|
+
asdfConfig,
|
|
41
|
+
};
|
package/core/githubCI.js
CHANGED
package/core/pkg.js
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
* @typedef {string|boolean|number|null|Array<unknown>|Record<string, unknown>} JsonValue
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
+
const path = require('node:path');
|
|
8
9
|
// @ts-ignore
|
|
9
10
|
const { intersect } = require('semver-intersect');
|
|
10
11
|
const { packageJson, file, json } = require('mrm-core');
|
|
11
12
|
const glob = require('glob');
|
|
12
|
-
const path = require('node:path');
|
|
13
13
|
const jsonFile = require('./jsonFile.js');
|
|
14
14
|
|
|
15
15
|
/**
|
package/core/vitest.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@w5s/mrm-preset",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Mrm configuration presets",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"mrm",
|
|
@@ -52,5 +52,5 @@
|
|
|
52
52
|
"publishConfig": {
|
|
53
53
|
"access": "public"
|
|
54
54
|
},
|
|
55
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "a10793f9e40481a6e84451e57851a3af630ce953"
|
|
56
56
|
}
|
package/.turbo/turbo-build.log
DELETED
package/.turbo/turbo-lint.log
DELETED
package/.turbo/turbo-test.log
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
[1] : exited with code 0
|
|
2
|
-
[script]
|
|
3
|
-
[script] > @w5s/mrm-preset@1.1.0 test:script
|
|
4
|
-
[script] > mkdir _tester; cd _tester; mrm bootstrap --dir ..; mrm configure --dir ..
|
|
5
|
-
[script]
|
|
6
|
-
[script] mkdir: _tester: File exists
|
|
7
|
-
[script] [36mRunning bootstrap...[39m
|
|
8
|
-
[script] [33mRunning alias configure...[39m
|
|
9
|
-
[script] [36mRunning gitignore...[39m
|
|
10
|
-
[script] [36mRunning project...[39m
|
|
11
|
-
[script] [32mUpdate turbo.json[39m
|
|
12
|
-
[script] [36mRunning contributing...[39m
|
|
13
|
-
[script] [36mRunning licenses...[39m
|
|
14
|
-
[script] [36mRunning release...[39m
|
|
15
|
-
[script] [36mRunning ci...[39m
|
|
16
|
-
[script] [36mRunning lang...[39m
|
|
17
|
-
[script] [32mUpdate tsconfig.json[39m
|
|
18
|
-
[script] [36mRunning commitlint...[39m
|
|
19
|
-
[script] [32mUpdate .vscode/extensions.json[39m
|
|
20
|
-
[script] [36mRunning editorconfig...[39m
|
|
21
|
-
[script] [36mRunning eslint...[39m
|
|
22
|
-
[script] Installing @w5s/eslint-config...
|
|
23
|
-
[script] npm ERR! code ERESOLVE
|
|
24
|
-
[script] npm ERR! ERESOLVE unable to resolve dependency tree
|
|
25
|
-
[script] npm ERR!
|
|
26
|
-
[script] npm ERR! While resolving: _tester@1.0.0-alpha.0
|
|
27
|
-
[script] npm ERR! Found: prettier@3.0.0
|
|
28
|
-
[script] npm ERR! node_modules/prettier
|
|
29
|
-
[script] npm ERR! dev prettier@"^3.0.0" from the root project
|
|
30
|
-
[script] npm ERR!
|
|
31
|
-
[script] npm ERR! Could not resolve dependency:
|
|
32
|
-
npm ERR! peer prettier@"2.x" from @w5s/eslint-config@1.1.1
|
|
33
|
-
[script] npm ERR! node_modules/@w5s/eslint-config
|
|
34
|
-
[script] npm ERR! dev @w5s/eslint-config@"1.1.1" from the root project
|
|
35
|
-
[script] npm ERR!
|
|
36
|
-
[script] npm ERR! Fix the upstream dependency conflict, or retry
|
|
37
|
-
[script] npm ERR! this command with --force or --legacy-peer-deps
|
|
38
|
-
[script] npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
|
|
39
|
-
[script] npm ERR!
|
|
40
|
-
[script] npm ERR!
|
|
41
|
-
[script] npm ERR! For a full report see:
|
|
42
|
-
[script] npm ERR! /Users/julienpolo/Library/Caches/npm/_logs/2023-07-12T19_18_18_503Z-eresolve-report.txt
|
|
43
|
-
[script]
|
|
44
|
-
[script] npm ERR! A complete log of this run can be found in:
|
|
45
|
-
npm ERR! /Users/julienpolo/Library/Caches/npm/_logs/2023-07-12T19_18_18_503Z-debug-0.log
|
|
46
|
-
[script] [36mRunning cspell...[39m
|
|
47
|
-
[script] [32mUpdate .cspell.json[39m
|
|
48
|
-
[script] [36mRunning vitest...[39m
|
|
49
|
-
[script] [36mRunning renovate...[39m
|
|
50
|
-
[script] [36mRunning githooks...[39m
|
|
51
|
-
[script] [36mRunning postconfigure...[39m
|
|
52
|
-
[script] npm run test:script exited with code 0
|