text:
Edges messed up on re-render.

I have a case where the incoming graph data can change; usually these changes only affect a few elements and most the elements will be the same.
However when the new data is detected and I go to re-render the graph the new elements are rendered in the correct position however the edges are all messed up.  One thing to note is that in my setup I am using the storeState to get rendered dimensions (eg, el.__rf) so I included the code for positioning as well but I don't think the position logic is the problem because the elements end up in the correct positions (again, its just the edges that are seeming to get stuck).
Reading through similar issues involving the edges I have tried setElements([]) in order to clear the graph before I set the new data as well as wrapping that in a timeout - neither seem to work. Do you have any ideas? Am I doing something wrong?
Before Refresh:

After Refresh:

For context, I am using ReactFlowProvider as:
<ReactFlowProvider>
    <LayoutReactFlow
        type={type}
        graphData={state.rfGraphJson}
        backgroundStyle={backgroundStyle}>
    </LayoutReactFlow>
 </ReactFlowProvider>

And then  is this:
const LayoutReactFlow: React.FC<any> = ({ graphData, backgroundStyle }) => {

    const [instance, setInstance] = useState<null | any>(null);
    const [shouldUpdate, setShouldUpdate] = useState(true);
    const [shouldRefit, setShouldRefit] = useState(false);
    const [graphWithPositions, setGraphWithPositions] = useState(graphData);
    const nodes = useStoreState(store => store.nodes);
    const edges = useStoreState(store => store.edges);
    const setElements = useStoreActions(actions => actions.setElements);

    useEffect(() => {
        if (instance && shouldRefit) {
            instance.fitView({ padding: 0.01 });
            setShouldRefit(false);
        }
    }, [shouldRefit, instance]);

    useEffect(() => {
        if (!shouldUpdate) {
            setElements(graphWithPositions);
        }
    }, [graphWithPositions]);

    useEffect(() => {
        if (!shouldUpdate) {
            setElements(graphData);
            setShouldUpdate(true);
            setShouldRefit(false);
        }
    }, [graphData, setShouldUpdate]);

    useEffect(() => {
        if (
            shouldUpdate &&
            !shouldRefit &&
            nodes.length > 0 &&
            edges.length > 0 &&
            nodes.every(
                node => node.__rf.width != null && node.__rf.height != null
            )
        ) {
            const nodesAndEdges = (nodes as any[]).concat(edges);
            const elementsWithLayout = setReactFlowGraphLayout(
                nodesAndEdges,
                'LR'
            );
            setShouldUpdate(false);
            renderPositionedElements(elementsWithLayout);
        }
    }, [nodes, edges]);

    const renderPositionedElements = data => {
        setGraphWithPositions(data);
        setShouldRefit(true);
    };

    const onLoad = (rf: any) => {
        setInstance(rf);
    };

    const reactFlowStyle: React.CSSProperties = {
        display: 'flex',
        flex: `1 1 100%`,
        flexDirection: 'column'
    };

    return (
        <ReactFlow
            elements={graphWithPositions}
            onLoad={onLoad}
            nodeTypes={CustomNodeTypes}
            style={reactFlowStyle}
            onlyRenderVisibleElements={false}
        >
            <Background
                style={backgroundStyle.background}
                color={backgroundStyle.gridColor}
                gap={backgroundStyle.gridSpacing}
            />
        </ReactFlow>
    );
};

And then the positioning logic from setReactFlowGraphLayout() is:
export const setReactFlowGraphLayout = (
    elements: Elements,
    direction: string
) => {
    const dagreGraph = new dagre.graphlib.Graph();
    dagreGraph.setDefaultEdgeLabel(() => ({}));
    dagreGraph.setGraph({
        rankdir: direction,
        edgesep: 60,
        nodesep: 30,
        ranker: 'longest-path',
        acyclicer: 'greedy'
    });
    elements.forEach(el => {
        if (isNode(el)) {
            const nodeWidth = el.__rf.width;
            const nodeHeight = el.__rf.height;
            dagreGraph.setNode(el.id, { width: nodeWidth, height: nodeHeight });
        } else {
            dagreGraph.setEdge(el.source, el.target);
        }
    });

    dagre.layout(dagreGraph);
    return elements.map(nodeState => {
        if (isNode(nodeState)) {
            const node = dagreGraph.node(nodeState.id);
            return {
                ...nodeState,
                position: {
                    x: node.x - node.width / 2,
                    y: node.y - node.height / 2
                }
            };
        } else {
            return { ...nodeState };
        }
    });
};

Fixing this solved it for me: https://github.com/wbkd/react-flow/issues/1715#issuecomment-985885004

This is a strange bug. As @thadk I would guess that it has something to do with the edge ids. Are you able to create a minimal codesandbox for this example @jsonporter ?

Okay yeah I was able to make a (very) poorly ported version of our setup but while it doesn't look so great it can repo the error so hopefully its helpful. And thanks for your quick response!
https://xxyhk.csb.app/

Yes, if I modify the edges in your sandbox to have a different edge id's, then it cleans them up as expected before redrawing. Thanks for sharing the intriguing example usage. I also started with the custom node example myself when I ran into this issue.

Hey @jsonporter you are nesting ReactFlow components. This is not supported ;) We are working on a next release that supports subflows (you can find the instructions how to test it here: #1555). I can't reproduce this when the flows are not nested.

Ah yeah, that makes sense haha 😂 .  But reading through that PR it looks like the sub-workflow bit is done so i'll give that a shot. And then any guess on an ETA for that formal release? (can just be a ball-park estimate). Regardless, thanks again for the quick replies!

Hopefully by end of January ;)

authors: jsonporter moklick thadk

repo: wbkd/react-flow


text:
Incorrect response when an escaped quote(") is present in the input

Using csv-stringify@0.0.6
the result doesn't have the escaped quote, but instead has two quotes.
function print(input) {
    var stringify = require('csv-stringify');
    stringify(input, function(err, data) {console.log(data)})
}

> var input = [["first col", "second \"col", "third col"]]
undefined
> print(input)
undefined
> first col,"second ""col",third col

undefined
>

Normal, default escape in csv is double quotes, use the escape option:
function print(input) {
    var stringify = require('./lib');
    stringify(input, {escape: '\\'}, function(err, data) {console.log(data)})
}

source: gharchive/issue

authors: aakn wdavidw

repo: wdavidw/node-csv-stringify

license_type: permissive

license_source: bigquery


text:
Avoid uberjar classes from interfering reloading

Adds "target/%s" as :target-path as suggested in https://github.com/technomancy/leiningen/blob/master/doc/PROFILES.md#activating-profiles.
Ran into this while building a small app and wondering why sometimes I get No namespace CompilerExceptions from some of my components while doing (reset) in the repl and realising that lein clean after creating an uberjar helped.

Thanks for the patch! Could you quickly amend the commit summary message to bring it down to under 70 characters to avoid truncation? Perhaps something like:
Add profile to :target-path in project file

Done. Added a mental note for me on trying to keep it short in the future :)

source: gharchive/pull-request

authors: viesti weavejester

repo: weavejester/duct

license: MIT

license_source: github-api


text:
Pod restarts not showing up in details

When I run kubectl get pods --all-namespaces in the terminal on the master host in Scope, I see a number of container in the sockshop have restarted:

But this information is not displayed on the container and says 0:

surely the fact that it says 0 is a bug. -> changing labels.

When pods restart, do their containers get re-created or re-started?

Good question. I would say they are restarted. I think that the restart count is obtained from docker and  I would doubt we have a bug specifically for the kubernetes case.

Hmmm.
$ docker version
Client:
 Version:      17.03.1-ce
 API version:  1.27
 Go version:   go1.7.5
 Git commit:   c6d412e
 Built:        Mon Mar 27 17:14:09 2017
 OS/Arch:      linux/amd64

Server:
 Version:      17.03.1-ce
 API version:  1.27 (minimum version 1.12)
 Go version:   go1.7.5
 Git commit:   c6d412e
 Built:        Mon Mar 27 17:14:09 2017
 OS/Arch:      linux/amd64
 Experimental: false
$ docker run --name test -dti alpine /bin/sh
b70426355549d77aeb632ae38982e06328324a228a56ca5c7835684e2d0efc65
$ docker inspect -f '{{.RestartCount}} {{.State.StartedAt}}' test
0 2017-05-18T14:07:31.877338973Z
$ docker restart -t 0 test
test
$ docker inspect -f '{{.RestartCount}} {{.State.StartedAt}}' test
0 2017-05-18T14:07:40.494411989Z

This suggests to me that k8s is counting something different.

Docker doesn't seem to have a state 'restarted' but rather they have 'restarting' - in the act of restarting.  And Kubernetes has a restart policy that determines if the container is restarted or not:
https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/

