Skip to content

Commit eb64ef0

Browse files
committed
Solution
1 parent ff435f3 commit eb64ef0

4 files changed

Lines changed: 41 additions & 5 deletions

File tree

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Test
2+
3+
on:
4+
pull_request:
5+
branches: [ master ]
6+
7+
jobs:
8+
build:
9+
10+
runs-on: ubuntu-latest
11+
12+
strategy:
13+
matrix:
14+
node-version: [20.x]
15+
16+
steps:
17+
- uses: actions/checkout@v2
18+
- name: Use Node.js ${{ matrix.node-version }}
19+
uses: actions/setup-node@v1
20+
with:
21+
node-version: ${{ matrix.node-version }}
22+
- run: npm install
23+
- run: npm test

package-lock.json

Lines changed: 5 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"devDependencies": {
1919
"@faker-js/faker": "^8.4.1",
2020
"@mate-academy/eslint-config": "latest",
21-
"@mate-academy/scripts": "^1.8.6",
21+
"@mate-academy/scripts": "^2.1.3",
2222
"eslint": "^8.57.0",
2323
"eslint-plugin-jest": "^28.6.0",
2424
"eslint-plugin-node": "^11.1.0",

src/app.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,13 @@
1+
/* eslint-disable no-console */
12
'use strict';
3+
import { cp } from 'node:fs/promises';
4+
5+
const [from, to] = process.argv.slice(2);
6+
7+
if (from !== to) {
8+
try {
9+
await cp(from, to);
10+
} catch (error) {
11+
console.error(error);
12+
}
13+
}

0 commit comments

Comments
 (0)