diff --git a/.babelrc b/.babelrc deleted file mode 100644 index 11a8a70..0000000 --- a/.babelrc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "presets": ["@babel/env", "@babel/preset-typescript"], - "ignore": ["**/*.spec.js", "**/*.spec.ts"] -} diff --git a/.eslintignore b/.eslintignore index 0964bbb..a1430c8 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,4 +1,3 @@ -/coverage/ -/demo/lib/ +coverage/ +lib/ /demo/webpack.config.js -/lib/ diff --git a/.eslintrc.json b/.eslintrc.json index 9d085da..1be9686 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -8,7 +8,8 @@ "prettier" ], "parserOptions": { - "ecmaVersion": 2018 + "ecmaVersion": 2018, + "project": ["./**/tsconfig.json", "./**/tsconfig.test.json"] }, "rules": { "@typescript-eslint/no-shadow": "error", diff --git a/.github/README.md b/.github/README.md new file mode 120000 index 0000000..3e12ca8 --- /dev/null +++ b/.github/README.md @@ -0,0 +1 @@ +../packages/strings-to-regex/README.md \ No newline at end of file diff --git a/.github/workflows/security-scan.yml b/.github/workflows/security-scan.yml index 79ec955..3154363 100644 --- a/.github/workflows/security-scan.yml +++ b/.github/workflows/security-scan.yml @@ -22,15 +22,15 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Initialize CodeQL - uses: github/codeql-action/init@v1 + uses: github/codeql-action/init@v3 with: languages: ${{ matrix.language }} - name: Autobuild - uses: github/codeql-action/autobuild@v1 + uses: github/codeql-action/autobuild@v3 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 + uses: github/codeql-action/analyze@v3 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 688b9a2..6395bb6 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -18,30 +18,37 @@ jobs: strategy: fail-fast: false matrix: - node-version: [12.x, 16.x, lts/*] + node-version: [16.x] + include: + - node-version: 18.x + - node-version: lts/* steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: fetch-depth: '2' - name: Test on Node ${{ matrix.node-version }} - uses: actions/setup-node@v2.5.0 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} - - run: npm install + - run: yarn - run: npx prettier --check . - - run: npm run lint - - run: npm run build - - run: npm run test - - run: npx testpack-cli --keep=@types/jest,ts-jest,typescript src/e2e.spec.ts + - run: yarn run build + - run: yarn run lint + - run: yarn run test + + - run: npx testpack-cli --keep=@types/jest,ts-jest,typescript jest.config.js tsconfig.test.json src/e2e.spec.ts + working-directory: ./packages/strings-to-regex - name: Upload test coverage report to Codecov - uses: codecov/codecov-action@v2.1.0 + uses: codecov/codecov-action@v5.4.3 with: fail_ci_if_error: true + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - name: Run Snyk to check for vulnerabilities if: ${{ github.actor != 'dependabot[bot]' }} diff --git a/.gitignore b/.gitignore index cad0a43..8aa55d8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,5 @@ package-lock.json coverage/ -demo/lib/ lib/ node_modules/ diff --git a/.prettierignore b/.prettierignore index ec6d3cd..1181a81 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1 +1,3 @@ +coverage +lib package.json diff --git a/demo/index.html b/demo/index.html index 7a837fc..a6e567b 100644 --- a/demo/index.html +++ b/demo/index.html @@ -42,7 +42,7 @@ /> - + @@ -163,7 +163,7 @@