I think there has been a mix-up here. The details pane shown by @abuehrle (with restart # = 0) corresponds to a container whereas the command-line output corresponds to a kubernetes pod. We don't currently show restart counts for pods in the UI (and as far as I have been able to see, we never had).
The restart counts of  containers (based on how many times a specific container been restarted) are totally different to those of a container in a pod (based on the number of different dead containers that have not yet been removed).
To be even more precise, kubectl get pods shows the sum of the restart for all the containers of the pod (init containers make it a bit more complicated but let's not get into that).
So, this is really a new feature, which should be fairly easy to implement.

authors: 2opremio abuehrle rade

repo: weaveworks/scope


text:
'cannot list resource "helmrepositories" in API group "source.toolkit.fluxcd.io" at the cluster scope'

This error is shown in the wego logs which leads to an error on the UI.
We are possibly not scoping a call to a namespace, so the call is going cluster-wide, thus asking for a cluster scope.

The errors
cannot list resource "helmrepositories" in API group "source.toolkit.fluxcd.io" at the cluster scope

and
{"error": "list resource: deployments.apps is forbidden: User \"system:serviceaccount:flux-system:wego-app-service-account\" cannot list resource \"deployments\" in API group \"apps\" in the namespace \"flux-system\""}

are caused by this bit around profiles
we are not sure why profiles are in core, so for now i am going to leave this and come back round once i have finished the service account work

Update for those playing along at home:
So this profiles (helm) watcher is start on wego-app launch. This means that it will use whatever powers the wego-app SA has to look up resources. It does not impersonate at all, and I am not sure it can, since queries do not come from the user; the watcher is just "on" all the time. This gets in the way of our "impersonate all the things all the time plan". To maintain the current profiles feature, the wego SA would need to have Cluster scope access to the objects that profiles cares about.

It can run with its own ServiceAccount?

And for this, I think it's fine to not impersonate all the time, as you say, it's not the user that's doing the queries.
It does raise some interesting questions around which ones we can show data from tho'.
So, maybe we query for the HelmReleases with impersonation, and use that to look in the cache?

It does raise some interesting questions around which ones we can show data from tho'.

Yeh that's an interesting thought.
I am going to close this ticket, as the error is solved, and will open a new ticket to do the "make sure people see profiles they are meant to" bit.

@bigkevmcd by "cache" are you talking about the disk-based profiles cache which I just spotted?

@Callisto13 yes, there's a cache of the parsed data extracted from the Helm charts repositories.

👍  coolio

repo: weaveworks/weave-gitops


text:
Rearchitecting Add code

What changed?
This is a major refactor of the app add command. It creates a new App Service package, that'll contain the implementation for app commands.
It also creates interfaces for all dependencies the app command needs.
Note:
In order to speed up the approval process of this PR, I decided to roll back any UX change, so, now it's behaving as is today. There should be no changes at all, besides possible bugs, introduced in the process.
I can create a new PR only with those UX changes if needed, I'm leaving the description below for historical reasons, but that's not valid anymore.
~As much as possible I haven't change the current behavior, all the 3 modes stay the same and work as current implementation, but as I was doing the development I felt the need to add new flags and make some changes to simplify the "mode selection".~

Details
These were the changes:
Add in the user repo
Stays exactly the same, with no changes at all as this is the default behavior, by running the command below the manifests will be generated, applied to the cluster, and committed to the user repo.
wego app add .

Add without committing manifests
For this mode, I added a --commit-manifests flag, it does the same as the default mode but it only applies the manifests to the cluster and doesn't commit them to any repo.
wego app add . --commit-manifests=false

Add with external repo
This mode had the biggest change, for it I added 3 new flags:
--automation-repo string          Repository that will hold the Gitops Automation manifests
--automation-repo-branch string   Repository branch that will hold the Gitops Automation manifests (default "main")
--automation-repo-path string     Repository path that will hold the Gitops Automation manifests (default "./wego")

To add an app using an external repo the user can do:
wego app add . --automation-repo https://github.com/luizbafilho/wego-automation

The above command will read the current directory looking for the app repo URL and save the manifests in ./wego directory in the wego-automation repo.
wego app add --url https://github.com/stefanprodan/podinfo --automation-repo https://github.com/luizbafilho/wego-automation

This one will create all the manifests save them in wego-automation repo, but point them to the repo specified in the --url
I did those changes because it felt a bit easier to understand, although I'm not attached to them or any naming I've used, so feel free to question them.

Why?
Testing in the current code is hard, this PR makes it quite easy to inject and define the behavior of the dependencies making it super easy to test our code.

How did you test it?
Just use it, try to add apps using the current three modes and check if something breaks.

Release notes

Documentation Changes

hi @cdavisafc and @bia tagging you because but I've made some changes to the UX and I'd love your feedback on it. those are mere suggestions since there was a need to input the same path and branch to the external repo, which is different from the path and branch of the app, so I've made a call and picked a name but I'm good with any name.

skipped some acceptances tests after discussion with rokshana


text:
General Issues or Thoughts

If you have any general thoughts on the article, @ruebot and I would love to hear them! Please drop us a line below.

Ian, do you and Nick have any ideas how you are going to use the dataset, beyond the simple analysis? Or are you just putting it out there for other people to use?

Very cool. I've had a number of research consultations recently where students are interested in how they can analyze events and social trends using twitter streams. Now I have an example to walk them through.

Thanks @WzMacdonald - really appreciate the comments here!

A minor point--in the Users section, we get the specifics on how many accounts were represented in the tweets:

From the above, we can see that there are 318,176 unique users in the dataset

I wonder if this may be important enough to emphasize in the Introduction (or somewhere near the beginning), to connect with these comments:

Social and cultural historians will have access to the thoughts, behaviours, and activities of everyday people, the sorts of which who are not generally preserved in the record.

300,000+ everyday people (well, some everyday bots too) is an interesting number to ponder.

Sounds good! Thanks @russellwhite - @ruebot, I'll take a stab at incorporating something re: that in the introduction.

authors: WzMacdonald ianmilligan1 russellwhite


text:
☂ linter: eslint recommended rules

These are the rules that we need to implement, except the ones that are:

stylistic
conventional
strict mode syntax errors
regex related (we need a regex parser)

Please create a separate issue for the rule you want to implement.
https://github.com/eslint/eslint/blob/main/packages/js/src/configs/eslint-recommended.js

[x] constructor-super
[x] for-direction
[x] getter-return
[x] no-async-promise-executor
[x] no-case-declarations
[x] no-class-assign
[x] no-compare-neg-zero
[x] no-cond-assign
[x] no-const-assign
[x] no-constant-condition
[x] no-control-regex
[x] no-debugger
[x] no-delete-var
~no-dupe-args~ (strict mode syntax error)
[x] no-dupe-class-members
[x] no-dupe-else-if
[x] no-dupe-keys
[x] no-duplicate-case
[x] no-empty
[ ] #559
[x] no-empty-pattern
[x] no-ex-assign
[ ] #596
~no-extra-semi~ (style)
[ ] #597
[x] no-func-assign
[ ] #598
[ ] #610
[x] no-inner-declarations
[ ] #611
[ ] #612
[ ] #613
[ ] #614
~no-mixed-spaces-and-tabs~ (style)
[x] no-new-symbol
~no-nonoctal-decimal-escape~ (strict mode syntax error)
[x] no-obj-calls
~no-octal~ (strict mode syntax error)
[x] no-prototype-builtins
[ ] #615
[ ] #616
[x] no-self-assign
[x] no-setter-return
[ ] #617
[x] no-sparse-arrays
[ ] #618
[ ] #619
[ ] #620
[ ] #621
[x] no-unsafe-finally
[x] no-unsafe-negation
[x] no-unsafe-optional-chaining
[x] no-unused-labels
[ ] #595
[ ] #622
[x] no-useless-catch
[x] no-useless-escape
~no-with~ (strict mode syntax error)
[x] require-yield
[x] use-isnan
[x] valid-typeof

@Boshen can we please update this?

@Boshen can we please update this?

Feel free to edit it, you have permission to do so.

For new comers:

Use just new-rule <name> to generate a rule file with test cases, as mentioned in https://github.com/web-infra-dev/oxc/issues/597. The just new-rule <name> command will fetch the info of eslint rule with exact the same name and fill the template for you.
Remember to declare the rule to crates/oxc_linter/src/rules.rs, to make sure the rule file is in the file hierarchy, otherwise the language server will not work in generated rule file, and VSCode will also complain about it.
Start to implement the rule and have fun!

unicorn/no-nested-ternary has been implemented.  Should eslint/no-nested-ternary be marked as complete? Or something else done for this rule?
The eslint version doesn't allow any nesting.  The unicorn version allows nesting 1 level, as long as it is wrapped in parenthesis.
https://eslint.org/docs/latest/rules/no-nested-ternary
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-nested-ternary.md

authors: Boshen DonIsaac nrayburn-tech suica

repo: web-infra-dev/oxc


text:
SplitChunks Strategy Fails with rspackFuture.newTreeshaking Enabled

System Info
System:
OS: macOS 13.2.1
CPU: (8) x64 Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz
Memory: 12.14 MB / 16.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 16.20.2 - ~/.nvm/versions/node/v16.20.2/bin/node
Yarn: 1.22.19 - ~/.nvm/versions/node/v16.20.2/bin/yarn
npm: 8.19.4 - ~/.nvm/versions/node/v16.20.2/bin/npm
pnpm: 6.26.0 - /usr/local/bin/pnpm
Browsers:
Chrome: 120.0.6099.129
Chrome Canary: 122.0.6223.0
Safari: 16.3
Details
Problem Description:
I have encountered an issue with the rspackFuture.newTreeshaking feature in my project. When rspackFuture.newTreeshaking is set to true, the splitChunks packaging strategy seems to malfunction.
Expected Behavior:
The splitChunks strategy should work consistently, splitting the vant components into a separate package, similar to how webpack behaves.
Observed Behavior:
When rspackFuture.newTreeshaking is enabled (true), the splitChunks strategy does not split the vant components as expected. Disabling rspackFuture.newTreeshaking (false) restores the normal splitting behavior.

Reproduce link
https://github.com/Moudicat/rspack-new-tree-shaking-split-chunk
Reproduce Steps

In my project, I've integrated the vant component library.
I've configured splitChunks with the following strategy for packaging vant:

splitChunks: {
  chunks: 'all',
  minChunks: 1,
  minSize: 20000,
  cacheGroups: {
    vant: {
      name: 'lib-vant',
      test: createDependenciesRegExp('vant'),
      reuseExistingChunk: true,
      priority: 15,
    },
  }
}

With the above configuration, webpack correctly applies the splitChunks strategy.
However, when using rspack with rspackFuture.newTreeshaking set to true, the expected package splitting does not occur.

Strange, I run npm run build:rspack, get the expected result

Strange, I run npm run build:rspack, get the expected result

To provide more context, I performed another build on a Windows machine, and unfortunately, I still encountered the same issue. Here are some additional details that might help in diagnosing the problem:
System:
    OS: Windows 11 10.0.22621
    CPU: (24) x64 13th Gen Intel(R) Core(TM) i7-13700K
    Memory: 20.00 GB / 31.75 GB
  Binaries:
    Node: 18.15.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.19 - ~\AppData\Roaming\npm\yarn.CMD
    npm: 9.5.0 - C:\Program Files\nodejs\npm.CMD
    pnpm: 8.14.0 - ~\AppData\Roaming\npm\pnpm.CMD
  Browsers:
    Edge: Chromium (120.0.2210.91)
    Internet Explorer: 11.0.22621.1
  npmPackages:
    @rspack/cli: latest => 0.4.5
    @rspack/core: latest => 0.4.5

  Additionally, I would like to mention that I am using pnpm as my package manager for this project.

I appreciate your assistance in resolving this issue. If there are any additional information I can provide to help diagnose the issue, please let me know. thanks

Have you tried setting minSize to 0, not sure if that help.

Thank you for the suggestion to set minSize to 0. I gave that a try, but unfortunately, it didn't resolve the issue.
I collaborated with several colleagues to test the build process on different machines.

Windows:    0/4
MacOS:  2/4
Linux: 1/1

Indeed, this is a strange issue.
MacOS Environments compare:

Using my windows laptop, it works fine,

System:
OS: Windows 10 10.0.19045
CPU: (8) x64 Intel(R) Core(TM) i7-10510U CPU @ 1.80GHz
Memory: 6.70 GB / 15.76 GB
Binaries:
Node: 16.18.0 - ~\AppData\Local\fnm_multishells\11352_1704351179827\node.EXE
Yarn: 1.22.21 - ~\AppData\Local\fnm_multishells\11352_1704351179827\yarn.CMD
npm: 8.19.2 - ~\AppData\Local\fnm_multishells\11352_1704351179827\npm.CMD
pnpm: 8.10.5 - ~\AppData\Local\fnm_multishells\11352_1704351179827\pnpm.CMD
Browsers:
Edge: Spartan (44.19041.3636.0), Chromium (120.0.2210.61)
Internet Explorer: 11.0.19041.3636
npmPackages:
@rspack/cli: latest => 0.4.5
@rspack/core: latest => 0.4.5

Can you help with testing this version:
0.5.3-canary-431379d-20240206044033

Can you help with testing this version:
0.5.3-canary-431379d-20240206044033

Sorry for the delay.
it's works!   both 0.5.3-canary-431379d-20240206044033 and 0.5.4 are functioning properly now.
Thank you for resolving the issue ✌

authors: IWANABETHATGUY JSerFeng Moudicat

repo: web-infra-dev/rspack


text:
Link to docs in description

Here's what's shown when hovering the @wpt-pr-bot avatar in https://github.com/web-platform-tests/wpt/pull/19802:

Giving credit with "Profile pic by Aaron K. Kim" is good, but linking to some documentation on how @wpt-pr-bot works would be better.
The wpt logo itself could be used to avoid the need for attribution, if that's a licensing requirement.

I think @tobie has said that the attribution should stay.
Alternative logo (view)
<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
 viewBox="0 0 1278.000000 1280.000000"
 preserveAspectRatio="xMidYMid meet">
 <!-- from https://svgsilh.com/image/153649.html , CC0 -->
<metadata>
Created by potrace 1.15, written by Peter Selinger 2001-2017
</metadata>
<g transform="translate(0.000000,1280.000000) scale(0.100000,-0.100000)"
fill="#003C56" stroke="none">
<path d="M4289 12758 c-59 -224 -229 -841 -231 -842 -2 -1 -48 -12 -103 -25
-55 -13 -154 -38 -219 -58 l-120 -34 -322 322 c-300 300 -324 322 -346 312
-20 -9 -1009 -581 -1015 -587 -1 -1 51 -200 115 -441 l118 -439 -163 -163
c-90 -90 -168 -163 -173 -163 -6 0 -205 52 -442 115 -237 63 -432 114 -434
113 -9 -10 -594 -1022 -594 -1029 0 -4 145 -151 322 -327 l322 -319 -37 -124
c-20 -68 -46 -164 -58 -214 -32 -140 -16 -126 -190 -170 -85 -21 -280 -71
-434 -110 l-280 -72 0 -599 0 -599 220 -56 c121 -31 315 -81 430 -110 116 -29
213 -55 217 -58 4 -3 25 -76 47 -161 21 -85 50 -190 64 -233 l25 -77 -324
-317 c-178 -174 -324 -320 -324 -324 0 -8 577 -1007 590 -1022 4 -5 203 46
441 113 l434 122 173 -173 173 -173 -117 -426 c-64 -234 -119 -430 -121 -436
-2 -6 214 -137 484 -294 268 -155 502 -291 519 -301 l30 -18 314 322 c173 177
319 323 326 325 6 2 70 -15 140 -36 71 -22 173 -50 226 -63 65 -15 99 -28 103
-38 2 -9 50 -189 105 -401 56 -212 105 -402 111 -422 l10 -38 598 0 599 0 14
58 c9 31 59 228 113 438 l97 381 97 22 c53 12 158 40 235 63 l138 41 152 -154
c83 -85 226 -231 318 -326 l167 -171 518 299 c404 233 517 303 515 317 -2 9
-39 144 -83 300 -43 155 -79 285 -79 289 0 4 72 -116 161 -265 l160 -273 -34
-57 c-87 -144 -166 -329 -217 -508 l-32 -110 -291 -74 c-161 -40 -307 -78
-325 -82 l-32 -9 2 -347 3 -347 319 -81 c263 -66 321 -84 327 -100 4 -10 21
-66 39 -124 42 -140 107 -292 180 -423 l60 -108 -170 -286 -169 -287 230 -237
c126 -130 236 -242 243 -249 12 -9 69 20 302 158 l287 169 131 -68 c153 -79
272 -127 434 -173 l117 -34 80 -323 81 -324 349 0 349 0 81 324 80 323 116 33
c155 45 280 95 430 172 l126 65 292 -167 293 -167 35 33 c19 19 129 131 243
250 l209 216 -170 287 -169 288 35 59 c79 129 183 378 221 527 18 69 20 73 54
82 19 5 167 45 327 87 l293 78 0 347 0 348 -22 5 c-13 4 -160 43 -327 88
l-305 82 -28 100 c-51 177 -125 350 -224 520 l-23 40 169 290 169 290 -242
243 c-148 149 -248 241 -257 239 -8 -2 -140 -76 -294 -165 l-278 -160 -48 29
c-135 83 -520 239 -590 239 -14 0 -22 11 -30 38 -5 20 -46 168 -89 327 l-78
290 -346 3 -345 2 -11 -32 c-5 -18 -42 -152 -81 -298 -39 -146 -75 -278 -80
-295 -9 -27 -17 -32 -80 -47 -140 -35 -383 -138 -540 -228 l-55 -32 -282 166
c-155 91 -285 166 -290 166 -4 0 -115 -107 -245 -237 -131 -130 -239 -235
-242 -232 -3 2 -18 52 -34 109 l-29 105 173 171 173 171 178 -49 c564 -155
695 -190 698 -187 2 2 136 234 298 516 l295 512 -211 208 c-117 114 -263 258
-324 318 l-113 110 30 95 c17 52 46 155 65 229 19 74 37 136 39 139 3 3 200
57 438 121 l433 117 0 598 0 598 -430 115 c-236 64 -434 119 -438 122 -4 4
-25 73 -46 152 -21 79 -49 179 -62 222 l-23 78 322 322 322 322 -296 515
c-163 283 -298 516 -299 518 -1 1 -201 -52 -445 -118 l-443 -120 -165 165
-165 165 88 322 c48 178 102 377 120 443 19 66 33 120 32 121 -9 8 -1031 594
-1035 594 -4 0 -151 -144 -328 -321 l-321 -321 -73 22 c-40 12 -138 37 -218
56 -80 18 -148 37 -152 41 -4 5 -55 188 -114 408 -59 220 -112 417 -118 438
l-11 37 -598 0 -598 0 -12 -42z"/>
</g>
<g transform="translate(0, 0) scale(0.8)">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 762 762">
<rect x="183.9" y="511.4" fill="#FFFFFF" width="201.5" height="38"/>
<path fill="#FFFFFF" d="M504.9,549.4c37.3,0,67.6-30.3,67.6-67.6v-19h-38v19c0,16.3-13.3,29.6-29.6,29.6c-16.3,0-29.6-13.3-29.6-29.6
V287.4h-38v56.5h-51.9v-92.6h112.4c25.5,0,46.3,20.8,46.3,46.3c0,20-13,37.8-31.8,44v39.1c40-6.9,69.8-42.1,69.8-83
c0-46.5-37.8-84.3-84.3-84.3H366.4c-10.5,0-19,8.5-19,19V386l-46.4-79.4c-3.4-5.8-9.7-9.4-16.4-9.4c-6.7,0-13,3.6-16.4,9.4
l-46.2,79.2V213.4h-38v242.7c0,8.6,5.8,16.1,14,18.3c8.3,2.2,17.1-1.4,21.4-8.8l65.2-111.8L350,465.7c3.4,5.8,9.7,9.4,16.4,9.4
c1.7,0,3.3-0.2,5-0.7c8.3-2.2,14-9.8,14-18.3v-74.2h51.9v99.8C437.3,519.1,467.6,549.4,504.9,549.4z"/>
</svg>
</g>
</svg>

I like it! Could you trim to just the big cog so it would scale down better?
If we replace the logo, then I guess we can make the description more useful?

http://software.hixie.ch/utilities/js/live-dom-viewer/saved/7308
<svg xmlns="http://www.w3.org/2000/svg"
 width="260" height="260" viewBox="0 0 1280.000000 1276.000000"
 preserveAspectRatio="xMidYMid meet">
<!-- from https://svgsilh.com/image/303465.html , CC0 -->
<metadata>
Created by potrace 1.15, written by Peter Selinger 2001-2017
</metadata>
<g transform="translate(0.000000,1276.000000) scale(0.100000,-0.100000)"
fill="#003C56" stroke="none">
<path d="M5975 12749 c-86 -6 -144 -14 -151 -22 -6 -6 -41 -111 -77 -232 -37
-121 -107 -355 -157 -520 -50 -165 -123 -406 -162 -536 l-71 -237 -188 -46
c-213 -52 -475 -135 -658 -208 -68 -27 -130 -47 -137 -44 -7 3 -301 221 -653
485 -353 265 -645 481 -649 481 -13 0 -257 -149 -392 -240 -198 -132 -359
-254 -578 -436 l-25 -21 271 -746 c150 -411 272 -752 272 -758 0 -6 -40 -56
-88 -112 -175 -202 -337 -420 -457 -615 -32 -52 -64 -96 -72 -99 -8 -3 -366 4
-796 16 -430 12 -794 21 -808 21 -23 0 -30 -9 -56 -67 -61 -137 -142 -353
-202 -538 -61 -186 -145 -494 -138 -502 2 -2 303 -204 668 -448 562 -377 665
-450 670 -473 3 -15 1 -72 -4 -127 -8 -99 -2 -525 11 -702 l7 -92 -669 -448
c-367 -246 -672 -450 -677 -453 -9 -6 23 -147 72 -320 71 -249 180 -554 284
-794 l16 -39 137 6 c75 4 440 14 810 24 l673 17 25 -29 c13 -17 68 -95 120
-174 113 -169 222 -314 350 -467 l93 -111 -275 -752 c-151 -414 -274 -757
-272 -761 5 -14 213 -185 361 -296 225 -170 606 -418 631 -412 7 2 299 219
649 482 l637 479 47 -15 c27 -9 84 -30 128 -48 183 -74 392 -141 619 -200 81
-21 149 -40 151 -42 3 -3 222 -724 386 -1273 38 -126 73 -239 78 -251 8 -18
24 -22 137 -33 314 -30 1078 -22 1110 12 6 7 41 111 77 232 37 121 107 355
157 520 50 165 123 406 162 536 l71 237 188 46 c213 52 475 135 658 208 68 27
130 47 137 44 7 -3 301 -221 653 -485 353 -265 644 -481 649 -481 11 0 250
145 362 220 206 137 422 299 608 456 l25 21 -271 746 c-150 411 -272 752 -272
758 0 6 40 56 88 112 175 202 337 420 457 615 32 52 64 96 72 99 8 3 366 -4
796 -16 430 -12 794 -21 808 -21 23 0 30 9 56 68 61 136 142 352 202 537 61
186 145 494 138 502 -2 2 -303 204 -668 448 -562 377 -665 450 -670 473 -3 15
-1 72 4 127 8 99 2 527 -11 702 l-7 92 668 448 c368 246 673 450 678 453 9 6
-22 146 -72 320 -71 249 -180 554 -284 794 l-17 39 -141 -6 c-78 -4 -443 -14
-810 -24 l-668 -17 -25 29 c-13 17 -68 95 -120 174 -113 169 -222 314 -350
467 l-93 111 275 752 c151 414 274 757 272 761 -5 14 -213 185 -361 296 -225
170 -606 418 -631 412 -7 -2 -299 -219 -649 -482 l-637 -479 -47 15 c-27 9
-84 30 -128 48 -183 74 -392 141 -619 200 -81 21 -149 40 -151 42 -3 3 -222
724 -386 1273 -38 127 -73 239 -78 251 -8 18 -24 22 -137 33 -164 16 -775 22
-959 10z"/>
</g>

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 762 762">
<rect x="183.9" y="511.4" fill="#FFFFFF" width="201.5" height="38"/>
<path fill="#FFFFFF" d="M504.9,549.4c37.3,0,67.6-30.3,67.6-67.6v-19h-38v19c0,16.3-13.3,29.6-29.6,29.6c-16.3,0-29.6-13.3-29.6-29.6
V287.4h-38v56.5h-51.9v-92.6h112.4c25.5,0,46.3,20.8,46.3,46.3c0,20-13,37.8-31.8,44v39.1c40-6.9,69.8-42.1,69.8-83
c0-46.5-37.8-84.3-84.3-84.3H366.4c-10.5,0-19,8.5-19,19V386l-46.4-79.4c-3.4-5.8-9.7-9.4-16.4-9.4c-6.7,0-13,3.6-16.4,9.4
l-46.2,79.2V213.4h-38v242.7c0,8.6,5.8,16.1,14,18.3c8.3,2.2,17.1-1.4,21.4-8.8l65.2-111.8L350,465.7c3.4,5.8,9.7,9.4,16.4,9.4
c1.7,0,3.3-0.2,5-0.7c8.3-2.2,14-9.8,14-18.3v-74.2h51.9v99.8C437.3,519.1,467.6,549.4,504.9,549.4z"/>
</svg>
</svg>

OK, new logo is in place and I have removed the bio.
I think there isn't yet documentation we can link to.

Maybe link to https://github.com/web-platform-tests/wpt-pr-bot and the README there can be expanded? Also people would probably understand that they can file issues there.

Done, though URLs in the bio are not clickable.

Also, I love the new logo!

authors: foolip zcorpan

repo: web-platform-tests/wpt-pr-bot


text:
Support PHP8

Is there any plan to upgrade the supported PHP version up to 8? Thanks

https://github.com/web3p/web3.php/releases/tag/0.1.6
That release isn't working?

Sorry for the delay in replying.
I was using this fork which does not work with PHP8 so I think it confused me.
I confirm that web3p/web3.php works with PHP8 from 0.1.6 indeed.
Thank you for your reply and for maintaining this lib.

authors: MatthieuScarset Razorholt


text:
Fe: hero text copywriting

An open virtual world built with existing communities.

The sample size is small but we've heard this expressed as a confusing wording -- what are the communities?

Now the hero text is "An Internet Scale Cinematic Universe" -- this + the hero image are worth testing to see what new users initial impressions are.

https://www.youtube.com/watch?v=S2xHZPH5Sng

authors: avaer softwarebycl

repo: webaverse/app


text:
Introduce code coverage tool and add to CI

Closes #109

Codecov Report

:exclamation: No coverage uploaded for pull request base (main@0b75bf9). Click here to learn what that means.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #144   +/-   ##
=======================================
  Coverage        ?   56.10%
=======================================
  Files           ?      102
  Lines           ?     6768
  Branches        ?        0
=======================================
  Hits            ?     3797
  Misses          ?     2971
  Partials        ?        0

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0b75bf9...b814011. Read the comment docs.

authors: appcypher codecov-commenter

repo: webb-tools/protocol-substrate


text:
Unexpected token )

error /home/paul/Documents/Coding/node_modules/electron-widevinecdm: Command failed.
Exit code: 1
Command: node install.js
Arguments:
Directory: /home/paul/Documents/Coding/node_modules/electron-widevinecdm
Output:
/home/paul/Documents/Coding/node_modules/electron-widevinecdm/install.js:84
  ),
  ^
