-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #747 from unicef/node_20.18.0_shoelace_2.18.0
Node 20.18.0 shoelace 2.18.0
- Loading branch information
Showing
16 changed files
with
6,538 additions
and
5,100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,10 @@ | ||
FROM node:14.21-alpine3.16 as builder | ||
FROM node:20.18.1-alpine3.19 AS builder | ||
RUN apk update | ||
RUN apk add --update bash | ||
|
||
RUN apk add git | ||
RUN npm config set unsafe-perm true | ||
RUN npm install -g [email protected] | ||
|
||
|
||
WORKDIR /tmp | ||
ADD package.json /tmp/ | ||
ADD package-lock.json /tmp/ | ||
|
@@ -17,18 +15,19 @@ ADD . /code/ | |
WORKDIR /code | ||
RUN rm -rf node_modules | ||
RUN cp -a /tmp/node_modules /code/node_modules | ||
ENV NODE_OPTIONS --max_old_space_size=4096 | ||
RUN npm run build | ||
|
||
WORKDIR /code | ||
RUN npm run build | ||
|
||
FROM node:14.21-alpine3.16 | ||
FROM node:20.18.1-alpine3.19 | ||
RUN apk update | ||
RUN apk add --update bash | ||
|
||
WORKDIR /code | ||
RUN npm init -y | ||
RUN npm install express | ||
RUN npm install compression | ||
RUN npm install ua-parser-js | ||
RUN npm install [email protected] | ||
COPY --from=builder /code/express.js /code/express.js | ||
COPY --from=builder /code/src /code/src | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
FROM node:14.21-alpine3.16 | ||
FROM node:20.18.1-alpine3.19 | ||
RUN apk update | ||
RUN apk add --update bash | ||
|
||
RUN apk add git | ||
RUN npm install -g --unsafe-perm polymer-cli | ||
RUN npm install -g [email protected] | ||
|
||
WORKDIR /code | ||
CMD ["npm", "start"] | ||
CMD ["sh", "-c", "npm start"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
import typescriptEslint from '@typescript-eslint/eslint-plugin'; | ||
import lit from 'eslint-plugin-lit'; | ||
import prettier from 'eslint-plugin-prettier'; | ||
import litA11Y from 'eslint-plugin-lit-a11y'; | ||
import globals from 'globals'; | ||
import tsParser from '@typescript-eslint/parser'; | ||
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 [ | ||
{ | ||
ignores: ['**/.gitignore', 'demo/*', 'test/*', 'build/*', 'src/*'] | ||
}, | ||
...compat.extends( | ||
'eslint:recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
'plugin:lit/recommended', | ||
'plugin:lit-a11y/recommended', | ||
'plugin:prettier/recommended' | ||
), | ||
{ | ||
plugins: { | ||
'@typescript-eslint': typescriptEslint, | ||
lit, | ||
prettier, | ||
'lit-a11y': litA11Y | ||
}, | ||
|
||
languageOptions: { | ||
globals: { | ||
...globals.browser, | ||
...globals.node, | ||
dayjs: true, | ||
Promise: true, | ||
Polymer: true, | ||
EtoolsPmpApp: true, | ||
EtoolsRequestCacheDb: true, | ||
ShadyCSS: true, | ||
Set: true | ||
}, | ||
|
||
parser: tsParser, | ||
ecmaVersion: 2018, | ||
sourceType: 'module' | ||
}, | ||
|
||
rules: { | ||
'lit-a11y/anchor-is-valid': 'off', | ||
'lit-a11y/click-events-have-key-events': 'off', | ||
'lit-a11y/no-autofocus': 'warn', | ||
'lit-a11y/aria-attrs': 'warn', | ||
'prettier/prettier': 'error', | ||
'lit/attribute-value-entities': 'off', | ||
'lit/no-legacy-template-syntax': 'off', | ||
'linebreak-style': 'off', | ||
|
||
'no-irregular-whitespace': [ | ||
'error', | ||
{ | ||
skipTemplates: true | ||
} | ||
], | ||
|
||
'@typescript-eslint/no-object-literal-type-assertion': 'off', | ||
'padded-blocks': 'off', | ||
'brace-style': 'off', | ||
'new-cap': 'off', | ||
'no-var': 'off', | ||
'require-jsdoc': 'off', | ||
'valid-jsdoc': 'off', | ||
'comma-dangle': ['error', 'never'], | ||
|
||
'max-len': [ | ||
'error', | ||
{ | ||
code: 120, | ||
ignoreUrls: true | ||
} | ||
], | ||
|
||
'prefer-promise-reject-errors': 'off', | ||
camelcase: 'off', | ||
'@typescript-eslint/explicit-module-boundary-types': 'off', | ||
'@typescript-eslint/explicit-member-accessibility': 'off', | ||
'@typescript-eslint/camelcase': 'off', | ||
'@typescript-eslint/explicit-function-return-type': 'off', | ||
'@typescript-eslint/no-explicit-any': 'off', | ||
'@typescript-eslint/no-non-null-assertion': 'off', | ||
'@typescript-eslint/ban-ts-comment': 'off', | ||
'@typescript-eslint/no-non-null-asserted-optional-chain': 'off', | ||
'@typescript-eslint/no-use-before-define': [ | ||
'error', | ||
{ | ||
functions: false, | ||
classes: true, | ||
variables: true | ||
} | ||
], | ||
|
||
'@typescript-eslint/no-unused-vars': [ | ||
'error', | ||
{ | ||
argsIgnorePattern: '^_' | ||
} | ||
] | ||
} | ||
} | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.