Skip to content

Commit 2c84edc

Browse files
committed
miniohm-js: bump version number
1 parent 2b4406d commit 2c84edc

File tree

6 files changed

+64
-17
lines changed

6 files changed

+64
-17
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,5 @@ yarn-error.log
1313
# IntelliJ files
1414
.idea
1515
*.iml
16+
17+
*.tsbuildinfo

packages/miniohm-js/package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@ohm-js/miniohm-js",
3-
"version": "0.2.0",
3+
"version": "0.3.0",
44
"description": "Implementation of the miniohm interface, to use Wasm grammar blobs from JavaScript.",
55
"keywords": [],
66
"homepage": "https://github.com/ohmjs/ohm#readme",
@@ -14,9 +14,10 @@
1414
"license": "MIT",
1515
"author": "Patrick Dubroy <[email protected]>",
1616
"type": "module",
17-
"main": "index.ts",
17+
"main": "dist/index.js",
18+
"files": ["dist"],
1819
"scripts": {
19-
"build": "tsc --noEmit"
20+
"build": "tsc"
2021
},
2122
"packageManager": "[email protected]",
2223
"devDependencies": {

packages/miniohm-js/tsconfig.json

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,18 @@
11
{
22
"extends": "../tsconfig.base.json",
3-
"files": ["index.ts", "toAST.ts"]
3+
"compilerOptions": {
4+
"outDir": "dist",
5+
"rootDir": "src",
6+
7+
// From the totaltypescript "Building for a Library in a Monorepo"
8+
// recommendation. See tsconfig.base.json for details.
9+
"declaration": true,
10+
"composite": true,
11+
"sourceMap": true,
12+
"declarationMap": true,
13+
14+
// "dom" for WebAssembly, see https://github.com/evanw/esbuild/issues/2388#issuecomment-1183836728
15+
"lib": ["es2022", "dom"],
16+
},
17+
"include": ["src/**/*.ts"],
418
}

packages/tsconfig.base.json

Lines changed: 43 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,51 @@
11
{
2-
// Based on the following:
3-
// https://www.npmjs.com/package/@tsconfig/recommended
4-
// https://www.npmjs.com/package/@tsconfig/node-ts
5-
// https://www.npmjs.com/package/@tsconfig/node24
62
"compilerOptions": {
7-
"allowImportingTsExtensions": true,
8-
"erasableSyntaxOnly": true,
3+
// Based on https://www.totaltypescript.com/tsconfig-cheat-sheet
4+
// Base options
95
"esModuleInterop": true,
10-
"forceConsistentCasingInFileNames": true,
11-
"isolatedModules": true,
12-
"module": "nodenext",
13-
"moduleResolution": "nodenext",
14-
"rewriteRelativeImportExtensions": true,
156
"skipLibCheck": true,
7+
"target": "es2022",
8+
"allowJs": true,
9+
"resolveJsonModule": true,
10+
"moduleDetection": "force",
11+
"isolatedModules": true,
12+
"verbatimModuleSyntax": true,
13+
14+
// Strictness
1615
"strict": true,
17-
"types": ["node"],
18-
"verbatimModuleSyntax": true
16+
// "noUncheckedIndexedAccess": true,
17+
"noImplicitOverride": true,
18+
19+
// Transpiling with TypeScript
20+
"module": "nodenext",
21+
"outDir": "dist",
22+
23+
// Below here are options that should be set on a per-project basis.
24+
25+
// Building for a Library in a Monorepo?
26+
// "declaration": true,
27+
// "composite": true,
28+
// "sourceMap": true,
29+
// "declarationMap": true,
30+
31+
// Running in the DOM?
32+
// "lib": ["es2022", "dom", "dom.iterable"]
33+
34+
// Not running in the DOM?
35+
"lib": ["es2022"],
36+
37+
// [End of totaltypescript rules]
38+
39+
// Ohm -specific stuff
40+
"forceConsistentCasingInFileNames": true,
41+
42+
// From https://nodejs.org/api/typescript.html
43+
// These options allow us to use Node.js type stripping, e.g. to run
44+
// the tests without transpiling.
45+
"allowImportingTsExtensions": true,
46+
"erasableSyntaxOnly": true,
47+
"rewriteRelativeImportExtensions": true
1948
},
49+
"exclude": ["node_modules", "dist"],
2050
"$schema": "https://json.schemastore.org/tsconfig"
2151
}

0 commit comments

Comments
 (0)