mirror of
https://github.com/bpatrik/pigallery2.git
synced 2024-11-28 08:58:49 +02:00
Revert "upgrading to recommend node v16, making min version to be v14"
This reverts commit b72788456b
.
# Conflicts:
# .github/workflows/build.yml
# .travis.yml
# package-lock.json
# package.json
This commit is contained in:
parent
776c8e83fc
commit
9ea2fc5f21
4
.github/workflows/build.yml
vendored
4
.github/workflows/build.yml
vendored
@ -17,7 +17,7 @@ jobs:
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [15.x, 16.x]
|
||||
node-version: [12.x, 13.x, 14.x]
|
||||
|
||||
services:
|
||||
mariadb:
|
||||
@ -77,7 +77,7 @@ jobs:
|
||||
name: Setup Node.js for use with actions
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 14
|
||||
node-version: 12
|
||||
-
|
||||
name: Install Deps
|
||||
run: npm install --unsafe-perm
|
||||
|
@ -1,8 +1,9 @@
|
||||
dist: xenial
|
||||
language: node_js
|
||||
node_js:
|
||||
- '15'
|
||||
- '16'
|
||||
- '12'
|
||||
- '13'
|
||||
- '14'
|
||||
env:
|
||||
- PORT=35000 MYSQL_HOST='localhost' MYSQL_PASSWORD='' MYSQL_USERNAME='root' MYSQL_DATABASE='pigallery2_test'
|
||||
services:
|
||||
|
@ -29,7 +29,7 @@ import {
|
||||
TextSearchQueryTypes
|
||||
} from '../src/common/entities/SearchQueryDTO';
|
||||
import {QueryKeywords, SearchQueryParser} from '../src/common/SearchQueryParser';
|
||||
import {DirectoryBaseDTO, ParentDirectoryDTO} from '../src/common/entities/DirectoryDTO';
|
||||
import {ParentDirectoryDTO} from '../src/common/entities/DirectoryDTO';
|
||||
|
||||
|
||||
export interface BenchmarkResult {
|
||||
@ -296,7 +296,7 @@ export class BenchmarkRunner {
|
||||
private resetDB = async (): Promise<void> => {
|
||||
Config.Server.Threading.enabled = false;
|
||||
await ObjectManagers.reset();
|
||||
await fs.promises.rm(ProjectPath.DBFolder, {recursive: true});
|
||||
await fs.promises.rm(ProjectPath.DBFolder, {recursive: true, force: true});
|
||||
Config.Server.Database.type = DatabaseType.sqlite;
|
||||
Config.Server.Jobs.scheduled = [];
|
||||
await ObjectManagers.InitSQLManagers();
|
||||
|
@ -1,6 +1,6 @@
|
||||
#-----------------BUILDER-----------------
|
||||
#-----------------------------------------
|
||||
FROM node:16-alpine3.15 AS builder
|
||||
FROM node:14-alpine3.15 AS builder
|
||||
RUN apk add --update-cache --repository https://alpine.global.ssl.fastly.net/alpine/v3.13/community/ \
|
||||
python3 build-base sqlite-dev sqlite-libs vips-dev fftw-dev gcc g++ make libc6-compat && ln -snf /usr/bin/python3 /usr/bin/python
|
||||
COPY pigallery2-release /app
|
||||
@ -14,7 +14,7 @@ RUN mkdir -p /app/data/config && \
|
||||
|
||||
#-----------------MAIN--------------------
|
||||
#-----------------------------------------
|
||||
FROM node:16-alpine3.15 AS main
|
||||
FROM node:14-alpine3.15 AS main
|
||||
WORKDIR /app
|
||||
ENV NODE_ENV=production \
|
||||
# overrides only the default value of the settings (the actualy value can be overwritten through config.json)
|
||||
|
@ -1,6 +1,6 @@
|
||||
#-----------------BUILDER-----------------
|
||||
#-----------------------------------------
|
||||
FROM node:16-buster AS builder
|
||||
FROM node:14-buster AS builder
|
||||
COPY pigallery2-release /app
|
||||
WORKDIR /app
|
||||
RUN npm install --unsafe-perm
|
||||
@ -12,7 +12,7 @@ RUN mkdir -p /app/data/config && \
|
||||
|
||||
#-----------------MAIN--------------------
|
||||
#-----------------------------------------
|
||||
FROM node:16-buster-slim AS main
|
||||
FROM node:14-buster-slim AS main
|
||||
WORKDIR /app
|
||||
ENV NODE_ENV=production \
|
||||
# overrides only the default value of the settings (the actualy value can be overwritten through config.json)
|
||||
|
@ -1,6 +1,6 @@
|
||||
#-----------------BUILDER-----------------
|
||||
#-----------------------------------------
|
||||
FROM node:16-stretch AS builder
|
||||
FROM node:14-stretch AS builder
|
||||
COPY pigallery2-release /app
|
||||
WORKDIR /app
|
||||
RUN npm install --unsafe-perm
|
||||
@ -12,7 +12,7 @@ RUN mkdir -p /app/data/config && \
|
||||
|
||||
#-----------------MAIN--------------------
|
||||
#-----------------------------------------
|
||||
FROM node:16-stretch-slim AS main
|
||||
FROM node:14-stretch-slim AS main
|
||||
WORKDIR /app
|
||||
ENV NODE_ENV=production \
|
||||
# overrides only the default value of the settings (the actualy value can be overwritten through config.json)
|
||||
|
@ -1,6 +1,6 @@
|
||||
#-----------------BUILDER-----------------
|
||||
#-----------------------------------------
|
||||
FROM node:16-buster AS builder
|
||||
FROM node:14-buster AS builder
|
||||
# LABEL maintainer="Patrik J. Braun"
|
||||
# copying only package{-lock}.json to make node_modules cachable
|
||||
RUN git clone https://github.com/bpatrik/pigallery2.git /build
|
||||
@ -16,7 +16,7 @@ RUN npm install --unsafe-perm \
|
||||
|
||||
#-----------------MAIN--------------------
|
||||
#-----------------------------------------
|
||||
FROM node:16-buster-slim AS main
|
||||
FROM node:14-buster-slim AS main
|
||||
WORKDIR /app
|
||||
ENV NODE_ENV=production \
|
||||
# overrides only the default value of the settings (the actualy value can be overwritten through config.json)
|
||||
|
@ -14,7 +14,7 @@ services:
|
||||
restart: always
|
||||
|
||||
pigallery2:
|
||||
image: bpatrik/pigallery2:latest-debian-buster # TODO: change it back to latest once release workflow gets fixed
|
||||
image: bpatrik/pigallery2:latest-debian-buster # TODO: change it back to latest once relese workflow gets fixed
|
||||
container_name: pigallery2
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
|
30300
package-lock.json
generated
30300
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -155,6 +155,6 @@
|
||||
"mysql": "2.18.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=15.0 <17.0"
|
||||
"node": ">=12.0 <15.0"
|
||||
}
|
||||
}
|
||||
|
@ -57,7 +57,7 @@ export class TempFolderCleaningJob extends Job {
|
||||
this.Progress.log('processing: ' + file);
|
||||
this.Progress.Processed++;
|
||||
if ((await fs.promises.stat(file)).isDirectory()) {
|
||||
await fs.promises.rm(file, {recursive: true});
|
||||
await fs.promises.rmdir(file, {recursive: true});
|
||||
} else {
|
||||
await fs.promises.unlink(file);
|
||||
}
|
||||
@ -83,7 +83,7 @@ export class TempFolderCleaningJob extends Job {
|
||||
if (await this.isValidDirectory(filePath) === false) {
|
||||
this.Progress.log('processing: ' + filePath);
|
||||
this.Progress.Processed++;
|
||||
await fs.promises.rm(filePath, {recursive: true});
|
||||
await fs.promises.rmdir(filePath, {recursive: true});
|
||||
} else {
|
||||
this.Progress.log('skipping: ' + filePath);
|
||||
this.Progress.Skipped++;
|
||||
|
@ -24,7 +24,7 @@ describe('Typeorm integration', () => {
|
||||
|
||||
const tempDir = path.join(__dirname, '../../tmp');
|
||||
const setUpSqlDB = async () => {
|
||||
await fs.promises.rm(tempDir, {recursive: true});
|
||||
await fs.promises.rm(tempDir, {recursive: true, force:true});
|
||||
|
||||
Config.Server.Database.type = DatabaseType.sqlite;
|
||||
Config.Server.Database.dbFolder = tempDir;
|
||||
@ -34,7 +34,7 @@ describe('Typeorm integration', () => {
|
||||
|
||||
const teardownUpSqlDB = async () => {
|
||||
await SQLConnection.close();
|
||||
await fs.promises.rm(tempDir, {recursive: true});
|
||||
await fs.promises.rmdir(tempDir, {recursive: true});
|
||||
};
|
||||
|
||||
beforeEach(async () => {
|
||||
|
@ -29,7 +29,7 @@ describe('GalleryRouter', (sqlHelper: DBTestHelper) => {
|
||||
let server: Server;
|
||||
const setUp = async () => {
|
||||
await sqlHelper.initDB();
|
||||
await fs.promises.rm(tempDir, {recursive: true});
|
||||
await fs.promises.rm(tempDir, {recursive: true, force: true});
|
||||
Config.Client.authenticationRequired = false;
|
||||
Config.Server.Threading.enabled = false;
|
||||
Config.Client.Media.Video.enabled = true;
|
||||
|
@ -11,7 +11,7 @@ import {SuperAgentStatic} from 'superagent';
|
||||
import {RouteTestingHelper} from './RouteTestingHelper';
|
||||
import {QueryParams} from '../../../../src/common/QueryParams';
|
||||
import {ErrorCodes} from '../../../../src/common/entities/Error';
|
||||
import {DatabaseType, ServerConfig} from '../../../../src/common/config/private/PrivateConfig';
|
||||
import {DatabaseType} from '../../../../src/common/config/private/PrivateConfig';
|
||||
|
||||
|
||||
process.env.NODE_ENV = 'test';
|
||||
@ -33,7 +33,7 @@ describe('SharingRouter', () => {
|
||||
const tempDir = path.join(__dirname, '../../tmp');
|
||||
let server: Server;
|
||||
const setUp = async () => {
|
||||
await fs.promises.rm(tempDir, {recursive: true});
|
||||
await fs.promises.rm(tempDir, {recursive: true, force: true});
|
||||
Config.Client.authenticationRequired = true;
|
||||
Config.Server.Threading.enabled = false;
|
||||
Config.Client.Sharing.enabled = true;
|
||||
@ -49,7 +49,7 @@ describe('SharingRouter', () => {
|
||||
};
|
||||
const tearDown = async () => {
|
||||
await SQLConnection.close();
|
||||
await fs.promises.rm(tempDir, {recursive: true});
|
||||
await fs.promises.rm(tempDir, {recursive: true, force: true});
|
||||
};
|
||||
|
||||
const shouldBeValidUser = (result: any, user: any) => {
|
||||
|
@ -11,7 +11,7 @@ import {Utils} from '../../../../src/common/Utils';
|
||||
import {SuperAgentStatic} from 'superagent';
|
||||
import {RouteTestingHelper} from './RouteTestingHelper';
|
||||
import {ErrorCodes} from '../../../../src/common/entities/Error';
|
||||
import {DatabaseType, ServerConfig} from '../../../../src/common/config/private/PrivateConfig';
|
||||
import {DatabaseType} from '../../../../src/common/config/private/PrivateConfig';
|
||||
import {ProjectPath} from '../../../../src/backend/ProjectPath';
|
||||
|
||||
|
||||
@ -34,7 +34,7 @@ describe('UserRouter', () => {
|
||||
const tempDir = path.join(__dirname, '../../tmp');
|
||||
let server: Server;
|
||||
const setUp = async () => {
|
||||
await fs.promises.rm(tempDir, {recursive: true});
|
||||
await fs.promises.rm(tempDir, {recursive: true, force: true});
|
||||
Config.Server.Threading.enabled = false;
|
||||
Config.Server.Database.type = DatabaseType.sqlite;
|
||||
Config.Server.Database.dbFolder = tempDir;
|
||||
@ -49,7 +49,7 @@ describe('UserRouter', () => {
|
||||
};
|
||||
const tearDown = async () => {
|
||||
await SQLConnection.close();
|
||||
await fs.promises.rm(tempDir, {recursive: true});
|
||||
await fs.promises.rm(tempDir, {recursive: true, force: true});
|
||||
};
|
||||
|
||||
const checkUserResult = (result: any, user: any) => {
|
||||
|
@ -3,7 +3,7 @@ import * as fs from 'fs';
|
||||
import {Config} from '../../../../../src/common/config/private/Config';
|
||||
import {SQLConnection} from '../../../../../src/backend/model/database/sql/SQLConnection';
|
||||
import {Server} from '../../../../../src/backend/server';
|
||||
import {DatabaseType, ServerConfig} from '../../../../../src/common/config/private/PrivateConfig';
|
||||
import {DatabaseType} from '../../../../../src/common/config/private/PrivateConfig';
|
||||
import {ProjectPath} from '../../../../../src/backend/ProjectPath';
|
||||
|
||||
process.env.NODE_ENV = 'test';
|
||||
@ -16,7 +16,7 @@ describe('SettingsRouter', () => {
|
||||
|
||||
const tempDir = path.join(__dirname, '../../tmp');
|
||||
beforeEach(async () => {
|
||||
await fs.promises.rm(tempDir, {recursive: true});
|
||||
await fs.promises.rm(tempDir, {recursive: true, force: true});
|
||||
Config.Server.Threading.enabled = false;
|
||||
Config.Server.Database.type = DatabaseType.sqlite;
|
||||
Config.Server.Database.dbFolder = tempDir;
|
||||
@ -26,7 +26,7 @@ describe('SettingsRouter', () => {
|
||||
|
||||
afterEach(async () => {
|
||||
await SQLConnection.close();
|
||||
await fs.promises.rm(tempDir, {recursive: true});
|
||||
await fs.promises.rm(tempDir, {recursive: true, force: true});
|
||||
});
|
||||
|
||||
describe('/GET settings', () => {
|
||||
|
Loading…
Reference in New Issue
Block a user