alexander-akait
Repos
190
Followers
682

Rust-based platform for the Web

24094
784

A bundler for javascript and friends. Packs many modules into a few bundled assets. Code Splitting allows for loading parts of the application on demand. Through "loaders", modules can be CommonJs, AMD, ES6 modules, CSS, Images, JSON, Coffeescript, LESS, ... and your custom stuff.

61881
8127

Prettier is an opinionated code formatter.

43954
3289

A mighty, modern linter that helps you avoid errors and enforce conventions in your styles.

9921
855

Transforming styles with JS plugins

26745
1462

A modular minifier, built on top of the PostCSS ecosystem.

4248
300

Events

issue comment
feat(html): options and types

@kdy1 Rebased and fixed (the options name), anyway looks like we have invalid version swc_html_utils in swc_html_minifier

Because:

error[E0277]: the trait bound `std::string::String: Borrow<string_cache::atom::Atom<JsWordStaticSet>>` is not satisfied
   --> /home/akait/.cargo/registry/src/github.com-1ecc6299db9ec823/swc_html_minifier-0.75.25/src/lib.rs:373:75
    |
373 |         if let Some(global_pseudo_element) = HTML_ELEMENTS_AND_ATTRIBUTES.get(&js_word!("*")) {
    |                                                                           ^^^ the trait `Borrow<string_cache::atom::Atom<JsWordStaticSet>>` is not implemented for `std::string::String`
    |
    = help: the trait `Borrow<str>` is implemented for `std::string::String`

I have changed it to JsWord recently

Created at 6 days ago

feat: Add type definitions (#15)

feat(html): options and types

fix: name

Created at 6 days ago
issue comment
when production model and optimization.sideEffects:true,should ignore package.json sideEffects

sideEffects mostly is used for dependecies, no need to setup it on appliction level

Created at 6 days ago
issue comment
when production model and optimization.sideEffects:true,should ignore package.json sideEffects

Please be patient we already have dicussion, if it will be consider as bug - we open PR or issue, no need to duplicate

Created at 6 days ago
closed issue
when production model and optimization.sideEffects:true,should ignore package.json sideEffects

Feature request

When optimization.sideEffects is set to true, the code will not be analyzed for side effects during production mode construction, The sideEffects field in package.json will still be used Whether sideEffects in package.json should be ignored when optimization.sideEffects is true and in production mode

What is the expected behavior? Whether sideEffects in package.json should be ignored when optimization.sideEffects is true and in production mode, but when production model and optimization.sideEffects:true,Still use package.json's sideEffects

What is motivation or use case for adding/changing the behavior? https://github.com/galaxy-s10/issue-demo/blob/master/demo1/webpack.config.js

How should this be implemented in your opinion?

Are you willing to work on this yourself? emm

Created at 6 days ago

feat: Add type definitions (#15)

Created at 6 days ago
delete branch
alexander-akait delete branch fix-typo
Created at 6 days ago
delete branch
alexander-akait delete branch fix-types
Created at 6 days ago
pull request opened
feat(html): error recovery mode by default
Created at 6 days ago
create branch
alexander-akait create branch feat-recovery-mode-by-default
Created at 6 days ago
issue comment
Config dependency manager doesn't take into account all the hooks until "initialize".

HtmlWebpackPlugin should not use compiler.hooks.initialize to get options, that is wrong and invalid, options can be change, so it need to get in the valid hooks, but here workaround:

const Plugin = require("html-webpack-plugin")

const compiler = [
  {
    name: 'client',
    output: {
      filename: "client-[name].js"
    },
    plugins: [
      {
        apply: compiler => compiler.hooks.afterEmit.tapAsync('Plugin1', (compilation, callback) => {
          console.log('Config 1: afterEmit')

          callback()
        })
      }
    ]
  },
  {
    name: 'server',
    dependencies: ['client'],
    output: {
      filename: "server-[name].js"
    },
    plugins: [
      {
        apply: compiler => compiler.hooks.beforeRun.tap('Plugin2', (compiler) => {
          new Plugin().apply(compiler);

          compiler.hooks.initialize.call(compiler);
        })
      }
    ]
  }
]

module.exports = compiler;

/cc @jantimon can we rewrite it, to get entries you can use this hook - https://github.com/webpack/webpack/blob/00c57ede11ee10dbb0a42e944b2cd7a038089944/lib/ProgressPlugin.js#L393, other things is just default options you don't need it to do inside hook and it is wrong

Created at 6 days ago
issue comment
Config dependency manager doesn't take into account all the hooks until "initialize".

I don't think it is bug, I want to say it is hidden feature, because https://github.com/webpack/webpack/blob/main/lib/WebpackOptionsApply.js#L695, i.e. afterResolvers is configuration hook, and all configuration hooks runs concurency

You can add more deps or change the whole configuration in afterResolvers, so we need do it before runs

Created at 6 days ago
regression: 4.2.0 causes "Call retries were exceeded" with a fresh, blank Docusaurus project

When https://github.com/facebook/jest/pull/13341 was merged and jest-worker will released, just update your deps (transitive, i.e. rm -rf node_modules && npm i). If there is no reaction, I will downgrade the versions back

Created at 6 days ago
pull request reopened
fix: jest-worker standalone usage

Summary

We use it here https://github.com/facebook/jest/blob/main/packages/jest-worker/src/workers/threadChild.ts#L9, but no in deps https://github.com/facebook/jest/blob/main/packages/jest-worker/package.json#L19

Ref: https://github.com/webpack-contrib/css-minimizer-webpack-plugin/issues/198

Test plan

No need, but make sense to setup linter to catch these problems

Created at 6 days ago
pull request closed
fix: jest-worker standalone usage

Summary

We use it here https://github.com/facebook/jest/blob/main/packages/jest-worker/src/workers/threadChild.ts#L9, but no in deps https://github.com/facebook/jest/blob/main/packages/jest-worker/package.json#L19

Ref: https://github.com/webpack-contrib/css-minimizer-webpack-plugin/issues/198

Test plan

No need, but make sense to setup linter to catch these problems

Created at 6 days ago
regression: 4.2.0 causes "Call retries were exceeded" with a fresh, blank Docusaurus project

Here fix - https://github.com/facebook/jest/pull/13341, but on the jest side

Created at 6 days ago
pull request opened
fix: jest-worker standalone usage

Summary

https://github.com/webpack-contrib/css-minimizer-webpack-plugin/issues/198

Test plan

No need, but make sense to setup linter to catch these problems

Created at 6 days ago
create branch
alexander-akait create branch fix-worker-standalone-usage
Created at 6 days ago

docs(blog): Jest 27 blog post (#11131)

Co-authored-by: Christoph Nakazawa cpojer@fb.com Co-authored-by: Simen Bekkhus sbekkhus91@gmail.com

chore: update changelog for release

v27.0.0

chore: update lockfile after publish

chore: fix changelog headings

chore: attempt to use v14 of node to deploy website

Revert "Upgrade website to Docusaurus using webpack 5 (#11266)"

This reverts commit 7ad8d06265a2a97cf6f0d3cd38b41120873293d6.

chore: use specific node version in netlify

chore(website): do not ignore changes to netlify config

chore: bump jsdom (#11442)

chore: update changelog for release

v27.0.1

chore: update lockfile after publish

docs(blog): fix typo Jest 27 blog post (#11443)

chore: roll new version of the docs (#11445)

chore: roll new version of the docs (#11445)

fix: loosen engine requirement of jest-worker (#11451)

feat(reporters): re-expose getResultHeader as a util (#11460)

Fix jest-worker readme with changes to exports (#11468)

chore: remove jest-config dependency from jest-runner (#11466)

Created at 6 days ago
regression: 4.2.0 causes "Call retries were exceeded" with a fresh, blank Docusaurus project

@SimenB Friendly ping, looks like jest-worker is broken for standalone usage:

Error: Cannot find module 'jest-util'
Require stack:
- /home/akait/IdeaProjects/untitled/my-website/node_modules/jest-worker/build/workers/threadChild.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:956:15)
    at Module._load (node:internal/modules/cjs/loader:804:27)
    at Module.require (node:internal/modules/cjs/loader:1022:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at _jestUtil (/home/akait/IdeaProjects/untitled/my-website/node_modules/jest-worker/build/workers/threadChild.js:14:16)
    at execFunction (/home/akait/IdeaProjects/untitled/my-website/node_modules/jest-worker/build/workers/threadChild.js:173:11)
    at execHelper (/home/akait/IdeaProjects/untitled/my-website/node_modules/jest-worker/build/workers/threadChild.js:151:5)
    at execMethod (/home/akait/IdeaProjects/untitled/my-website/node_modules/jest-worker/build/workers/threadChild.js:155:5)
    at MessagePort.messageListener (/home/akait/IdeaProjects/untitled/my-website/node_modules/jest-worker/build/workers/threadChild.js:59:7)
    at [nodejs.internal.kHybridDispatch] (node:internal/event_target:689:20) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/home/akait/IdeaProjects/untitled/my-website/node_modules/jest-worker/build/workers/threadChild.js'
  ]
}

Here usage - https://github.com/facebook/jest/blob/main/packages/jest-worker/src/workers/threadChild.ts#L9, but no in deps https://github.com/facebook/jest/blob/main/packages/jest-worker/package.json#L19

Created at 6 days ago
regression: 4.2.0 causes "Call retries were exceeded" with a fresh, blank Docusaurus project

WIP on this

Created at 6 days ago
pull request opened
feat(html/codegen): added option to keep quotes when minified

Description:

Some old system can't parser HTML attributes without quotes (yes, it is legacy), currently we don't have ability to prevent it, so let's add an option

BREAKING CHANGE:

Yes

Related issue (if exists):

No

Created at 6 days ago

feat(html/codegen): added option to keep quotes when minified

Created at 6 days ago
create branch
alexander-akait create branch feat-keep-quotes
Created at 6 days ago