Merge pull request #1616 from hedgedoc/yarn2

This commit is contained in:
Yannick Bungers 2021-09-23 22:47:34 +02:00 committed by GitHub
commit 96025e6dce
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 11273 additions and 7386 deletions

View file

@ -25,17 +25,8 @@ jobs:
uses: actions/setup-node@v2
with:
node-version: 16
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- run: yarn --frozen-lockfile --prefer-offline
cache: 'yarn'
- run: yarn install --immutable
- run: ${{matrix.command}}
build:
runs-on: ubuntu-latest
@ -48,17 +39,8 @@ jobs:
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- run: yarn --frozen-lockfile --prefer-offline
cache: 'yarn'
- run: yarn install --immutable
- run: yarn run build
integration-tests:
@ -71,17 +53,8 @@ jobs:
uses: actions/setup-node@v2
with:
node-version: 16
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- run: yarn --frozen-lockfile --prefer-offline
cache: 'yarn'
- run: yarn install --immutable
- run: yarn run test:cov
- uses: codecov/codecov-action@v2
with:
@ -98,17 +71,8 @@ jobs:
uses: actions/setup-node@v2
with:
node-version: 16
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- run: yarn --frozen-lockfile --prefer-offline
cache: 'yarn'
- run: yarn install --immutable
- run: yarn run test:e2e:cov
- uses: codecov/codecov-action@v2
with:

9
.gitignore vendored
View file

@ -44,3 +44,12 @@ public/uploads/*
!public/.gitkeep
uploads
test_uploads
# Yarn 2 without zero-installs
.yarn/*
!.yarn/patches
!.yarn/releases
!.yarn/plugins
!.yarn/sdks
!.yarn/versions
.pnp.*

View file

@ -1,4 +1,5 @@
{
"plugins": ["@trivago/prettier-plugin-sort-imports"],
"singleQuote": true,
"trailingComma": "all",
"importOrder": ["^[./]"],

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

631
.yarn/releases/yarn-berry.cjs vendored Executable file

File diff suppressed because one or more lines are too long

3
.yarn/releases/yarn-berry.cjs.license vendored Normal file
View file

@ -0,0 +1,3 @@
SPDX-FileCopyrightText: 2016-present, Yarn Contributors
SPDX-License-Identifier: BSD-2-Clause

9
.yarnrc.yml Normal file
View file

@ -0,0 +1,9 @@
nodeLinker: node-modules
plugins:
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
spec: "@yarnpkg/plugin-interactive-tools"
- path: .yarn/plugins/@yarnpkg/plugin-typescript.cjs
spec: "@yarnpkg/plugin-typescript"
yarnPath: .yarn/releases/yarn-berry.cjs

3
.yarnrc.yml.license Normal file
View file

@ -0,0 +1,3 @@
SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file)
SPDX-License-Identifier: CC0-1.0

View file

@ -0,0 +1,9 @@
Copyright (c) <year> <owner> All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View file

@ -6,8 +6,7 @@
"private": true,
"license": "AGPL-3.0",
"scripts": {
"prebuild": "rimraf dist",
"build": "nest build",
"build": "rimraf dist && nest build",
"format": "prettier --check \"src/**/*.ts\" \"test/**/*.ts\"",
"format:fix": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
"start": "nest start",
@ -45,8 +44,6 @@
"class-validator": "0.13.1",
"cli-color": "2.0.0",
"connect-typeorm": "1.1.4",
"eslint-plugin-jest": "24.4.2",
"eslint-plugin-local-rules": "1.1.0",
"express-session": "1.17.2",
"file-type": "16.5.3",
"joi": "17.4.2",
@ -76,18 +73,21 @@
"@types/jest": "27.0.2",
"@types/node": "14.17.18",
"@types/passport-local": "1.0.34",
"@types/source-map-support": "^0",
"@types/supertest": "2.0.11",
"@typescript-eslint/eslint-plugin": "4.31.2",
"@typescript-eslint/parser": "4.31.2",
"eslint": "7.32.0",
"eslint-config-prettier": "8.3.0",
"eslint-plugin-import": "2.24.2",
"eslint-plugin-jest": "24.4.2",
"eslint-plugin-local-rules": "1.1.0",
"eslint-plugin-prettier": "4.0.0",
"jest": "27.2.1",
"prettier": "2.4.1",
"source-map-support": "^0.5.19",
"supertest": "6.1.6",
"ts-jest": "27.0.5",
"ts-loader": "9.2.6",
"ts-node": "10.2.1",
"tsconfig-paths": "3.11.0",
"typescript": "4.4.3"

View file

@ -12,6 +12,7 @@ import {
IsUrl,
ValidateNested,
} from 'class-validator';
import { URL } from 'url';
import { ServerVersion } from '../monitoring/server-status.dto';

View file

@ -4,6 +4,7 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { Inject, Injectable } from '@nestjs/common';
import { URL } from 'url';
import appConfiguration, { AppConfig } from '../config/app.config';
import authConfiguration, { AuthConfig } from '../config/auth.config';

View file

@ -5,6 +5,7 @@
*/
import { Inject, Injectable } from '@nestjs/common';
import { Client } from 'minio';
import { URL } from 'url';
import mediaConfiguration, { MediaConfig } from '../../config/media.config';
import { MediaBackendError } from '../../errors/errors';

View file

@ -5,6 +5,7 @@
*/
import { Inject, Injectable } from '@nestjs/common';
import fetch, { Response } from 'node-fetch';
import { URL } from 'url';
import mediaConfiguration, { MediaConfig } from '../../config/media.config';
import { MediaBackendError } from '../../errors/errors';

View file

@ -10,10 +10,6 @@
"outDir": "./dist",
"baseUrl": "./",
"incremental": true,
"typeRoots": [
"./types",
"./node_modules/@types"
],
"strict": true,
"strictPropertyInitialization": false
}

17540
yarn.lock

File diff suppressed because it is too large Load diff