Skip to content

Commit

Permalink
build(package): switch to tsup
Browse files Browse the repository at this point in the history
Changes a few things:
- replaces custom build script with faster & better `tsup`
- adds `exports` to `package.json`
- switches to `pnpm` from `npm`

BREAKING CHANGE: users of this library will no longer be able to `require`/`import` anything from  a subpath, i.e. `decaffeinate-parser/dist/*`. This was never an intentional part of the API, but it was available and decaffeinate used it.
  • Loading branch information
eventualbuddha committed Jun 11, 2022
1 parent 579611f commit 8da9368
Show file tree
Hide file tree
Showing 69 changed files with 4,473 additions and 10,316 deletions.
10 changes: 6 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,22 @@ aliases:
install_dependencies_step: &install_dependencies_step
run:
name: install-dependencies
command: npm ci
command: |
curl -L https://pnpm.js.org/pnpm.js | node - add --global pnpm
pnpm install --frozen-lockfile
unit_test: &unit_test
steps:
- checkout
- *install_dependencies_step
- run:
name: tests
command: 'npm run test:ci'
command: 'pnpm test:ci'
environment:
JEST_JUNIT_OUTPUT: 'reports/junit/js-test-results.xml'
- run:
name: lint
command: 'npm run lint'
command: 'pnpm lint'
- store_test_results:
path: reports/junit
- store_artifacts:
Expand Down Expand Up @@ -43,7 +45,7 @@ jobs:
- *install_dependencies_step
- run:
name: Publish package
command: 'npm ci && npm run build && npx semantic-release'
command: 'pnpm build && npx semantic-release'

workflows:
version: 2
Expand Down
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/dist
4 changes: 3 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:jest/all",
"plugin:import/recommended",
"plugin:import/typescript",
"prettier"
],
"env": {
Expand All @@ -13,7 +15,7 @@
"parserOptions": {
"sourceType": "module"
},
"plugins": ["prettier", "jest", "@typescript-eslint/eslint-plugin"],
"plugins": ["prettier", "jest", "@typescript-eslint/eslint-plugin", "import"],
"rules": {
"jest/require-hook": "off",
"no-unused-vars": "off",
Expand Down
Loading

0 comments on commit 8da9368

Please sign in to comment.