Skip to content

Commit 785be42

Browse files
authored
Merge pull request #46 from ws-4020/fintan-contents
🚀: Publish 2023.12
2 parents 97da7de + 19acc91 commit 785be42

File tree

863 files changed

+23531
-44091
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

863 files changed

+23531
-44091
lines changed

.azure-pipelines/deploy.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ stages:
3636
- job: build_${{environment.name}}
3737
displayName: 'build ${{environment.name}}'
3838
pool:
39-
# https://github.com/actions/virtual-environments/blob/main/images/macos/macos-12-Readme.md
40-
vmImage: macOS-12
39+
# https://github.com/actions/runner-images/blob/main/images/macos/macos-13-Readme.md
40+
vmImage: macOS-13
4141
steps:
4242
- task: UseRubyVersion@0
4343
inputs:
@@ -134,8 +134,8 @@ stages:
134134
- job: build_${{environment.name}}
135135
displayName: 'build ${{environment.name}}'
136136
pool:
137-
# https://github.com/actions/virtual-environments/blob/main/images/macos/macos-12-Readme.md
138-
vmImage: macOS-12
137+
# https://github.com/actions/runner-images/blob/main/images/macos/macos-13-Readme.md
138+
vmImage: macOS-13
139139
steps:
140140
- task: UseRubyVersion@0
141141
inputs:

.github/renovate.json5

+1
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
'expo',
4949
'expo-build-properties',
5050
'expo-crypto',
51+
'expo-dev-client',
5152
'expo-keep-awake',
5253
'expo-linking',
5354
'expo-local-authentication',

.github/workflows/app.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@ on:
3333
jobs:
3434
lint-and-test:
3535
name: (${{ github.workflow }}) Lints, Tests
36-
# https://github.com/actions/virtual-environments/blob/main/images/macos/macos-12-Readme.md
37-
runs-on: macos-12
36+
# https://github.com/actions/runner-images/blob/main/images/macos/macos-13-Readme.md
37+
runs-on: macos-13
3838
env:
3939
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4040
steps:
4141
- name: Checkout
42-
uses: actions/checkout@v3
42+
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
4343
with:
4444
submodules: true
4545
fetch-depth: 0

.github/workflows/delete-deploygate-distribution-pages.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ on:
1212
jobs:
1313
delete-distribution-pages:
1414
name: Delete DeployGate distribution pages
15-
# https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-README.md
16-
runs-on: ubuntu-20.04
15+
# https://github.com/actions/runner-images/blob/main/images/linux/Ubuntu2204-Readme.md
16+
runs-on: ubuntu-22.04
1717
env:
1818
DEPLOYGATE_ORGANIZATION_NAME: ${{ secrets.DEPLOYGATE_ORGANIZATION_NAME }}
1919
DEPLOYGATE_API_KEY: ${{ secrets.DEPLOYGATE_API_KEY }}

.github/workflows/gh-pages-deploy.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ on:
1212
jobs:
1313
deploy-pages:
1414
name: Deploy Pages
15-
# https://github.com/actions/virtual-environments/blob/main/images/macos/macos-12-Readme.md
16-
runs-on: macos-12
15+
# https://github.com/actions/runner-images/blob/main/images/macos/macos-13-Readme.md
16+
runs-on: macos-13
1717
if: >
1818
${{ github.event.workflow_run.conclusion == 'success' }}
1919
steps:

.github/workflows/gh-pages.yaml

+6-5
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ on:
2222
jobs:
2323
lint:
2424
name: (${{ github.workflow }}) Lints
25-
# https://github.com/actions/virtual-environments/blob/main/images/macos/macos-12-Readme.md
26-
runs-on: macos-12
25+
# https://github.com/actions/runner-images/blob/main/images/macos/macos-13-Readme.md
26+
runs-on: macos-13
2727
env:
2828
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2929
steps:
3030
- name: Checkout
31-
uses: actions/checkout@v3
31+
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
3232
with:
3333
submodules: true
3434
fetch-depth: 0
@@ -98,10 +98,11 @@ jobs:
9898
9999
build:
100100
name: (${{ github.workflow }}) Build
101-
runs-on: ubuntu-20.04
101+
# https://github.com/actions/runner-images/blob/main/images/linux/Ubuntu2204-Readme.md
102+
runs-on: ubuntu-22.04
102103
steps:
103104
- name: Checkout
104-
uses: actions/checkout@v3
105+
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
105106
with:
106107
submodules: true
107108
fetch-depth: 0

.github/workflows/report.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ on:
1010
jobs:
1111
report:
1212
name: Report
13-
# https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-README.md
14-
runs-on: ubuntu-20.04
13+
# https://github.com/actions/runner-images/blob/main/images/linux/Ubuntu2204-Readme.md
14+
runs-on: ubuntu-22.04
1515
steps:
1616
- name: Jest results
1717
uses: dorny/test-reporter@v1

.github/workflows/triage.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ on:
1010

1111
jobs:
1212
triage:
13-
# https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-README.md
14-
runs-on: ubuntu-20.04
13+
# https://github.com/actions/runner-images/blob/main/images/linux/Ubuntu2204-Readme.md
14+
runs-on: ubuntu-22.04
1515
steps:
1616
- name: Label according to modified files
1717
# https://github.com/marketplace/actions/labeler
18-
uses: actions/labeler@master
18+
uses: actions/labeler@v4
1919
with:
2020
repo-token: '${{ secrets.GITHUB_TOKEN }}'
2121
# Default is '.github/labeler.yml', but we use 'yaml' as an extension of YAML files.

