Skip to content

Commit

Permalink
Merge pull request #10 from hildjj/update-deps
Browse files Browse the repository at this point in the history
Update dependencies
  • Loading branch information
hildjj authored Jul 16, 2024
2 parents 9adad05 + e576079 commit 401e106
Show file tree
Hide file tree
Showing 6 changed files with 1,046 additions and 811 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ jobs:
run: npm run test
- uses: codecov/codecov-action@v3
with:
files: coverage/lcov.info
token: ${{ secrets.CODECOV_TOKEN }}
23 changes: 23 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Publish Package to npmjs
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
cache: pnpm
- run: pnpm i -r
- run: npm run ci
- run: npm publish --access public --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
node_modules/
coverage/
.vscode/
26 changes: 13 additions & 13 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,19 @@ declare function fromMem(code: string, options: FromMemOptions): Promise<unknown
declare namespace fromMem {
export { guessModuleType, SourceFormat, FromMemOptions, ModuleType };
}
/**
* Figure out the module type for the given file. If no package.json is
* found, default to "commonjs".
*
* @param {string} filename Fully-qualified filename to start from.
* @returns {Promise<ModuleType>}
* @throws On invalid package.json
*/
declare function guessModuleType(filename: string): Promise<ModuleType>;
declare namespace guessModuleType {
function clearCache(): void;
}
type SourceFormat = "amd" | "bare" | "cjs" | "commonjs" | "es" | "es6" | "esm" | "globals" | "guess" | "mjs" | "module" | "umd";
/**
* Options for how to process code.
*/
Expand Down Expand Up @@ -54,17 +67,4 @@ type FromMemOptions = {
*/
columnOffset?: number | undefined;
};
/**
* Figure out the module type for the given file. If no package.json is
* found, default to "commonjs".
*
* @param {string} filename Fully-qualified filename to start from.
* @returns {Promise<ModuleType>}
* @throws On invalid package.json
*/
declare function guessModuleType(filename: string): Promise<ModuleType>;
declare namespace guessModuleType {
function clearCache(): void;
}
type SourceFormat = "amd" | "bare" | "cjs" | "commonjs" | "es" | "es6" | "esm" | "globals" | "guess" | "mjs" | "module" | "umd";
type ModuleType = "commonjs" | "es";
27 changes: 19 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"scripts": {
"build": "tsc",
"lint": "eslint .",
"test": "c8 node --stack-trace-limit=1000 --experimental-vm-modules --test"
"test": "c8 node --stack-trace-limit=1000 --experimental-vm-modules --test",
"ci": "npm run build && npm run lint && npm run test"
},
"keywords": [
"vm",
Expand All @@ -17,17 +18,27 @@
"author": "Joe Hildebrand <[email protected]>",
"license": "MIT",
"dependencies": {
"semver": "7.6.0"
"semver": "7.6.2"
},
"devDependencies": {
"@peggyjs/eslint-config": "3.2.4",
"@types/node": "20.11.20",
"@peggyjs/eslint-config": "4.0.1",
"@types/node": "20.14.11",
"@types/semver": "7.5.8",
"c8": "9.1.0",
"eslint": "8.57.0",
"typescript": "5.3.3"
"c8": "10.1.2",
"eslint": "9.7.0",
"typescript": "5.5.3"
},
"packageManager": "[email protected]",
"overrides": {
"@typescript-eslint/utils": "8.0.0-alpha.44",
"@typescript-eslint/parser": "8.0.0-alpha.44"
},
"pnpm": {
"overrides": {
"@typescript-eslint/utils": "8.0.0-alpha.44",
"@typescript-eslint/parser": "8.0.0-alpha.44"
}
},
"packageManager": "[email protected]",
"engines": {
"node": ">=18"
}
Expand Down
Loading

0 comments on commit 401e106

Please sign in to comment.