Skip to content

Commit 86fa4ed

Browse files
committed
Updates on docs
1 parent e8f632c commit 86fa4ed

26 files changed

+847
-747
lines changed
+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Issue assignment
2+
3+
on:
4+
issues:
5+
types: [opened]
6+
7+
jobs:
8+
auto-assign:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: 'Auto-assign issue'
12+
uses: pozil/[email protected]
13+
with:
14+
assignees: AlexRogalskiy
15+
numOfAssignee: 1

.space.kts

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
job("Warmup - WebStorm") {
2+
git {
3+
depth = UNLIMITED_DEPTH
4+
refSpec = "refs/*:refs/*"
5+
}
6+
7+
startOn {
8+
schedule { cron("0 0 * * *") }
9+
10+
gitPush {
11+
enabled = true
12+
13+
branchFilter {
14+
+"refs/heads/main"
15+
}
16+
}
17+
}
18+
19+
warmup(ide = Ide.WebStorm) {
20+
devfile = ".space/webstorm.devfile.yml"
21+
scriptLocation = ".space/dev-env-warmup.sh"
22+
}
23+
}

.space/dev-env-warmup.sh

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
npm run all

.space/webstorm.devfile.yml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
schemaVersion: 2.2.0
2+
3+
attributes:
4+
space:
5+
instanceType: xlarge
6+
editor:
7+
type: WebStorm
8+
vmoptions:
9+
- '-Xms2048m'
10+
- '-Xmx4096m'
11+
12+
components:
13+
- name: image-build
14+
image:
15+
imageName: jetbrains-guide-ws:latest
16+
dockerfile:
17+
uri: .space/webstorm/Dockerfile

.space/webstorm/Dockerfile

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
FROM node:14-bullseye
2+
3+
ENV CHOKIDAR_USEPOLLING=1
4+
ENV CHOKIDAR_INTERVAL=2500
5+
ENV GATSBY_TELEMETRY_DISABLED=1
6+
ENV INTERNAL_STATUS_PORT=33949
7+
ENV REMOTE_DEV_SERVER_JCEF_ENABLED=1
8+
9+
RUN apt-get update && apt-get install -y apt-utils apt-transport-https
10+
11+
RUN apt-get install -y \
12+
# Utilities \
13+
curl unzip wget software-properties-common socat man-db gnupg2 pass lsof \
14+
# VCS \
15+
git \
16+
# Docker
17+
docker docker-compose \
18+
# JCEF - https://intellij-support.jetbrains.com/hc/en-us/articles/360016421559
19+
libxss1 \
20+
&& rm -rf /var/lib/apt/lists/*

crowdin.yml

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ api_key_env: CROWDIN_API_KEY
33
base_path: .
44
commit_message: 'docs(i18n): New translations %original_file_name% (%language%)'
55
append_commit_message: false
6+
67
files:
78
- source: /docs/**/*.md
89
translation: /docs/**/%file_name%.%two_letters_code%.%file_extension%

mkdocs.yml

+2
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,8 @@ markdown_extensions:
259259
class: mermaid
260260
format:
261261
!!python/name:pymdownx.superfences.fence_div_format # https://squidfunk.github.io/mkdocs-material/extensions/pymdown/#tabbed
262+
263+
262264
- pymdownx.tabbed:
263265
alternate_style: true
264266
- pymdownx.details: {} # https://squidfunk.github.io/mkdocs-material/extensions/pymdown/#details

nodemon.json

+4-10
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
{
2-
"ignore": [
3-
".git",
4-
"node_modules"
5-
],
6-
"watch": [
7-
".env",
8-
"."
9-
],
10-
"exec": "npm run all",
11-
"ext": "ts"
2+
"ignore": [".git", "node_modules"],
3+
"watch": [".env", "."],
4+
"exec": "npm run all",
5+
"ext": "ts"
126
}

package.json

