-
Notifications
You must be signed in to change notification settings - Fork 33
feat: move the module to be esm #221
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 7 commits
3a1da09
a713c4b
1fd3662
f831101
fbdf8eb
313c11e
7af8d36
95bb927
b62ec0d
c25bba2
f2158eb
f8a83ab
af9fb98
34e5b69
ca6c9bb
a22cd00
da13fce
6626a62
e2c6877
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
|
@@ -2,7 +2,8 @@ | |||
"name": "@testing-library/svelte", | ||||
"version": "0.0.0-semantically-released", | ||||
"description": "Simple and complete Svelte testing utilities that encourage good testing practices.", | ||||
"main": "dist/index.js", | ||||
"main": "src/index.js", | ||||
yanick marked this conversation as resolved.
Show resolved
Hide resolved
|
||||
"type": "module", | ||||
"types": "types/index.d.ts", | ||||
"license": "MIT", | ||||
"homepage": "https://github.com/testing-library/svelte-testing-library#readme", | ||||
|
@@ -29,21 +30,18 @@ | |||
"e2e" | ||||
], | ||||
"files": [ | ||||
"dist", | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does probably also need There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. True! |
||||
"dont-cleanup-after-each.js", | ||||
"pure.js", | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think you need this since it's in
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removed both. |
||||
"types/index.d.ts" | ||||
], | ||||
"scripts": { | ||||
"toc": "doctoc README.md", | ||||
"lint": "eslint src --fix", | ||||
"clean": "rimraf dist", | ||||
"build": "npm run clean && babel src --out-dir dist --ignore '**/__tests__/**'", | ||||
"test": "jest src", | ||||
"test": "vitest run src", | ||||
"test:watch": "npm run test -- --watch", | ||||
"test:update": "npm run test -- --updateSnapshot --coverage", | ||||
"setup": "npm install && npm run validate", | ||||
"validate": "npm run clean && npm-run-all lint test build", | ||||
"validate": "npm-run-all lint test", | ||||
"contributors:add": "all-contributors add", | ||||
"contributors:generate": "all-contributors generate" | ||||
}, | ||||
|
@@ -54,32 +52,31 @@ | |||
"@testing-library/dom": "^8.1.0" | ||||
}, | ||||
"devDependencies": { | ||||
"@babel/cli": "^7.6.2", | ||||
"@babel/core": "^7.6.2", | ||||
"@babel/plugin-transform-modules-commonjs": "^7.6.0", | ||||
"@babel/preset-env": "^7.6.2", | ||||
"@commitlint/cli": "^13.1.0", | ||||
"@commitlint/config-conventional": "^13.1.0", | ||||
"@sveltejs/vite-plugin-svelte": "^2.4.1", | ||||
"@testing-library/jest-dom": "^5.0.2", | ||||
"@types/jest": "^27.0.0", | ||||
"@vitest/coverage-c8": "^0.32.0", | ||||
"all-contributors-cli": "^6.9.0", | ||||
"babel-eslint": "^10.0.3", | ||||
"babel-jest": "^27.0.6", | ||||
"doctoc": "^2.0.0", | ||||
"eslint": "^7.2.0", | ||||
"eslint-config-standard": "^16.0.0", | ||||
"eslint-plugin-import": "^2.18.2", | ||||
"eslint-plugin-node": "^11.0.0", | ||||
"eslint-plugin-promise": "^5.1.0", | ||||
"eslint-plugin-simple-import-sort": "^7.0.0", | ||||
"eslint-plugin-svelte3": "^3.0.0", | ||||
"eslint": "^8.42.0", | ||||
"eslint-config-standard": "^17.1.0", | ||||
"eslint-plugin-import": "^2.27.5", | ||||
"eslint-plugin-node": "^11.1.0", | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this one is no longer maintained so folks use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good to know! Done! |
||||
"eslint-plugin-promise": "^6.1.1", | ||||
"eslint-plugin-simple-import-sort": "^10.0.0", | ||||
"eslint-plugin-svelte3": "^4.0.0", | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is the older original package. there's now an There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Migrated! |
||||
"husky": "^7.0.1", | ||||
"jest": "^27.0.0", | ||||
"jest": "^29.5.0", | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we need jest and Vitest installed? (also There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oops. Leftover. Removing... |
||||
"jest-environment-jsdom": "^29.5.0", | ||||
"lint-staged": "^11.1.1", | ||||
"npm-run-all": "^4.1.5", | ||||
"prettier": "^2.0.1", | ||||
"svelte": "^3.0.0", | ||||
"svelte-jester": "^2.1.4" | ||||
"svelte": "^3.59.1", | ||||
"svelte-jester": "^2.1.4", | ||||
"vite": "^4.3.9", | ||||
"vitest": "^0.32.0" | ||||
}, | ||||
"husky": { | ||||
"hooks": { | ||||
|
@@ -120,7 +117,6 @@ | |||
], | ||||
"testEnvironment": "jsdom", | ||||
"transform": { | ||||
"^.+\\.js$": "babel-jest", | ||||
"^.+\\.svelte$": "svelte-jester", | ||||
"^.+\\.html$": "svelte-jester" | ||||
}, | ||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
// Makes it so people can import from '@testing-library/svelte/pure' | ||
module.exports = require('./dist/pure') | ||
import './src/pure.js' |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html | ||
|
||
exports[`auto-cleanup-skip > second 1`] = `""`; | ||
|
||
exports[`auto-cleanup-skip second 1`] = `"<div><h1 data-testid=\\"test\\">Hello world!</h1> <div>we have undefined</div> <button>Button</button></div>"`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we still need this line if we're using Vitest?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm... Maybe for the globals. Let's see ! :goes to console:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Switched to the vitest env