virmator 4.0.2 → 4.0.3

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',
@@ -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
  }
@@ -0,0 +1,5 @@
1
+ /** This file helps ensure that test calls are imported from the correct package. */
2
+
3
+ declare var it: 'Don\'t use it directly: import "it" from Mocha.';
4
+ declare var expect: 'Don\'t use expect directly: import "expect" from Chai.';
5
+ declare var describe: 'Don\'t use describe directly: import "describe" from Mocha.';
@@ -42,4 +42,25 @@ 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, 'src', 'index.d.ts'),
47
+ copyToPathRelativeToRepoDir: (0, path_1.join)('src', 'index.d.ts'),
48
+ updateExistingConfigFileCallback: combine_text_config_1.combineTextConfig,
49
+ required: true,
50
+ },
51
+ {
52
+ copyFromInternalPath: (0, path_1.join)(package_paths_1.virmatorConfigsDir, '.github', 'workflows', 'build-for-gh-pages.yml'),
53
+ copyToPathRelativeToRepoDir: (0, path_1.join)('.github', 'workflows', 'build-for-gh-pages.yml'),
54
+ required: true,
55
+ },
56
+ {
57
+ copyFromInternalPath: (0, path_1.join)(package_paths_1.virmatorConfigsDir, '.github', 'workflows', 'tagged-release.yml'),
58
+ copyToPathRelativeToRepoDir: (0, path_1.join)('.github', 'workflows', 'tagged-release.yml'),
59
+ required: true,
60
+ },
61
+ {
62
+ copyFromInternalPath: (0, path_1.join)(package_paths_1.virmatorConfigsDir, '.github', 'workflows', 'tests.yml'),
63
+ copyToPathRelativeToRepoDir: (0, path_1.join)('.github', 'workflows', 'tests.yml'),
64
+ required: true,
65
+ },
45
66
  ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "virmator",
3
- "version": "4.0.2",
3
+ "version": "4.0.3",
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,6 +61,7 @@
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",
66
67
  "prettier": "2.7.1",