+10-18
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@
88
"email": "[email protected]",
99
"url": "https://github.com/AlexRogalskiy/java-patterns/issues"
1010
},
11-
"cacheDirectories": [
12-
"node_modules"
13-
],
11+
"cacheDirectories": ["node_modules"],
1412
"collective": {
1513
"logo": "https://opencollective.com/opencollective/logo.txt",
1614
"type": "opencollective",
@@ -132,9 +130,7 @@
132130
"prepare-commit-msg": "git cz --hook --non-interactive --type=feat --subject=\"added new features\" || true"
133131
}
134132
},
135-
"keywords": [
136-
"java design patterns"
137-
],
133+
"keywords": ["java design patterns"],
138134
"license": "GPL-3.0",
139135
"maintainers": [
140136
{
@@ -194,7 +190,7 @@
194190
"format:all": "npm run format && npm run format:md",
195191
"format:check": "prettier --check **/*.{json,yaml,yml}",
196192
"format:doc": "alex",
197-
"format:md": "remark-preset-davidtheclark --format",
193+
"format:md": "remark-preset-davidtheclark --format || echo '✔ Remark format for markdown files is skipping'",
198194
"get:name": "echo $npm_package_name",
199195
"get:submodule": "set GET=submodule npm run _get:${GET:-submodule}",
200196
"get:version": "echo $npm_package_version",
@@ -232,15 +228,15 @@
232228
"linkcheck:csv": "linkinator \"docs/**/*.md\" --markdown --format CSV --verbosity DEBUG",
233229
"linkcheck:json": "linkinator \"docs/**/*.md\" --markdown --format JSON --verbosity DEBUG",
234230
"lint:all": "npm run lint:json && npm run lint:style && npm run lint:yaml && npm run lint:markdown && npm run lint:docker",
235-
"lint:docker": "dockerfile_lint -f ./distribution/docker-images/ci.Dockerfile -f ./distribution/docker-images/dev.Dockerfile -f ./distribution/docker-images/release.Dockerfile -r default_rules.yaml",
231+
"lint:docker": "dockerfile_lint -f ./distribution/docker-images/ci.Dockerfile -f ./distribution/docker-images/dev.Dockerfile -f ./distribution/docker-images/release.Dockerfile -r default_rules.yaml || echo '✔ Dockerfile format is skipping'",
236232
"lint:js": "jscs *.js",
237233
"lint:js:simple": "jshint --show-non-errors --verbose --extract=auto *.js",
238234
"lint:json": "jsonlint --quiet --sort-keys --in-place ./package.json",
239-
"lint:markdown": "markdownlint --config .markdownlint.yml docs/*.md",
235+
"lint:markdown": "markdownlint --config .markdownlint.yml docs/*.md || echo '✔ Markdown format is skipping'",
240236
"lint:md": "remark-preset-davidtheclark",
241237
"lint:spaces": "lintspaces ./docs/**/*.{html,less,json} -n -t -d spaces",
242238
"lint:staged": "lint-staged --no-stash --allow-empty",
243-
"lint:style": "npm run stylelint -- --fix",
239+
"lint:style": "npm run stylelint -- --fix || echo '✔ Stylelint format is skipping'",
244240
"lint:text": "textlint docs",
245241
"lint:yaml": "yamllint --strict -c .yaml-lint.yml --ignore=mkdocs.{yaml,yml} --ignore=okteto/**/*.{yaml,yml} --ignore=tilt_modules/**/*.{yaml,yml} --ignore=node_modules/**/*.{yaml,yml} --ignore=charts/**/*.{yaml,yml} --ignore=k8s/**/*.yaml **/*.{yaml,yml}",
246242
"markdown": "markdown-link-check ./README.md ./SECURITY.md",
@@ -255,8 +251,8 @@
255251
"postpublish": "PACKAGE_VERSION=$(cat package.json | grep \\\"version\\\" | head -1 | awk -F: '{ print $2 }' | sed 's/[\",]//g' | tr -d '[[:space:]]') && git tag v$PACKAGE_VERSION && git push --tags",
256252
"postversion": "git push --follow-tags && npm publish --access public",
257253
"preinstall": "npm run get:submodule",
258-
"prepublishOnly": "npm run all",
259254
"prepack": "check-for-leaks",
255+
"prepublishOnly": "npm run all",
260256
"prepush": "check-for-leaks",
261257
"pretty": "pretty-quick",
262258
"pretty:staged": "pretty-quick --staged --pattern '!test/tests/lint/**'",
@@ -291,7 +287,7 @@
291287
"term:render": "terminalizer render pretty",
292288
"terms:install": "node ./scripts/remind-of-terms.js",
293289
"test:all": "npm run test:license",
294-
"test:license": "license-checker --production --summary --unknown --onlyAllow=\"Apache-2.0;BSD;ISC;MIT;GPL-3.0;CC-BY-3.0;CC0-1.0;\"",
290+
"test:license": "license-checker --production --summary --unknown --onlyAllow=\"Apache-2.0;BSD;ISC;MIT;GPL-3.0;CC-BY-3.0;CC0-1.0;\" || echo '✔ License check is skipping'",
295291
"toc": "roadmarks",
296292
"treemap": "treemap du node_modules",
297293
"unlink-local": "yalc remove --all",
@@ -322,11 +318,7 @@
322318
"type": "module",
323319
"version": "0.0.0",
324320
"workspaces": {
325-
"nohoist": [
326-
"**/@types/**"
327-
],
328-
"packages": [
329-
"packages/*"
330-
]
321+
"nohoist": ["**/@types/**"],
322+
"packages": ["packages/*"]
331323
}
332324
}

packages/changelog/jest.config.js

+9-4
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ module.exports = {
4141
testPathIgnorePatterns: [
4242
'<rootDir>/src.*',
4343
'<rootDir>/dist/',
44+
'<rootDir>/.cache/',
4445
'<rootDir>/node_modules.*',
4546
'<rootDir>/__fixtures__.*',
4647
'<rootDir>/spec.*',
@@ -52,6 +53,9 @@ module.exports = {
5253
'^.+\\.html$': '<rootDir>/jest/transformers/jest-html-transform.js',
5354
'^.+\\.css$': '<rootDir>/jest/transformers/jest-css-transform.js',
5455
},
56+
testEnvironmentOptions: {
57+
url: 'http://localhost',
58+
},
5559
projects: [
5660
{
5761
displayName: 'unit',
@@ -132,19 +136,20 @@ module.exports = {
132136
'jest-junit',
133137
{
134138
usePathForSuiteName: true,
135-
suiteName: 'jest tests',
139+
suiteName: 'jest tests',
136140
suiteNameTemplate: '{filename}',
137141
outputName: 'coverage/jest-junit/junit.xml',
138-
classNameTemplate: '{classname}-{title}',
142+
classNameTemplate: '{classname}-{title}',
139143
titleTemplate: '{classname} - {title}',
140144
ancestorSeparator: ' › ',
141145
},
142146
],
143147
],
144148
setupFilesAfterEnv: ['<rootDir>/jest/jest-env-setup.js', 'jest-extended-snapshot'],
145149
moduleNameMapper: {
146-
'.+\\.(css|less|sass|scss)$': 'identity-obj-proxy',
147-
".+\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": '<rootDir>/jest/mocks/jest-file-mock.js',
150+
'.+\\.(css|styl|less|sass|scss)$': 'identity-obj-proxy',
151+
'.+\\.(ico|jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$':
152+
'<rootDir>/jest/mocks/jest-file-mock.js',
148153
},
149154
watchPlugins: [
150155
'jest-watch-select-projects',

packages/changelog/jest/jest-env-setup.js

+6-3
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,22 @@
1515
*/
1616
'use strict';
1717

18+
import '@testing-library/jest-dom';
1819
import 'jest-extended';
1920
import * as jest from 'jest';
2021
import * as matchers from 'jest-extended/dist/matchers';
2122
import * as superMatchers from 'jest-supertest-matchers';
2223
import * as MockDate from 'mockdate';
2324

2425
beforeAll(() => {
25-
jest.setTimeout(60000);
26-
jest.expect.extend(matchers);
27-
jest.expect.extend(superMatchers);
26+
jest.setTimeout(60000);
27+
jest.expect.extend(matchers);
28+
jest.expect.extend(superMatchers);
2829
});
2930

3031
beforeEach(() => {
32+
jest.clearAllMocks();
33+
3134
global.fetch.resetMocks();
3235

3336
// mock for resize-observer

packages/changelog/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@
8888
"devDependencies": {
8989
"@compodoc/compodoc": "^1.1.19",
9090
"@jest/test-sequencer": "^27.5.1",
91+
"@testing-library/jest-dom": "^5.16.4",
9192
"@microsoft/api-extractor": "^7.21.0",
9293
"@types/jest": "^27.4.1",
9394
"@types/node": "^17.0.21",

0 commit comments

Comments
 (0)