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

feat(deps): bump Rspack 1.0.0-alpha.3 #2883

Merged
merged 1 commit into from
Jul 11, 2024
Merged
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
32 changes: 14 additions & 18 deletions e2e/cases/css/resolve-ts-paths/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,24 +1,20 @@
import { build, proxyConsole, rspackOnlyTest } from '@e2e/helper';
import { expect } from '@playwright/test';

// TODO enhance-resolve on the js side cannot get the tsConfig paths configuration on the rust side
rspackOnlyTest.fail(
'should resolve ts paths correctly in SCSS file',
async () => {
const { restore } = proxyConsole();
try {
const rsbuild = await build({
cwd: __dirname,
});
rspackOnlyTest('should resolve ts paths correctly in SCSS file', async () => {
const { restore } = proxyConsole();
try {
const rsbuild = await build({
cwd: __dirname,
});

const files = await rsbuild.unwrapOutputJSON();
const files = await rsbuild.unwrapOutputJSON();

const content =
files[Object.keys(files).find((file) => file.endsWith('.css'))!];
const content =
files[Object.keys(files).find((file) => file.endsWith('.css'))!];

expect(content).toContain('background-image:url(/static/image/icon');
} finally {
restore();
}
},
);
expect(content).toContain('background-image:url(/static/image/icon');
} finally {
restore();
}
});
4 changes: 2 additions & 2 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@
"prebundle": "prebundle"
},
"dependencies": {
"@rspack/core": "1.0.0-alpha.2",
"@rspack/lite-tapable": "1.0.0-alpha.2",
"@rspack/core": "1.0.0-alpha.3",
"@rspack/lite-tapable": "1.0.0-alpha.3",
"@swc/helpers": "0.5.11",
"caniuse-lite": "^1.0.30001640",
"core-js": "~3.37.1",
Expand Down
10 changes: 6 additions & 4 deletions packages/core/tests/__snapshots__/builder.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -393,10 +393,12 @@ exports[`should use rspack as default bundler > apply rspack correctly 1`] = `
},
},
DefinePlugin {
"_options": {
"process.env.ASSET_PREFIX": """",
"process.env.NODE_ENV": ""development"",
},
"_args": [
{
"process.env.ASSET_PREFIX": """",
"process.env.NODE_ENV": ""development"",
},
],
"affectedHooks": "compilation",
"name": "DefinePlugin",
},
Expand Down
16 changes: 10 additions & 6 deletions packages/core/tests/__snapshots__/config.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@ exports[`stringifyConfig > should stringify Rspack config correctly 1`] = `
{
name: 'DefinePlugin',
affectedHooks: 'compilation',
_options: {
foo: 'bar'
}
_args: [
{
foo: 'bar'
}
]
}
]
}"
Expand All @@ -38,9 +40,11 @@ exports[`stringifyConfig > should stringify Rspack config with verbose option co
{
name: 'DefinePlugin',
affectedHooks: 'compilation',
_options: {
foo: 'bar'
}
_args: [
{
foo: 'bar'
}
]
}
]
}"
Expand Down
88 changes: 40 additions & 48 deletions packages/core/tests/__snapshots__/default.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -393,10 +393,12 @@ exports[`applyDefaultPlugins > should apply default plugins correctly 1`] = `
},
},
DefinePlugin {
"_options": {
"process.env.ASSET_PREFIX": """",
"process.env.NODE_ENV": ""development"",
},
"_args": [
{
"process.env.ASSET_PREFIX": """",
"process.env.NODE_ENV": ""development"",
},
],
"affectedHooks": "compilation",
"name": "DefinePlugin",
},
Expand Down Expand Up @@ -719,35 +721,21 @@ exports[`applyDefaultPlugins > should apply default plugins correctly when prod
"minimize": true,
"minimizer": [
SwcJsMinimizerRspackPlugin {
"_options": {
"compress": {
"passes": 1,
},
"exclude": undefined,
"extractComments": {
"condition": "@preserve|@lic|@cc_on|^/**!",
},
"format": {
"asciiOnly": true,
"comments": false,
},
"include": undefined,
"mangle": true,
"module": undefined,
"test": undefined,
},
"_args": [
{
"extractComments": true,
"format": {
"asciiOnly": true,
},
},
],
"affectedHooks": "compilation",
"name": "SwcJsMinimizerRspackPlugin",
},
LightningCssMinimizerRspackPlugin {
"_options": {
"browserslist": [
"defaults",
],
"errorRecovery": true,
"removeUnusedLocalIdents": true,
"unusedSymbols": [],
},
"_args": [
undefined,
],
"affectedHooks": undefined,
"name": "LightningCssMinimizerRspackPlugin",
},
Expand Down Expand Up @@ -848,21 +836,21 @@ exports[`applyDefaultPlugins > should apply default plugins correctly when prod
},
},
DefinePlugin {
"_options": {
"process.env.ASSET_PREFIX": """",
"process.env.NODE_ENV": ""production"",
},
"_args": [
{
"process.env.ASSET_PREFIX": """",
"process.env.NODE_ENV": ""production"",
},
],
"affectedHooks": "compilation",
"name": "DefinePlugin",
},
ProgressPlugin {
"_options": {
"prefix": "web",
"profile": false,
"progressChars": "━━",
"template": "● {prefix:.bold} {bar:25.green/white.dim} ({percent}%) {wide_msg:.dim}",
"tick": undefined,
},
"_args": [
{
"prefix": "web",
},
],
"affectedHooks": undefined,
"name": "ProgressPlugin",
},
Expand Down Expand Up @@ -1176,10 +1164,12 @@ exports[`applyDefaultPlugins > should apply default plugins correctly when targe
"plugins": [
RsbuildTransformPlugin {},
DefinePlugin {
"_options": {
"process.env.ASSET_PREFIX": """",
"process.env.NODE_ENV": ""test"",
},
"_args": [
{
"process.env.ASSET_PREFIX": """",
"process.env.NODE_ENV": ""test"",
},
],
"affectedHooks": "compilation",
"name": "DefinePlugin",
},
Expand Down Expand Up @@ -1608,10 +1598,12 @@ exports[`tools.rspack > should match snapshot 1`] = `
},
},
DefinePlugin {
"_options": {
"process.env.ASSET_PREFIX": """",
"process.env.NODE_ENV": ""development"",
},
"_args": [
{
"process.env.ASSET_PREFIX": """",
"process.env.NODE_ENV": ""development"",
},
],
"affectedHooks": "compilation",
"name": "DefinePlugin",
},
Expand Down
12 changes: 7 additions & 5 deletions packages/core/tests/__snapshots__/define.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ exports[`plugin-define > should register define plugin correctly 1`] = `
{
"plugins": [
DefinePlugin {
"_options": {
"NAME": ""Jack"",
"process.env.ASSET_PREFIX": """",
"process.env.NODE_ENV": ""test"",
},
"_args": [
{
"NAME": ""Jack"",
"process.env.ASSET_PREFIX": """",
"process.env.NODE_ENV": ""test"",
},
],
"affectedHooks": "compilation",
"name": "DefinePlugin",
},
Expand Down
20 changes: 12 additions & 8 deletions packages/core/tests/__snapshots__/environments.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -1665,10 +1665,12 @@ exports[`environment config > tools.rspack / bundlerChain can be used in environ
},
},
DefinePlugin {
"_options": {
"process.env.ASSET_PREFIX": """",
"process.env.NODE_ENV": ""development"",
},
"_args": [
{
"process.env.ASSET_PREFIX": """",
"process.env.NODE_ENV": ""development"",
},
],
"affectedHooks": "compilation",
"name": "DefinePlugin",
},
Expand Down Expand Up @@ -1972,10 +1974,12 @@ exports[`environment config > tools.rspack / bundlerChain can be used in environ
"plugins": [
RsbuildTransformPlugin {},
DefinePlugin {
"_options": {
"process.env.ASSET_PREFIX": """",
"process.env.NODE_ENV": ""development"",
},
"_args": [
{
"process.env.ASSET_PREFIX": """",
"process.env.NODE_ENV": ""development"",
},
],
"affectedHooks": "compilation",
"name": "DefinePlugin",
},
Expand Down
56 changes: 20 additions & 36 deletions packages/core/tests/__snapshots__/output.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -66,17 +66,15 @@ exports[`plugin-output > should allow to use copy plugin 1`] = `
},
"plugins": [
CopyRspackPlugin {
"_options": {
"patterns": [
{
"force": false,
"from": "test",
"globOptions": {},
"noErrorOnMissing": false,
"priority": 0,
},
],
},
"_args": [
{
"patterns": [
{
"from": "test",
},
],
},
],
"affectedHooks": undefined,
"name": "CopyRspackPlugin",
},
Expand All @@ -103,31 +101,17 @@ exports[`plugin-output > should allow to use copy plugin with multiple config 1`
},
"plugins": [
CopyRspackPlugin {
"_options": {
"patterns": [
{
"force": false,
"from": "test",
"globOptions": {},
"noErrorOnMissing": false,
"priority": 0,
},
{
"force": false,
"from": "src/assets/",
"globOptions": {},
"noErrorOnMissing": false,
"priority": 0,
},
{
"force": false,
"from": "tests/",
"globOptions": {},
"noErrorOnMissing": false,
"priority": 0,
},
],
},
"_args": [
{
"patterns": [
{
"from": "test",
},
"src/assets/",
"tests/",
],
},
],
"affectedHooks": undefined,
"name": "CopyRspackPlugin",
},
Expand Down
Loading
Loading