Skip to content

Commit c8b6663

Browse files
authored
feat: update dependencies and node version (#230)
1 parent 1dbeab4 commit c8b6663

File tree

16 files changed

+3465
-3464
lines changed

16 files changed

+3465
-3464
lines changed

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ insert_final_newline = true
99
max_line_length = 150
1010
trim_trailing_whitespace = true
1111

12-
[*.{sh,podspec,yml,yaml}]
12+
[*.{sh,podspec,yml,yaml,json}]
1313
indent_style = space
1414
indent_size = 2
1515

.github/actions/setup/action.yaml

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
1-
name: Setup
2-
description: Setup Node.js and install dependencies
3-
4-
runs:
5-
using: composite
6-
steps:
7-
- name: Setup Node.js
8-
uses: actions/[email protected]
9-
with:
10-
node-version-file: .nvmrc
11-
12-
- name: Cache dependencies
13-
id: yarn-cache
14-
uses: actions/[email protected]
15-
with:
16-
path: |
17-
**/node_modules
18-
.yarn/install-state.gz
19-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
20-
restore-keys: |
21-
${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
22-
23-
- name: Install dependencies
24-
if: steps.yarn-cache.outputs.cache-hit != 'true'
25-
run: yarn install --immutable
26-
shell: bash
1+
name: Setup
2+
description: Setup Node.js and install dependencies
3+
4+
runs:
5+
using: composite
6+
steps:
7+
- name: Setup Node.js
8+
uses: actions/[email protected]
9+
with:
10+
node-version-file: .nvmrc
11+
12+
- name: Cache dependencies
13+
id: yarn-cache
14+
uses: actions/[email protected]
15+
with:
16+
path: |
17+
**/node_modules
18+
.yarn/install-state.gz
19+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
20+
restore-keys: |
21+
${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
22+
23+
- name: Install dependencies
24+
if: steps.yarn-cache.outputs.cache-hit != 'true'
25+
run: yarn install --immutable
26+
shell: bash

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v20.12.2
1+
v22.13.1

.prettierrc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22
"trailingComma": "none",
33
"semi": false,
44
"singleQuote": true,
5-
"jsxSingleQuote": false,
65
"bracketSpacing": true,
76
"bracketSameLine": false,
8-
"arrowParens": "avoid",
9-
"printWidth": 150
7+
"arrowParens": "avoid"
108
}

.swcrc

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
{
2-
"$schema": "https://json.schemastore.org/swcrc",
3-
"sourceMaps": true,
4-
"jsc": {
5-
"parser": {
6-
"syntax": "typescript",
7-
"decorators": true,
8-
"dynamicImport": true
9-
},
10-
"transform": {
11-
"legacyDecorator": true,
12-
"decoratorMetadata": true
13-
},
14-
"baseUrl": "./"
2+
"$schema": "https://json.schemastore.org/swcrc",
3+
"sourceMaps": true,
4+
"jsc": {
5+
"parser": {
6+
"syntax": "typescript",
7+
"decorators": true,
8+
"dynamicImport": true
159
},
16-
"minify": false
10+
"transform": {
11+
"legacyDecorator": true,
12+
"decoratorMetadata": true
13+
},
14+
"baseUrl": "./"
15+
},
16+
"minify": false
1717
}

docker-compose.yaml

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
version: '3.7'
22
services:
3-
elasticsearch:
4-
container_name: es-container
5-
image: docker.elastic.co/elasticsearch/elasticsearch:8.14.0
6-
environment:
7-
- discovery.type=single-node
8-
- xpack.security.enabled=false
9-
# Limit use of memory https://github.com/zammad/zammad-docker-compose/issues/256#issuecomment-1105241970
10-
- ES_JAVA_OPTS=-Xmx4096m
11-
ports:
12-
- 9200:9200
3+
elasticsearch:
4+
container_name: es-container
5+
image: docker.elastic.co/elasticsearch/elasticsearch:8.14.0
6+
environment:
7+
- discovery.type=single-node
8+
- xpack.security.enabled=false
9+
# Limit use of memory https://github.com/zammad/zammad-docker-compose/issues/256#issuecomment-1105241970
10+
- ES_JAVA_OPTS=-Xmx4096m
11+
ports:
12+
- 9200:9200
1313

14-
kibana:
15-
container_name: kb-container
16-
image: docker.elastic.co/kibana/kibana:8.14.0
17-
environment:
18-
- ELASTICSEARCH_HOSTS=http://es-container:9200
19-
depends_on:
20-
- elasticsearch
21-
ports:
22-
- 5601:5601
14+
kibana:
15+
container_name: kb-container
16+
image: docker.elastic.co/kibana/kibana:8.14.0
17+
environment:
18+
- ELASTICSEARCH_HOSTS=http://es-container:9200
19+
depends_on:
20+
- elasticsearch
21+
ports:
22+
- 5601:5601
Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
```typescript
2-
import { IsString } from 'class-validator'
3-
import { RegisterIndex } from '@codemaskjs/nestjs-elasticsearch'
4-
5-
@RegisterIndex('examples')
6-
export class ExampleDocument {
7-
@IsString()
8-
readonly field: string
9-
}
10-
```
1+
```typescript
2+
import { IsString } from 'class-validator'
3+
import { RegisterIndex } from '@codemaskjs/nestjs-elasticsearch'
4+
5+
@RegisterIndex('examples')
6+
export class ExampleDocument {
7+
@IsString()
8+
readonly field: string
9+
}
10+
```
Lines changed: 22 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,22 @@
1-
2-
```typescript
3-
import { Module } from '@nestjs/common'
4-
import { ElasticsearchModule } from '../src/nestjs'
5-
import { ExampleDocument } from './document'
6-
7-
@Module({
8-
imports: [
9-
ElasticsearchModule.register({
10-
node: 'http://localhost:9200',
11-
auth: {
12-
username: 'admin',
13-
password: 'password'
14-
},
15-
headers: {
16-
'Content-Type': 'application/json'
17-
}
18-
}),
19-
ElasticsearchModule.forFeature([
20-
ExampleDocument
21-
])
22-
]
23-
})
24-
export class AppModule {}
25-
```
1+
```typescript
2+
import { Module } from '@nestjs/common'
3+
import { ElasticsearchModule } from '../src/nestjs'
4+
import { ExampleDocument } from './document'
5+
6+
@Module({
7+
imports: [
8+
ElasticsearchModule.register({
9+
node: 'http://localhost:9200',
10+
auth: {
11+
username: 'admin',
12+
password: 'password'
13+
},
14+
headers: {
15+
'Content-Type': 'application/json'
16+
}
17+
}),
18+
ElasticsearchModule.forFeature([ExampleDocument])
19+
]
20+
})
21+
export class AppModule {}
22+
```

jest.config.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"moduleFileExtensions": ["js", "ts"],
3-
"modulePaths": ["<rootDir>", "src"],
4-
"coverageDirectory": "../unit-test/coverage",
5-
"rootDir": "./src",
6-
"setupFilesAfterEnv": ["<rootDir>/test/jest.setup.ts"],
7-
"testRegex": ".spec.ts$",
8-
"transform": {
9-
"^.+\\.(t|j)s$": "@swc/jest"
10-
}
2+
"moduleFileExtensions": ["js", "ts"],
3+
"modulePaths": ["<rootDir>", "src"],
4+
"coverageDirectory": "../unit-test/coverage",
5+
"rootDir": "./src",
6+
"setupFilesAfterEnv": ["<rootDir>/test/jest.setup.ts"],
7+
"testRegex": ".spec.ts$",
8+
"transform": {
9+
"^.+\\.(t|j)s$": "@swc/jest"
10+
}
1111
}

0 commit comments

Comments
 (0)