@thiagodiogo/psjava 0.0.1-beta.3 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # psjava
2
2
 
3
- [![npm](https://img.shields.io/npm/v/@thiagodiogo/psjava/beta)](https://www.npmjs.com/package/@thiagodiogo/psjava)
3
+ [![npm](https://img.shields.io/npm/v/@thiagodiogo/psjava)](https://www.npmjs.com/package/@thiagodiogo/psjava)
4
4
  [![CI](https://github.com/eipastel/psjava/actions/workflows/ci.yml/badge.svg)](https://github.com/eipastel/psjava/actions/workflows/ci.yml)
5
5
  [![license](https://img.shields.io/npm/l/@thiagodiogo/psjava)](./LICENSE)
6
6
 
@@ -11,7 +11,7 @@ There's no custom syntax and no transpilation: whatever is in the file is exactl
11
11
  ## Install
12
12
 
13
13
  ```bash
14
- npm install -g @thiagodiogo/psjava@beta
14
+ npm install -g @thiagodiogo/psjava
15
15
  ```
16
16
 
17
17
  Requires a **JDK 11+** with `jshell` on your `PATH`. Verify your setup with `psjava doctor`.
package/dist/cli.js CHANGED
@@ -1,9 +1,12 @@
1
1
  import { Command } from 'commander';
2
+ import { createRequire } from 'module';
2
3
  import { runFile } from './commands/run.js';
3
4
  import { runDoctor } from './commands/doctor.js';
5
+ // Versão vem do package.json (fonte única) — em dist/cli.js, '../package.json' é a raiz do pacote.
6
+ const { version } = createRequire(import.meta.url)('../package.json');
4
7
  export function buildProgram() {
5
8
  const program = new Command();
6
- program.name('psjava').description('Run .psjava files').version('0.1.0');
9
+ program.name('psjava').description('Run .psjava files').version(version);
7
10
  program
8
11
  .argument('[file]', '.psjava file')
9
12
  .option('-d, --debug', 'print the elapsed time at the end')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thiagodiogo/psjava",
3
- "version": "0.0.1-beta.3",
3
+ "version": "0.1.0",
4
4
  "description": "Run .psjava files as scripts — plain Java, no ceremony, on top of JShell.",
5
5
  "keywords": [
6
6
  "psjava",