Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix module (2) #417

Merged
merged 12 commits into from
Aug 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 9 additions & 11 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,12 @@ jobs:
env:
DEBUG: "npm-groovy-lint"
run: npm run test:coverage
- name: Build coverage report
run: ./node_modules/.bin/nyc report --reporter text-lcov > coverage.lcov
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
file: coverage.lcov
flags: unittests
verbose: true
dry_run: true
token: ${{ secrets.CODECOV_TOKEN }} # required

# - name: Build coverage report
# run: ./node_modules/.bin/nyc report --reporter text-lcov > coverage.lcov
# - name: Upload coverage to Codecov
# uses: codecov/codecov-action@v4
# with:
# fail_ci_if_error: true
# verbose: true
# token: ${{ secrets.CODECOV_TOKEN }} # required
1 change: 1 addition & 0 deletions .mega-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ JAVASCRIPT_DEFAULT_STYLE: prettier
DISABLE_LINTERS:
- JAVASCRIPT_STANDARD
- MARKDOWN_MARKDOWN_LINK_CHECK
- TYPESCRIPT_STANDARD
DISABLE_ERRORS_LINTERS:
- REPOSITORY_SEMGREP
FLAVOR_SUGGESTIONS: false
Expand Down
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@

## Beta

## [15.0.0] 2024-26-08
## [15.0.1] 2024-08-29

- Add module declaration
- Fix crash in case of parsing error (https://github.com/nvuillam/npm-groovy-lint/issues/406)
- Disable codecov

## [15.0.0] 2024-08-26

- Convert to [ES Module](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules)
- Upgrade to CodeNarc 3.5.0
Expand Down
8 changes: 7 additions & 1 deletion docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@

## Beta

## [15.0.0] 2024-26-08
## [15.0.1] 2024-08-29

- Add module declaration
- Fix crash in case of parsing error (https://github.com/nvuillam/npm-groovy-lint/issues/406)
- Disable codecov

## [15.0.0] 2024-08-26

- Convert to [ES Module](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules)
- Upgrade to CodeNarc 3.5.0
Expand Down
2 changes: 1 addition & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export default [...compat.extends("eslint:recommended"), {
},

parser: babelParser,
ecmaVersion: 2018,
ecmaVersion: 2020,
sourceType: "module",

parserOptions: {
Expand Down
1 change: 1 addition & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
declare module "npm-groovy-lint";
Binary file modified lib/java/CodeNarcServer.jar
Binary file not shown.
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
"name": "npm-groovy-lint",
"version": "15.0.0",
"description": "Lint, format and auto-fix your Groovy / Jenkinsfile / Gradle files",
"exports": "./index.js",
"exports": "./lib/groovy-lint.js",
"type": "module",
"scripts": {
"lint:fix": "eslint **/*.js --fix && prettier --write \"./lib/**/*.{js,jsx}\" --tab-width 4 --print-width 150",
"lint:fix": "eslint **/*.{js,mjs} --fix && prettier --write \"./lib/**/*.{js,jsx,mjs}\" --tab-width 4 --print-width 150",
"server:run-from-source": "npm run server:kill && groovy -cp \"lib/java/*\" groovy/src/main/com/nvuillam/CodeNarcServer.groovy --server",
"server:run": "npm run server:kill && java -Xms256m -Xmx2048m -jar lib/java/CodeNarcServer.jar --server",
"server:build": "node scripts/build-server.js",
Expand Down Expand Up @@ -41,6 +41,7 @@
},
"homepage": "https://github.com/nvuillam/npm-groovy-lint#readme",
"files": [
"index.d.ts",
"lib"
],
"bin": {
Expand Down
14 changes: 6 additions & 8 deletions scripts/deploy-in-vscode.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
// Copy source files into vscode npm installation (avoid generate betas to test updates)
// npm-groovy-lint & vscode-groovy-lint must be in the same folder, else you have to override VSCODE_GROOVY_LINT_PATH env variable


// Imports
import { existsSync, emptyDirSync, mkdirSync, copySync } from 'fs-extra';
import fs from 'fs-extra';

console.log('---- START DEPLOY IN VSCODE INSTALLED npm-groovy-lint PACKAGE ----');

Expand All @@ -15,21 +14,20 @@ const targetPath = `${vsCodeGroovyLintPath}/server/node_modules/npm-groovy-lint`
console.info(`GroovyLint: Starting copying package in vscode for testing`);

// Reset target folder
if (existsSync(targetPath)) {
emptyDirSync(targetPath);
if (fs.existsSync(targetPath)) {
fs.emptyDirSync(targetPath);
}
else {
mkdirSync(targetPath);
fs.mkdirSync(targetPath);
}

// Copy files into dest folder
for (const path of ['package.json', 'README.md', 'CHANGELOG.md', 'LICENSE', 'lib']) {
copySync(path, `${targetPath}/${path}`);
for (const path of ['package.json', 'README.md', 'CHANGELOG.md', 'LICENSE', 'index.d.ts', 'lib']) {
fs.copySync(path, `${targetPath}/${path}`);
}

console.info(`GroovyLint: Copied files into ${targetPath}`);

console.log('---- END DEPLOY IN VSCODE INSTALLED npm-groovy-lint PACKAGE ----\n');

process.exit(0);

Loading