From 3eba7ee0723ba477aac4dfe59a1ef14a8839b068 Mon Sep 17 00:00:00 2001 From: Lars Hvam Date: Mon, 13 Nov 2023 07:25:17 +0100 Subject: [PATCH] add action --- .github/workflows/test.yml | 15 +++++++++ .gitignore | 3 ++ .npmrc | 1 + abap_transpile.json | 19 +++++++++++ abaplint-downport.jsonc | 35 ++++++++++++++++++++ package-lock.json | 67 ++++++++++++++++++++++++++++++++++++++ package.json | 20 ++++++++++++ 7 files changed, 160 insertions(+) create mode 100644 .github/workflows/test.yml create mode 100644 .gitignore create mode 100644 .npmrc create mode 100644 abap_transpile.json create mode 100644 abaplint-downport.jsonc create mode 100644 package-lock.json create mode 100644 package.json diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..576b701 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,15 @@ +name: test + +on: + push: + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + - name: Run npm steps + run: | + npm install + npm test diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..401f578 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +node_modules +output +downport \ No newline at end of file diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..537f81f --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +ignore-scripts=true \ No newline at end of file diff --git a/abap_transpile.json b/abap_transpile.json new file mode 100644 index 0000000..02bfb97 --- /dev/null +++ b/abap_transpile.json @@ -0,0 +1,19 @@ +{ + "input_folder": "downport", + "input_filter": [], + "output_folder": "output", + "libs": [ + { + "url": "https://github.com/open-abap/open-abap-core" + } + ], + "write_unit_tests": true, + "write_source_map": true, + "options": { + "ignoreSyntaxCheck": false, + "addFilenames": true, + "addCommonJS": true, + "unknownTypes": "runtimeError", + "skip": [] + } +} diff --git a/abaplint-downport.jsonc b/abaplint-downport.jsonc new file mode 100644 index 0000000..4e0c28f --- /dev/null +++ b/abaplint-downport.jsonc @@ -0,0 +1,35 @@ +{ + "global": { + "files": "/downport/**/*.*" + }, + "dependencies": [ + { + "url": "https://github.com/open-abap/open-abap-core", + "files": "/src/**/*.*" + } + ], + "syntax": { + "version": "open-abap", + "errorNamespace": "." + }, + "rules": { + "downport": true, + "begin_end_names": true, + "line_length": { + "length": 255 + }, + "keyword_case": true, + "in_statement_indentation": true, + "check_ddic": true, + "indentation": true, + "check_include": true, + "check_syntax": true, + "global_class": true, + "implement_methods": true, + "method_implemented_twice": true, + "parser_error": true, + "superclass_final": true, + "unknown_types": true, + "xml_consistency": true + } +} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..4820da8 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,67 @@ +{ + "name": "@abaplint/abap-base", + "version": "0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "@abaplint/abap-base", + "version": "0", + "license": "MIT", + "dependencies": { + "@abaplint/cli": "^2.103.6", + "@abaplint/runtime": "^2.7.135", + "@abaplint/transpiler-cli": "^2.7.135" + } + }, + "node_modules/@abaplint/cli": { + "version": "2.103.6", + "resolved": "https://registry.npmjs.org/@abaplint/cli/-/cli-2.103.6.tgz", + "integrity": "sha512-htiMy5bLmN4f1+3jgmVeUFYZcjD3/qC381xl+8TuRapcFwKHCRY/uxF+6f1d+0NpWjW23uZSYs1aFz54n0Taig==", + "bin": { + "abaplint": "abaplint" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/larshp" + } + }, + "node_modules/@abaplint/runtime": { + "version": "2.7.135", + "resolved": "https://registry.npmjs.org/@abaplint/runtime/-/runtime-2.7.135.tgz", + "integrity": "sha512-8zqoSSIpAJk/wZ1PhtVIy6rYbWZe6hv9A+WjCXS1sI4TVrW/lsZgHRshpNDBxpwITGu85yK1EPYNTmJCO7JhnQ==", + "dependencies": { + "temporal-polyfill": "^0.1.1" + }, + "funding": { + "url": "https://github.com/sponsors/larshp" + } + }, + "node_modules/@abaplint/transpiler-cli": { + "version": "2.7.135", + "resolved": "https://registry.npmjs.org/@abaplint/transpiler-cli/-/transpiler-cli-2.7.135.tgz", + "integrity": "sha512-cG6j4P/CQaphkHGQjtXW1v3xVskV+Kk37efgLNnz3Sf8bhgMGTRYc5OdEGBTqT4Awe6WQg66P78tHw04lJuObg==", + "bin": { + "abap_transpile": "abap_transpile" + }, + "funding": { + "url": "https://github.com/sponsors/larshp" + } + }, + "node_modules/temporal-polyfill": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/temporal-polyfill/-/temporal-polyfill-0.1.1.tgz", + "integrity": "sha512-/5e4EVRA0wBI/bEhWLirSjwUg1lELhQyTXxw9zNbVhqjKvI9BLczs+3wtsoD9sn3HN2ImAMW5XJQwAiXgWT+GA==", + "dependencies": { + "temporal-spec": "~0.1.0" + } + }, + "node_modules/temporal-spec": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/temporal-spec/-/temporal-spec-0.1.0.tgz", + "integrity": "sha512-sMNggMeS6trCgMQuudgFHhX1gtBK3e+AT1zGrMsFYG1wlqtRT5E9rcvm3I1iNlvHpJX/3DO6L4qtWAuEl/T04Q==" + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..f7984dd --- /dev/null +++ b/package.json @@ -0,0 +1,20 @@ +{ + "name": "@abaplint/abap-base", + "private": true, + "version": "0", + "description": "test", + "scripts": { + "build": "rm -rf output && abap_transpile abap_transpile.json", + "downport": "rm -rf downport && cp -r src downport && abaplint --fix abaplint-downport.jsonc", + "lint": "abaplint abaplint-downport.jsonc", + "test": "npm run downport && npm run build && node output/index.mjs" + }, + "author": "Lars Hvam Petersen", + "license": "MIT", + "homepage": "https://abaplint.org", + "dependencies": { + "@abaplint/cli": "^2.103.6", + "@abaplint/runtime": "^2.7.135", + "@abaplint/transpiler-cli": "^2.7.135" + } +}