Skip to content

Commit d3e3052

Browse files
authored
💚 upgrade dependencies to latest versions except those that break the build
2 parents b0b9dba + 44f40be commit d3e3052

File tree

7 files changed

+2020
-1710
lines changed

7 files changed

+2020
-1710
lines changed

.eslintrc.js

Lines changed: 2 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,4 @@
11
module.exports = {
2-
extends: [
3-
require.resolve('amper-scripts/config/eslint'),
4-
'plugin:@typescript-eslint/recommended',
5-
'prettier/@typescript-eslint',
6-
'plugin:prettier/recommended'
7-
],
8-
parser: '@typescript-eslint/parser',
9-
plugins: ['@typescript-eslint'],
10-
root: true,
11-
rules: {
12-
'@typescript-eslint/explicit-function-return-type': ['off'],
13-
'@typescript-eslint/explicit-module-boundary-types': ['off'],
14-
'@typescript-eslint/no-empty-function': 'off',
15-
'@typescript-eslint/no-empty-interface': [
16-
'error',
17-
{ allowSingleExtends: true }
18-
],
19-
'@typescript-eslint/no-explicit-any': 'off'
20-
},
21-
overrides: [
22-
{
23-
files: ['*.ts', '*.tsx'],
24-
rules: {
25-
// Turn off rules that TypeScript ESLint handles
26-
'no-undef': 'off',
27-
'no-unused-vars': 'off',
28-
'no-use-before-define': 'off'
29-
}
30-
}
31-
]
2+
extends: [require.resolve('amper-scripts/config/eslint')],
3+
root: true
324
};

.github/workflows/nodejs.yml

Lines changed: 0 additions & 22 deletions
This file was deleted.

.github/workflows/run-tests.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Run tests
2+
3+
on: push
4+
5+
jobs:
6+
run-tests:
7+
runs-on: ubuntu-latest
8+
9+
strategy:
10+
fail-fast: true
11+
matrix:
12+
node_version:
13+
- '12'
14+
- '14'
15+
- '16'
16+
- '17'
17+
18+
steps:
19+
- uses: actions/checkout@v2
20+
- uses: actions/setup-node@v2
21+
name: Use Node.js v${{matrix.node_version}}
22+
with:
23+
node-version: ${{matrix.node_version}}
24+
cache: 'yarn'
25+
- run: yarn install
26+
- run: yarn validate

package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@
4848
"not op_mini all"
4949
],
5050
"dependencies": {
51-
"@blakek/deep": "^2.1.1",
51+
"@blakek/deep": "^2.2.0",
5252
"glob": "^7.1.6",
53-
"meow": "^8.0.0",
53+
"meow": "^8",
5454
"mkdirp": "^1.0.4",
55-
"p-limit": "^3.1.0"
55+
"p-limit": "^3"
5656
},
5757
"devDependencies": {
5858
"@babel/core": "^7.12.9",
@@ -61,13 +61,13 @@
6161
"@babel/preset-env": "^7.12.7",
6262
"@babel/preset-typescript": "^7.12.7",
6363
"@rollup/plugin-babel": "^5.2.2",
64-
"@rollup/plugin-commonjs": "^17.0.0",
65-
"@rollup/plugin-node-resolve": "^11.0.0",
64+
"@rollup/plugin-commonjs": "^21.0.1",
65+
"@rollup/plugin-node-resolve": "^13.0.6",
6666
"@rollup/plugin-typescript": "^8.0.0",
6767
"@types/glob": "^7.1.3",
6868
"@types/mkdirp": "^1.0.1",
69-
"@typescript-eslint/eslint-plugin": "^4.9.0",
70-
"@typescript-eslint/parser": "^4.9.0",
69+
"@typescript-eslint/eslint-plugin": "^5.3.1",
70+
"@typescript-eslint/parser": "^5.3.1",
7171
"amper-scripts": "^1.0.0-1",
7272
"ava": "^3.13.0",
7373
"nodemon": "^2.0.6",
@@ -76,7 +76,7 @@
7676
"rimraf": "^3.0.2",
7777
"rollup": "^2.34.0",
7878
"rollup-plugin-terser": "^7.0.2",
79-
"ts-node": "^9.0.0",
79+
"ts-node": "^10.4.0",
8080
"typescript": "^4.1.2"
8181
},
8282
"peerDependencies": {},

src/cli.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ import path from 'path';
55
import { renderToFolder } from '.';
66

77
async function main() {
8-
const cli = meow(`
8+
const cli = meow(
9+
`
910
Usage
1011
$ template-file <dataFile> <sourceGlob> <destination>
1112
@@ -20,7 +21,9 @@ async function main() {
2021
2122
Compile all .abc files in src/ to build/
2223
$ template-file stuff.json 'src/**/*.abc' build/
23-
`);
24+
`
25+
// { importMeta: import.meta }
26+
);
2427

2528
if (cli.input.length !== 3) {
2629
cli.showHelp(2);

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export function render(template: string, data: Data): string {
5454
(_match, sectionTag, sectionContents, replacementTag) => {
5555
// Tag is for a repeating section
5656
if (sectionTag !== undefined) {
57-
const replacements = get(sectionTag, data);
57+
const replacements = get(sectionTag, data) as Data[] | undefined;
5858

5959
return replacements
6060
.map((subData: Data) => {

0 commit comments

Comments
 (0)