Skip to content

Commit

Permalink
chore: simplify token setup, update deps (#384)
Browse files Browse the repository at this point in the history
  • Loading branch information
domoritz committed Aug 12, 2022
1 parent a94e429 commit 506c360
Show file tree
Hide file tree
Showing 5 changed files with 94 additions and 138 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/publish.yml
Expand Up @@ -12,23 +12,23 @@ jobs:
if: "!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci')"

name: Make a release and publish to NPM

steps:
- uses: actions/checkout@v3

- name: Prepare repository
run: git fetch --unshallow --tags
with:
fetch-depth: 0

- uses: actions/setup-node@v3
with:
registry-url: 'https://registry.npmjs.org'
cache: 'yarn'
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Install Node dependencies
run: yarn --frozen-lockfile

- run: yarn build

- run: npm run release
# don't use yarn run to avoid using yarnpkg registry
- name: Create release
run: npm run release
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Expand Up @@ -19,6 +19,8 @@ jobs:

- name: Setup Node
uses: actions/setup-node@v3
with:
cache: 'yarn'

- name: Install Node dependencies
run: yarn --frozen-lockfile
Expand Down
14 changes: 7 additions & 7 deletions package.json
Expand Up @@ -17,16 +17,16 @@
"url": "http://idl.cs.washington.edu"
},
"devDependencies": {
"@auto-it/conventional-commits": "^10.37.1",
"@auto-it/first-time-contributor": "^10.37.1",
"@auto-it/conventional-commits": "^10.37.4",
"@auto-it/first-time-contributor": "^10.37.4",
"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-node-resolve": "^13.3.0",
"@types/d3-dsv": "^2.0.0",
"auto": "^10.37.1",
"d3-dsv": "^2.0.0",
"@types/d3-dsv": "^3.0.0",
"auto": "^10.37.4",
"d3-dsv": "^3.0.1",
"datalib": "^1.9.3",
"rollup": "^2.76.0",
"terser": "^5.14.1",
"rollup": "^2.77.3",
"terser": "^5.14.2",
"typescript": "^4.7.4"
},
"scripts": {
Expand Down
3 changes: 1 addition & 2 deletions src/data.ts
Expand Up @@ -16,8 +16,7 @@ for (const name of Object.keys(urls) as Name[]) {
if (name.endsWith(".json")) {
return await result.json();
} else if (name.endsWith(".csv")) {
// TODO: remove "as any" once @types/d3-dsv has been updated
return d3.csvParse(await result.text(), (d3 as any).autoType);
return d3.csvParse(await result.text(), d3.autoType);
} else {
return await result.text();
}
Expand Down

0 comments on commit 506c360

Please sign in to comment.