virmator 4.0.2 → 4.1.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.
@@ -17,6 +17,7 @@ const baseConfig = {
17
17
  'autofixable',
18
18
  'autofixing',
19
19
  'browserconfig',
20
+ 'checkmark',
20
21
  'combinator',
21
22
  'combinators',
22
23
  'cpsell',
@@ -1,4 +1,5 @@
1
1
  const testFiles = require('./test-files-glob.js');
2
+ const SpecReporterWithFileNames = require('mocha-spec-reporter-with-file-names');
2
3
 
3
4
  /** @type {import('mocha').MochaOptions} */
4
5
  const mochaConfig = {
@@ -8,6 +9,7 @@ const mochaConfig = {
8
9
  require: 'ts-node/register',
9
10
  slow: 1_500, // ms
10
11
  timeout: 60_000, // 1 minute in ms
12
+ reporter: SpecReporterWithFileNames.pathToThisReporter,
11
13
  ...testFiles,
12
14
  };
13
15
 
@@ -0,0 +1,24 @@
1
+ name: build-for-gh-pages
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+
8
+ jobs:
9
+ build-for-gh-pages:
10
+ runs-on: 'ubuntu-latest'
11
+
12
+ steps:
13
+ - uses: actions/checkout@v3
14
+ - uses: actions/setup-node@v3
15
+ with:
16
+ node-version: 16.x
17
+ - name: build
18
+ run: |
19
+ npm ci
20
+ npm run build
21
+ - uses: JamesIves/github-pages-deploy-action@v4
22
+ with:
23
+ branch: 'gh-pages'
24
+ folder: 'dist'
@@ -0,0 +1,42 @@
1
+ name: 'tagged-release'
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - 'v*'
7
+
8
+ jobs:
9
+ tagged-release:
10
+ name: 'Tagged Release'
11
+ if: github.event.base_ref == 'refs/heads/main' || github.event.base_ref == 'refs/heads/master'
12
+ runs-on: 'ubuntu-latest'
13
+
14
+ steps:
15
+ - uses: actions/checkout@v3
16
+ - name: Use Node.js
17
+ uses: actions/setup-node@v3
18
+ with:
19
+ node-version: 16.x
20
+ - name: run test
21
+ run: |
22
+ npm ci
23
+ npx playwright install --with-deps
24
+ npm run test:all
25
+ - name: pack and set vars
26
+ id: vars
27
+ run: |
28
+ tagName="${GITHUB_REF#refs/*/}"
29
+ originalTarName="$(npm pack)"
30
+ packageNameWithoutFileExtension="${originalTarName%.tgz}"
31
+ tagNameWithoutV="${tagName##v}"
32
+ packageName="${packageNameWithoutFileExtension%-$tagNameWithoutV}"
33
+ newTarName="$packageName-$tagName.tgz"
34
+ mv "$originalTarName" "$newTarName"
35
+ echo ::set-output name=tarName::"$newTarName"
36
+
37
+ - uses: 'marvinpinto/action-automatic-releases@latest'
38
+ with:
39
+ repo_token: '${{ secrets.GITHUB_TOKEN }}'
40
+ prerelease: false
41
+ files: |
42
+ ${{ steps.vars.outputs.tarName }}
@@ -0,0 +1,26 @@
1
+ name: tests
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - '**'
7
+
8
+ jobs:
9
+ build:
10
+ runs-on: ${{ matrix.os }}
11
+ strategy:
12
+ fail-fast: false
13
+ matrix:
14
+ os: [ubuntu-latest, windows-latest, macos-latest]
15
+ node-version: [16.x, 18.x]
16
+ steps:
17
+ - uses: actions/checkout@v3
18
+ - name: Use Node.js ${{ matrix.node-version }}
19
+ uses: actions/setup-node@v3
20
+ with:
21
+ node-version: ${{ matrix.node-version }}
22
+ - name: run test
23
+ run: |
24
+ npm ci
25
+ npx playwright install --with-deps
26
+ npm run test:all
@@ -5,15 +5,15 @@
5
5
  "scripts": {
6
6
  "build": "virmator frontend build",
7
7
  "compile": "rm -rf dist && virmator compile",
8
- "docs:check": "virmator code-in-markdown check",
9
8
  "docs:update": "virmator code-in-markdown",
10
9
  "format": "virmator format",
11
10
  "prepublishOnly": "npm run compile && npm run test:all",
12
11
  "preview": "virmator frontend preview",
13
12
  "spellcheck": "virmator spellcheck",
14
13
  "start": "npm install && virmator frontend",
15
- "test": "virmator test",
16
- "test:all": "npm run test:types && npm test && npm run spellcheck && virmator format check && npm run docs:check",
14
+ "test": "virmator test && npm run test:types",
15
+ "test:all": "npm run test:types && npm test && npm run spellcheck && virmator format check && npm run test:docs",
16
+ "test:docs": "virmator code-in-markdown check",
17
17
  "test:types": "tsc --noEmit",
18
18
  "test:web": "virmator test-web"
19
19
  }
@@ -66,9 +66,11 @@ async function getVersionsToUpgradeTo({ repoDir, packageDir, npmDeps, packageBin
66
66
  ...packageJson.dependencies,
67
67
  };
68
68
  return npmDeps.map((npmDep) => {
69
- var _a;
69
+ var _a, _b, _c;
70
70
  const currentRepoVersion = currentRepoDepVersions[npmDep];
71
- const packageDepVersion = semver.clean((_a = packageDepVersions[npmDep]) !== null && _a !== void 0 ? _a : '');
71
+ const packageDepVersion = packageDepVersions[npmDep]
72
+ ? (_c = (_a = semver.clean(packageDepVersions[npmDep])) !== null && _a !== void 0 ? _a : (_b = semver.minVersion(packageDepVersions[npmDep])) === null || _b === void 0 ? void 0 : _b.raw) !== null && _c !== void 0 ? _c : undefined
73
+ : undefined;
72
74
  if (!packageDepVersion) {
73
75
  throw new Error(`No npm dep version listed for "${npmDep}" in ${packageBinName}'s dependencies.`);
74
76
  }
@@ -42,4 +42,19 @@ exports.nonCommandConfigs = [
42
42
  updateExistingConfigFileCallback: combine_json_config_1.combineJsonConfig,
43
43
  required: true,
44
44
  },
45
+ {
46
+ copyFromInternalPath: (0, path_1.join)(package_paths_1.virmatorConfigsDir, '.github', 'workflows', 'build-for-gh-pages.yml'),
47
+ copyToPathRelativeToRepoDir: (0, path_1.join)('.github', 'workflows', 'build-for-gh-pages.yml'),
48
+ required: true,
49
+ },
50
+ {
51
+ copyFromInternalPath: (0, path_1.join)(package_paths_1.virmatorConfigsDir, '.github', 'workflows', 'tagged-release.yml'),
52
+ copyToPathRelativeToRepoDir: (0, path_1.join)('.github', 'workflows', 'tagged-release.yml'),
53
+ required: true,
54
+ },
55
+ {
56
+ copyFromInternalPath: (0, path_1.join)(package_paths_1.virmatorConfigsDir, '.github', 'workflows', 'tests.yml'),
57
+ copyToPathRelativeToRepoDir: (0, path_1.join)('.github', 'workflows', 'tests.yml'),
58
+ required: true,
59
+ },
45
60
  ];
@@ -8,5 +8,5 @@ export declare const testCommandDefinition: import("../api/command/define-comman
8
8
  readonly required: true;
9
9
  };
10
10
  };
11
- npmDeps: readonly ["@types/chai", "@types/mocha", "chai", "mocha", "ts-node"];
11
+ npmDeps: readonly ["@types/chai", "@types/mocha", "chai", "mocha-spec-reporter-with-file-names", "mocha", "ts-node"];
12
12
  }>;
@@ -18,6 +18,7 @@ exports.testCommandDefinition = (0, define_command_1.defineCommand)({
18
18
  '@types/chai',
19
19
  '@types/mocha',
20
20
  'chai',
21
+ 'mocha-spec-reporter-with-file-names',
21
22
  'mocha',
22
23
  'ts-node',
23
24
  ],
package/dist/index.d.ts CHANGED
@@ -96,7 +96,7 @@ export declare const virmator: Readonly<{
96
96
  readonly required: true;
97
97
  };
98
98
  };
99
- npmDeps: readonly ["@types/chai", "@types/mocha", "chai", "mocha", "ts-node"];
99
+ npmDeps: readonly ["@types/chai", "@types/mocha", "chai", "mocha-spec-reporter-with-file-names", "mocha", "ts-node"];
100
100
  }> | import("./api/command/define-command").CommandDefinition<{
101
101
  commandName: "test-web";
102
102
  subCommandDescriptions: {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "virmator",
3
- "version": "4.0.2",
3
+ "version": "4.1.0",
4
4
  "description": "Handle all the stuffs in one package.",
5
5
  "keywords": [
6
6
  "automation",
@@ -31,7 +31,6 @@
31
31
  "format": "npm run format:base -- --write --list-different",
32
32
  "format:base": "prettier \"./**/*.+(ts|json|html|css|md|js)\"",
33
33
  "format:check": "npm run format:base -- --check",
34
- "prepack": "npm run compile",
35
34
  "prepublishOnly": "npm run test:all",
36
35
  "readme:check": "npm run compile && ts-node -r tsconfig-paths/register src/scripts/save-help-message.ts check && md-code --check README.md",
37
36
  "readme:update": "npm run compile && ts-node -r tsconfig-paths/register src/scripts/save-help-message.ts && md-code README.md",
@@ -50,6 +49,7 @@
50
49
  "devDependencies": {
51
50
  "@open-wc/testing": "3.1.6",
52
51
  "@types/chai": "4.3.3",
52
+ "@types/fs-extra": "^9.0.13",
53
53
  "@types/mocha": "10.0.0",
54
54
  "@types/node": "18.8.3",
55
55
  "@types/semver": "7.3.12",
@@ -61,8 +61,10 @@
61
61
  "augment-vir": "2.5.1",
62
62
  "chai": "4.3.6",
63
63
  "cspell": "6.12.0",
64
+ "fs-extra": "^10.1.0",
64
65
  "markdown-code-example-inserter": "0.1.11",
65
66
  "mocha": "10.0.0",
67
+ "mocha-spec-reporter-with-file-names": "^0.0.0",
66
68
  "prettier": "2.7.1",
67
69
  "prettier-plugin-jsdoc": "0.4.2",
68
70
  "prettier-plugin-multiline-arrays": "1.1.1",