Skip to content

Commit 38c5103

Browse files
authored
chore(ALL): fix packaging (aws-powertools#316)
1 parent 6b5b147 commit 38c5103

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+13763
-290
lines changed

.eslintrc.js

+59-45
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,77 @@
11
module.exports = {
22
env: {
3-
'browser': false,
4-
'es2020': true,
5-
'jest': true,
6-
'node': true,
3+
browser: false,
4+
es2020: true,
5+
jest: true,
6+
node: true,
77
},
8-
extends: [
9-
'plugin:@typescript-eslint/eslint-recommended',
10-
'plugin:@typescript-eslint/recommended'
11-
],
8+
extends: ['plugin:@typescript-eslint/eslint-recommended', 'plugin:@typescript-eslint/recommended'],
129
parser: '@typescript-eslint/parser',
1310
plugins: ['@typescript-eslint'],
11+
settings: {
12+
'import/resolver': {
13+
node: {},
14+
typescript: {
15+
project: './tsconfig.es.json',
16+
alwaysTryTypes: true,
17+
},
18+
},
19+
},
1420
rules: {
1521
'@typescript-eslint/ban-ts-ignore': ['off'],
1622
'@typescript-eslint/camelcase': ['off'],
17-
'@typescript-eslint/explicit-function-return-type': [ 'error', { 'allowExpressions': true } ],
23+
'@typescript-eslint/explicit-function-return-type': ['error', { allowExpressions: true }],
1824
'@typescript-eslint/explicit-member-accessibility': 'error',
19-
'@typescript-eslint/indent': [ 'error', 2, { 'SwitchCase': 1 } ],
25+
'@typescript-eslint/indent': ['error', 2, { SwitchCase: 1 }],
2026
'@typescript-eslint/interface-name-prefix': ['off'],
21-
'@typescript-eslint/member-delimiter-style': [ 'error', { 'multiline': { 'delimiter': 'none' } } ],
22-
'@typescript-eslint/member-ordering': [ 'error', {
23-
'default': { 'memberTypes': [
24-
'signature',
25-
'public-field', // = ["public-static-field", "public-instance-field"]
26-
'protected-field', // = ["protected-static-field", "protected-instance-field"]
27-
'private-field', // = ["private-static-field", "private-instance-field"]
28-
'constructor',
29-
'public-method', // = ["public-static-method", "public-instance-method"]
30-
'protected-method', // = ["protected-static-method", "protected-instance-method"]
31-
'private-method' // = ["private-static-method", "private-instance-method"]
32-
] ,
33-
'order': 'alphabetically' }
34-
} ],
27+
'@typescript-eslint/member-delimiter-style': ['error', { multiline: { delimiter: 'none' } }],
28+
'@typescript-eslint/member-ordering': [
29+
'error',
30+
{
31+
default: {
32+
memberTypes: [
33+
'signature',
34+
'public-field', // = ["public-static-field", "public-instance-field"]
35+
'protected-field', // = ["protected-static-field", "protected-instance-field"]
36+
'private-field', // = ["private-static-field", "private-instance-field"]
37+
'constructor',
38+
'public-method', // = ["public-static-method", "public-instance-method"]
39+
'protected-method', // = ["protected-static-method", "protected-instance-method"]
40+
'private-method', // = ["private-static-method", "private-instance-method"]
41+
],
42+
order: 'alphabetically',
43+
},
44+
},
45+
],
3546
'@typescript-eslint/no-explicit-any': 'error',
3647
'@typescript-eslint/no-inferrable-types': ['off'],
37-
'@typescript-eslint/no-unused-vars': [ 'error', { 'argsIgnorePattern': '^_' } ],
48+
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
3849
'@typescript-eslint/no-use-before-define': ['off'],
39-
'@typescript-eslint/semi': [ 'error', 'always' ],
40-
'array-bracket-spacing': [ 'error', 'always', { 'singleValue': false } ],
41-
'arrow-body-style': [ 'error', 'as-needed' ],
42-
'computed-property-spacing': [ 'error', 'never' ],
43-
'func-style': [ 'warn', 'expression' ],
44-
'indent': [ 'error', 2, { 'SwitchCase': 1 } ],
50+
'@typescript-eslint/semi': ['error', 'always'],
51+
'array-bracket-spacing': ['error', 'always', { singleValue: false }],
52+
'arrow-body-style': ['error', 'as-needed'],
53+
'computed-property-spacing': ['error', 'never'],
54+
'func-style': ['warn', 'expression'],
55+
indent: ['error', 2, { SwitchCase: 1 }],
4556
'keyword-spacing': 'error',
4657
'newline-before-return': 2,
4758
'no-console': 0,
48-
'no-multi-spaces': [ 'error', { 'ignoreEOLComments': false } ],
49-
'no-multiple-empty-lines': [ 'error', { 'max': 1, 'maxBOF': 0 } ],
59+
'no-multi-spaces': ['error', { ignoreEOLComments: false }],
60+
'no-multiple-empty-lines': ['error', { max: 1, maxBOF: 0 }],
5061
'no-throw-literal': 'error',
51-
'object-curly-spacing': [ 'error', 'always' ],
62+
'object-curly-spacing': ['error', 'always'],
5263
'prefer-arrow-callback': 'error',
53-
'quotes': [ 'error', 'single', { 'allowTemplateLiterals': true } ],
54-
'semi': [ 'error', 'always' ],
55-
'sort-imports': [ 'error', {
56-
'allowSeparatedGroups': true,
57-
'ignoreCase': true,
58-
'ignoreDeclarationSort': false,
59-
'ignoreMemberSort': true,
60-
'memberSyntaxSortOrder': [ 'all', 'single', 'multiple', 'none' ]
61-
} ]
62-
}
63-
};
64+
quotes: ['error', 'single', { allowTemplateLiterals: true }],
65+
semi: ['error', 'always'],
66+
'sort-imports': [
67+
'error',
68+
{
69+
allowSeparatedGroups: true,
70+
ignoreCase: true,
71+
ignoreDeclarationSort: false,
72+
ignoreMemberSort: true,
73+
memberSyntaxSortOrder: ['all', 'single', 'multiple', 'none'],
74+
},
75+
],
76+
},
77+
};