.vscode/extensions.json

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"recommendations": [
3+
"dbaeumer.vscode-eslint",
4+
"EditorConfig.EditorConfig",
5+
"esbenp.prettier-vscode"
6+
]
7+
}

.vscode/settings.json

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"editor.codeActionsOnSave": {
3+
"source.fixAll.eslint":true
4+
},
5+
"eslint.workingDirectories": [
6+
{
7+
"mode": "auto"
8+
}
9+
]
10+
}

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
* [extensible-custom-error](https://github.com/necojackarc/extensible-custom-error)
1919
* ライセンス: https://github.com/necojackarc/extensible-custom-error/blob/52d56448d9f535835a9ffbc7e447b951555c08c2/README.md
20-
* 利用箇所: [ApplicationError.ts](example-app/SantokuApp/src/bases/core/errors/ApplicationError.ts)
20+
* 利用箇所: [ErrorWrapper.ts](example-app/SantokuApp/src/bases/core/errors/ErrorWrapper.ts)
2121
* [react-native-barcode-generator](https://github.com/Kichiyaki/react-native-barcode-generator)
2222
* ライセンス: https://github.com/Kichiyaki/react-native-barcode-generator/blob/22f020eacf47fe23f0e311732ec801068db14fbc/LICENSE
2323
* 利用箇所: [Barcode.tsx](example-app/SantokuApp/src/bases/ui/barcode/Barcode.tsx)

example-app/SantokuApp/.script/README.md

+19
Original file line numberDiff line numberDiff line change
@@ -125,3 +125,22 @@ ESLintプラグインやルールのURLなどの情報は、`print-eslint-rules.
125125
```
126126

127127
必要に応じて、`print-eslint-rules.js`にプラグイン情報を定義してください。
128+
129+
## [add-license-comment.js](./add-license-comment.js)
130+
131+
プロジェクトで使用しているファイル(`js``tsx``ts`)の先頭にライセンスコメントを追加します。
132+
133+
対象ファイルは、`src`ディレクトリ以下のファイルです。ただし、以下のファイルは対象外としています。
134+
135+
- `orval`で自動生成されたファイル
136+
- `src/features/backend/apis`配下のファイル
137+
- `src/features/sandbox/apis`配下のファイル
138+
- OSSのソースコードを利用・改変しているファイル
139+
- `src/features/demo-instructions/pages/InstructionsPage.tsx`
140+
- `src/bases/ui/barcode/Barcode.tsx`
141+
- `src/bases/core/errors/ErrorWrapper.ts`
142+
143+
`add-license-comment.js` を実行する場合のコマンド例
144+
```bash
145+
node .script/add-license-comment.js
146+
```
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
const fs = require('fs');
2+
const path = require('path');
3+
4+
const rootDir = path.resolve(__dirname, '..');
5+
const targetDir = path.join(rootDir, 'src');
6+
7+
const excludes = [
8+
path.join(targetDir, 'features/demo-instructions/pages/InstructionsPage.tsx'),
9+
path.join(targetDir, 'bases/ui/barcode/Barcode.tsx'),
10+
path.join(targetDir, 'bases/core/errors/ErrorWrapper.ts'),
11+
path.join(targetDir, 'features/backend/apis'),
12+
path.join(targetDir, 'features/sandbox/apis'),
13+
];
14+
15+
const licenseComment = `/**
16+
* Copyright ${new Date().getFullYear()} TIS Inc.
17+
*
18+
* Licensed under the Apache License, Version 2.0 (the "License");
19+
* you may not use this file except in compliance with the License.
20+
* You may obtain a copy of the License at
21+
*
22+
* http://www.apache.org/licenses/LICENSE-2.0
23+
*
24+
* Unless required by applicable law or agreed to in writing, software
25+
* distributed under the License is distributed on an "AS IS" BASIS,
26+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
27+
* See the License for the specific language governing permissions and
28+
* limitations under the License.
29+
*/`;
30+
31+
const addLicenseToFiles = directory => {
32+
// withFileTypesとrecursiveの両方を有効にすると、取得するファイルが欠落する問題があるため、recursiveは指定しない
33+
// https://github.com/nodejs/node/issues/48858
34+
const files = fs.readdirSync(directory, {withFileTypes: true});
35+
files.forEach(file => {
36+
const filePath = path.join(directory, file.name);
37+
const found = excludes.find(f => filePath.startsWith(f));
38+
if (found) {
39+
return;
40+
}
41+
if (file.isDirectory()) {
42+
addLicenseToFiles(filePath);
43+
return;
44+
}
45+
if (file.name.endsWith('.js') || file.name.endsWith('.tsx') || file.name.endsWith('.ts')) {
46+
try {
47+
const data = fs.readFileSync(filePath, 'utf-8');
48+
if (!data.toString('utf-8').match(/Copyright \d{4} TIS Inc./)) {
49+
const commentWithContent = licenseComment + '\n\n' + data;
50+
fs.writeFileSync(filePath, commentWithContent);
51+
}
52+
} catch (error) {
53+
console.error(`Error occurred while processing the file ${filePath}: ${error.message}`);
54+
}
55+
}
56+
});
57+
};
58+
59+
addLicenseToFiles(targetDir);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"recommendations": [
3+
"dbaeumer.vscode-eslint",
4+
"EditorConfig.EditorConfig",
5+
"esbenp.prettier-vscode"
6+
]
7+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"editor.codeActionsOnSave": {
3+
"source.fixAll.eslint":true
4+
},
5+
"eslint.workingDirectories": [
6+
{
7+
"mode": "auto"
8+
}
9+
]
10+
}

0 commit comments

Comments
 (0)