Skip to content

Commit

Permalink
feat: resolve metadata type using file extension (#750)
Browse files Browse the repository at this point in the history
  • Loading branch information
scolladon committed Jan 16, 2024
1 parent e324f00 commit eb66cfc
Show file tree
Hide file tree
Showing 70 changed files with 1,341 additions and 1,294 deletions.
3 changes: 2 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Happy linting! 💖
module.exports = {
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
'prettier',
Expand Down Expand Up @@ -162,7 +163,7 @@ module.exports = {
'no-unsafe-finally': 'error',
'no-unsafe-negation': 'error',
'no-unused-labels': 'error',
'no-unused-vars': 'error',
'no-unused-vars': 'off',
'no-useless-catch': 'error',
'no-useless-escape': 'error',
'no-whitespace-before-property': 'off',
Expand Down
26 changes: 0 additions & 26 deletions .github/workflows/on-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,32 +96,6 @@ jobs:
megalinter-reports
mega-linter.log
mutation-testing:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4

- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 18

- name: Setup dependencies, cache and install
uses: ./.github/actions/install

- name: Build plugin

run: yarn pack

- name: Mutation test
run: yarn test:mutation

- uses: actions/upload-artifact@v3
with:
name: mutation-test-report
path: reports/mutation

build:
uses: ./.github/workflows/reusable-build.yml
secrets: inherit
Expand Down
2 changes: 1 addition & 1 deletion .husky/post-checkout
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/sh

git diff HEAD^ HEAD --exit-code -- ./yarn.lock || yarn
yarn dependencies:reinstall
2 changes: 1 addition & 1 deletion .husky/post-merge
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/sh

git diff HEAD^ HEAD --exit-code -- ./yarn.lock || yarn
yarn dependencies:reinstall
2 changes: 1 addition & 1 deletion .husky/post-rewrite
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/sh

git diff HEAD^ HEAD --exit-code -- ./yarn.lock || yarn
yarn dependencies:reinstall
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ We encourage the developer community to contribute to this repository. This guid

## Requirements

- [Node](https://nodejs.org/) >= 14
- [yarn](https://yarnpkg.com/) >= 1.22.5
- [Node](https://nodejs.org/) >= 18
- [yarn](https://yarnpkg.com/) >= 3.6.0

## Installation

Expand Down
2 changes: 1 addition & 1 deletion __tests__/__utils__/globalTestHelper.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
'use strict'
import { MetadataRepository } from '../../src/metadata/MetadataRepository'
import {
getDefinition,
getLatestSupportedVersion,
} from '../../src/metadata/metadataManager'
import { MetadataRepository } from '../../src/types/metadata'
import { Work } from '../../src/types/work'

require('ts-node/register')
Expand Down
8 changes: 6 additions & 2 deletions __tests__/integration/services.test.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
'use strict'
import { expect, jest, describe, it } from '@jest/globals'
import { getGlobalMetadata } from '../__utils__/globalTestHelper'
import { ADDITION, DELETION, MODIFICATION } from '../../src/utils/gitConstants'
import {
ADDITION,
DELETION,
MODIFICATION,
} from '../../src/constant/gitConstants'
import { readPathFromGit } from '../../src/utils/fsHelper'
import { MetadataRepository } from '../../src/types/metadata'
import { Work } from '../../src/types/work'
import TypeHandlerFactory from '../../src/service/typeHandlerFactory'
import { MetadataRepository } from '../../src/metadata/MetadataRepository'

jest.mock('../../src/utils/fsHelper')

Expand Down
Loading

0 comments on commit eb66cfc

Please sign in to comment.