Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fbfc6ce

Browse files
authored
atom is no longer afraid of minified and transpiled js code (#217)
* Tweaks Signed-off-by: Prabhu Subramanian <[email protected]> --------- Signed-off-by: Prabhu Subramanian <[email protected]>
1 parent 8ecf2e7 commit fbfc6ce

12 files changed

Lines changed: 102 additions & 87 deletions

File tree

.github/workflows/nodejstests.yml

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -198,28 +198,3 @@ jobs:
198198
shell: cmd
199199
run: |
200200
atom -l js --remove-atom -o %GITHUB_WORKSPACE%\\repotests\\shiftleft-ts-example\\app.atom %GITHUB_WORKSPACE%\\repotests\\shiftleft-ts-example
201-
202-
devenv:
203-
runs-on: ${{ matrix.os }}
204-
strategy:
205-
matrix:
206-
os: [ubuntu-latest, macos-15]
207-
steps:
208-
- uses: actions/checkout@v4
209-
- uses: cachix/install-nix-action@v26
210-
- uses: cachix/cachix-action@v14
211-
with:
212-
name: devenv
213-
- name: Install devenv.sh
214-
run: nix profile install nixpkgs#devenv
215-
- name: Build the devenv shell
216-
run: devenv test
217-
env:
218-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
219-
- name: Run atom --help
220-
run: |
221-
devenv shell -- atom --help
222-
devenv shell -- cdxgen --help
223-
devenv shell -- atom-tools --help
224-
env:
225-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/pr.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@ jobs:
105105
- run: |
106106
bash ci/native-image.sh
107107
./target/graalvm-native-image/atom --remove-atom -o /tmp/java.atom -l java $GITHUB_WORKSPACE/repotests/shiftleft-java-example -Dlog4j.configurationFile=log4j2.xml
108-
./target/graalvm-native-image/atom --remove-atom -o /tmp/juice.atom -l js $GITHUB_WORKSPACE/repotests/juice-shop -Dlog4j.configurationFile=log4j2.xml
109108
env:
110109
JAVA_TOOL_OPTIONS: "-Dfile.encoding=UTF-8"
111110
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/repotests.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
name: repotests
22
on:
3+
pull_request:
34
push:
45
branches:
5-
- feature/*
6+
- main
67
workflow_dispatch:
78
concurrency:
89
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}

build.sbt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
name := "atom"
22
ThisBuild / organization := "io.appthreat"
3-
ThisBuild / version := "2.4.0"
3+
ThisBuild / version := "2.4.1"
44
ThisBuild / scalaVersion := "3.7.3"
55

6-
val chenVersion = "2.5.1"
6+
val chenVersion = "2.5.3"
77

88
lazy val atom = Projects.atom
99

codemeta.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"downloadUrl": "https://github.com/AppThreat/atom",
88
"issueTracker": "https://github.com/AppThreat/atom/issues",
99
"name": "atom",
10-
"version": "2.4.0",
10+
"version": "2.4.1",
1111
"description": "Atom is a novel intermediate representation for next-generation code analysis.",
1212
"applicationCategory": "code-analysis",
1313
"keywords": [

wrapper/nodejs/package-lock.json

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

wrapper/nodejs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@appthreat/atom",
3-
"version": "2.4.0",
3+
"version": "2.4.1",
44
"description": "Create atom (⚛) representation for your application, packages and libraries",
55
"exports": "./index.js",
66
"type": "module",

wrapper/nodejs/packages/atom-common/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@appthreat/atom-common",
3-
"version": "1.0.9",
3+
"version": "1.0.10",
44
"description": "Common library for the @appthreat/atom project.",
55
"main": "index.js",
66
"type": "module",

wrapper/nodejs/packages/atom-common/utils.mjs

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,8 @@ import { spawnSync } from "node:child_process";
55
const IGNORE_DIRS = process.env.ASTGEN_IGNORE_DIRS
66
? process.env.ASTGEN_IGNORE_DIRS.split(",")
77
: [
8-
"node_modules",
98
"venv",
109
"docs",
11-
"test",
12-
"tests",
1310
"e2e",
1411
"e2e-beta",
1512
"examples",
@@ -19,30 +16,24 @@ const IGNORE_DIRS = process.env.ASTGEN_IGNORE_DIRS
1916
"codemods",
2017
"flow-typed",
2118
"i18n",
22-
"vendor",
23-
"www",
24-
"dist",
25-
"build",
26-
"__tests__"
2719
];
2820

2921
const IGNORE_FILE_PATTERN = new RegExp(
3022
process.env.ASTGEN_IGNORE_FILE_PATTERN ||
31-
"(test|spec|min|three|\\.d)\\.(js|ts|jsx|tsx)$",
23+
"(three|\\.d)\\.(js|ts|jsx|tsx)$",
3224
"i"
3325
);
3426

35-
export const getAllFiles = (dir, extn, files, result, regex) => {
27+
export const getAllFiles = (dir, extn, files, result, regex, ignore_node_modules=true) => {
3628
files = files || readdirSync(dir);
3729
result = result || [];
3830
regex = regex || new RegExp(`\\${extn}$`);
3931

4032
for (let i = 0; i < files.length; i++) {
4133
const file = files[i];
4234
if (
43-
file.startsWith(".") ||
44-
file.startsWith("__") ||
45-
IGNORE_FILE_PATTERN.test(file)
35+
file.startsWith(".") ||
36+
IGNORE_FILE_PATTERN.test(file)
4637
) {
4738
continue;
4839
}
@@ -52,8 +43,8 @@ export const getAllFiles = (dir, extn, files, result, regex) => {
5243
const dirName = basename(fileWithDir);
5344
if (
5445
dirName.startsWith(".") ||
55-
dirName.startsWith("__") ||
56-
IGNORE_DIRS.includes(dirName.toLowerCase())
46+
IGNORE_DIRS.includes(dirName.toLowerCase()) ||
47+
(ignore_node_modules && dirName.toLowerCase() === "node_modules")
5748
) {
5849
continue;
5950
}
@@ -63,7 +54,8 @@ export const getAllFiles = (dir, extn, files, result, regex) => {
6354
extn,
6455
readdirSync(fileWithDir),
6556
result,
66-
regex
57+
regex,
58+
ignore_node_modules
6759
);
6860
} catch (error) {
6961
// ignore
Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
module.exports = {
2-
"env": {
3-
"node": true,
4-
"es2021": true
5-
},
6-
"extends": "eslint:recommended",
7-
"overrides": [
8-
],
9-
"parserOptions": {
10-
"ecmaVersion": "latest",
11-
"sourceType": "module"
12-
},
13-
"rules": {
14-
}
15-
}
2+
env: {
3+
node: true,
4+
es2021: true
5+
},
6+
extends: "eslint:recommended",
7+
overrides: [],
8+
parserOptions: {
9+
ecmaVersion: "latest",
10+
sourceType: "module"
11+
},
12+
rules: {}
13+
};

0 commit comments

Comments
 (0)