SyntaxError: Unexpected token )
    at createScript (vm.js:56:10)
    at Object.runInThisContext (vm.js:97:10)
    at Module._compile (module.js:542:28)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)

Happens upon install.

@PaulBGD It seems like the script doesn't work correctly on Node.js 6. Please upgrade to Node.js 8+.

@PaulBGD I'll add Node.js 6 support in the next version.

I actually thought I was on node 8 already, fixed that on my side.

repo: webcatalog/electron-widevinecdm

license: mit


text:
At the time of execuiting my scripts I am getting following error

C:\Framework>npx ntaf run wdio.local.conf.js
npx: installed 1 in 19.119s
Path must be a string. Received undefined
C:\Framework\node_modules\ntaf\bin\ntaf.js
A service failed in the 'onPrepare' hook
Error: Could not download https://download.microsoft.com/download/D/4/1/D417998A
-58EE-4EFE-A7CC-39EF9E020768/MicrosoftWebDriver.exe: Error: connect ETIMEDOUT 23
.54.115.197:443
at Request. (C:\Framework\node_modules\selenium-standalone\lib\in
stall.js:386:12)
at Object.onceWrapper (events.js:315:30)
at emitOne (events.js:116:13)
at Request.emit (events.js:211:7)
at Request.onRequestError (C:\Framework\node_modules\request\request.js:845:
8)
at emitOne (events.js:116:13)
at ClientRequest.emit (events.js:211:7)
at TLSSocket.socketErrorListener (_http_client.js:387:9)
at emitOne (events.js:116:13)
at TLSSocket.emit (events.js:211:7)
Continue...
ERROR: connect ECONNREFUSED 127.0.0.1:4444
chrome
at new RuntimeError (C:\Framework\node_modules\webdriverio\build\lib\utils\E
rrorHandler.js:144:12)
at Request._callback (C:\Framework\node_modules\webdriverio\build\lib\utils
RequestHandler.js:327:43)
at self.callback (C:\Framework\node_modules\webdriverio\node_modules\request
\request.js:186:22)
at emitOne (events.js:116:13)
at Request.emit (events.js:211:7)
at Request.onRequestError (C:\Framework\node_modules\webdriverio\node_module
s\request\request.js:878:8)
at emitOne (events.js:121:20)
at ClientRequest.emit (events.js:211:7)
at Socket.socketErrorListener (_http_client.js:387:9)
at emitOne (events.js:116:13)
at Socket.emit (events.js:211:7)
at emitErrorNT (internal/streams/destroy.js:64:8)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickDomainCallback (internal/process/next_tick.js:218:9)
0 steps (0 passed, 0 failed, 0 pending)

