Skip to content

Commit fec863b

Browse files
committed
dev: Development changes
1 parent d95a63c commit fec863b

9 files changed

Lines changed: 2475 additions & 158 deletions

File tree

.github/actions/node-build/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ inputs:
44

55
runs:
66
using: 'node20'
7-
main: 'lib/index.js'
7+
main: 'dist/index.js'
Lines changed: 75 additions & 65 deletions
Large diffs are not rendered by default.
Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
require('esbuild').build({
2-
entryPoints: [__dirname + '/src/index.mjs'],
3-
bundle: true,
4-
platform: 'node',
5-
target: 'node20',
6-
format: 'cjs',
7-
outfile: __dirname + '/lib/index.js'
8-
}).catch(() => process.exit(1));
1+
require("esbuild")
2+
.build({
3+
entryPoints: [__dirname + "/src/index.mjs"],
4+
bundle: true,
5+
platform: "node",
6+
target: "node20",
7+
format: "cjs",
8+
outfile: __dirname + "/dist/index.js",
9+
})
10+
.catch(() => process.exit(1));
Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,24 @@
1-
import * as core from '@actions/core';
1+
import fs from "node:fs";
2+
import path from "node:path";
3+
import * as core from "@actions/core";
24

35
async function run() {
4-
const packagesString = core.getInput('packages', {
6+
const packagesString = core.getInput("packages", {
57
trimWhitespace: true,
6-
required: true
8+
required: true,
79
});
810
const packages = JSON.parse(packagesString);
11+
for (const pkg of packages) {
12+
const packageDir = path.join(process.env.GITHUB_WORKSPACE, pkg.directory);
13+
const buildDir = path.join(packageDir, pkg.buildDir);
14+
console.log("buildDir: ", buildDir);
15+
if (fs.existsSync(buildDir)) {
16+
console.log("buildDir exists");
17+
} else console.log("buildDir do not exists");
18+
}
919
console.log(packages);
1020
}
1121

12-
run().catch(error => {
22+
run().catch((error) => {
1323
core.setFailed(error);
1424
});

.github/workflows/node-build.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,6 @@ jobs:
4242
outputFile: "COMMIT_CHANGELOG.md"
4343
configuration: 'changelog-config.json'
4444

45-
- name: "debug 1"
46-
run: |
47-
echo "${{ steps.changelog.outputs.changelog }}"
48-
4945
- name: "debug 2"
5046
run: |
5147
cat COMMIT_CHANGELOG.md

.prettierignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/node_modules
2+
/coverage
3+
/.idea
4+
/.circleci
5+
/.husky
6+
/.DS_Store
7+
/.nyc_output
8+
/.github/actions/*/dist/
9+
**/*.md
10+
11+
# IDEs and editors
12+
.project
13+
.classpath
14+
.c9/
15+
*.launch
16+
.settings/
17+
*.sublime-workspace
18+
19+
# IDE - VSCode
20+
.vscode/*
21+
!.vscode/settings.json
22+
!.vscode/tasks.json
23+
!.vscode/launch.json
24+
!.vscode/extensions.json

eslint.config.mjs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import panatesEslint from "@panates/eslint-config";
2+
import globals from "globals";
3+
4+
/** @type {import('eslint').Linter.Config[]} */
5+
export default [
6+
{
7+
ignores: [".github/actions/*/dist", "node_modules/**/*"],
8+
},
9+
...panatesEslint.configs.node,
10+
{
11+
languageOptions: {
12+
globals: {
13+
...globals.jest,
14+
},
15+
},
16+
},
17+
];

0 commit comments

Comments
 (0)