Skip to content

Commit

Permalink
chore: update node modules
Browse files Browse the repository at this point in the history
  • Loading branch information
sixmen committed Dec 13, 2023
1 parent 30977fc commit 2ba0d83
Show file tree
Hide file tree
Showing 14 changed files with 1,998 additions and 1,320 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ on:

jobs:
release:
if: github.ref == 'refs/heads/master'
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Use Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: '18'
node-version: '20'
registry-url: 'https://registry.npmjs.org'
cache: npm

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: test
on:
push:
branches:
- master
- main
pull_request:
branches:
- '**'
Expand All @@ -14,12 +14,12 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Use Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: '18'
node-version: '20'
cache: npm

- name: Install packages
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2022 Kakao Style Corp.
Copyright (c) 2017-2024 Kakao Style Corp.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[![npm version](https://badge.fury.io/js/rinore.svg)](https://badge.fury.io/js/rinore)
![test](https://github.com/croquiscom/rinore/workflows/test/badge.svg)
[![Coverage Status](https://coveralls.io/repos/github/croquiscom/rinore/badge.svg?branch=master)](https://coveralls.io/github/croquiscom/rinore?branch=master)
[![Coverage Status](https://coveralls.io/repos/github/croquiscom/rinore/badge.svg?branch=main)](https://coveralls.io/github/croquiscom/rinore?branch=main)

# Rinore

Expand Down Expand Up @@ -227,4 +227,4 @@ To find best REPL experience, Rinore has referred some projects:

# License

MIT licenses. See [LICENSE](https://github.com/croquiscom/rinore/blob/master/LICENSE) for more details.
MIT licenses. See [LICENSE](https://github.com/croquiscom/rinore/blob/main/LICENSE) for more details.
2 changes: 2 additions & 0 deletions lib/coffeescript.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,12 @@ const start = (rinoreOptions) => {
historyFile: null,
input: rinoreOptions.input,
output: rinoreOptions.output,
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
prompt: rinoreOptions.prompt || 'rinore> ',
terminal: rinoreOptions.terminal,
};
const replServer = repl.start(options);
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
(0, history_1.setupHistory)(replServer, rinoreOptions.historyFile || '.rinore_history_cs', 1000);
(0, context_1.setupContext)(replServer);
const new_server = replaceEval(replServer);
Expand Down
4 changes: 1 addition & 3 deletions lib/context.d.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
/// <reference types="node" />
import repl from 'repl';
export declare const context: {
[key: string]: any;
};
export declare const context: Record<string, any>;
export declare const modules: Array<{
module: string;
name: string;
Expand Down
1 change: 1 addition & 0 deletions lib/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/// <reference types="node" />
/// <reference types="node" />
import repl from 'repl';
export interface RinoreOptions {
language?: string;
Expand Down
3 changes: 3 additions & 0 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,11 @@ function startInternal(options) {
}
const start = (options = {}) => {
const argv = createArgvParser().parseSync([]);
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
options.historyFile = options.historyFile || argv.historyFile;
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
options.language = options.language || argv.language;
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
options.prompt = options.prompt || argv.prompt;
return startInternal(options);
};
Expand Down
2 changes: 2 additions & 0 deletions lib/javascript.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,12 @@ const start = (rinoreOptions) => {
historySize: 1000,
input: rinoreOptions.input,
output: rinoreOptions.output,
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
prompt: rinoreOptions.prompt || 'rinore> ',
terminal: rinoreOptions.terminal,
};
const replServer = repl_1.default.start(options);
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
(0, history_1.setupHistory)(replServer, rinoreOptions.historyFile || '.rinore_history_js', 1000);
(0, context_1.setupContext)(replServer);
const new_server = replaceEval(replServer);
Expand Down
1 change: 1 addition & 0 deletions lib/typescript.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/// <reference types="node" />
import repl from 'repl';
import { RinoreOptions } from '.';
export declare const start: (rinoreOptions: RinoreOptions) => repl.REPLServer;
2 changes: 2 additions & 0 deletions lib/typescript.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ const start = (rinoreOptions) => {
historySize: 1000,
input: rinoreOptions.input,
output: rinoreOptions.output,
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
prompt: rinoreOptions.prompt || 'rinore> ',
terminal: rinoreOptions.terminal,
};
Expand All @@ -222,6 +223,7 @@ const start = (rinoreOptions) => {
replServer.displayPrompt();
},
});
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
(0, history_1.setupHistory)(replServer, rinoreOptions.historyFile || '.rinore_history_ts', 1000);
(0, context_1.setupContext)(replServer);
if ((0, utils_1.getMajorNodeVersion)() >= 12) {
Expand Down
2 changes: 1 addition & 1 deletion lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
exports.getMajorNodeVersion = void 0;
function getMajorNodeVersion() {
const match = /^v(\d{1,2})\./.exec(process.version);
if (match && match[1]) {
if (match?.[1]) {
return parseInt(match[1]);
}
return 0;
Expand Down
Loading

0 comments on commit 2ba0d83

Please sign in to comment.