Please report this error to the selenium-standalone. Thanks!


text:
Feature request: keys to open console

Exokit has shell support, as well as ndb, but it's hidden behind a shell invocation. It would be nice to have a Ctrl-Shift-I type hotkey to open a command console or debugger to debug the current app.

I did some reasearch + prototyping and the best path forward for this seems to be a light custom UI +  terminal (hterm), exposing chrome-remote-interface directly connected to Exokit's node.
Would like to use actual chrome devtools here, but unfortunately the frontend is very tied to chrome itself.

Also, this was suggested as being a good complement to a multi-app reality tabs environment, allowing each reality tab to be debugged in place in the world.

This seems to have been implemented in #670.

Yeah. Devtools needs work but that's probably the right framework of discussion for this feature request.

authors: chrislatorres modulesio

repo: webmixedreality/exokit


text:
Feature request: method to remove a tap

(I may make a PR for this eventually)
I know that tapable is mainly intended for plugins that are registered once at startup.  But this is the first package I turn to when I need something more powerful than an EventEmitter, since I can't do anything like an AsyncSeriesHook with EventEmitter.  Overall it's a pretty good general-purpose replacement.
However, one thing EventEmitter can do that tapable can't is remove hooks.  I have a few use cases where I would like to use tapable but I need to be able to remove the hooks at certain times.

Have you read this issue #71? One of the goal of tapable is to compile a static event emitter: callbacks are added to the hook and then the hook is called. If you add/remove callbacks, the hook must be compiled again and V8 has to reoptimize it.
I don't know what your use-case is but maybe async would be a better choice.

Yeah that's a good point, I had forgotten about that aspect of Tapable.  It's not that hard for me to
for (let listener of listeners) {
  await listener(foo, bar)
}

I just was looking for a preexisting class that manages the listener list itself.
So I guess I'll just write my own class to do it.
Thanks!

repo: webpack/tapable


text:
How are different module systems being used together?

I couldn't find an explanation for this anywhere: Not in the docs, not on the web, anywhere.
For example, the official getting started guide uses Lodash as an example library to import. The guide imports the library using the ES6 module syntax.
However, as of now, Lodash uses CommonJS module system to export stuff. I cannot understand how can webpack import stuff using ES6 module syntax from a module written in CommonJS syntax.
Had we used Babel, I would say that Babel is first transpiling the ES6 module syntax to CommonJS module syntax and hence, webpack is easily using these two different module syntaxes together, thanks to Babel.
Is webpack doing the same thing behind the scenes? Or is it doing something else? In any case, where can I find further information on it?

Please see my comment to your original question on #552.

Is webpack doing the same thing behind the scenes? Or is it doing something else? In any case, where can I find further information on it?

The short answer is yes, webpack supports multiple syntaxes out of the box. See that comment for links to the pages that discuss which ones are supported.

authors: skipjack ugultopu


text:
Update dev-server.md typo

Switches "it's" for "its".

Can you sign the CLA? Thanks.

@phlco: Don't forget to sign the CLA.

@phlco, ping!

@simon04 Maybe it's easier to redo this PR and close this one? I'm not sure what's the correct way to deal with cases like this. Trivial fix.

Let's give him/her one more chance to get his/her first PR accepted? I agree that it would be easier to redo the fix. :smile:

@simon04 Ok. Maybe we can agree on some period (a week?) for cases like this.

@simon04 @bebraw sorry I missed this! 🤕

@phlco No worries. 👍

authors: bebraw phlco simon04


text:
SyntaxError: Unexpected token :     at Module._compile (internal/modules/cjs/loader.js:723:23) Eventhough webpack is set correctly

I have installed webpack using npm and configured the config like follows :
module.exports = {
  module: {
    rules: [
      { test: /\.css$/, use: 'css-loader' },
      { test: /\.css$/, use: 'style-loader' }
    ]
  }
};

but when i import my bootstrap.css into my jsx file i get this error :

