mirror of
https://github.com/xuthus83/pigallery2.git
synced 2025-01-14 14:43:17 +08:00
Revert "upgrading to recommend node v16, making min version to be v14"
This reverts commit b72788456b64ecaac1a81ea8b24429ad22f60baa. # 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:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
node-version: [15.x, 16.x]
|
node-version: [12.x, 13.x, 14.x]
|
||||||
|
|
||||||
services:
|
services:
|
||||||
mariadb:
|
mariadb:
|
||||||
@ -77,7 +77,7 @@ jobs:
|
|||||||
name: Setup Node.js for use with actions
|
name: Setup Node.js for use with actions
|
||||||
uses: actions/setup-node@v2
|
uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
node-version: 14
|
node-version: 12
|
||||||
-
|
-
|
||||||
name: Install Deps
|
name: Install Deps
|
||||||
run: npm install --unsafe-perm
|
run: npm install --unsafe-perm
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
dist: xenial
|
dist: xenial
|
||||||
language: node_js
|
language: node_js
|
||||||
node_js:
|
node_js:
|
||||||
- '15'
|
- '12'
|
||||||
- '16'
|
- '13'
|
||||||
|
- '14'
|
||||||
env:
|
env:
|
||||||
- PORT=35000 MYSQL_HOST='localhost' MYSQL_PASSWORD='' MYSQL_USERNAME='root' MYSQL_DATABASE='pigallery2_test'
|
- PORT=35000 MYSQL_HOST='localhost' MYSQL_PASSWORD='' MYSQL_USERNAME='root' MYSQL_DATABASE='pigallery2_test'
|
||||||
services:
|
services:
|
||||||
|
@ -29,7 +29,7 @@ import {
|
|||||||
TextSearchQueryTypes
|
TextSearchQueryTypes
|
||||||
} from '../src/common/entities/SearchQueryDTO';
|
} from '../src/common/entities/SearchQueryDTO';
|
||||||
import {QueryKeywords, SearchQueryParser} from '../src/common/SearchQueryParser';
|
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 {
|
export interface BenchmarkResult {
|
||||||
@ -296,7 +296,7 @@ export class BenchmarkRunner {
|
|||||||
private resetDB = async (): Promise<void> => {
|
private resetDB = async (): Promise<void> => {
|
||||||
Config.Server.Threading.enabled = false;
|
Config.Server.Threading.enabled = false;
|
||||||
await ObjectManagers.reset();
|
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.Database.type = DatabaseType.sqlite;
|
||||||
Config.Server.Jobs.scheduled = [];
|
Config.Server.Jobs.scheduled = [];
|
||||||
await ObjectManagers.InitSQLManagers();
|
await ObjectManagers.InitSQLManagers();
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#-----------------BUILDER-----------------
|
#-----------------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/ \
|
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
|
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
|
COPY pigallery2-release /app
|
||||||
@ -14,7 +14,7 @@ RUN mkdir -p /app/data/config && \
|
|||||||
|
|
||||||
#-----------------MAIN--------------------
|
#-----------------MAIN--------------------
|
||||||
#-----------------------------------------
|
#-----------------------------------------
|
||||||
FROM node:16-alpine3.15 AS main
|
FROM node:14-alpine3.15 AS main
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
ENV NODE_ENV=production \
|
ENV NODE_ENV=production \
|
||||||
# overrides only the default value of the settings (the actualy value can be overwritten through config.json)
|
# overrides only the default value of the settings (the actualy value can be overwritten through config.json)
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#-----------------BUILDER-----------------
|
#-----------------BUILDER-----------------
|
||||||
#-----------------------------------------
|
#-----------------------------------------
|
||||||
FROM node:16-buster AS builder
|
FROM node:14-buster AS builder
|
||||||
COPY pigallery2-release /app
|
COPY pigallery2-release /app
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
RUN npm install --unsafe-perm
|
RUN npm install --unsafe-perm
|
||||||
@ -12,7 +12,7 @@ RUN mkdir -p /app/data/config && \
|
|||||||
|
|
||||||
#-----------------MAIN--------------------
|
#-----------------MAIN--------------------
|
||||||
#-----------------------------------------
|
#-----------------------------------------
|
||||||
FROM node:16-buster-slim AS main
|
FROM node:14-buster-slim AS main
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
ENV NODE_ENV=production \
|
ENV NODE_ENV=production \
|
||||||
# overrides only the default value of the settings (the actualy value can be overwritten through config.json)
|
# overrides only the default value of the settings (the actualy value can be overwritten through config.json)
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#-----------------BUILDER-----------------
|
#-----------------BUILDER-----------------
|
||||||
#-----------------------------------------
|
#-----------------------------------------
|
||||||
FROM node:16-stretch AS builder
|
FROM node:14-stretch AS builder
|
||||||
COPY pigallery2-release /app
|
COPY pigallery2-release /app
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
RUN npm install --unsafe-perm
|
RUN npm install --unsafe-perm
|
||||||
@ -12,7 +12,7 @@ RUN mkdir -p /app/data/config && \
|
|||||||
|
|
||||||
#-----------------MAIN--------------------
|
#-----------------MAIN--------------------
|
||||||
#-----------------------------------------
|
#-----------------------------------------
|
||||||
FROM node:16-stretch-slim AS main
|
FROM node:14-stretch-slim AS main
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
ENV NODE_ENV=production \
|
ENV NODE_ENV=production \
|
||||||
# overrides only the default value of the settings (the actualy value can be overwritten through config.json)
|
# overrides only the default value of the settings (the actualy value can be overwritten through config.json)
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#-----------------BUILDER-----------------
|
#-----------------BUILDER-----------------
|
||||||
#-----------------------------------------
|
#-----------------------------------------
|
||||||
FROM node:16-buster AS builder
|
FROM node:14-buster AS builder
|
||||||
# LABEL maintainer="Patrik J. Braun"
|
# LABEL maintainer="Patrik J. Braun"
|
||||||
# copying only package{-lock}.json to make node_modules cachable
|
# copying only package{-lock}.json to make node_modules cachable
|
||||||
RUN git clone https://github.com/bpatrik/pigallery2.git /build
|
RUN git clone https://github.com/bpatrik/pigallery2.git /build
|
||||||
@ -16,7 +16,7 @@ RUN npm install --unsafe-perm \
|
|||||||
|
|
||||||
#-----------------MAIN--------------------
|
#-----------------MAIN--------------------
|
||||||
#-----------------------------------------
|
#-----------------------------------------
|
||||||
FROM node:16-buster-slim AS main
|
FROM node:14-buster-slim AS main
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
ENV NODE_ENV=production \
|
ENV NODE_ENV=production \
|
||||||
# overrides only the default value of the settings (the actualy value can be overwritten through config.json)
|
# overrides only the default value of the settings (the actualy value can be overwritten through config.json)
|
||||||
|
@ -14,7 +14,7 @@ services:
|
|||||||
restart: always
|
restart: always
|
||||||
|
|
||||||
pigallery2:
|
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
|
container_name: pigallery2
|
||||||
environment:
|
environment:
|
||||||
- NODE_ENV=production
|
- 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"
|
"mysql": "2.18.1"
|
||||||
},
|
},
|
||||||
"engines": {
|
"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.log('processing: ' + file);
|
||||||
this.Progress.Processed++;
|
this.Progress.Processed++;
|
||||||
if ((await fs.promises.stat(file)).isDirectory()) {
|
if ((await fs.promises.stat(file)).isDirectory()) {
|
||||||
await fs.promises.rm(file, {recursive: true});
|
await fs.promises.rmdir(file, {recursive: true});
|
||||||
} else {
|
} else {
|
||||||
await fs.promises.unlink(file);
|
await fs.promises.unlink(file);
|
||||||
}
|
}
|
||||||
@ -83,7 +83,7 @@ export class TempFolderCleaningJob extends Job {
|
|||||||
if (await this.isValidDirectory(filePath) === false) {
|
if (await this.isValidDirectory(filePath) === false) {
|
||||||
this.Progress.log('processing: ' + filePath);
|
this.Progress.log('processing: ' + filePath);
|
||||||
this.Progress.Processed++;
|
this.Progress.Processed++;
|
||||||
await fs.promises.rm(filePath, {recursive: true});
|
await fs.promises.rmdir(filePath, {recursive: true});
|
||||||
} else {
|
} else {
|
||||||
this.Progress.log('skipping: ' + filePath);
|
this.Progress.log('skipping: ' + filePath);
|
||||||
this.Progress.Skipped++;
|
this.Progress.Skipped++;
|
||||||
|
@ -24,7 +24,7 @@ describe('Typeorm integration', () => {
|
|||||||
|
|
||||||
const tempDir = path.join(__dirname, '../../tmp');
|
const tempDir = path.join(__dirname, '../../tmp');
|
||||||
const setUpSqlDB = async () => {
|
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.type = DatabaseType.sqlite;
|
||||||
Config.Server.Database.dbFolder = tempDir;
|
Config.Server.Database.dbFolder = tempDir;
|
||||||
@ -34,7 +34,7 @@ describe('Typeorm integration', () => {
|
|||||||
|
|
||||||
const teardownUpSqlDB = async () => {
|
const teardownUpSqlDB = async () => {
|
||||||
await SQLConnection.close();
|
await SQLConnection.close();
|
||||||
await fs.promises.rm(tempDir, {recursive: true});
|
await fs.promises.rmdir(tempDir, {recursive: true});
|
||||||
};
|
};
|
||||||
|
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
|
@ -29,7 +29,7 @@ describe('GalleryRouter', (sqlHelper: DBTestHelper) => {
|
|||||||
let server: Server;
|
let server: Server;
|
||||||
const setUp = async () => {
|
const setUp = async () => {
|
||||||
await sqlHelper.initDB();
|
await sqlHelper.initDB();
|
||||||
await fs.promises.rm(tempDir, {recursive: true});
|
await fs.promises.rm(tempDir, {recursive: true, force: true});
|
||||||
Config.Client.authenticationRequired = false;
|
Config.Client.authenticationRequired = false;
|
||||||
Config.Server.Threading.enabled = false;
|
Config.Server.Threading.enabled = false;
|
||||||
Config.Client.Media.Video.enabled = true;
|
Config.Client.Media.Video.enabled = true;
|
||||||
|
@ -11,7 +11,7 @@ import {SuperAgentStatic} from 'superagent';
|
|||||||
import {RouteTestingHelper} from './RouteTestingHelper';
|
import {RouteTestingHelper} from './RouteTestingHelper';
|
||||||
import {QueryParams} from '../../../../src/common/QueryParams';
|
import {QueryParams} from '../../../../src/common/QueryParams';
|
||||||
import {ErrorCodes} from '../../../../src/common/entities/Error';
|
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';
|
process.env.NODE_ENV = 'test';
|
||||||
@ -33,7 +33,7 @@ describe('SharingRouter', () => {
|
|||||||
const tempDir = path.join(__dirname, '../../tmp');
|
const tempDir = path.join(__dirname, '../../tmp');
|
||||||
let server: Server;
|
let server: Server;
|
||||||
const setUp = async () => {
|
const setUp = async () => {
|
||||||
await fs.promises.rm(tempDir, {recursive: true});
|
await fs.promises.rm(tempDir, {recursive: true, force: true});
|
||||||
Config.Client.authenticationRequired = true;
|
Config.Client.authenticationRequired = true;
|
||||||
Config.Server.Threading.enabled = false;
|
Config.Server.Threading.enabled = false;
|
||||||
Config.Client.Sharing.enabled = true;
|
Config.Client.Sharing.enabled = true;
|
||||||
@ -49,7 +49,7 @@ describe('SharingRouter', () => {
|
|||||||
};
|
};
|
||||||
const tearDown = async () => {
|
const tearDown = async () => {
|
||||||
await SQLConnection.close();
|
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) => {
|
const shouldBeValidUser = (result: any, user: any) => {
|
||||||
|
@ -11,7 +11,7 @@ import {Utils} from '../../../../src/common/Utils';
|
|||||||
import {SuperAgentStatic} from 'superagent';
|
import {SuperAgentStatic} from 'superagent';
|
||||||
import {RouteTestingHelper} from './RouteTestingHelper';
|
import {RouteTestingHelper} from './RouteTestingHelper';
|
||||||
import {ErrorCodes} from '../../../../src/common/entities/Error';
|
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';
|
import {ProjectPath} from '../../../../src/backend/ProjectPath';
|
||||||
|
|
||||||
|
|
||||||
@ -34,7 +34,7 @@ describe('UserRouter', () => {
|
|||||||
const tempDir = path.join(__dirname, '../../tmp');
|
const tempDir = path.join(__dirname, '../../tmp');
|
||||||
let server: Server;
|
let server: Server;
|
||||||
const setUp = async () => {
|
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.Threading.enabled = false;
|
||||||
Config.Server.Database.type = DatabaseType.sqlite;
|
Config.Server.Database.type = DatabaseType.sqlite;
|
||||||
Config.Server.Database.dbFolder = tempDir;
|
Config.Server.Database.dbFolder = tempDir;
|
||||||
@ -49,7 +49,7 @@ describe('UserRouter', () => {
|
|||||||
};
|
};
|
||||||
const tearDown = async () => {
|
const tearDown = async () => {
|
||||||
await SQLConnection.close();
|
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) => {
|
const checkUserResult = (result: any, user: any) => {
|
||||||
|
@ -3,7 +3,7 @@ import * as fs from 'fs';
|
|||||||
import {Config} from '../../../../../src/common/config/private/Config';
|
import {Config} from '../../../../../src/common/config/private/Config';
|
||||||
import {SQLConnection} from '../../../../../src/backend/model/database/sql/SQLConnection';
|
import {SQLConnection} from '../../../../../src/backend/model/database/sql/SQLConnection';
|
||||||
import {Server} from '../../../../../src/backend/server';
|
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';
|
import {ProjectPath} from '../../../../../src/backend/ProjectPath';
|
||||||
|
|
||||||
process.env.NODE_ENV = 'test';
|
process.env.NODE_ENV = 'test';
|
||||||
@ -16,7 +16,7 @@ describe('SettingsRouter', () => {
|
|||||||
|
|
||||||
const tempDir = path.join(__dirname, '../../tmp');
|
const tempDir = path.join(__dirname, '../../tmp');
|
||||||
beforeEach(async () => {
|
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.Threading.enabled = false;
|
||||||
Config.Server.Database.type = DatabaseType.sqlite;
|
Config.Server.Database.type = DatabaseType.sqlite;
|
||||||
Config.Server.Database.dbFolder = tempDir;
|
Config.Server.Database.dbFolder = tempDir;
|
||||||
@ -26,7 +26,7 @@ describe('SettingsRouter', () => {
|
|||||||
|
|
||||||
afterEach(async () => {
|
afterEach(async () => {
|
||||||
await SQLConnection.close();
|
await SQLConnection.close();
|
||||||
await fs.promises.rm(tempDir, {recursive: true});
|
await fs.promises.rm(tempDir, {recursive: true, force: true});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('/GET settings', () => {
|
describe('/GET settings', () => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user