@appthreat/atom-parsetools 1.0.1 → 1.0.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appthreat/atom-parsetools",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "Parsing tools that complement the @appthreat/atom project.",
5
5
  "main": "./index.js",
6
6
  "type": "module",
@@ -9,8 +9,8 @@
9
9
  "lint": "eslint *.mjs *.js"
10
10
  },
11
11
  "dependencies": {
12
- "@appthreat/atom-common": "^1.0.0",
13
- "@babel/parser": "^7.27.1",
12
+ "@appthreat/atom-common": "^1.0.1",
13
+ "@babel/parser": "^7.27.2",
14
14
  "typescript": "^5.8.3",
15
15
  "yargs": "^17.7.2"
16
16
  },
package/phpastgen.js CHANGED
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
 
3
+ import { existsSync } from "node:fs";
3
4
  import { dirname, join } from "node:path";
4
5
  import { spawnSync } from "node:child_process";
5
6
  import { fileURLToPath } from "node:url";
@@ -11,9 +12,23 @@ if (!url.startsWith("file://")) {
11
12
  }
12
13
  const dirName = import.meta ? dirname(fileURLToPath(url)) : __dirname;
13
14
  export const PLUGINS_HOME = join(dirName, "plugins");
14
- const PHP_PARSER_BIN =
15
+ export const PARENT_NODE_PLUGINS_HOME = join(
16
+ dirName,
17
+ "..",
18
+ "..",
19
+ "node_modules",
20
+ "@appthreat",
21
+ "atom-parsetools",
22
+ "plugins"
23
+ );
24
+ let PHP_PARSER_BIN =
15
25
  process.env.PHP_PARSER_BIN || join(PLUGINS_HOME, "bin", "php-parse");
16
-
26
+ if (
27
+ !existsSync(PHP_PARSER_BIN) &&
28
+ existsSync(join(PARENT_NODE_PLUGINS_HOME, "bin", "php-parse"))
29
+ ) {
30
+ PHP_PARSER_BIN = join(PARENT_NODE_PLUGINS_HOME, "bin", "php-parse");
31
+ }
17
32
  function main(argvs) {
18
33
  if (!detectPhp()) {
19
34
  console.warn("PHP is not installed!");
@@ -1,9 +1,9 @@
1
1
  <?php return array(
2
2
  'root' => array(
3
3
  'name' => '__root__',
4
- 'pretty_version' => 'v2.2.2',
5
- 'version' => '2.2.2.0',
6
- 'reference' => 'b5a32a0b987a713cd9581241a2887727d76b49ac',
4
+ 'pretty_version' => 'v2.2.3',
5
+ 'version' => '2.2.3.0',
6
+ 'reference' => 'a971730fa21490a46c8d63f4f65f985f268c7803',
7
7
  'type' => 'library',
8
8
  'install_path' => __DIR__ . '/../../',
9
9
  'aliases' => array(),
@@ -11,9 +11,9 @@
11
11
  ),
12
12
  'versions' => array(
13
13
  '__root__' => array(
14
- 'pretty_version' => 'v2.2.2',
15
- 'version' => '2.2.2.0',
16
- 'reference' => 'b5a32a0b987a713cd9581241a2887727d76b49ac',
14
+ 'pretty_version' => 'v2.2.3',
15
+ 'version' => '2.2.3.0',
16
+ 'reference' => 'a971730fa21490a46c8d63f4f65f985f268c7803',
17
17
  'type' => 'library',
18
18
  'install_path' => __DIR__ . '/../../',
19
19
  'aliases' => array(),
@@ -3,16 +3,16 @@ current directory: /home/runner/work/atom/atom/wrapper/nodejs/packages/atom-pars
3
3
  creating Makefile
4
4
 
5
5
  current directory: /home/runner/work/atom/atom/wrapper/nodejs/packages/atom-parsetools/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/ext/racc/cparse
6
- make DESTDIR\= sitearchdir\=./.gem.20250512-3079-eeleor sitelibdir\=./.gem.20250512-3079-eeleor clean
6
+ make DESTDIR\= sitearchdir\=./.gem.20250512-2984-i6rcd0 sitelibdir\=./.gem.20250512-2984-i6rcd0 clean
7
7
 
8
8
  current directory: /home/runner/work/atom/atom/wrapper/nodejs/packages/atom-parsetools/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/ext/racc/cparse
9
- make DESTDIR\= sitearchdir\=./.gem.20250512-3079-eeleor sitelibdir\=./.gem.20250512-3079-eeleor
9
+ make DESTDIR\= sitearchdir\=./.gem.20250512-2984-i6rcd0 sitelibdir\=./.gem.20250512-2984-i6rcd0
10
10
  compiling cparse.c
11
11
  linking shared-object racc/cparse.so
12
12
 
13
13
  current directory: /home/runner/work/atom/atom/wrapper/nodejs/packages/atom-parsetools/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/ext/racc/cparse
14
- make DESTDIR\= sitearchdir\=./.gem.20250512-3079-eeleor sitelibdir\=./.gem.20250512-3079-eeleor install
15
- /usr/bin/install -c -m 0755 cparse.so ./.gem.20250512-3079-eeleor/racc
14
+ make DESTDIR\= sitearchdir\=./.gem.20250512-2984-i6rcd0 sitelibdir\=./.gem.20250512-2984-i6rcd0 install
15
+ /usr/bin/install -c -m 0755 cparse.so ./.gem.20250512-2984-i6rcd0/racc
16
16
 
17
17
  current directory: /home/runner/work/atom/atom/wrapper/nodejs/packages/atom-parsetools/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/ext/racc/cparse
18
- make DESTDIR\= sitearchdir\=./.gem.20250512-3079-eeleor sitelibdir\=./.gem.20250512-3079-eeleor clean
18
+ make DESTDIR\= sitearchdir\=./.gem.20250512-2984-i6rcd0 sitelibdir\=./.gem.20250512-2984-i6rcd0 clean
package/rbastgen.js CHANGED
@@ -12,8 +12,23 @@ if (!url.startsWith("file://")) {
12
12
  }
13
13
  const dirName = import.meta ? dirname(fileURLToPath(url)) : __dirname;
14
14
  export const PLUGINS_HOME = join(dirName, "plugins");
15
- const RUBY_ASTGEN_BIN =
15
+ export const PARENT_NODE_PLUGINS_HOME = join(
16
+ dirName,
17
+ "..",
18
+ "..",
19
+ "node_modules",
20
+ "@appthreat",
21
+ "atom-parsetools",
22
+ "plugins"
23
+ );
24
+ let RUBY_ASTGEN_BIN =
16
25
  process.env.RUBY_ASTGEN_BIN || join(PLUGINS_HOME, "bin", "ruby_ast_gen");
26
+ if (
27
+ !existsSync(RUBY_ASTGEN_BIN) &&
28
+ existsSync(join(PARENT_NODE_PLUGINS_HOME, "bin", "ruby_ast_gen"))
29
+ ) {
30
+ RUBY_ASTGEN_BIN = join(PARENT_NODE_PLUGINS_HOME, "bin", "ruby_ast_gen");
31
+ }
17
32
  // Ruby version needed
18
33
  const RUBY_VERSION_NEEDED = "3.4.3";
19
34
  function main(argvs) {