.github/workflows/on-pull-request.yml

+3
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ jobs:
1313
uses: actions/setup-node@v2
1414
with:
1515
node-version: '14'
16+
- name: "Setup npm"
17+
run: |
18+
npm set "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}"
1619
- name: Install packages
1720
run: |
1821
npm ci

.github/workflows/on-push.yml

+3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ jobs:
1414
uses: actions/setup-node@v2
1515
with:
1616
node-version: '14'
17+
- name: "Setup npm"
18+
run: |
19+
npm set "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}"
1720
- name: Install packages
1821
run: |
1922
npm ci

.github/workflows/on-release.yml

+3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ jobs:
99
runs-on: ubuntu-latest
1010
steps:
1111
- uses: actions/checkout@v2
12+
- name: "Setup npm"
13+
run: |
14+
npm set "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}"
1215
- name: Install packages
1316
run: |
1417
export NODE_ENV=dev

packages/logger/.eslintrc.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"parserOptions": {
1313
"ecmaVersion": 2020,
1414
"sourceType": "module",
15-
"project": "./tsconfig.json"
15+
"project": "./tsconfig-dev.json"
1616
},
1717
"extends": [
1818
"plugin:import/typescript"

packages/logger/examples/utils/formatters/CustomLogFormatter.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { LogFormatter } from '../../../src/formatter';
2-
import { LogAttributes, UnformattedAttributes } from '../../../types';
2+
import { LogAttributes, UnformattedAttributes } from '../../../src/types';
33

44
type MyCompanyLog = LogAttributes;
55

packages/logger/examples/utils/formatters/MyCompanyLogFormatter.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { LogFormatter } from '../../../src/formatter';
2-
import { LogAttributes, UnformattedAttributes } from '../../../types';
2+
import { LogAttributes, UnformattedAttributes } from '../../../src/types';
33

44
type MyCompanyLog = LogAttributes;
55

packages/logger/jest.config.js

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ module.exports = {
2323
'testEnvironment': 'node',
2424
'coveragePathIgnorePatterns': [
2525
'/node_modules/',
26+
'/types/',
2627
],
2728
'coverageThreshold': {
2829
'global': {

0 commit comments

Comments
 (0)