Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ module.exports = {
'no-var': 'error',
},
parserOptions: {
ecmaVersion: 2020,
ecmaVersion: 2022,
sourceType: 'module',
},
};
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ jobs:
strategy:
matrix:
node-vesion:
- 18
- 20
- 22
- 24
Expand Down
32 changes: 12 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,34 +13,26 @@
"license": "ISC",
"author": "",
"type": "module",
"types": "./types/index.d.ts",
"exports": {
".": {
"require": {
"types": "./types/index.d.ts",
"default": "./dist/cjs/index.js"
},
"import": {
"types": "./types/index.d.ts",
"default": "./dist/esm/index.js"
},
"default": {
"types": "./types/index.d.ts",
"default": "./dist/cjs/index.js"
}
"types": "./types/index.d.ts",
"default": "./dist/index.js"
}
Comment thread
kibertoad marked this conversation as resolved.
},
"main": "dist/cjs/index.js",
"module": "dist/esm/index.js",
"types": "types/index.d.ts",
"files": [
"dist",
"types"
],
Comment thread
kibertoad marked this conversation as resolved.
"scripts": {
"lint": "eslint .",
"prepublishOnly": "pnpm run build",
"build": "npm-run-all build:parser build:esm build:cjs",
"build:cjs": "tsc --module commonjs --moduleResolution node --target es5 --outDir dist/cjs",
"build:esm": "tsc --module es2015 --target es5 --outDir dist/esm",
"build": "npm-run-all build:parser build:esm",
"build:esm": "tsc --module es2022 --outDir dist",
"build:jison": "jison -m js src/handlebars.yy src/handlebars.l -o lib/parser.js",
"build:parser": "npm-run-all build:jison build:parser-suffix",
"build:parser": "npm-run-all build:jison build:parser-suffix build:parser-clean",
"build:parser-suffix": "combine-files lib/parser.js,src/parser-suffix.js lib/parser.js",
"build:parser-clean": "node --input-type=module -e \"import{readFileSync,writeFileSync}from'fs';const f='lib/parser.js';writeFileSync(f,readFileSync(f,'utf8').replace(/^\\s*_token_stack:\\n/m,''))\"",
"pretest": "pnpm run build",
"test": "mocha --inline-diffs spec",
"pretest:bail": "pnpm run build",
Expand All @@ -65,7 +57,7 @@
},
"packageManager": "pnpm@9.12.2",
"engines": {
"node": "^18 || ^20 || ^22 || >=24"
"node": "^20 || ^22 || >=24"
},
"publishConfig": {
"access": "public",
Expand Down
2 changes: 1 addition & 1 deletion spec/ast.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { parse, parseWithoutProcessing } from '../dist/esm/index.js';
import { parse, parseWithoutProcessing } from '../dist/index.js';
import { equals } from './utils.js';

describe('ast', function () {
Expand Down
2 changes: 1 addition & 1 deletion spec/parser.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { parse, print } from '../dist/esm/index.js';
import { parse, print } from '../dist/index.js';
import { equals, equalsAst, shouldThrow } from './utils.js';

describe('parser', function () {
Expand Down
2 changes: 1 addition & 1 deletion spec/utils.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { parse, print } from '../dist/esm/index.js';
import { parse, print } from '../dist/index.js';

let AssertError;
if (Error.captureStackTrace) {
Expand Down
2 changes: 1 addition & 1 deletion spec/visitor.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Visitor, parse, print, Exception } from '../dist/esm/index.js';
import { Visitor, parse, print, Exception } from '../dist/index.js';
import { equals, shouldThrow } from './utils.js';

describe('Visitor', function () {
Expand Down
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"compilerOptions": {
// Compilation Configuration
"target": "es2017",
"target": "es2022",
"module": "es2022",
"inlineSources": true,
"inlineSourceMap": true,
"outDir": "dist",
Expand Down