Skip to content
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

build: clean build script, restrict hoist of pnpm #1286

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,17 +147,17 @@ pnpm run --filter @rsbuild/some-package test

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR contains several changes, can you split them to into separate PRs? 😄

Small PR is better for reviewing and generating changelog.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure. I'm closing this PR for now.

In addition to the unit tests, the Rsbuild also includes end-to-end (E2E) tests, which checks the functionality of the application as a whole.

You can run the `test:e2e` command to run the E2E tests:
You can run the `e2e` command to run the E2E tests:

```sh
pnpm run test:e2e
pnpm run e2e
```

If you need to run a specified test, you can add keywords to filter:

```sh
# Only run test cases with the copy-assets keyword
npx jest copy-assets
# Only run test cases which contains `vue` keyword with webpack
pnpm --filter @rsbuild/e2e test:webpack -g vue
```

---
Expand Down
3 changes: 3 additions & 0 deletions packages/plugin-svelte/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@
"@scripts/test-helper": "workspace:*",
"@types/node": "16.x",
"svelte": "^4.2.2",
"less": "^4.2.0",
"sass": "^1.69.5",
"stylus": "^0.55.0",
"typescript": "^5.3.0"
},
"publishConfig": {
Expand Down
5 changes: 5 additions & 0 deletions packages/plugin-svelte/tests/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { type Transformer, pluginSvelte } from '../src';
describe('plugin-svelte', () => {
it('should add svelte loader properly', async () => {
const rsbuild = await createStubRsbuild({
cwd: __dirname,
rsbuildConfig: {},
plugins: [pluginSvelte()],
});
Expand All @@ -16,6 +17,7 @@ describe('plugin-svelte', () => {
process.env.NODE_ENV = 'production';

const rsbuild = await createStubRsbuild({
cwd: __dirname,
rsbuildConfig: {},
plugins: [pluginSvelte()],
});
Expand All @@ -26,6 +28,7 @@ describe('plugin-svelte', () => {

it('should turn off hmr by hand correctly', async () => {
const rsbuild = await createStubRsbuild({
cwd: __dirname,
rsbuildConfig: {
dev: {
hmr: false,
Expand All @@ -40,6 +43,7 @@ describe('plugin-svelte', () => {

it('should override default svelte-loader options throw options.svelteLoaderOptions', async () => {
const rsbuild = await createStubRsbuild({
cwd: __dirname,
rsbuildConfig: {},
plugins: [
pluginSvelte({
Expand All @@ -56,6 +60,7 @@ describe('plugin-svelte', () => {

it('should support pass custom preprocess options', async () => {
const rsbuild = await createStubRsbuild({
cwd: __dirname,
rsbuildConfig: {},
plugins: [
pluginSvelte({
Expand Down
1 change: 1 addition & 0 deletions packages/plugin-vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"@rsbuild/core": "workspace:*",
"@scripts/test-helper": "workspace:*",
"typescript": "^5.3.0",
"vue": "^3.3.4",
"webpack": "^5.89.0"
},
"peerDependencies": {
Expand Down
Loading