Skip to content
Open
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
19 changes: 0 additions & 19 deletions .eslintrc.json

This file was deleted.

12 changes: 6 additions & 6 deletions .github/dependaboot.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
version: 2
updates:
# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
- package-ecosystem: 'github-actions'
directory: '/'
schedule:
interval: "daily"
interval: 'daily'

- package-ecosystem: "npm"
directory: "."
- package-ecosystem: 'npm'
directory: '.'
schedule:
interval: "daily"
interval: 'daily'
7 changes: 3 additions & 4 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Install NodeJS
uses: actions/setup-node@v3
with:
node-version: "20"
node-version: '20'

- name: Install dependencies
run: npm install
Expand All @@ -32,22 +32,21 @@ jobs:
- name: Install NodeJS
uses: actions/setup-node@v3
with:
node-version: "20"
node-version: '20'

- name: Install dependencies
run: npm install

- name: Lint
run: npm run test


commit_lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3.3.0
with:
token: "${{ secrets.ACCESS_TOKEN }}"
token: '${{ secrets.ACCESS_TOKEN }}'
fetch-depth: 0

- name: Setup Python
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@ jobs:
bump_version:
if: "!startsWith(github.event.head_commit.message, 'bump:')"
runs-on: ubuntu-latest
name: "Bump version"
name: 'Bump version'
outputs:
version: ${{ steps.cz.outputs.version }}
steps:
- name: Check out
uses: actions/checkout@v3
with:
fetch-depth: 0
token: "${{ secrets.ACCESS_TOKEN }}"
ref: "main"
token: '${{ secrets.ACCESS_TOKEN }}'
ref: 'main'

- name: Set up Python
uses: actions/setup-python@v4.7.0
Expand All @@ -50,8 +50,8 @@ jobs:
uses: ad-m/github-push-action@v0.6.0
with:
github_token: ${{ secrets.ACCESS_TOKEN }}
repository: "Drafteame/serverless-plugin-go"
branch: "main"
repository: 'Drafteame/serverless-plugin-go'
branch: 'main'
directory: .
tags: true

Expand All @@ -77,7 +77,7 @@ jobs:
- name: Set up NodeJS
uses: actions/setup-node@v3
with:
node-version: "24"
node-version: '24'

- name: Install dependencies
run: npm install
Expand Down
6 changes: 4 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/mirrors-eslint
rev: v8.50.0
- repo: local
hooks:
- id: eslint
name: eslint
entry: npx eslint --fix
language: system
files: \.[jt]sx?$ # *.js, *.jsx, *.ts and *.tsx
types: [file]

Expand Down
5 changes: 4 additions & 1 deletion .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
{}
{
"singleQuote": true,
"printWidth": 120
}
9 changes: 2 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,23 @@
## v0.1.1 (2026-01-21)


- chore: implements trusted publisher and bump node 20 -> 24 (#9)

## v0.1.0 (2025-08-12)


- feat: build hooks (#8)
- * feat: add executable list of build hooks before build
- * fix: remove .idea folder
- - feat: add executable list of build hooks before build
- - fix: remove .idea folder

## v0.0.3 (2024-08-19)


- deps: resolve vulnerabilities (#7)

## v0.0.2 (2023-11-16)


- fix: concurrency overhead (#6)

## v0.0.1 (2023-10-26)


- chore: enable release pipeline (#5)
- chore: add debug logs (#4)
- chore: add start compilation logs (#3)
Expand Down
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,25 @@

1. Install the plugin

```bash
npm i --save-dev serverless-plugin-go
```
```bash
npm i --save-dev serverless-plugin-go
```

1. Add it to your `serverless.yaml`

```yaml
plugins:
- 'serverless-plugin-go'
```
```yaml
plugins:
- 'serverless-plugin-go'
```

1. Replace every Go function's `handler` with `*.go` file path or a package path. E.g.

```yaml
functions:
example:
runtime: 'provided.al2'
handler: 'functions/example/main.go' # or just functions/example
```
```yaml
functions:
example:
runtime: 'provided.al2'
handler: 'functions/example/main.go' # or just functions/example
```

## Configuration

Expand Down Expand Up @@ -62,7 +62,7 @@ custom:
env:
GOOS: 'linux' # Default compile OS
CGO_ENABLED: '0' # By default CGO is disabled

# Bash commands to execute before compilation
# These commands will be executed once before all compilations
beforeBuild: []
Expand Down
60 changes: 60 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
import globals from 'globals';
import { configs, plugins } from 'eslint-config-airbnb-extended';
import prettierConfig from 'eslint-config-prettier';

export default [
{
ignores: ['node_modules/', 'build/', 'coverage/', 'example/', 'scripts/', 'eslint.config.mjs'],
},
plugins.stylistic,
plugins.importX,
...configs.base.recommended,
{
files: ['**/*.js'],
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
globals: {
...globals.node,
},
parserOptions: {
ecmaVersion: 'latest',
},
},
rules: {
'import-x/extensions': ['error', 'ignorePackages'],
'import-x/no-useless-path-segments': ['error', { noUselessIndex: false }],
'no-plusplus': 'off',
'no-await-in-loop': 'off',
'no-restricted-syntax': 'off',
'no-param-reassign': ['error', { props: false }],
'no-underscore-dangle': 'off',
'class-methods-use-this': 'off',
radix: 'off',
},
},
{
files: ['*.test.js'],
languageOptions: {
globals: {
describe: 'readonly',
it: 'readonly',
beforeEach: 'readonly',
afterEach: 'readonly',
before: 'readonly',
after: 'readonly',
},
},
rules: {
'no-unused-expressions': 'off',
},
},
{
files: ['mocks/**/*.js'],
rules: {
'class-methods-use-this': 'off',
'import-x/no-extraneous-dependencies': 'off',
},
},
prettierConfig,
];
Loading