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
2 changes: 1 addition & 1 deletion .github/workflows/node-js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
node-version: [16.x, 18.x, 20.x]
node-version: [18.x, 20.x, 22.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
Expand Down
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# https://medium.com/@kahana.hagai/docker-compose-with-node-js-and-mongodb-dbdadab5ce0a

# The instructions for the first stage
FROM node:16-alpine AS builder
FROM node:22-alpine AS builder

ARG NODE_ENV=production
ENV NODE_ENV=${NODE_ENV}
Expand All @@ -16,14 +16,15 @@ RUN chmod +x scripts/post-install.sh
RUN apk --no-cache add python3 make g++

COPY ./package*.json ./
RUN npm pkg delete scripts.prepare
RUN npm install


# ------------------------------------


# The instructions for second stage
FROM node:16-alpine
FROM node:22-alpine

WORKDIR /opt/OpenHaus/connector
COPY --from=builder node_modules node_modules
Expand Down
1 change: 1 addition & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ module.exports = (grunt) => {
`echo "exit 0" > ${path.join(PATH_BUILD, "scripts/post-install.sh")}`,
`chmod +x ${path.join(PATH_BUILD, "scripts/post-install.sh")}`,
`cp ./package*.json ${PATH_BUILD}`,
`cd ${PATH_BUILD} && npm pkg delete scripts.prepare`,
"grunt uglify",
].forEach((cmd) => {
cp.execSync(cmd, {
Expand Down
52 changes: 52 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
import { defineConfig, globalIgnores } from "eslint/config";
import globals from "globals";
import path from "node:path";
import { fileURLToPath } from "node:url";
import js from "@eslint/js";
import { FlatCompat } from "@eslint/eslintrc";

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);

const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
});

export default defineConfig([
globalIgnores([
"**/node_modules",
"**/build",
"**/dist"
]), {
files: ["*.js"],
extends: compat.extends("eslint:recommended"),
languageOptions: {
globals: {
...globals.node,
...globals.commonjs,
},
ecmaVersion: 12,
sourceType: "commonjs"
},
rules: {
semi: ["error", "always"],
quotes: ["error", "double", {
avoidEscape: true,
allowTemplateLiterals: true,
}],
"no-inner-declarations": "off",
"no-unused-vars": ["error", {
caughtErrors: "none"
}]
}
},
{
files: ["eslint.config.mjs"],
languageOptions: {
ecmaVersion: 12,
sourceType: "module",
}
}
]);
Loading