`SyntaxError: Unexpected token :     at Module._compile (internal/modules/cjs/loader.js:723:23)

Why ?
Thanks !

It looks like you just deleted our lovely crafted issue template. It was there for good reasons. Please help us solving your issue by answering the questions asked in this template. I'm closing this. Please either update the issue with the template and reopen, or open a new issue.

Here simple example https://github.com/webpack-contrib/css-loader#assets

repo: webpack/webpack


text:
Node global polyfill is broken by 'use strict'

I think I may have found an issue caused by how how Webpack polyfills global.
Here's what happened:

Lodash uses global in its code
We introduced Lodash as a dependency into Redux
I noticed that the UMD build (created with Webpack) is broken if transpiled another time with Babel

We could argue that transpiling UMD builds is wasteful but some people do that due to bad configurations, and we don't want to break them.
So why is the build broken? This happens because Webpack global polyfill emits code like this:
    /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))

This works as a polyfill in most cases but if you add 'use strict' at the top of the file, it will return undefined due to strict semantics. And Babel adds 'use strict'.
It would be nice if the global polyfill was resistant to 'use strict'. For example, Lodash uses Function('return this') as last resort, which is immune to strict semantics. However this may cause issues in restricted environments.
In practice, some combination of global checks might be helpful. Unfortunately I don't know enough about the ways to fix that, but hope it helps!

webpack emits non-strict code. You should not insert "use strict" at the top. This means: only use babel on ES6 code. The error is to run babel on the bundle. This could break other stuff too (that's why you shouldn't run the babel-loader on node_modules).
But anyway we can change the default to a more safe approach.
(function() { return this; }())
(1,eval)('this')
Function('return this')()
This mean more code and why better move it into a separate module instead of injecting it into every module.

This was fixed

This was fixed

@sokra can you expand on "this was fixed"? What version? Where is code? I'm having the same issue and I'm babel transpiling a node-module that has "use strict;" at the top of it.

https://github.com/webpack/webpack/commit/2ff9a247e242f716b8ad41da460ca57108617d36

only in webpack 2. If you want to backport it to webpack 1 feel free to send a PR.

that's why you shouldn't run the babel-loader on node_modules

@sokra hm, but if you want tree shaking to work then? Sorry for jumping into this issue like this.

authors: arb gaearon phun-ky sokra


text:
descriptionFiles  resolve only package.json webpack - 2

i have
module.exports = {
    entry: {index: "./index.js"},
    context: __dirname,
    output: {
        filename: "dist/[name].js"
    },
    resolve: {
        modules: [
            "bower_components",
            path.resolve('./'),
        ],
    },
    descriptionFiles: ["bower.json"],
    mainFields: ["main"],
    devServer: {
        host: "localhost",
        port: 3001,
    }
};

and this configuration not resolve files from main field in  bower.json.
But if using descriptionFiles: ["package.json"], it is work.
info:
webpack 2.1.0-beta.13

Please use StackOverflow for questions.
descriptionFiles and mainFields should be children of resolve.

authors: arshtepe sokra


text:
Webpack do not resolve aliases in dependencies

Bug report

What is the current behavior?
I have npm module which have aliases in package.json.
When I import/require this module in my app - I get errors:
Module not found: Error: ........... Can't resolve  Parsed request is a module ...........
I have to add aliaces from package.json of that module to webpack.config to make it works. But then it can break something in other modules or even in my app.
If the current behavior is a bug, please provide the steps to reproduce.

Init empty project.
Install dependency with aliases (f.e. npm i mosaico)
Import/Require module
Build

What is the expected behavior?
Webpack resolve aliases in package.json for dependencies

Other relevant information:
webpack version:  3.11.0
Node.js version: 8.11.2
Operating System: Ubuntu 16.04
Additional tools:

Was wrong ^_^


text:
[Webpack 5] getChunkFilenameRuntimeModule not respecting filename as a function

Bug report
What is the current behavior?
When output.filename is a function, an error is thrown during chunk generation in Webpack 5 on the "next" branch.
This happens because in https://github.com/webpack/webpack/blob/next/lib/runtime/GetChunkFilenameRuntimeModule.js#L180, the filename is being run through JSON.stringify. Removing the JSON.stringify wrapper seems to resolve the issue.
If the current behavior is a bug, please provide the steps to reproduce.
Chunked build with output.filename as a function.
What is the expected behavior?
This should be supported as in the docs.

Which webpack version?
There was a fix in https://github.com/webpack/webpack/releases/tag/v5.0.0-alpha.11

This was in alpha.12.

Yes that's a bug. I have a fix, but still need to create some more tests for this.

authors: guybedford sokra


text:
Compile angular app with Babel 7 either lead to buggy code or fails

First of all, i tried so many things, i'm wonder if i can find anything different on stack or other places.
As some tutorial i write some code, which were not much more than 10 line codes, but after getting n'th errors it get like this:
const path = require('path');

module.exports = {
    entry: {
        app: './../AshianeApp/dist/AshianeApp/main.7f761bb26029cb314ad9.js',
    },
    output: {
        path: path.resolve(__dirname, 'build'),
        filename: 'app.bundle.js'
    },
    module: {
        rules: [{
            test: /\.js?$/,
            exclude: /node_modules/,
            loader: 'babel-loader',
            options: {
                presets: ['@babel/preset-env'],
                // presets: ["@babel/preset-stage-2"],
                plugins: [
                    [
                        "@babel/plugin-transform-runtime",
                        {
                            "absoluteRuntime": false,
                            "corejs": false,
                            "helpers": true,
                            "regenerator": true,
                            "useESModules": false
                        }
                    ],
                    '@babel/plugin-transform-classes',
                    [
                        "@babel/plugin-proposal-decorators",
                        {
                            "legacy": true,
                        }
                    ],
                    "@babel/plugin-proposal-class-properties"
                ],
                // plugins: [
                //     // Stage 2
                //     ["@babel/plugin-proposal-decorators", { "legacy": true }],
                //     "@babel/plugin-proposal-function-sent",
                //     "@babel/plugin-proposal-export-namespace-from",
                //     "@babel/plugin-proposal-numeric-separator",
                //     "@babel/plugin-proposal-throw-expressions",

                //     // // Stage 3
                //     // "@babel/plugin-syntax-dynamic-import",
                //     // "@babel/plugin-syntax-import-meta",
                //     // ["@babel/plugin-proposal-class-properties", { "loose": false }],
                //     // "@babel/plugin-proposal-json-strings"
                //   ]
                compact: false
            }
        }]
    }
}

{
  "name": "my-babel-compiler",
  "version": "0.0.0",
  "description": "make project for google crawlers",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "build": "webpack"
  },
  "private": true,
  "dependencies": {
    "@babel/runtime": "^7.5.5"
  },
  "devDependencies": {
    "@babel/cli": "^7.5.5",
    "@babel/core": "^7.5.5",
    "@babel/node": "^7.5.5",
    "@babel/plugin-proposal-class-properties": "^7.5.5",
    "@babel/plugin-proposal-decorators": "^7.4.4",
    "@babel/plugin-proposal-export-namespace-from": "^7.5.2",
    "@babel/plugin-proposal-function-sent": "^7.5.0",
    "@babel/plugin-proposal-json-strings": "^7.2.0",
    "@babel/plugin-proposal-numeric-separator": "^7.2.0",
    "@babel/plugin-proposal-throw-expressions": "^7.2.0",
    "@babel/plugin-syntax-dynamic-import": "^7.2.0",
    "@babel/plugin-syntax-import-meta": "^7.2.0",
    "@babel/plugin-transform-classes": "^7.5.5",
    "@babel/plugin-transform-runtime": "^7.5.5",
    "@babel/preset-env": "^7.5.5",
    "@babel/preset-stage-2": "^7.0.0",
    "babel-loader": "^8.0.6",
    "babel-plugin-transform-builtin-classes": "^0.6.1",
    "babel-plugin-transform-class-properties": "^6.24.1",
    "babel-plugin-transform-es2015-arrow-functions": "^6.22.0",
    "babel-preset-env": "^1.7.0",
    "babel-preset-es2015": "^6.24.1",
    "nodemon": "^1.19.1",
    "webpack": "^4.39.1",
    "webpack-cli": "^3.3.6",
    "webpack-dev-server": "^3.7.2"
  }
}

What I am after:
Since google crawler generate error on Angular 7 compiled code, i wish to recompile it using babel.
Does it works?
It worked before my project exceed 500KB compilation size, then babel stop working, so after some research, i wished to launched it via compact: false flag.
I get any kind of errors... the file i'm looking to compile:
https://www.ashiane.house/main.7f761bb26029cb314ad9.js
it generate errors before compile like:
> my-babel-compiler@0.0.0 build F:\Project2017\S1\BaseProject\RealEstate\RealEstate\ClientApp\Babel
> webpack

F:\Project2017\S1\BaseProject\RealEstate\RealEstate\ClientApp\Babel\webpack.config.js:53
                compact: false
                ^^^^^^^

SyntaxError: Unexpected identifier
    at new Script (vm.js:80:7)
    at NativeCompileCache._moduleCompile (F:\Project2017\S1\BaseProject\RealEstate\RealEstate\ClientApp\Babel\node_modules\v8-compile-cache\v8-compile-cache.js:240:18)
    at Module._compile (F:\Project2017\S1\BaseProject\RealEstate\RealEstate\ClientApp\Babel\node_modules\v8-compile-cache\v8-compile-cache.js:186:36)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
    at Module.load (internal/modules/cjs/loader.js:600:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
    at Function.Module._load (internal/modules/cjs/loader.js:531:3)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (F:\Project2017\S1\BaseProject\RealEstate\RealEstate\ClientApp\Babel\node_modules\v8-compile-cache\v8-compile-cache.js:161:20)
    at WEBPACK_OPTIONS (F:\Project2017\S1\BaseProject\RealEstate\RealEstate\ClientApp\Babel\node_modules\webpack-cli\bin\utils\convert-argv.js:116:13)
    at requireConfig (F:\Project2017\S1\BaseProject\RealEstate\RealEstate\ClientApp\Babel\node_modules\webpack-cli\bin\utils\convert-argv.js:118:6)
    at F:\Project2017\S1\BaseProject\RealEstate\RealEstate\ClientApp\Babel\node_modules\webpack-cli\bin\utils\convert-argv.js:125:17
    at Array.forEach (<anonymous>)
    at module.exports (F:\Project2017\S1\BaseProject\RealEstate\RealEstate\ClientApp\Babel\node_modules\webpack-cli\bin\utils\convert-argv.js:123:15)
    at yargs.parse (F:\Project2017\S1\BaseProject\RealEstate\RealEstate\ClientApp\Babel\node_modules\webpack-cli\bin\cli.js:71:45)
    at Object.parse (F:\Project2017\S1\BaseProject\RealEstate\RealEstate\ClientApp\Babel\node_modules\webpack-cli\node_modules\yargs\yargs.js:567:18)
    at F:\Project2017\S1\BaseProject\RealEstate\RealEstate\ClientApp\Babel\node_modules\webpack-cli\bin\cli.js:49:8
    at Object.<anonymous> (F:\Project2017\S1\BaseProject\RealEstate\RealEstate\ClientApp\Babel\node_modules\webpack-cli\bin\cli.js:365:3)
    at Module._compile (internal/modules/cjs/loader.js:701:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
    at Module.load (internal/modules/cjs/loader.js:600:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
    at Function.Module._load (internal/modules/cjs/loader.js:531:3)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:22:18)
    at Object.<anonymous> (F:\Project2017\S1\BaseProject\RealEstate\RealEstate\ClientApp\Babel\node_modules\webpack\bin\webpack.js:156:2)
    at Module._compile (internal/modules/cjs/loader.js:701:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
    at Module.load (internal/modules/cjs/loader.js:600:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! my-babel-compiler@0.0.0 build: `webpack`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the my-babel-compiler@0.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Hassan\AppData\Roaming\npm-cache\_logs\2019-08-04T04_54_57_394Z-debug.log
PS F:\Project2017\S1\BaseProject\RealEstate\RealEstate\ClientApp\Babel> npm run build

> my-babel-compiler@0.0.0 build F:\Project2017\S1\BaseProject\RealEstate\RealEstate\ClientApp\Babel
> webpack

<--- Last few GCs --->

[8504:000001DD2A9C64A0]   442395 ms: Scavenge 1310.3 (1423.4) -> 1309.5 (1423.9) MB, 18.3 / 0.0 ms  (average mu = 0.248, current mu = 0.237) allocation failure
[8504:000001DD2A9C64A0]   442419 ms: Scavenge 1310.4 (1423.9) -> 1309.6 (1424.4) MB, 10.3 / 0.0 ms  (average mu = 0.248, current mu = 0.237) allocation failure
[8504:000001DD2A9C64A0]   442436 ms: Scavenge 1310.5 (1424.4) -> 1309.6 (1424.9) MB, 7.5 / 0.0 ms  (average mu = 0.248, current mu = 0.237) allocation failure

<--- JS stacktrace --->

==== JS stack trace =========================================

    0: ExitFrame [pc: 00000148F4CDC5C1]
Security context: 0x03665291e6e9 <JSObject>
    1: m(aka m) [000003FD0B912B09] [F:\Project2017\S1\BaseProject\RealEstate\RealEstate\ClientApp\Babel\node_modules\terser\dist\bundle.min.js:~1] [pc=00000148F5E4ED87](this=0x01596b3826f1 <undefined>,t=0x03657e351669
<String[2]: t0>,n=0x00e0fc882521 <String[1]: ">)
    2: print_string [000003FD0B912B49] [F:\Project2017\S1\BaseProject\RealEstate\RealEstate...

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
 1: 00007FF74531F04A v8::internal::GCIdleTimeHandler::GCIdleTimeHandler+5114
 2: 00007FF7452FA0C6 node::MakeCallback+4518
 3: 00007FF7452FAA30 node_module_register+2032
 4: 00007FF7455820EE v8::internal::FatalProcessOutOfMemory+846
 5: 00007FF74558201F v8::internal::FatalProcessOutOfMemory+639
 6: 00007FF745AA2BC4 v8::internal::Heap::MaxHeapGrowingFactor+9556
 7: 00007FF745A99C46 v8::internal::ScavengeJob::operator=+24310
 8: 00007FF745A9829C v8::internal::ScavengeJob::operator=+17740
 9: 00007FF745AA0F87 v8::internal::Heap::MaxHeapGrowingFactor+2327
10: 00007FF745AA1006 v8::internal::Heap::MaxHeapGrowingFactor+2454
11: 00007FF74565CDB7 v8::internal::Factory::NewFillerObject+55
12: 00007FF7456F2CC6 v8::internal::WasmJs::Install+29414
13: 00000148F4CDC5C1
npm ERR! code ELIFECYCLE
npm ERR! errno 134
npm ERR! my-babel-compiler@0.0.0 build: `webpack`
npm ERR! Exit status 134
npm ERR!
npm ERR! Failed at the my-babel-compiler@0.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Hassan\AppData\Roaming\npm-cache\_logs\2019-08-04T05_03_48_709Z-debug.log

, or either after compile:

ReferenceError: regeneratorRuntime is not defined

Any idea how to do it like the babel website? just with extra compact: false flag? it's my 3rd day searching, and i'm really tired of this :|

Please submit support requests and questions to StackOverflow using the tag [webpack]. StackOverflow is better suited for this kind of support. The issue tracker is for bug reports and feature discussions. See also our CONTRIBUTING guidelines.

stack overflow is the kind of community that banish people who ask question that doesn't bring much attention to the stack domains... and since there are so many question in this field, although this one wasn't there, i'm on the edge of getting ban, so i rather not ask question who no ones knows about, no one will answer, and few may read.

authors: deadmann sokra


text:
Check block dependencies length instead of its presence

Bug report

If the current behavior is a bug, please provide the steps to reproduce.
I'm exploring source code of webpack and found such lines:
https://github.com/webpack/webpack/blob/84f541fc86129f94f39148a5ec2fc824857e3ae2/lib/buildChunkGraph.js#L116
https://github.com/webpack/webpack/blob/84f541fc86129f94f39148a5ec2fc824857e3ae2/lib/buildChunkGraph.js#L122
If I'm not mistaken these two variables always exists but sometimes they can be empty arrays. So such condition is always true.

What is the expected behavior?
Conditions checks not variables itself (or not only) but length or array, something like
if (block.dependencies.length) {
	for (const dep of block.dependencies) iteratorDependency(dep);
}

Can I make a PR to fix this small bug?

Other relevant information:
webpack version:  master branch
Node.js version: v10.15.1
Operating System: MacOS X 10.14.6
Additional tools:

Not sure this is related but stated having this issue this morning when I changed some text inside a html file.(coincidence?) now any branch in my project has this same issues. it's a ionic 3 project
[Error] ERROR – Error: Uncaught (in promise): TypeError: undefined is not an object (evaluating 'modules[moduleId].call')
__webpack_require__@http://localhost:8100/build/vendor.js:55:29
http://localhost:8100/build/main.js:8548:29
onInvoke@http://localhost:8100/build/vendor.js:5134:39
http://localhost:8100/build/polyfills.js?__WB_REVISION__=443c697fc904cd88a651d09cf5c2fe2b:3:10149
http://localhost:8100/build/polyfills.js?__WB_REVISION__=443c697fc904cd88a651d09cf5c2fe2b:3:20245
onInvokeTask@http://localhost:8100/build/vendor.js:5125:43
http://localhost:8100/build/polyfills.js?__WB_REVISION__=443c697fc904cd88a651d09cf5c2fe2b:3:10844
o@http://localhost:8100/build/polyfills.js?__WB_REVISION__=443c697fc904cd88a651d09cf5c2fe2b:3:7901
promiseReactionJob@[native code]
Error: Uncaught (in promise): TypeError: undefined is not an object (evaluating 'modules[moduleId].call')
__webpack_require__@http://localhost:8100/build/vendor.js:55:29
http://localhost:8100/build/main.js:8548:29
onInvoke@http://localhost:8100/build/vendor.js:5134:39
http://localhost:8100/build/polyfills.js?__WB_REVISION__=443c697fc904cd88a651d09cf5c2fe2b:3:10149
http://localhost:8100/build/polyfills.js?__WB_REVISION__=443c697fc904cd88a651d09cf5c2fe2b:3:20245
onInvokeTask@http://localhost:8100/build/vendor.js:5125:43
http://localhost:8100/build/polyfills.js?__WB_REVISION__=443c697fc904cd88a651d09cf5c2fe2b:3:10844
o@http://localhost:8100/build/polyfills.js?__WB_REVISION__=443c697fc904cd88a651d09cf5c2fe2b:3:7901
promiseReactionJob@[native code]
	defaultErrorLogger (vendor.js:1823)
	(anonymous function) (vendor.js:1884)
	(anonymous function) (vendor.js:169846)
	(anonymous function) (main.js:19874)
	next (vendor.js:5882:148)
	(anonymous function) (vendor.js:4716)
	(anonymous function) (vendor.js:24150)
	(anonymous function) (vendor.js:24097)
	(anonymous function) (vendor.js:24037)
	(anonymous function) (vendor.js:24001)
	(anonymous function) (vendor.js:26733)
	(anonymous function) (vendor.js:4696)
	(anonymous function) (polyfills.js:3:10150)
	onHandleError (vendor.js:5156)
	(anonymous function) (polyfills.js:3:10410)
	(anonymous function) (polyfills.js:3:21024)
	(anonymous function) (polyfills.js:3:21061)
	o (polyfills.js:3:8009)
	promiseReactionJob

Other relevant information:
Node.js version:  v10.16.0
Operating System: MacOS X 10.14.6

authors: JamesLeeTrigg goganchic


text:
chore(JavascriptParser.js): Minor enhancements

What kind of change does this PR introduce?
refactoring

Did you add tests for your changes?
Nope

Does this PR introduce a breaking change?
Nope

What needs to be documented once your changes are merged?
Nothing

Thanks


text:
fix: some typos

What kind of change does this PR introduce?
typo fix

Did you add tests for your changes?
NA

Does this PR introduce a breaking change?
no

What needs to be documented once your changes are merged?
nothing

Thanks


text:
chore: update some descriptions for CLI help output

What kind of change does this PR introduce?
refactor, needed for https://github.com/webpack/webpack-cli/pull/1801
webpack --help wasn't working anymore probably due to the presence of { in these descriptions.

Did you add tests for your changes?
Yes updated CLI snapshot.

Does this PR introduce a breaking change?
No

What needs to be documented once your changes are merged?
Nothing

@snitin315 I think we should investigate why it was broken in chalk, because using example of code in help is normal

@evilebottnawi  I did some more research and found a similar issue https://github.com/Polymer/tools/issues/595 and PR https://github.com/Polymer/tools/pull/612/

Escaping characters works well, hence closing.


text:
Fix types. Set ProgressPlugin options optional

What kind of change does this PR introduce?
bugfix
Did you add tests for your changes?
Not required.

Does this PR introduce a breaking change?
No.
What needs to be documented once your changes are merged?
Not required

You should do it inside JSDocs https://github.com/webpack/webpack/blob/master/lib/ProgressPlugin.js#L109 and run yarn special-lint-fix

You should do it inside JSDocs https://github.com/webpack/webpack/blob/master/lib/ProgressPlugin.js#L109 and run yarn special-lint-fix

Thanks @alexander-akait . Will update.

Thanks @alexander-akait . Will update.

Thanks

Thanks

authors: alexander-akait sibiraj-s sokra


text:
fix modules concatenation with importModule usage

What kind of change does this PR introduce?
bugfix

Did you add tests for your changes?
yes

Does this PR introduce a breaking change?
no

What needs to be documented once your changes are merged?
nothing

Thasnk

authors: sokra vankop


text:
[Test] simplify .wat code for finalize-exports-issue-8261 test

To fix @xtuc comment in previous PR: https://github.com/webpack/webpack/pull/8266/files/035ceb6b1b9b14fe7c3c0da2738cd5d5e2ecf24b#diff-373fad072502d91acb95b26d85c95b7e

What kind of change does this PR introduce?
minor readability improvement

Did you add tests for your changes?
It's test itself

Does this PR introduce a breaking change?
No

What needs to be documented once your changes are merged?
Nothing

Thanks

authors: ljqx sokra


text:
False positive for dev dependency listed in jest config

I am running knip on a TS application with the following knip & jest files:
knip.json
{
  "$schema": "https://unpkg.com/knip@5/schema.json",
  "entry": ["src/server.ts", "src/commands/command.ts", "test/**/*.ts", "!test/mocks/**/*"],
  "paths": {
    "@/src/*": ["./src/*"],
    "@/test/*": ["./test/*"]
  },
  "project": ["src/**/*.ts", "test/**/*.ts"],
  "husky": {
    "config": [".husky/pre-commit"]
  },
  "prettier": {
    "config": [".prettierrc"]
  },
  "eslint": {
    "config": [".eslintrc"]
  },
  "jest": {
    "config": ["jest.config.js"]
  },
  "ignoreDependencies": ["@instana/collector", "@side/jest-runtime"]
}

jest.config.js
const { pathsToModuleNameMapper } = require('ts-jest');
const { compilerOptions } = require('./tsconfig.json');

module.exports = {
  transform: {
    '^.+\\.ts$': '@swc/jest',
  },
  clearMocks: true,
  runtime: '@side/jest-runtime',
  testEnvironment: 'node',
  testPathIgnorePatterns: ['node_modules', 'dist'],
  verbose: false,
  collectCoverage: true,
  coverageReporters: ['clover', 'json', 'lcov', 'text', 'text-summary'],
  globalSetup: '<rootDir>/test/jest/globalSetup.ts',
  globalTeardown: '<rootDir>/test/jest/globalTeardown.ts',
  setupFiles: ['<rootDir>/test/jest/setupTests.ts'],
  moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths, { prefix: '<rootDir>/' }),
};

I am getting a false positive, claiming @side/jest-runtime is an unused dev dependency, but is is mentioned in the jest config under the runtime key

Thanks for the report, @mountEvarus.
This is the Jest plugin: https://github.com/webpro/knip/blob/main/packages/knip/src/plugins/jest/index.ts
Any chance you're up for a PR? No worries if not!

:rocket: This issue has been resolved in v5.36.2. See Release 5.36.2 for release notes.
Using Knip in a commercial project? Please consider becoming a sponsor.

authors: mountEvarus webpro

repo: webpro-nl/knip

license: ISC


text:
📘 Add package manager commands in command examples to be consistent

Link
https://knip.dev/overview/configuration#location
Description of the issue
Problem: There are different package manager commands in the installation section of Getting Started, and the user can switch between the packages managers they are using. In order to be more consistent across documentations, adding this switching is helpful for new users to copy and paste.
Solution: We should make a command example to be able to switch between package managers. This is the example, which I changed in the configuration page of the Overview.
Before (current, got knip command not found in my terminal)

After (switch by package manager)

Thanks Norifumi! I like your suggestion, but I think we need to modify it to either one of these:

npx knip --config path/to/knip.json
npm run knip -- --config path/to/knip.json

I'm leaning towards the first one, what do you think?

@webpro Thanks for the quick reply. I agree with you that npx knip --config path/to/knip.json is better since there is no assumption of npm installation. Can I create PR for this ?

That would be swell! Thank you in advance.

Actually, I have seconds thoughts on this: all commands might go into package.json#scripts and there we don't need any of npx etc. Those command examples in the documentation are concise and minimal just to show the essence of that section. So I think no pull request is necessary here :)

@webpro Got it thanks. Closing this issue.

authors: FumiKimura webpro


text:
Add Tokio Console integration to reflect example

⚠ This PR shouldn't be merged ⚠
This PR illustrates what I think is a problem that I've discovered with the number of polls on the task spawned to handle Operations. For some reason this task gets polled extremely excessively(at least on my machine).
Steps to reproduce

Compile the reflect example RUSTFLAGS="--cfg tokio_unstable" cargo build --release --example reflect
Start tokio-console in a different tab with tokio-console.
Follow the instructions from the README.md to start reflecting video and/or audio.
Look at the polls on the operations task in tokio-console.

Example
Here's an example from when I left the demo run for a while.

Note how the task spawned at <cargo>/webrtc-0.4.0/src/peer_connection/operation/mod.rs:41:9 has been polled millions of times after only running for a few minutes.
This is the task in question:
https://github.com/webrtc-rs/webrtc/blob/master/src/peer_connection/operation/mod.rs#L92-L114
There recv call isn't actually returning anything other than a few times at the start of the program, but the polling continues.

We have migrated this crate to the monorepo(webrtc-rs/webrtc) please re-open this pull request over there.
I opened https://github.com/webrtc-rs/webrtc/issues/249 to track it

repo: webrtc-rs/examples


text:
Make RTCRtpTransceiver.mid spec-compliant

The current implementation is:
pub struct RTCRtpTransceiver {
    mid: Mutex<String>,                           //atomic.Value
    sender: Mutex<Option<Arc<RTCRtpSender>>>,     //atomic.Value
    receiver: Mutex<Option<Arc<RTCRtpReceiver>>>, //atomic.Value
    ...
}

Essentially, the empty string is used instead of None (Option<String>).
This PR makes the behavior of mid explicitly optional, and also replaces Mutex with OnceCell.

ping @k0nserv

repo: webrtc-rs/webrtc


text:
Added a quiet mode

I was testing a service that pinged a lot, and would interrupt typing, so I added a flag -q, --quiet that would silence the ping control frame (pong and close control frames handled same as usual) from the console.
May be useful for others 🤷♂ 😄

Thank you for the PR. Some thoughts:

I think --quiet is not a good name for the option. It's too general when in reality it only prevents ping messages from being printed.
A server or client could spam pong frames for no particular reason so I think the option should also silence the pong messages or we need two separate options, one for pings and one for pongs.
Doesn't this also happen with data messages? If the other peer sends a lot messages while the user is typing, doesn't it cause the same problem?

Agreed about wording, but also didn't want it to be too long (i.e .--silence-incoming-pings) any suggestions? 😅
A server could spam pongs, but I was under the impression that the tool was geared towards debugging and so if it is spamming pongs when you aren't pinging then it is a bug... would you ever want to silence it?

At the same time wouldn't hurt to have, but should not be under the same flag. I am testing a service that will ping often and I don't need to know, just pong back, but when I ping I want to ensure it pongs me.

Unsure, I have not tested with incoming messages; probably would but unsure how to handle... before ping store what is being written and write it back out in the correct order after?...

My point is, if this happens with everything that is written (data messages, pings, pongs) why is this only take into account pings? Not sure if it's possible or how hard it will be but isn't it better to try to solve the issue differently? Ideally what is written should not mess up user input.

Perhaps a slightly different view of the same problem. To me, ping/pongs are part of the underlying protocol. In the same way I don't see the HTTP upgrade request, I don't want to see the websocket control frames in normal operation. Based on that, perhaps another option for verbose control frames? By default, no control frames are printed but --verbose-control-frames would enable it. This would then include all control frames, which currently there are only three defined (as far as I know). Close, Ping & Pong.
Does that make sense?

authors: jonbo372 lpinca nebloc

repo: websockets/wscat


text:
🛑 Member Genesis is down

In 3b0d7b7, Member Genesis (https://www.membergenesis.com) was down:

HTTP code: 500
Response time: 16755 ms

Resolved: Member Genesis is back up in 3b0354a.

repo: webworldview/uptime


text:
🛑 Jeff with Susan is down

In c0dcea7, Jeff with Susan (https://www.jeffwithsusan.com) was down:

HTTP code: 521
Response time: 169 ms

Resolved: Jeff with Susan is back up in 9a6df3f after 16 minutes.


text:
Test

Summary by CodeRabbit

New Features

Introduced automation for packaging and releasing the repository using GitHub Actions.
Added functionality to handle file extensions based on MIME types for emoticon and image messages.

Improvements

Updated the version of the "wechaty-puppet-wechat4u" package to 1.14.16.

:rocket:
This description was created by Ellipsis for commit 9f416d747139216be64a134aea904e8ae773872a

Summary:
This PR updates workflows, refactors code for message handling, and introduces a utility for MIME type to file extension mapping, alongside a version bump.
Key points:

Removed .github/workflows/npm.yml
Added .github/workflows/pack.yml for handling package and release on tag push
Updated package.json version to 1.14.16
Refactored src/puppet-wechat4u.ts:

Removed emotion message parsing
Utilized new utility function for file extension determination

Added new utility file src/wechat4u/utils/mim-to-extension.ts for mapping MIME types to file extensions

Generated with :heart: by ellipsis.dev

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.xleat seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.

Subject: Please Ignore the Pull Request
Dear [Repository Owner/Team],
I hope this message finds you well.
I accidentally made a pull request to your repository after forking and making some modifications. It was an error on my part, and I kindly ask you to ignore this pull request. I apologize for any inconvenience this may have caused.
Thank you for your understanding.
Best regards

authors: CLAassistant areidx


text:
Question about save scan payload.

I found that after login event we can still received the old scan payload in scan event. It seems that something wrong with
puppet.on('login', _      => { scanPayload = undefined })

And then it will emit scan event with the expired QR code.
/**
 * If `scanPayload` is not undefined, then we emit it to downstream immediatelly
 */
if (scanPayload) {
  eventStreamManager.grpcEmit(EventType.EVENT_TYPE_SCAN, scanPayload)
}

Key Logs
14:12:06 VERB EventStreamManager grpcEmit(EVENT_TYPE_LOGIN[25], {"contactId":"wxid_1v6owwa1vnvj12"})

14:12:18 VERB EventStreamManager grpcEmit(EVENT_TYPE_LOGIN[25], {"contactId":"wxid_1v6owwa1vnvj12"})
14:12:18 VERB EventStreamManager grpcEmit(EVENT_TYPE_SCAN[22], {"qrcode":"http://weixin.qq.com/x/w85V_c5Wup7ecgMGZdgD","status":2})

Detail Logs
14:09:37 SILL
      ==================================
      Inject WeChat By New Client : 118
      ==================================

14:09:37 VERB Bridge initWeChatSocket()
14:09:37 VERB Bridge getConnectCallback()
14:09:37 VERB Bridge getCloseCallback()
14:09:37 VERB Bridge getEventCallback()
14:09:37 VERB Donut(ffi-adapter) InitWeChatSocket(>,��>,�h>)
14:09:37 VERB ffi-adapter Backend.lib(0: "Z:\juzi\node_modules\@juzibot\wechaty-puppet-donut\dlls\WxLoader.dll")
14:09:37 SILL StateSwitch <PuppetDonut> on() is pending
14:09:37 VERB StateSwitch <PuppetDonut> on(true) <- (pending)
14:09:37 VERB Wechaty on(heartbeat, function) registered
14:09:37 VERB Wechaty addListenerFunction(heartbeat)
14:09:37 SILL StateSwitch <Wechaty> on() is pending
14:09:37 VERB StateSwitch <Wechaty> on(true) <- (pending)
14:09:37 VERB IoClient startHostie()
14:09:37 VERB PuppetServer constructor({endpoint: "0.0.0.0:8821", puppet: "Puppet#0<PuppetDonut>(donut-test-user-5001)", token: "donut-test-user-5001"})
14:09:37 VERB PuppetServer start()
14:09:37 VERB EventStreamManager constructor(Puppet#0<PuppetDonut>(donut-test-user-5001))
14:09:37 SILL StateSwitch <IoClient> on() is pending
14:09:37 VERB StateSwitch <IoClient> on(true) <- (pending)
14:09:37 SILL Io initWebSocket() ws.on(message): {"name":"sys","payload":"registered"}
14:09:37 SILL Io initWebSocket() ws.on(message): {"name":"sys","payload":"roger"}
14:09:37 SILL ConnectCallback: 1
14:09:37 VERB Bridge processEvent(DEBUG_LOG)
14:09:37 SILL debug log: "Client[1] is Connected!!!"

[0629/070938:INFO:exception_record.cc(518)] [QB]Process ID: 118 Type: 1
[0629/070938:ERROR:network_change_notifier_win.cc(156)] WSALookupServiceBegin failed with: 8
14:09:38 VERB Bridge processEvent(RECV_QRCODE_MSG)
14:09:38 VERB PuppetDonut onScan(2, http://weixin.qq.com/x/w85V_c5Wup7ecgMGZdgD)
14:09:38 INFO IoClient [2] http://weixin.qq.com/x/w85V_c5Wup7ecgMGZdgD
14:09:38 SILL Io send({"name":"scan","payload":{"qrcode":"http://weixin.qq.com/x/w85V_c5Wup7ecgMGZdgD","status":2}})
14:09:38 VERB Bridge processEvent(UNREAD_MSG_COUNT_CHANGE_MSG)
14:09:38 WARN Bridge onEvent() Unknown EventType: 11088, payload : {"login_hwnd":65680,"login_shadow_hwnd":65708,"main_hwnd":0,"main_shadow_hwnd":0,"pid":118}
14:09:38 SILL Io initWebSocket() ws.on(message): {"name":"sys","payload":"roger"}
14:09:43 SILL Io initWebSocket() ws.on(message): {"name":"jsonrpc","payload":{"id":-9007199254740785,"jsonrpc":"2.0","method":"getHostieGrpcPort"}}
14:09:43 INFO Io on(jsonrpc): [object Object]
14:09:43 VERB Io on(jsonrpc) send({"id":-9007199254740785,"jsonrpc":"2.0","result":8821})
14:09:43 SILL Io send({"name":"jsonrpc","payload":{"id":-9007199254740785,"jsonrpc":"2.0","result":8821}})
14:09:44 SILL Io initWebSocket() ws.on(message): {"name":"sys","payload":"roger"}
14:09:44 VERB PuppetServiceImpl start()
14:09:44 VERB PuppetDonut start()
14:09:44 SILL StateSwitch <PuppetDonut> on() is true
14:09:44 WARN PuppetDonut start() is called on a ON puppet. await ready(on) and return.
14:09:44 VERB StateSwitch <PuppetDonut> ready(on, false)
14:09:44 SILL StateSwitch <PuppetDonut> ready(on, false) resolved.
14:09:44 VERB PuppetServiceImpl event()
14:09:44 VERB EventStreamManager start(stream)
14:09:44 VERB EventStreamManager connectPuppetEventToStreamingCall() for Puppet#0<PuppetDonut>(donut-test-user-5001)
14:09:44 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(friendship) (listenerCount:1) registering...
14:09:44 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(login) (listenerCount:2) registering...
14:09:44 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(logout) (listenerCount:1) registering...
14:09:44 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(message) (listenerCount:1) registering...
14:09:44 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(room-invite) (listenerCount:1) registering...
14:09:44 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(room-join) (listenerCount:1) registering...
14:09:44 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(room-leave) (listenerCount:1) registering...
14:09:44 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(room-topic) (listenerCount:1) registering...
14:09:44 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(scan) (listenerCount:2) registering...
14:09:44 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(dong) (listenerCount:1) registering...
14:09:44 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(error) (listenerCount:1) registering...
14:09:44 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(heartbeat) (listenerCount:2) registering...
14:09:44 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(ready) (listenerCount:1) registering...
14:09:44 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(reset) (listenerCount:1) registering...
14:09:44 VERB EventStreamManager onStreamingCallEnd(callback)
14:09:44 VERB EventStreamManager grpcEmit(EVENT_TYPE_SCAN[22], {"qrcode":"http://weixin.qq.com/x/w85V_c5Wup7ecgMGZdgD","status":2})
14:09:45 SILL Io start() setInterval() ws.ping()
14:09:55 SILL Io start() setInterval() ws.ping()
14:10:05 SILL Io start() setInterval() ws.ping()
14:10:15 SILL Io start() setInterval() ws.ping()
14:10:25 SILL Io start() setInterval() ws.ping()
14:10:35 SILL Io start() setInterval() ws.ping()
14:10:44 VERB PuppetServiceImpl stop()
14:10:44 VERB EventStreamManager stop()
14:10:44 VERB EventStreamManager this.onStreamingCallEnd() this.eventStream.on(finish) fired
14:10:44 VERB EventStreamManager connectPuppetEventToStreamingCall() unconnect() 13 callbacks
14:10:44 VERB PuppetDonut stop()
14:10:44 SILL StateSwitch <PuppetDonut> off() is false
14:10:44 SILL StateSwitch <PuppetDonut> off() is false
14:10:44 VERB StateSwitch <PuppetDonut> off(pending) <- (false)
14:10:44 VERB PuppetDonut stopBridge()
14:10:44 SILL StateSwitch <PuppetDonut> on() is false
14:10:44 VERB Bridge stop()
14:10:44 VERB CacheManager release()
14:10:44 VERB CacheManager release() CacheManager not exist, no need to release it.
14:10:44 SILL StateSwitch <PuppetDonut> off() is pending
14:10:44 VERB StateSwitch <PuppetDonut> off(true) <- (pending)
14:10:45 SILL Io initWebSocket() ws.on(message): {"name":"jsonrpc","payload":{"id":-9007199254740782,"jsonrpc":"2.0","method":"getHostieGrpcPort"}}
14:10:45 INFO Io on(jsonrpc): [object Object]
14:10:45 VERB Io on(jsonrpc) send({"id":-9007199254740782,"jsonrpc":"2.0","result":8821})
14:10:45 SILL Io send({"name":"jsonrpc","payload":{"id":-9007199254740782,"jsonrpc":"2.0","result":8821}})
14:10:45 SILL Io initWebSocket() ws.on(message): {"name":"sys","payload":"roger"}
14:10:45 VERB PuppetServiceImpl start()
14:10:45 VERB PuppetDonut start()
14:10:45 SILL StateSwitch <PuppetDonut> on() is false
14:10:45 SILL StateSwitch <PuppetDonut> on() is false
14:10:45 VERB StateSwitch <PuppetDonut> on(pending) <- (false)
14:10:45 VERB PuppetDonut startBridge()
14:10:45 SILL StateSwitch <PuppetDonut> off() is false
14:10:45 VERB Bridge initWeChatSocket()
14:10:45 VERB Bridge getConnectCallback()
14:10:45 VERB Bridge getCloseCallback()
14:10:45 VERB Bridge getEventCallback()
14:10:45 VERB Donut(ffi-adapter) InitWeChatSocket(�(>,��>,��>)
14:10:45 VERB ffi-adapter Backend.lib(0: "Z:\juzi\node_modules\@juzibot\wechaty-puppet-donut\dlls\WxLoader.dll")
14:10:45 VERB PuppetServiceImpl event()
14:10:45 VERB EventStreamManager start(stream)
14:10:45 VERB EventStreamManager connectPuppetEventToStreamingCall() for Puppet#0<PuppetDonut>(donut-test-user-5001)
14:10:45 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(friendship) (listenerCount:0) registering...
14:10:45 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(login) (listenerCount:0) registering...
14:10:45 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(logout) (listenerCount:0) registering...
14:10:45 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(message) (listenerCount:0) registering...
14:10:45 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(room-invite) (listenerCount:0) registering...
14:10:45 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(room-join) (listenerCount:0) registering...
14:10:45 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(room-leave) (listenerCount:0) registering...
14:10:45 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(room-topic) (listenerCount:0) registering...
14:10:45 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(scan) (listenerCount:0) registering...
14:10:45 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(dong) (listenerCount:0) registering...
14:10:45 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(error) (listenerCount:0) registering...
14:10:45 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(heartbeat) (listenerCount:0) registering...
14:10:45 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(ready) (listenerCount:0) registering...
14:10:45 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(reset) (listenerCount:0) registering...
14:10:45 VERB EventStreamManager onStreamingCallEnd(callback)
14:10:45 VERB EventStreamManager grpcEmit(EVENT_TYPE_SCAN[22], {"qrcode":"http://weixin.qq.com/x/w85V_c5Wup7ecgMGZdgD","status":2})
14:10:45 SILL StateSwitch <PuppetDonut> on() is pending
14:10:45 VERB StateSwitch <PuppetDonut> on(true) <- (pending)
14:10:45 SILL Io start() setInterval() ws.ping()
14:10:55 SILL Io start() setInterval() ws.ping()
14:11:05 SILL Io start() setInterval() ws.ping()
14:11:15 SILL Io start() setInterval() ws.ping()
14:11:25 SILL Io start() setInterval() ws.ping()
14:11:35 SILL Io start() setInterval() ws.ping()
14:11:45 VERB PuppetServiceImpl stop()
14:11:45 VERB EventStreamManager stop()
14:11:45 VERB EventStreamManager this.onStreamingCallEnd() this.eventStream.on(finish) fired
14:11:45 VERB EventStreamManager connectPuppetEventToStreamingCall() unconnect() 13 callbacks
14:11:45 VERB PuppetDonut stop()
14:11:45 SILL StateSwitch <PuppetDonut> off() is false
14:11:45 SILL StateSwitch <PuppetDonut> off() is false
14:11:45 VERB StateSwitch <PuppetDonut> off(pending) <- (false)
14:11:45 VERB PuppetDonut stopBridge()
14:11:45 SILL StateSwitch <PuppetDonut> on() is false
14:11:45 VERB Bridge stop()
14:11:45 VERB CacheManager release()
14:11:45 VERB CacheManager release() CacheManager not exist, no need to release it.
14:11:45 SILL StateSwitch <PuppetDonut> off() is pending
14:11:45 VERB StateSwitch <PuppetDonut> off(true) <- (pending)
14:11:45 SILL Io start() setInterval() ws.ping()
14:11:46 SILL Io initWebSocket() ws.on(message): {"name":"jsonrpc","payload":{"id":-9007199254740779,"jsonrpc":"2.0","method":"getHostieGrpcPort"}}
14:11:46 INFO Io on(jsonrpc): [object Object]
14:11:46 VERB Io on(jsonrpc) send({"id":-9007199254740779,"jsonrpc":"2.0","result":8821})
14:11:46 SILL Io send({"name":"jsonrpc","payload":{"id":-9007199254740779,"jsonrpc":"2.0","result":8821}})
14:11:46 SILL Io initWebSocket() ws.on(message): {"name":"sys","payload":"roger"}
14:11:46 VERB PuppetServiceImpl start()
14:11:46 VERB PuppetDonut start()
14:11:46 SILL StateSwitch <PuppetDonut> on() is false
14:11:46 SILL StateSwitch <PuppetDonut> on() is false
14:11:46 VERB StateSwitch <PuppetDonut> on(pending) <- (false)
14:11:46 VERB PuppetDonut startBridge()
14:11:46 SILL StateSwitch <PuppetDonut> off() is false
14:11:46 VERB Bridge initWeChatSocket()
14:11:46 VERB Bridge getConnectCallback()
14:11:46 VERB Bridge getCloseCallback()
14:11:46 VERB Bridge getEventCallback()
14:11:46 VERB Donut(ffi-adapter) InitWeChatSocket(�H>,>,��>)
14:11:46 VERB ffi-adapter Backend.lib(0: "Z:\juzi\node_modules\@juzibot\wechaty-puppet-donut\dlls\WxLoader.dll")
14:11:46 VERB PuppetServiceImpl event()
14:11:46 VERB EventStreamManager start(stream)
14:11:46 VERB EventStreamManager connectPuppetEventToStreamingCall() for Puppet#0<PuppetDonut>(donut-test-user-5001)
14:11:46 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(friendship) (listenerCount:0) registering...
14:11:46 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(login) (listenerCount:0) registering...
14:11:46 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(logout) (listenerCount:0) registering...
14:11:46 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(message) (listenerCount:0) registering...
14:11:46 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(room-invite) (listenerCount:0) registering...
14:11:46 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(room-join) (listenerCount:0) registering...
14:11:46 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(room-leave) (listenerCount:0) registering...
14:11:46 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(room-topic) (listenerCount:0) registering...
14:11:46 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(scan) (listenerCount:0) registering...
14:11:46 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(dong) (listenerCount:0) registering...
14:11:46 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(error) (listenerCount:0) registering...
14:11:46 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(heartbeat) (listenerCount:0) registering...
14:11:46 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(ready) (listenerCount:0) registering...
14:11:46 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(reset) (listenerCount:0) registering...
14:11:46 VERB EventStreamManager onStreamingCallEnd(callback)
14:11:46 VERB EventStreamManager grpcEmit(EVENT_TYPE_SCAN[22], {"qrcode":"http://weixin.qq.com/x/w85V_c5Wup7ecgMGZdgD","status":2})
14:11:46 SILL StateSwitch <PuppetDonut> on() is pending
14:11:46 VERB StateSwitch <PuppetDonut> on(true) <- (pending)
14:11:55 SILL Io start() setInterval() ws.ping()
14:12:05 SILL Io start() setInterval() ws.ping()
14:12:06 VERB Bridge processEvent(UNREAD_MSG_COUNT_CHANGE_MSG)
14:12:06 WARN Bridge onEvent() Unknown EventType: 11088, payload : {"login_hwnd":0,"login_shadow_hwnd":0,"main_hwnd":131256,"main_shadow_hwnd":196818,"pid":118}
14:12:06 VERB Bridge processEvent(USER_LOGIN)
14:12:06 SILL init cache manager
14:12:06 VERB CacheManager init()
14:12:06 VERB CacheManager initCache(wxid_1v6owwa1vnvj12)
14:12:06 VERB CacheManager initCache() inited [object Promise] Contacts,  cachedir="C:\users\user\.wechaty\puppet-donut-cache\flash-store-v0.12\wxid_1v6owwa1vnvj12"
14:12:06 VERB PuppetDonut onLogin(wxid_1v6owwa1vnvj12)
14:12:06 VERB Puppet selfId()
14:12:06 VERB EventStreamManager grpcEmit(EVENT_TYPE_LOGIN[25], {"contactId":"wxid_1v6owwa1vnvj12"})
=======================================================================================
SKIP USELESS LOGS
=======================================================================================
14:12:16 VERB PuppetDonut onMessage({"at_user_list":[],"from_wxid":"wxid_ikxrezhjanxu22","is_pc":0,"msg":"美式","msgid":"6153545763921484394","room_wxid":"8087835920@chatroom","timestamp":1593411135,"to_wxid":"8087835920@chatroom","wx_type":1})
14:12:16 VERB PuppetDonut contactRawPayload(wxid_ikxrezhjanxu22)
14:12:16 VERB Bridge contactRawPayload(wxid_ikxrezhjanxu22)
14:12:16 SILL Bridge contactRawPayload() cache HIT
14:12:16 VERB PuppetServiceImpl stop()
14:12:16 ERR PuppetServiceImpl stop() eventStreamManager is not busy?
14:12:16 VERB PuppetDonut stop()
14:12:16 SILL StateSwitch <PuppetDonut> off() is false
14:12:16 SILL StateSwitch <PuppetDonut> off() is false
14:12:16 VERB StateSwitch <PuppetDonut> off(pending) <- (false)
14:12:16 VERB PuppetDonut stopBridge()
14:12:16 SILL StateSwitch <PuppetDonut> on() is false
14:12:16 VERB Bridge stop()
14:12:16 VERB CacheManager release()
14:12:16 VERB CacheManager releaseCache()
14:12:16 SILL CacheManager releaseCache() closing caches ...
14:12:16 SILL CacheManager releaseCache() cache closed.
14:12:16 SILL StateSwitch <PuppetDonut> off() is pending
14:12:16 VERB StateSwitch <PuppetDonut> off(true) <- (pending)
14:12:18 SILL Io initWebSocket() ws.on(message): {"name":"jsonrpc","payload":{"id":-9007199254740778,"jsonrpc":"2.0","method":"getHostieGrpcPort"}}
14:12:18 INFO Io on(jsonrpc): [object Object]
14:12:18 VERB Io on(jsonrpc) send({"id":-9007199254740778,"jsonrpc":"2.0","result":8821})
14:12:18 SILL Io send({"name":"jsonrpc","payload":{"id":-9007199254740778,"jsonrpc":"2.0","result":8821}})
[0629/141218.564:ERROR:gl_surface_egl.cc(770)] ANGLE Platform initialization failed.
14:12:18 SILL Io initWebSocket() ws.on(message): {"name":"sys","payload":"roger"}
14:12:18 VERB PuppetServiceImpl start()
14:12:18 VERB PuppetDonut start()
14:12:18 SILL StateSwitch <PuppetDonut> on() is false
14:12:18 SILL StateSwitch <PuppetDonut> on() is false
14:12:18 VERB StateSwitch <PuppetDonut> on(pending) <- (false)
14:12:18 VERB PuppetDonut startBridge()
14:12:18 SILL StateSwitch <PuppetDonut> off() is false
14:12:18 VERB Bridge initWeChatSocket()
14:12:18 VERB Bridge getConnectCallback()
14:12:18 VERB Bridge getCloseCallback()
14:12:18 VERB Bridge getEventCallback()
14:12:18 VERB Donut(ffi-adapter) InitWeChatSocket(>,��>,�h>)
14:12:18 VERB ffi-adapter Backend.lib(0: "Z:\juzi\node_modules\@juzibot\wechaty-puppet-donut\dlls\WxLoader.dll")
14:12:18 VERB PuppetServiceImpl event()
14:12:18 VERB EventStreamManager start(stream)
14:12:18 VERB EventStreamManager connectPuppetEventToStreamingCall() for Puppet#0<PuppetDonut>(donut-test-user-5001)
14:12:18 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(friendship) (listenerCount:0) registering...
14:12:18 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(login) (listenerCount:0) registering...
14:12:18 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(logout) (listenerCount:0) registering...
14:12:18 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(message) (listenerCount:0) registering...
14:12:18 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(room-invite) (listenerCount:0) registering...
14:12:18 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(room-join) (listenerCount:0) registering...
14:12:18 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(room-leave) (listenerCount:0) registering...
14:12:18 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(room-topic) (listenerCount:0) registering...
14:12:18 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(scan) (listenerCount:0) registering...
14:12:18 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(dong) (listenerCount:0) registering...
14:12:18 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(error) (listenerCount:0) registering...
14:12:18 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(heartbeat) (listenerCount:0) registering...
14:12:18 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(ready) (listenerCount:0) registering...
14:12:18 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(reset) (listenerCount:0) registering...
14:12:18 VERB EventStreamManager onStreamingCallEnd(callback)
14:12:18 VERB EventStreamManager start() puppet is logged in, emit a login event for downstream
14:12:18 VERB Puppet selfId()
14:12:18 VERB EventStreamManager grpcEmit(EVENT_TYPE_LOGIN[25], {"contactId":"wxid_1v6owwa1vnvj12"})
14:12:18 VERB EventStreamManager grpcEmit(EVENT_TYPE_SCAN[22], {"qrcode":"http://weixin.qq.com/x/w85V_c5Wup7ecgMGZdgD","status":2})

BTW, it can not save the new QR code to scanPayload when the new scan event coming. When we restart the bot, it will emit the same QR code which has expired.
puppet.on('scan', payload => { scanPayload = payload   })
puppet.on('login', _      => { scanPayload = undefined })

It might have some bug that stored the outdated QRcode data and emit it which should not.
Let's keep our eyes on it and try to figure the problem out.

This problem maybe relate to this one: https://github.com/wechaty/wechaty-puppet-hostie/issues/46 , after update hostie in wechaty, let's keep watching it figure out or not.

authors: huan su-chang

repo: wechaty/wechaty-puppet-hostie


text:
Tutorial for examples/advanced/busy-bot

Tag #891

@Rohitesh-Kumar-Jain and @proudofsimin I have applied the suggested fixes.

@Rohitesh-Kumar-Jain and @proudofsimin I have applied the suggested fixes.

you haven't applied my suggested change : message to a message or depending on the context messages if applicable

And We were actually yet to decide which English variant we are following, because as per the English (UK one) taught in our schools, you were actually correct

@Rohitesh-Kumar-Jain and @proudofsimin I have applied the suggested fixes.

you haven't applied my suggested change : message to a message or depending on the context messages if applicable

I thought you agreed upon keeping it message and to me even it sounds good.
Actually what is happening here is:
either we can keep it as Busy bot sends auto-response message for you when you are busy. or
Busy bot sends a message for you when you are busy. or
but we can't change it to messages because only one message is being sent.

And We were actually yet to decide which English variant we are following, because as per the English (UK one) taught in our schools, you were actually correct

Yeah, that is true but I think since from the beginning in this documentation we have been following English(American one), so to maintain the consistency, its better to use it.

Yes @shwetalsoni,  @Rohitesh-Kumar-Jain I believe we are trying to follow English (US) for the Wechaty documentation because previously also we have tried to keep that consistency of English (US), so it would be better to stick to it.

Yes @shwetalsoni, @Rohitesh-Kumar-Jain I believe we are trying to follow English (US) for the Wechaty documentation because previously also we have tried to keep that consistency of English (US), so it would be better to stick to it.

Yes let's stick to the US variant, thanks to @proudofsimin for pointing that

@Rohitesh-Kumar-Jain and @proudofsimin I have applied the suggested fixes.

you haven't applied my suggested change : message to a message or depending on the context messages if applicable

I thought you agreed upon keeping it message and to me even it sounds good.
Actually what is happening here is:
either we can keep it as Busy bot sends auto-response message for you when you are busy. or
Busy bot sends a message for you when you are busy. or
but we can't change it to messages because only one message is being sent.

Well let's change it to Busy bot sends an auto-response message for you when you are busy 😅

I saw that Simin pointed out 3 initialize changes, and you have changed only 2
I Will give my approval once all comments gets resoved

Sorry, I missed it. Now it's done.

@Rohitesh-Kumar-Jain and @proudofsimin since this PR has got 3 approvals, I request you to add it to merging list.
Thank you ;)

@lijiarui I have changed to requested changes.

authors: Rohitesh-Kumar-Jain sbis04 shwetalsoni


text:
每次weex run ios后node_modules目录下都会丢失文件，导致编译报错

每次weex run ios后会把node_modules/_querystringify@1.0.0@querystringify给删除掉，导致编译报错

No longer active, I will close this issue, if have further questions, please open a new issue.

repo: weexteam/weex-toolkit