Skip to content

Commit

Permalink
Merge pull request #942 from ideafast/develop
Browse files Browse the repository at this point in the history
chore: v0.2.1
  • Loading branch information
fguitton authored Sep 26, 2024
2 parents 3d23365 + 872b258 commit eddc261
Show file tree
Hide file tree
Showing 11 changed files with 1,877 additions and 1,960 deletions.
21 changes: 15 additions & 6 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
version: 2
updates:
- package-ecosystem: npm
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
target-branch: develop
- package-ecosystem: npm
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
target-branch: develop
labels:
- "dependencies"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
target-branch: "develop"
labels:
- "actions"
2 changes: 1 addition & 1 deletion .github/workflows/mutation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:

strategy:
matrix:
node-version: [16.x]
node-version: [22.x]

steps:
- uses: actions/checkout@v2
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:

strategy:
matrix:
node-version: [16.x]
node-version: [22.x]

steps:
- uses: actions/checkout@v2
Expand All @@ -26,7 +26,7 @@ jobs:

strategy:
matrix:
node-version: [14.x, 16.x]
node-version: [22.x]

steps:
- uses: actions/checkout@v2
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/npmpublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 16
node-version: 22
- run: yarn install --frozen-lockfile
- run: npm test

Expand All @@ -22,7 +22,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 16
node-version: 22
registry-url: https://registry.npmjs.org/
- run: yarn install --frozen-lockfile
- run: npm publish --access public
Expand All @@ -36,7 +36,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 16
node-version: 22
registry-url: https://npm.pkg.github.com/
scope: '@ideafast'
- run: yarn install --frozen-lockfile
Expand Down
27 changes: 26 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,28 @@
{
"typescript.tsdk": "node_modules\\typescript\\lib"
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
},
"editor.tabSize": 4,
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact"
],
"editor.detectIndentation": false,
"editor.formatOnSave": true,
"files.exclude": {
"**/.classpath": true,
"**/.project": true,
"**/.settings": true,
"**/.factorypath": true
},
"css.format.enable": true,
"workbench.colorCustomizations": {
"titleBar.activeBackground": "#af2b70",
"titleBar.activeForeground": "#f1cee1",
"titleBar.inactiveBackground": "#d53488",
"titleBar.inactiveForeground": "#e6d5dd"
},
"typescript.tsdk": "node_modules/typescript/lib"
}
50 changes: 0 additions & 50 deletions config/eslint.config.js

This file was deleted.

5 changes: 3 additions & 2 deletions config/stryker.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
module.exports = {
mutate: [
'{src,lib}/**/*.[jt]s?(x)',
'!{src,lib}/**/?(*.)+(spec|test).[jt]s?(x)',
'src/**/*.ts', '!src/**/*.spec.ts'
],
ignorePatterns: ['{coverage,dist,reports}'],
disableTypeChecks: '{coverage,dist,reports,config}/**/*.*',
packageManager: 'yarn',
reporters: ['html', 'clear-text', 'progress', 'dashboard'],
testRunner: 'jest',
Expand Down
54 changes: 54 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
import jest from 'eslint-plugin-jest';
import typescriptEslint from '@typescript-eslint/eslint-plugin';
import globals from 'globals';
import tsParser from '@typescript-eslint/parser';
import path from 'node:path';
import { fileURLToPath } from 'node:url';
import js from '@eslint/js';
import { FlatCompat } from '@eslint/eslintrc';

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
});

export default [...compat.extends('eslint:recommended'), {
plugins: {
jest,
'@typescript-eslint': typescriptEslint,
},

languageOptions: {
globals: {
...globals.browser,
...globals.commonjs,
...globals.node,
...jest.environments.globals.globals,
},

parser: tsParser,
parserOptions: {
warnOnUnsupportedTypeScriptVersion: false,
tsconfigRootDir: __dirname
},
ecmaVersion: 2022,
sourceType: 'module',
},

rules: {
indent: ['error', 4],
'linebreak-style': ['error', 'windows'],
quotes: ['error', 'single'],
semi: ['error', 'always'],
},
}, ...compat.extends(
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
).map(config => ({
...config,
files: ['**/*.ts', '**/*.tsx'],
}))];
43 changes: 23 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ideafast/idgen",
"version": "0.2.0",
"version": "0.2.1",
"description": "ID generators for the IDEAFast study",
"main": "./dist/lib.umd.js",
"module": "./dist/index.js",
Expand All @@ -16,36 +16,39 @@
"scripts": {
"test": "jest --coverage",
"test:mutation": "stryker run ./config/stryker.config.js",
"lint": "eslint --ext .js,.jsx,.ts,.tsx ./config ./src",
"lint": "eslint ./config ./src",
"build": "tsc -p . && webpack --config ./config/webpack.config.js",
"start": "webpack --config ./config/webpack.config.js --progress --color --watch",
"prepare": "npm run build"
},
"devDependencies": {
"@babel/core": "7.23.2",
"@babel/preset-env": "7.23.2",
"@babel/preset-typescript": "7.23.2",
"@stryker-mutator/core": "7.3.0",
"@stryker-mutator/jest-runner": "7.3.0",
"@types/jest": "29.5.6",
"@typescript-eslint/eslint-plugin": "6.8.0",
"@typescript-eslint/parser": "6.8.0",
"babel-loader": "9.1.3",
"@babel/core": "7.25.2",
"@babel/preset-env": "7.25.4",
"@babel/preset-typescript": "7.24.7",
"@eslint/eslintrc": "^3.1.0",
"@eslint/js": "^9.11.1",
"@stryker-mutator/core": "8.5.0",
"@stryker-mutator/jest-runner": "8.5.0",
"@types/jest": "29.5.13",
"@typescript-eslint/eslint-plugin": "8.7.0",
"@typescript-eslint/parser": "8.7.0",
"babel-loader": "9.2.1",
"babel-plugin-add-module-exports": "1.0.4",
"babel-plugin-rewire-ts": "1.4.0",
"eslint": "8.51.0",
"eslint-plugin-jest": "27.4.2",
"eslint": "9.11.1",
"eslint-plugin-jest": "28.8.3",
"globals": "^15.9.0",
"jest": "29.7.0",
"rimraf": "5.0.5",
"terser-webpack-plugin": "5.3.9",
"typescript": "5.2.2",
"webpack": "5.89.0",
"rimraf": "6.0.1",
"terser-webpack-plugin": "5.3.10",
"typescript": "5.6.2",
"webpack": "5.95.0",
"webpack-cli": "5.1.4"
},
"resolutions": {
"**/glob": "^9"
},
"babel": {
"extends": "./config/babel.config.js"
},
"eslintConfig": {
"extends": "./config/eslint.config.js"
}
}
3 changes: 2 additions & 1 deletion src/index.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// eslint-disable-next-line @typescript-eslint/no-var-requires

// eslint-disable-next-line @typescript-eslint/no-require-imports
const IDHandler = require('./index');
const getRandomStringMock = jest.fn();

Expand Down
Loading

0 comments on commit eddc261

Please sign in to comment.