Skip to content

Commit

Permalink
Merge pull request enriikke#65 from enriikke/move-to-npm
Browse files Browse the repository at this point in the history
Update dependencies, move to npm, and fix TS module resolution
  • Loading branch information
enriikke committed Jun 9, 2021
2 parents 37566f7 + 689c5f2 commit 401b8dc
Show file tree
Hide file tree
Showing 8 changed files with 9,963 additions and 4,475 deletions.
6 changes: 1 addition & 5 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"prettier/@typescript-eslint",
"plugin:prettier/recommended"
],
"rules": {
Expand All @@ -18,10 +17,7 @@
"tabWidth": 2,
"semi": false
}
],
// octokit/rest requires parameters that are not in camelcase
// "camelcase": "off",
"@typescript-eslint/camelcase": ["error", {"properties": "never"}]
]
},
"env": {
"node": true,
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
- name: Dependencies
run: yarn install
run: npm install
- name: Lint
run: yarn run lint
run: npm run lint
- name: Test
run: yarn run test
run: npm run test
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
with:
ref: ${{ github.event.release.tag_name }}
- name: Dependencies
run: yarn install && yarn build
run: npm install && npm run build
- name: Tag
uses: JasonEtco/build-and-tag-action@v1
env:
Expand Down
10 changes: 5 additions & 5 deletions __tests__/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,23 +85,23 @@ describe('Gatsby Publish action', () => {

await run()

expect(execSpy).toBeCalledWith('yarn run build', [], {cwd: '.'})
expect(execSpy).toBeCalledWith('npm run build', [], {cwd: '.'})
})

it('calls gatsby build without args', async () => {
inputs['gatsby-args'] = ''

await run()

expect(execSpy).toBeCalledWith('yarn run build', [], {cwd: '.'})
expect(execSpy).toBeCalledWith('npm run build', [], {cwd: '.'})
})

it('calls gatsby build with args', async () => {
inputs['gatsby-args'] = '--prefix-paths --no-uglify'

await run()

expect(execSpy).toBeCalledWith('yarn run build', ['--', '--prefix-paths', '--no-uglify'], {cwd: '.'})
expect(execSpy).toBeCalledWith('npm run build', ['--', '--prefix-paths', '--no-uglify'], {cwd: '.'})
})

it('calls gatsby build with working-dir', async () => {
Expand All @@ -110,7 +110,7 @@ describe('Gatsby Publish action', () => {

await run()

expect(execSpy).toBeCalledWith('yarn run build', [], {cwd: '../gatsby-gh-pages-action'})
expect(execSpy).toBeCalledWith('npm run build', [], {cwd: '../gatsby-gh-pages-action'})
})

it('calls gatsby build with working-dir and args', async () => {
Expand All @@ -119,7 +119,7 @@ describe('Gatsby Publish action', () => {

await run()

expect(execSpy).toBeCalledWith('yarn run build', ['--', '--prefix-paths', '--no-uglify'], {
expect(execSpy).toBeCalledWith('npm run build', ['--', '--prefix-paths', '--no-uglify'], {
cwd: '../gatsby-gh-pages-action',
})
})
Expand Down
Loading

0 comments on commit 401b8dc

Please sign in to comment.