Skip to content

Commit 02d59e5

Browse files
chore: update repository
1 parent 35fc9f5 commit 02d59e5

23 files changed

Lines changed: 539 additions & 266 deletions

.eslintignore

Lines changed: 0 additions & 2 deletions
This file was deleted.

.eslintrc

Lines changed: 0 additions & 7 deletions
This file was deleted.

.github/workflows/codeql.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,15 @@ jobs:
4343

4444
steps:
4545
- name: Harden Runner
46-
uses: step-security/harden-runner@1b05615854632b887b69ae1be8cbefe72d3ae423 # v2.6.0
46+
uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
4747
with:
4848
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
4949
- name: Checkout repository
50-
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608
50+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
5151

5252
# Initializes the CodeQL tools for scanning.
5353
- name: Initialize CodeQL
54-
uses: github/codeql-action/init@74483a38d39275f33fcff5f35b679b5ca4a26a99
54+
uses: github/codeql-action/init@ce28f5bb42b7a9f2c824e633a3f6ee835bab6858 # v3.29.0
5555
with:
5656
languages: ${{ matrix.language }}
5757
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -65,7 +65,7 @@ jobs:
6565
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
6666
# If this step fails, then you should remove it and run the build manually (see below)
6767
- name: Autobuild
68-
uses: github/codeql-action/autobuild@74483a38d39275f33fcff5f35b679b5ca4a26a99
68+
uses: github/codeql-action/autobuild@ce28f5bb42b7a9f2c824e633a3f6ee835bab6858 # v3.29.0
6969

7070
# ℹ️ Command-line programs to run using the OS shell.
7171
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
@@ -78,6 +78,6 @@ jobs:
7878
# ./location_of_script_within_repo/buildscript.sh
7979

8080
- name: Perform CodeQL Analysis
81-
uses: github/codeql-action/analyze@74483a38d39275f33fcff5f35b679b5ca4a26a99
81+
uses: github/codeql-action/analyze@ce28f5bb42b7a9f2c824e633a3f6ee835bab6858 # v3.29.0
8282
with:
8383
category: "/language:${{matrix.language}}"

.github/workflows/node.js.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@ name: Node.js CI
55

66
on:
77
push:
8-
branches: [ "master" ]
8+
branches:
9+
- master
910
pull_request:
10-
branches: [ "master" ]
11+
branches:
12+
- master
1113

1214
permissions:
1315
contents: read
@@ -17,17 +19,17 @@ jobs:
1719
runs-on: ${{matrix.os}}
1820
strategy:
1921
matrix:
20-
node-version: [16.x, 18.x, 20.x]
21-
os: [ubuntu-latest, windows-latest, macos-latest]
22+
node-version: [22.x, 24.x]
23+
os: [ubuntu-latest]
2224
steps:
2325
- name: Harden Runner
24-
uses: step-security/harden-runner@1b05615854632b887b69ae1be8cbefe72d3ae423 # v2.6.0
26+
uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
2527
with:
2628
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
2729

28-
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608
30+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2931
- name: Use Node.js ${{ matrix.node-version }}
30-
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d
32+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
3133
with:
3234
node-version: ${{ matrix.node-version }}
3335
- run: npm install

.github/workflows/scorecard.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,17 @@ jobs:
3232

3333
steps:
3434
- name: Harden Runner
35-
uses: step-security/harden-runner@1b05615854632b887b69ae1be8cbefe72d3ae423 # v2.6.0
35+
uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
3636
with:
3737
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
3838

3939
- name: "Checkout code"
40-
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
40+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
4141
with:
4242
persist-credentials: false
4343

4444
- name: "Run analysis"
45-
uses: ossf/scorecard-action@0864cf19026789058feabb7e87baa5f140aac736 # v2.3.1
45+
uses: ossf/scorecard-action@05b42c624433fc40578a4040d5cf5e36ddca8cde # v2.4.2
4646
with:
4747
results_file: results.sarif
4848
results_format: sarif
@@ -64,14 +64,14 @@ jobs:
6464
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
6565
# format to the repository Actions tab.
6666
- name: "Upload artifact"
67-
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
67+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
6868
with:
6969
name: SARIF file
7070
path: results.sarif
7171
retention-days: 5
7272

7373
# Upload the results to GitHub's code scanning dashboard.
7474
- name: "Upload to code-scanning"
75-
uses: github/codeql-action/upload-sarif@74483a38d39275f33fcff5f35b679b5ca4a26a99 # v2.22.5
75+
uses: github/codeql-action/upload-sarif@ce28f5bb42b7a9f2c824e633a3f6ee835bab6858 # v3.29.0
7676
with:
7777
sarif_file: results.sarif

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,4 @@ typings/
5757
# dotenv environment variables file
5858
.env
5959

60-
jsdoc/
61-
docs/
60+
.temp

.npmrc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
11
package-lock=false
2-
tag-version-prefix=""
3-
message="chore(release): %s"

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2018 TopCli
3+
Copyright (c) 2018-2025 TopCli
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/TopCli/Pretty-JSON/badge?style=for-the-badge)](https://api.securityscorecards.dev/projects/github.com/TopCli/Pretty-JSON)
66
![build](https://img.shields.io/github/actions/workflow/status/TopCli/Pretty-JSON/node.js.yml?style=for-the-badge)
77

8-
Stdout JSON in your terminal with colors. This package has been created to stdout clean and beautiful JSON in the SlimIO CLI.
8+
Pretty-print JSON to the terminal with syntax highlighting and structure-aware formatting.
99

1010
## Requirements
11-
- [Node.js](https://nodejs.org/en/) v16 or higher
11+
- [Node.js](https://nodejs.org/en/) v20 or higher
1212

1313
## Getting Started
1414

@@ -25,9 +25,9 @@ $ yarn add @topcli/pretty-json
2525
import prettyJSON from "@topcli/pretty-json";
2626

2727
prettyJSON({
28-
foo: "bar",
29-
hello: "world!",
30-
arr: [1, 2, 3]
28+
foo: "bar",
29+
hello: "world!",
30+
arr: [1, 2, 3]
3131
});
3232
```
3333

@@ -38,14 +38,13 @@ It will produce the following stdout:
3838
## API
3939

4040
### prettyJSON(obj: object): void
41-
Stdout a given JSON Object (Plain Object, Objects Prototype of Object or Array).
4241

43-
## Dependencies
42+
Prints a JSON-compatible object or array to the terminal with syntax highlighting and structured indentation.
4443

45-
|Name|Refactoring|Security Risk|Usage|
46-
|---|---|---|---|
47-
|[@slimio/is](https://github.com/SlimIO/is)|Minor|Low|Type checker|
48-
|[kleur](https://github.com/lukeed/kleur)|Minor|Low|TTY color|
44+
- Supports plain objects, arrays, and nested structures.
45+
- Skips functions and symbols.
46+
- Color-codes data types (strings, numbers, booleans, etc.).
47+
- Outputs readable, formatted JSON — ideal for CLI inspection.
4948

5049
## License
5150
MIT

eslint.config.mjs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// Import Third-party Dependencies
2+
import { ESLintConfig } from "@openally/config.eslint";
3+
4+
export default [
5+
...ESLintConfig,
6+
{
7+
languageOptions: {
8+
sourceType: "module"
9+
}
10+
}
11+
];

0 commit comments

Comments
 (0)