Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependencies #10

Merged
merged 3 commits into from
Jul 16, 2024
Merged
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 .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 <joe-github@cursive.net>",
"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": "pnpm@8.15.4",
"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": "pnpm@9.5.0",
"engines": {
"node": ">=18"
}
Expand Down
Loading
Loading