text:
refactor(index): remove Tapable.apply calls

Tapable.apply is deprecated in tapable@1.0.0-x.
The plugins should now call apply themselves.
Fixes #136

@ooflorent looks like the CLA isn't signed yet according to clabot.

All fine.
/cc @michael-ciniawsky

I've updated the PR to target master since webpack 4 compatibility has been added.

@ooflorent this is going to need an upstream rebase unfortunately.

Any news on this?

@WhoAteDaCake yes, as clearly indicated by the conversation on this PR made 14 days ago. please do refrain from comments with questions such as that and the previous "Any news on this?" They don't contribute anything meaningful to the PR or associated issue. The submitter (@ooflorent in this case) will have already been aware of the last comment requesting additional work and they'll come back to it when they have the time available to do so.

I've rebased the PR.

@shellscape or @d3viant0ne Could we get a new version tagged with this change, please?  This is the only remaining loader/plugin in my webpack config that is still throwing deprecation warnings in webpack v4 and it's driving me nuts 😅
🙏

authors: evilebottnawi mikegreiling ooflorent renchap shellscape switz

repo: webpack-contrib/worker-loader


text:
webpack 2: Error in ... doesn't export content

I am trying to follow the instructions in the readme in the simplest test-case possible and encountering errors. I am using webpack 2.1.0-beta.25 and extract-text-webpack-plugin 2.0.0-beta.4. Below is webpack config:
'use strict';

const webpack     = require('webpack');
const CleanPlugin = require('clean-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const ExtractTextPlugin = require('extract-text-webpack-plugin');

const PATHS = {
  entry: `${__dirname}/app/entry`,
  build: `${__dirname}/build`,
};

let entry = {
  app: [
    PATHS.entry,
  ],
};

let output = {
  path:     PATHS.build,
  filename: '[name].bundle.js',
};

let plugins = [
  new CleanPlugin('build'),
  new ExtractTextPlugin({
    filename:  '[name].bundle.css',
    allChunks: true,
  }),
  new HtmlWebpackPlugin({
    template: `${__dirname}/app/main/index.html`,
  }),
];

let rules = [
  {
    test:    /\.js$/,
    include: `${__dirname}/app`,
    use: [
      {
        loader: 'babel',
      },
    ],
  },
  {
    test:    /\.css$/,
    include: `${__dirname}/app`,
    use: ExtractTextPlugin.extract({
      loader:         'css-loader',
      fallbackLoader: 'style-loader',
    }),
  },
];

let webpackModule = {
  rules,
};

module.exports = {
  plugins,
  entry,
  output,
  module: webpackModule,
  stats: {
    reasons:      true,
    errorDetails: true,
  },
};

For reference, my entry.js looks like this:
import './main/main.css';
import './main';

This is the error I'm getting:
clean-webpack-plugin: /Users/fraziermork/independent_coding/my-gh-repos/webpack-2-sandbox/build has been removed.
Hash: 0b89f46da75eeff003b3
Version: webpack 2.1.0-beta.25
Time: 1022ms
        Asset       Size  Chunks             Chunk Names
app.bundle.js     7.3 kB       0  [emitted]  app
   index.html  186 bytes          [emitted]
   [3] multi app 28 bytes {0} [built]
    + 3 hidden modules

ERROR in ./app/main/main.css
Module build failed: ModuleParseError: Module parse failed: /Users/fraziermork/independent_coding/my-gh-repos/webpack-2-sandbox/app/main/main.css Unexpected token (1:5)
You may need an appropriate loader to handle this file type.
| html {
|   background-color: red;
| }
    at /Users/fraziermork/independent_coding/my-gh-repos/webpack-2-sandbox/node_modules/webpack/lib/NormalModule.js:207:34
    at /Users/fraziermork/independent_coding/my-gh-repos/webpack-2-sandbox/node_modules/webpack/lib/NormalModule.js:164:10
    at /Users/fraziermork/independent_coding/my-gh-repos/webpack-2-sandbox/node_modules/loader-runner/lib/LoaderRunner.js:365:3
    at iterateNormalLoaders (/Users/fraziermork/independent_coding/my-gh-repos/webpack-2-sandbox/node_modules/loader-runner/lib/LoaderRunner.js:206:10)
    at /Users/fraziermork/independent_coding/my-gh-repos/webpack-2-sandbox/node_modules/loader-runner/lib/LoaderRunner.js:197:4
    at Storage.finished (/Users/fraziermork/independent_coding/my-gh-repos/webpack-2-sandbox/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:39:16)
    at /Users/fraziermork/independent_coding/my-gh-repos/webpack-2-sandbox/node_modules/graceful-fs/graceful-fs.js:78:16
    at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:439:3)

ERROR in ./app/main/main.css
Module build failed: ModuleParseError: Module parse failed: /Users/fraziermork/independent_coding/my-gh-repos/webpack-2-sandbox/app/main/main.css Unexpected token (1:5)
You may need an appropriate loader to handle this file type.
| html {
|   background-color: red;
| }
    at /Users/fraziermork/independent_coding/my-gh-repos/webpack-2-sandbox/node_modules/webpack/lib/NormalModule.js:207:34
    at /Users/fraziermork/independent_coding/my-gh-repos/webpack-2-sandbox/node_modules/webpack/lib/NormalModule.js:164:10
    at /Users/fraziermork/independent_coding/my-gh-repos/webpack-2-sandbox/node_modules/loader-runner/lib/LoaderRunner.js:365:3
    at iterateNormalLoaders (/Users/fraziermork/independent_coding/my-gh-repos/webpack-2-sandbox/node_modules/loader-runner/lib/LoaderRunner.js:206:10)
    at /Users/fraziermork/independent_coding/my-gh-repos/webpack-2-sandbox/node_modules/loader-runner/lib/LoaderRunner.js:197:4
    at Storage.finished (/Users/fraziermork/independent_coding/my-gh-repos/webpack-2-sandbox/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:39:16)
    at /Users/fraziermork/independent_coding/my-gh-repos/webpack-2-sandbox/node_modules/graceful-fs/graceful-fs.js:78:16
    at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:439:3)

ERROR in ./app/main/main.css
Module build failed: ModuleParseError: Module parse failed: /Users/fraziermork/independent_coding/my-gh-repos/webpack-2-sandbox/app/main/main.css Unexpected token (1:5)
You may need an appropriate loader to handle this file type.
| html {
|   background-color: red;
| }
    at /Users/fraziermork/independent_coding/my-gh-repos/webpack-2-sandbox/node_modules/webpack/lib/NormalModule.js:207:34
    at /Users/fraziermork/independent_coding/my-gh-repos/webpack-2-sandbox/node_modules/webpack/lib/NormalModule.js:164:10
    at /Users/fraziermork/independent_coding/my-gh-repos/webpack-2-sandbox/node_modules/loader-runner/lib/LoaderRunner.js:365:3
    at iterateNormalLoaders (/Users/fraziermork/independent_coding/my-gh-repos/webpack-2-sandbox/node_modules/loader-runner/lib/LoaderRunner.js:206:10)
    at /Users/fraziermork/independent_coding/my-gh-repos/webpack-2-sandbox/node_modules/loader-runner/lib/LoaderRunner.js:197:4
    at Storage.provide (/Users/fraziermork/independent_coding/my-gh-repos/webpack-2-sandbox/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:53:20)
    at CachedInputFileSystem.readFile (/Users/fraziermork/independent_coding/my-gh-repos/webpack-2-sandbox/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:160:24)
    at processResource (/Users/fraziermork/independent_coding/my-gh-repos/webpack-2-sandbox/node_modules/loader-runner/lib/LoaderRunner.js:194:11)
    at iteratePitchingLoaders (/Users/fraziermork/independent_coding/my-gh-repos/webpack-2-sandbox/node_modules/loader-runner/lib/LoaderRunner.js:153:10)
    at runLoaders (/Users/fraziermork/independent_coding/my-gh-repos/webpack-2-sandbox/node_modules/loader-runner/lib/LoaderRunner.js:357:2)
    at NormalModule.doBuild (/Users/fraziermork/independent_coding/my-gh-repos/webpack-2-sandbox/node_modules/webpack/lib/NormalModule.js:131:2)
    at NormalModule.build (/Users/fraziermork/independent_coding/my-gh-repos/webpack-2-sandbox/node_modules/webpack/lib/NormalModule.js:179:15)
    at Compilation.buildModule (/Users/fraziermork/independent_coding/my-gh-repos/webpack-2-sandbox/node_modules/webpack/lib/Compilation.js:127:9)
    at Compilation.<anonymous> (/Users/fraziermork/independent_coding/my-gh-repos/webpack-2-sandbox/node_modules/webpack/lib/Compilation.js:404:8)
    at /Users/fraziermork/independent_coding/my-gh-repos/webpack-2-sandbox/node_modules/webpack/lib/NormalModuleFactory.js:74:13
    at NormalModuleFactory.applyPluginsAsyncWaterfall (/Users/fraziermork/independent_coding/my-gh-repos/webpack-2-sandbox/node_modules/tapable/lib/Tapable.js:123:70)
    at onDoneResolving (/Users/fraziermork/independent_coding/my-gh-repos/webpack-2-sandbox/node_modules/webpack/lib/NormalModuleFactory.js:49:11)
    at onDoneResolving (/Users/fraziermork/independent_coding/my-gh-repos/webpack-2-sandbox/node_modules/webpack/lib/NormalModuleFactory.js:165:6)
    at /Users/fraziermork/independent_coding/my-gh-repos/webpack-2-sandbox/node_modules/webpack/lib/NormalModuleFactory.js:161:6
    at /Users/fraziermork/independent_coding/my-gh-repos/webpack-2-sandbox/node_modules/async/lib/async.js:726:13
    at /Users/fraziermork/independent_coding/my-gh-repos/webpack-2-sandbox/node_modules/async/lib/async.js:52:16
    at async.forEachOf.async.eachOf (/Users/fraziermork/independent_coding/my-gh-repos/webpack-2-sandbox/node_modules/async/lib/async.js:236:30)
    at _parallel (/Users/fraziermork/independent_coding/my-gh-repos/webpack-2-sandbox/node_modules/async/lib/async.js:717:9)
    at Object.async.parallel (/Users/fraziermork/independent_coding/my-gh-repos/webpack-2-sandbox/node_modules/async/lib/async.js:731:9)
    at /Users/fraziermork/independent_coding/my-gh-repos/webpack-2-sandbox/node_modules/webpack/lib/NormalModuleFactory.js:154:11
    at /Users/fraziermork/independent_coding/my-gh-repos/webpack-2-sandbox/node_modules/async/lib/async.js:726:13
    at /Users/fraziermork/independent_coding/my-gh-repos/webpack-2-sandbox/node_modules/async/lib/async.js:52:16
    at async.forEachOf.async.eachOf (/Users/fraziermork/independent_coding/my-gh-repos/webpack-2-sandbox/node_modules/async/lib/async.js:236:30)
    at _parallel (/Users/fraziermork/independent_coding/my-gh-repos/webpack-2-sandbox/node_modules/async/lib/async.js:717:9)
    at Object.async.parallel (/Users/fraziermork/independent_coding/my-gh-repos/webpack-2-sandbox/node_modules/async/lib/async.js:731:9)

ERROR in /Users/fraziermork/independent_coding/my-gh-repos/webpack-2-sandbox/node_modules/extract-text-webpack-plugin/loader.js?{"omit":1,"remove":true}!style-loader!css-loader!/Users/fraziermork/independent_coding/my-gh-repos/webpack-2-sandbox/app/main/main.css doesn't export content
Child extract-text-webpack-plugin:
       [0] ./app/main/main.css 254 bytes {0} [built] [failed] [1 error]

    ERROR in ./app/main/main.css
    Module parse failed: /Users/fraziermork/independent_coding/my-gh-repos/webpack-2-sandbox/app/main/main.css Unexpected token (1:5)
    You may need an appropriate loader to handle this file type.
    | html {
    |   background-color: red;
    | }
Child html-webpack-plugin for "index.html":
        + 4 hidden modules
Child extract-text-webpack-plugin:
       [0] ./app/main/main.css 254 bytes {0} [built] [failed] [1 error]

    ERROR in ./app/main/main.css
    Module parse failed: /Users/fraziermork/independent_coding/my-gh-repos/webpack-2-sandbox/app/main/main.css Unexpected token (1:5)
    You may need an appropriate loader to handle this file type.
    | html {
    |   background-color: red;
    | }

I'm not sure what the difference is between my code and the instructions in the readme. Here is the repo with the current code.

It turns out that the problem was that I had my rule set up as:
{
    test:    /\.css$/,
    include: `${__dirname}/app`,
    use: ExtractTextPlugin.extract({
      loader:         'css-loader',
      fallbackLoader: 'style-loader',
    }),
  },

instead of
{
    test:    /\.css$/,
    include: `${__dirname}/app`,
    loader: ExtractTextPlugin.extract({
      loader:         'css-loader',
      fallbackLoader: 'style-loader',
    }),
  },

Basically, the code breaks for 'use', but not for 'loader'. It's my understanding that they are supposed to be the same thing for webpack 2. If that's the case, this may need to be fixed.

I have used few hours to figure what's going on (and I actually did not, but went into recent issues and found this). Thanks a lot for sharing the solution. I think this is quite a critical issue in fact, since the docs suggest to use "use", but it does not work without any hint that you should use "loader". Hope this is fixed soon

Related #265

@fraziermork thanks! changing use to loader did the trick.

It's only way that works for me:
{
        test: /\.scss$/,
        loader: ExtractTextPlugin.extract({
          fallbackLoader: 'style-loader',
          loader: [
            {
              loader: 'css-loader',
              query: {
                modules: true,
                importLoaders: 2,
                sourceMap: true
              }
            }, {
              loader: 'autoprefixer-loader',
              query: {
                browsers: 'last 2 version'
              }
            }, {
              loader: 'sass-loader',
              query: {
                outputStyle: 'expanded',
                sourceMap: true,
                sourceMapContents: true
              }
            }
          ]
        })
      }

Changing use to loader

use -> loader worked for me as well.  Banged my head for a half a day on this one.

Looks like use takes an array, while loader: X is a shortcut for use: [X], so convenient when you're only using a single loader.
See the webpack configuration docs.

I get the same error ".css doesn't export content" after updating the plugin from 2.0.0-beta.4 to 2.0.0-rc.2
my config is as following:
{
        test: /\.css$/,
        loader: ExtractTextPlugin.extract({
            fallbackLoader: 'style',
            loader: 'css?' + 'minimize&sourceMap&importLoaders=1!postcss'
        })
    },
    {
        test: /\.scss$/,
        loader: ExtractTextPlugin.extract({
            fallbackLoader: 'style',
            loader: 'css?' + 'minimize&sourceMap&importLoaders=2!postcss!resolve-url!sass?&sourceMap'
        })
    }

detailed error:
ERROR in ./src/index.scss
Module build failed: Error
    at /media/ashraf/projects/node_modules/webpack/lib/NormalModule.js:141:35
    at /media/ashraf/projects/node_modules/loader-runner/lib/LoaderRunner.js:364:11
    at /media/ashraf/projects/node_modules/loader-runner/lib/LoaderRunner.js:230:18
    at runSyncOrAsync (/media/ashraf/projects/node_modules/loader-runner/lib/LoaderRunner.js:143:3)
    at iterateNormalLoaders (/media/ashraf/projects/node_modules/loader-runner/lib/LoaderRunner.js:229:2)
    at iterateNormalLoaders (/media/ashraf/projects/node_modules/loader-runner/lib/LoaderRunner.js:218:10)
    at /media/ashraf/projects/node_modules/loader-runner/lib/LoaderRunner.js:233:3
    at context.callback (/media/ashraf/projects/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
    at Object.onRender (/media/ashraf/projects/node_modules/sass-loader/index.js:289:9)
    at Object.<anonymous> (/media/ashraf/projects/node_modules/sass-loader/node_modules/async/dist/async.js:2234:31)
    at apply (/media/ashraf/projects/node_modules/sass-loader/node_modules/async/dist/async.js:20:25)
    at Object.<anonymous> (/media/ashraf/projects/node_modules/sass-loader/node_modules/async/dist/async.js:56:12)
    at Object.callback (/media/ashraf/projects/node_modules/sass-loader/node_modules/async/dist/async.js:840:16)
    at options.success (/media/ashraf/projects/node_modules/node-sass/lib/index.js:303:32)

ERROR in /media/ashraf/projects/node_modules/extract-text-webpack-plugin/loader.js?{"omit":1,"remove":true}!/media/ashraf/projects/node_modules/style-loader/index.js!/media/ashraf/projects/node_modules/css-loader/index.js?minimize&sourceMap&importLoaders=2!/media/ashraf/projects/node_modules/postcss-loader/index.js!/media/ashraf/projects/node_modules/resolve-url-loader/index.js!/media/ashraf/projects/node_modules/sass-loader/index.js?&sourceMap!/media/ashraf/projects/components/Image/src/index.scss doesn't export content

@ashraffayad Did you try use: ExtractTextPlugin.extract as instructed in the readme?

@bebraw Actually yes. I tried the following. I still get the same error
{
        test: /\.css$/,
        use: ExtractTextPlugin.extract({
            fallbackLoader: "style-loader",
            loader: "css-loader"
        })
    },
    {
        test: /\.scss$/,
        use: ExtractTextPlugin.extract({
            fallbackLoader: "style-loader",
            loader: ["css-loader?importLoaders=1","resolve-url-loader","sass-loader?sourceMap","postcss-loader"]
        })
    }

@ashraffayad Can you open a separate issue with an example (repository)? I can't fix with partial information.

Thanks. I will do that.

{
        test: /\.css$/,
        use: ExtractTextPlugin.extract({
            fallbackLoader: "style-loader",
            loader: "css-loader"
        })
    },
    {
        test: /\.scss$/,
        use: ExtractTextPlugin.extract({
            fallbackLoader: "style-loader",
-            loader: ["css-loader?importLoaders=1","resolve-url-loader","sass-loader?sourceMap","postcss-loader"]
+           loader: [
+             { loader: 'css-loader', options: { importLoaders: 3, sourceMap: true } },
+             'resolve-url-loader',
+             'postcss-loader',
+             { loader: 'sass-loader', options: { sourceMap: true } }
+           ]
        })
    }

@ashraffayad Can you show your postcss.config.js please, are you using postcss-scss+ stylelint ?

@michael-ciniawsky Thanks for the effort. I will try the configuration you suggested. The problem appeared after I ran npm update .
So I restored the old package.json and the node_modules folder, deleted the old plugin folder, updated the package.json with the new version manually, then ran npm install
now it works fine.
I configure postcss that way:
new webpack.LoaderOptionsPlugin({
        options: {
            postcss: [autoprefixer({ browsers: ['last 2 versions'] })],
            context: process.cwd(), // Required for the sourceMap of css/sass loader
            debug: false,
            minimize: true
        },
    }),

Don't mind the context: process.cwd(). It has not to do with the error :)

loader option has been deprecated - replace with "use"

So how to solve?

See this solution: https://github.com/towry/n/issues/67

I've got the same error and I just solved it. For me, it's because I didn't use the BannerPlugin in a right way. Just change the input value, remove the extra *, and now it's fine.

source: gharchive/issue

authors: ashraffayad bebraw bertho-zero devourment77 elyobo fraziermork hero-guo ilya-git leggomuhgreggo michael-ciniawsky oodzchen renarsvilnis towry

repo: webpack/extract-text-webpack-plugin

license: MIT

license_type: permissive

license_source: github-api


text:
Hi I'm an idiot and I failed to find the "caching" section in the docs

Feel free to "wontfix" this, but when I was looking for the docs I was looking for terms like "revisioning", "versioning", "hashing", "renaming" etc etc.

We should at the least see if theres a way to index those terms against the site search we have. Is that possible @bebraw ?

FWIW, I also looked for it in "Building for production" as I thought "Ah yes this is a production-specific action".

@dzello Any thoughts on this?

It's totally possible that I'm the only person in the world that wouldn't think of this as "caching".
Within a build system, I figured "caching" might be to internal caching for incremental builds, or something like https://github.com/contra/gulp-cached.

reaches into search toolbox, pulls out synonyms
This sounds like a job for some synonyms. The DocSearch config supports them directly as you can see here with Mozilla.
Anyone want to take a pass at what they all should be?

Content addressable file naming, hashing, revisionig, "revving", consistent file hashing, persistent caching.
People use so many names for this

Alright awesome looks like we have everything equipped to add this feature. I'll share with the masses.

The webpack DocSearch config has been updated and deployed. You can use any of those terms now and they'll return caching-related results.
Also, I noticed the Development part of the docs wasn't in the config yet. It's added now as well.

Just tested, it seems @dzello's changes have taken effect:

Going to close, but feel free to re-open if I missed something.

authors: Munter TheLarkInn bebraw dzello jakearchibald skipjack


text:
--hot flag should not add HMR plugin when it's already there, causes wrong moduleId in hot.accept

I am struggling getting HMR to work.
I see in the generated code that the moduleId in the hot.accept call is generated wrong.
In my case it reads 1010 whereas it should be 10.
It looks like the moduleId is inserted twice?
I found an existing issue in which the same problem is described:
https://github.com/webpack/webpack/issues/406#issuecomment-62756894
However I don't know what the solution is. It's suggested that the issue is with the output.path but I have no idea what to do. My output path is set to an absolute directory and the docs suggest that this is correct?

Ok... So after re-reading the issue it suddenly dawned upon me that I had both --hot and the HotModuleReplacementPlugin in my config... @sokra explicitly mentions that as the cause but it never clicked when I read it the first time... When I removed the plugin it all started working!
However, I have to say I find this behavior very unexpected. I would expect command line arguments to override the config, not just add the plugin again... Especially when that ends up breaking everything.
If it's possible to detect that the plugin is already there then maybe that would be much better behavior for the --hot switch. To add the plugin, only when it's not already configured. I'm going to change the title of this issue to reflect that, and remove the question label. My question is answered, but I feel this is actually a bug.

Ah I can't remove labels. Ok.  :)

Consider closing the issue? This makes it a bit easier to navigate open issues (there are so many). Thanks.

authors: Download sebastienbarre

repo: webpack/webpack


text:
BUG: "export 'default' (imported as 'selection_enter') was not found in './enter'

Do you want to request a feature or report a bug?
BUG

What is the current behavior?
Currently if you try to use d3.js library, webpack will generate warning:
"export 'default' (imported as 'selection_enter') was not found in './enter'
That is not so big problem, but when you run javascript generated by webpack it will fail with error:
SyntaxError: function statement requires a name
Problem is using ES2015 import default and export default which is not working.
If the current behavior is a bug, please provide the steps to reproduce.
https://github.com/kukjevov/webpack-error-sample

What is the expected behavior?
It should work
If this is a feature request, what is motivation or use case for changing the behavior?
Please mention other relevant information such as the browser version, Node.js version, webpack version and Operating System.
nodejs: 7.10, webpack 2.5.0, Windows 10

You testcase compiles fine for me... ?

As i wrote down it compiles with warnings. But these warnings ends up in browser with syntax error as mentioned above:
SyntaxError: function statement requires a name
Thanks :)

Having the same issue with d3-shape module
WARNING in /Users/gshtilma/src/flurry/corona-ui/~/d3-shape/src/order/descending.js
4:9-18 "export 'default' (imported as 'ascending') was not found in './ascending'

Files in question:
https://github.com/d3/d3-shape/blob/master/src/order/descending.js
https://github.com/d3/d3-shape/blob/master/src/order/ascending.js

had a similar issue, but realized it was caused by module (d3-shape) being written in ES6 & being  excluded from babel-loader in my config, fixing that got rid of the warning - possible you have a similar issue @kukjevov

Well i have temporarily solved it by using import {} from 'd3' as whole library. There is no problem, but with partial 'd3-shape' etc it is not working. But it was working in older versions of Webpack. So this is not critical for me, but i was thinking maybe it is good to look at that if it can cause problems.
Thanks :)

Have the same issue.
Node 7.10 Webpack 2.5.1
With "d3-shape"
4:9-18 "export 'default' (imported as 'ascending') was not found in './ascending'

maybe it is because of the unamed function
# d3-shape/src/constant.js
export default function(x) {
  return function constant() {
    return x;
  };
}

will pack to
/******/ ([
/* 0 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
function(x) {
  return function constant() {
    return x;
  };
}
/***/ }),
/* 1 */

the export default is missing.
when i named it, it works well.

Sorry, it may be registry mirror issue, use install from npm registry work well, but use https://registry.npm.taobao.org will got this issue.

I am experiencing this issue as well with 2.6.1

I had the same issue, but it was because I used multi compiler mode (webpack.config.js returns array of configs) and also:

For one of compilers the same module did not contain the default export, for example:
// moduleName/package.json
{
  "main": "./server.js",
  "browser": "./browser.js"
  // ...
}

// moduleName/server.js
export default 'example'

// moduleName/browser.js
// no default export here

The resolve configuration object had shared between multiple configs, like so:
// webpack.config.js
const resolve = {};

module.exports = [
  {
    target: 'web',
    resolve: resolve,
    // ...
  },
  {
    target: 'node',
    resolve: resolve,
    // ...
  },
];

FYI @sokra
Maybe webpack should not mutate resolve section of config?

@kukjevov - Your test error repo compiles and shows "Hello World, 4" as I tried it with webpack 3.1. Don't see any warnings. Can you confirm too?

I just stumbled upon the same error at work with react:
WARNING in ./components/Button/index.js
56:2-7 "export 'default' (imported as 'React') was not found in '../../..'

Haven't managed to narrow it down to a small test case yet, though.

Got the same problem!
export 'compose' was not found in 'redux'
The issue was that one of my folders in project was named redux.

@morlay  我使用淘宝镜像以遇到这个问题呢。  你更换了源好呢吗?

this might be of use for someone. had a similar issue when i was updating an old create-react-app application. had to change all occurrences of
module.exports = Blabla;
to
export default Blabla;

In case anyone stumbles across this thread... you'll also see the error reported here if you try to process the babel-runtime itself through (i.e., by not excluding it from the babel-loader in webpack).

maybe babel has compiled some files which should not be compiled!

So I've been working on this vue-cli project for days that uses webpack. I had a simple config file that was module.exports = {stuff} and now today for some reason webpack started up with this problem and I had to switch it over to export default {stuff} ... I have no idea why for days the old style export was fine and all of a sudden when I run the dev environment today it was not. That's pretty odd!?

https://babeljs.io/docs/en/babel-plugin-transform-es2015-modules-commonjs it works for me

In our Node project, we use a CommonJS module that is included on both server-side and client-side. Everything worked fine until we added @babel/plugin-transform-runtime. It started showing compilation warning mentioned here. And in the browser it just fails with Uncaught TypeError: Cannot assign to read-only property 'exports' of object '#<Object>'.
I've discovered that it can be fixed by adding @babel/plugin-transform-modules-commonjs.

@sigod , that solved our issue! Thank you!

In my case, this occurred while updating to Babel 7. The key was adding modules: 'commonjs' to the presets in our babel.config.js file.
presets: [
        '@babel/preset-react',
        ['@babel/preset-env', {
          modules: 'commonjs',
          ...

I've discovered that it can be fixed by adding @babel/plugin-transform-modules-commonjs.

The key was adding modules: 'commonjs' to the presets in our babel.config.js file.

Both these options made my warnings/errors go away and also made my bundle size explode from 472 KiB (without using @babel/plugin-transform-runtime) to 865 KiB.
Quoting the docs:

A plugin that enables the re-use of Babel's injected helper code to save on codesize.

When you tell Babel to transform ES modules to CommonJS, you're disabling Webpack's tree shaking, which is enabled by default in production builds. Although the bundle size saving provided by @babel/plugin-transform-runtime are not insignificant, it pales in comparison to Webpack's tree shaking.
The real fix here is to simply not use @babel/plugin-transform-runtime until this issue is fixed or someone shows us how to use the tools properly.

const Cesium = require('cesium/Cesium')
so easy

@zebulonj @sigod  @steve-taylor
I use @babel/plugin-transform-modules-commonjs for a long time, and my project (ssr project) run well until someday i found tree shaking feature lost with this babel plugin.
I remove it and tree shaking come back, but get some WARNING like this issue.
    WARNING in ../_base/modules/commonMixins.js 12:4-10
    "export 'default' (imported as 'config') was not found in '../config/commonConfig'

have you guys ever check your project's tree shaking feature.

export default { .... }

Worked for me and makes sense. Thanks @Arish-theGalaxyBea !

I want to close this issue, because there are a lot of difference problems without configurations/reproducible test repos. Most of problems related to https://github.com/webpack/webpack/issues/4817#issuecomment-492194612. Anyway if you faced with this issue again, feel free to open new issue with reproducible test repo and we will help you, thanks for using webpack

In my case, it was solved when I used "awesome-typescript-loader" instead of "ts-loader". I am not sure what is a difference between those loaders

If you using @babel/plugin-transform-runtime in your project，and one of your dependency in the node_module or file in your src dir that has been compiled for commonJs style by some bundle util like Webpack、Rollup. Your should exclude the file for the babel-loader. You can find the reason here.

rm -fr node_modules/.cache/* may fix this issue as describe in doc Upgrade to react-scripts@5 and Add Web Workers support and npm run web-fresh in APP PixelShapeRN commit Add Web Workers support for CRA v5 (and Webpack 5)

authors: CommanderXL Luixo RyKilleen chuilee evilebottnawi flyskywhy frenzzy gmatroskin hpeikari jardicc jsonchou kukjevov marvinhagemeister michaelalhilly morlay nerdess pksjce scottbedard sigod sivanZhang sokra steve-taylor xiaoshude xierenyuan zachstronaut zebulonj


text:
ModuleConcatenationPlugin is setting modules[].reasons[].moduleId to null in some cases

Bug report

What is the current behavior?
It would appear that when using ModuleConcatenationPlugin (which is default for mode = production), that the modules that it concatenated do not properly have module ids in the output stats. More specifically, if a reason for given module is from a module that has been concatenated, then the moduleId of that reason is null. I would not expect that to be the case.
If the current behavior is a bug, please provide the steps to reproduce.
Reproduction Project:
https://github.com/joeljeske/webpack-module-concatenation-plugin-issue

What is the expected behavior?
Every reason for module should have a moduleId that corresponds with the id of a module

Other relevant information:
webpack version:  4.19.1
Node.js version:  v8.11.3
Operating System: MacOS 10.13.4
Additional tools: N/A

Concatenated modules don't have ids. All modules have identifiers.

How would you recommend that I traverse the dependency tree using the stats? Is there any way to do this?

You can use moduleIdentifier and identifier. This is always set and unique.

Answer above

authors: evilebottnawi joeljeske sokra


text:
Fix:10071 - Accept watchOptions.aggregateTimeout be 0

What kind of change does this PR introduce?
Bugfix : #10071
Credits : @simonhowey

Did you add tests for your changes?

No
Does this PR introduce a breaking change?
No

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

Thanks Jeffin!
FWIW I think:
https://github.com/webpack/watchpack/blob/c0221fc3be199b34711909c6c1245fc1054c7a51/lib/watchpack.js#L67
needs to be changed as well for the 0 to make it through to where it gets used. Could be wrong - have not looked at it recently.

@simonhowey seem to be right. Please also send a PR to watchpack.

@sokra , friendly - ping

source: gharchive/pull-request

authors: jeffin143 simonhowey sokra


text:
[Rendering/Architectures]: Add Slide to discuss 'CRA' alternatives

[ ] create a few slides on different React architectures
[ ] give advice how a client's project (depending on its requirements) can benefit from a different rendering strategy than purely client-side rendering

My impression from the last iteration was, that the way we handle it is atm quite allright. We currently mention next/remix as alternative & will switch to Vite in the next course iteration. And the other rendering strategies in the end chapter are fine imho


text:
Fix SDP attributes

This fixes a bug where set_local_description would immediately trigger on_negotiation_needed even though a negotiation isn't needed. This happens because the check for step 5.3.3 in check_negotiation_needed would always fail.
MediaDescription::attribute did not allow distinguishing between an attribute that was missing and one that was present but had no value, such as a=recvonly.
This PR depends on this sibling PR in webrtc-rs/sdp: https://github.com/webrtc-rs/sdp/pull/9.

@k0nserv, I just bumped SDP to v0.5.0 to include your fix in sdp git repo.
You can update sdp to v0.5.0 in Cargo.toml, in order to fix the Github Actions errors.
Thanks.

Done

repo: webrtc-rs/webrtc


text:
Make RTCRtpTransceiver (Sender, Receiver) spec-compliant

This PR reworked Sender and Receiver on Transceiver to comply with specification.

Nice! I left a few comments.
Did you test this with at least some of the examples to make sure it hasn't broken anything?

Yes, I tested with
cargo test,
using internal example,
and on a side project.
Maybe I didn't cover every possible case, but nothing broke

Yes, I tested with
cargo test,
using internal example,

and on a side project.

Maybe I didn't cover every possible case, but nothing broke

Cool I can test on our project too after you address some of these comments

I will try to check as soon as possible

Can you rebase or merge again and then we can merge?

Thanks for this @rogurotus 🎉


text:
Chrome app doesn't send origin header to CEOD

One possible solution is to make the GET request a POST request, then it does send the origin header.

That seems like a reasonable solution.

An issue that @jiayliu and I were discussing is the chrome app extension id, which is what gets sent as part of the origin header. This is the value that is needed to be whitelisted.
When you "install" the unpacked app on your local dev machine during development, a random id is generated in an unpredictable way.
However, if we create an entry in the web store, we can get the permanent value and put it into the manifest so it stays stable during development.
https://developer.chrome.com/apps/manifest/key
https://developer.chrome.com/apps/app_identity#copy_key

Thanks for the investigation! Can you create the entry in app store?
On Fri, Feb 27, 2015 at 10:52 AM, Chuck Hays notifications@github.com
wrote:

An issue that @jiayliu https://github.com/jiayliu and I were discussing
is the chrome app extension id, which is what gets sent as part of the
origin header. This is the value that is needed to be whitelisted.
When you "install" the unpacked app on your local dev machine during
development, a random id is generated in an unpredictable way.
However, if we create an entry in the web store, we can get the permanent
value and put it into the manifest so it stays stable during development.
https://developer.chrome.com/apps/manifest/key
https://developer.chrome.com/apps/app_identity#copy_key
—
Reply to this email directly or view it on GitHub
https://github.com/webrtc/apprtc/issues/96#issuecomment-76449870.

--
Jiayang Liu

authors: chuckhays jiayliu juberti

repo: webrtc/apprtc

license_source: bigquery


text:
fix: i > NB_KEPT returned NB_KEPT+1

when retrieving content, the condition i > NB_KEPT was one shifted... So replaced it with i >= NB_KEPT.

LGTM ! 👍

authors: RiwsPy weber-s

repo: webu/dalec-discourse


text:
🛑 The Good Cyclist is down

In cb9c61b, The Good Cyclist (https://thegoodcyclist.iwview.com) was down:

HTTP code: 521
Response time: 170 ms

Resolved: The Good Cyclist is back up in bdc1efc after 8 minutes.

repo: webworldview/uptime


text:
请问如何联系上客服？

我微信留言，申请加飞书都没有任何反映和消息。请问如何联系客服人员呢？

+1   想咨询开票问题 联系不到人

已联系到  邮件和飞书联系

已联系到 邮件和飞书联系
您好，我也有相同的开票问题，鉴于客服也是好久没回复，所以问问已经联系过客服的朋友，项目支持开增值税专用发票吗？

邮件回复的么？飞书发的消息三天了，没回复！

repo: wechaty/puppet-padlocal


text:
PadLocal: Applying for a PadLocal token.

Please make sure you have read the Wechaty Puppet Service: PadLocal from Wechaty Official Website before you continue writting this issue.
Question
I am a student majoring in cyber security. I am applying for a PadLocal Token to implement the term project related on Content Security. It is about sensitive content filtering and we need a Wechat API to effectively present our project. We are willing to share our code after finishing the project.

You can apply here: http://pad-local.com

authors: padlocal slatdude

repo: wechaty/puppet-services


text:
为 go-wechaty 设计实现 插件体系

此次活动
开源软件供应链点亮计划
“开源软件供应链点亮计划-暑期2020”（以下简称 暑期2020）是由中科院软件所与 openEuler 社区共同举办的一项面向高校学生的暑期活动，旨在鼓励在校学生积极参与开源软件的开发维护，促进国内优秀开源软件社区的蓬勃发展。
根据项目的难易程度和完成情况，参与者还可获取“开源软件供应链点亮计划-暑期2020”活动奖金和奖杯。
官网：https://isrc.iscas.ac.cn/summer2020 官方新闻：http://www.iscas.ac.cn/xshd2016/xshy2016/202004/t20200426_5563484.html
Wechaty
Wechaty 是一个开源聊天机器人框架SDK，具有高度封装、高可用的特性，支持NodeJs, Python, Go 和Java 等多语言版本。在过去的4年中，服务了数万名开发者，收获了 Github 的 8000 Star。同时配置了完整的DevOps体系并持续按照Apache 的方式管理技术社区。
为 go-wechaty 设计实现 插件体系
项目需求
wechaty 是一个款支持多协议的微信接入方案，随着社区多语言生态的建立，吸引了更多的开发者和爱好者的加入；同时需求的推动和技术的发展，插件系统逐渐完善，但是在多语言系统中 Plugin 体系尚未完成，我们希望通过这个任务，能够让更多的人加入 go-wechaty 的建设。
目前 go-wechaty examples/ding-dong-bot.go 有一个 ding-dong bot, 但是我们希望这个 ding-dong 是通用的，如果我们的 Plugin 体系能编写出来，也许实现 ding-dong 就只需要一行代码。
例如：
bot.Use(DingDong{})

go-wechaty 是 Go 语言实现 wechaty 的项目，同样支持多协议接入；同时借助 gorountine 和 channel 的语言特性，实现了更加合理的封装和设计。
项目难度
中（奖金：9000元）
导师联系
在这里，你将会获得以下三位老师的指导:

丁小雨，go-wechaty contributor， mail: 614422099@qq.com
丁超飞，go-wechaty contributor， mail: dchaofei@163.com
李博杰，go-wechaty contributor， mail: silkage@silkage.net

项目产出目标
任务可以分为两块（参见核心目标），两个任务具有先后顺序，需要先完成任务一，导师对任务评估后，再进行任务二；如果 Go 对你有所挑战，你可以选择获取导师帮助，或者仅完成任务一。
核心目标

设计 Go 的 Plugin 机制
实现  go-wechaty plugin 并完成一个 demo

项目技术栈

Go
Plugin 机制

相关资料

wechaty
go-wechaty
wechaty-plugin-contrib

看上去应该还可以，如果单纯实现的话就还好，但是如果要同时利用好 Golang 的语言特性需要设计一番。

@ShiinaOrez 很高兴你能关注到这个项目，项目分为两个阶段，第一阶段单纯的实现扩展加载和注册就好，第二阶段基于 Go 的特性去做更好的设计。

很有吸引力~ 现在正在努力看源码 :smile:

请问这里的插件体系，是指运用golang的plugin包还是说一种插件化的代码理念

请问这里的插件体系，是指运用golang的plugin包还是说一种插件化的代码理念

是插件化的代码理念

@FINCTIVE 邮件的回复，我在这里也粘贴一份，希望能帮助到更多的人。
任务一和任务二其实是相辅相成的，之所以拆出任务一，是希望参与者能够提前去完整的设计一套 Plugin 机制，而不是直接上手写代码，应提前了然于胸；当然，除此之外，也是希望参与者能够真正的设计一套适合 Go 语言下的 Plugin 机制，TypeScript 实现的机制是一个阶段性目标，而不是最终目标，你可以在任务一时充分的调研相关的 Plugin 机制。

如果单纯的看任务一的话，那么成果输出就是 设计文档（应该包含设计思路，实现逻辑，以及涉及到项目的变更等）。
任务二，则是将任务一的设计成果，落地到代码中，所以在任务一时，并不建议设计的过于复杂，这将会导致任务二实现起来难度也会比较大。

希望对你有所帮助，无论如何，不要将任务看的过于复杂，本质是实现一套 Plugin 机制（有 TypeScript 的机制可以参考，而且并不复杂）；但不要给自己设上限，发挥自己的想象和实力。拆分出两个任务，是希望谋而后动，有设计才能更好的实现，也引导参与者在今后的项目中，有此习惯，希望可有所得。

[为 go-wechaty 设计实现 插件体系] 进度报告
日期：07-18
本周完成的成果
注：本周为第一次进度报告，实际报告内容的范围从项目开始时间（7月1日）到现在。

学习 TypeScript 语法基础，阅读 Wechaty 项目源码。
对照阅读 go-wechaty 项目源代码。
初步设计 go-wechaty 插件体系，编写文档，与导师交流沟通。

对插件机制的设想（WIP 非最终版本）

当只有一个聊天机器人，且机器人有多种功能时，最能体现插件机制的便利性。
充分利用其他开发者的成果。插件系统可以封装细节。Bot 开发者不需要学习相关依赖库如何调用，使用其他开发者开发好的 Wechaty 插件可以马上上手。

举个例子：
插件A检测用户消息情绪或者是否有攻击他人的词语；插件B接收检测结果并记录，决定是否发起踢人投票；插件C接收检测结果，生成每周统计结果。A的运算结果会被 B、C 等多个插件使用。
当开源社区中出现了A插件，其他插件开发者不需要开发重复功能，直接可以使用。
功能（WIP 非最终版本）
每一个插件类似于一个单独的wechaty实例，互相隔离，通过插件管理对象共享数据。允许相同的插件运行多个插件实例。

插件开关
优先级
事件拦截 (跳过后续插件对该事件的处理)
共享数据

伪代码实现（WIP 非最终版本）
非最终版本，且存在大量语法错误
插件使用者的代码 bot.go
bot.Use(&HelloPlugin{name:"hello001", volume:5})

插件开发者的代码 helloPlugin.go
// 实现WechatyPlugin接口
type HelloPlugin struct {
	name string
	volume int
}

func (p *HelloPlugin) Load (manager *WechatyPluginManager) {
	p.OnLogin(...)
	 .OnMessage(func {
        if true {
            // 开关
            manager.GetPlugin("ding").SetActive(false)
            p.(WecahtyPlugin).SetActive(false)

            // 优先级
            manager.SetPriority(p, High)

            // 事件拦截
            manager.NextRound()
        }
        // 数据分享, todo
        fmt.Println(p.SetData("hello", "Hi!"))
        fmt.Println(manager.GetPlugin("hello001").GetData("hello").(string))
    })
}

wechaty.go
增加了pluginManager变量，原先的bot开发方法仍然兼容，增加了插件相关的代码。
type Wechaty struct {
	*Option

	puppet wp.IPuppetAbstract
	events events.EventEmitter

	pluginManager WechatyPluginManager //增加部分

	message        _interface.IMessageFactory
	room           _interface.IRoomFactory
	contact        _interface.IContactFactory
	tag            _interface.ITagFactory
	friendship     _interface.IFriendshipFactory
	image          _interface.IImageFactory
	urlLink        _interface.IUrlLinkFactory
	roomInvitation _interface.IRoomInvitationFactory
}

func (w *Wechaty)Use(plugin *WechatyPlugin) {
	w.pluginManager.AddPlugin(plugin)
}

func (w *Wechaty)Start() {
	// 省略之前代码.....
	initPlugins(w);
}

// 把所有Puppet事件都注册了一遍，全部指向 plugin manager
func initPlugins(w *Wechaty){
    for _, name := range schemas.GetEventNames() {
        name := name

        // 这里重复注册了，不太优雅
        w.puppet.On(name, func(i ...interface{}){
            w.pluginManager.Emit(name, i...)
        })
    }
}

wechaty_plugin.go
每一个插件，相当于一个局部的wechaty实例，各自储存内部的回调函数（events）。
type WechatyPlugin interface {
    enable bool
    priority int

    events events.EventEmitter

    Load(manager *WechatyPluginManager)
    // TODO:数据存储
    GetData(string dataName)
    SetData(string dataName, data interface{})
}

// 同 wechaty.registerEvent，但是回调函数存储在WechatyPlugin.events
func (p *WechatyPlugin) registerEvent(name schemas.PuppetEventName, f interface{}){
    // 同 wechaty.registerEvent
    p.events.On(name, func(data ...interface{}) {
        // ...省略...
    })
}

// 同 wechaty，调用registerEvent
func (p *WechatyPlugin) OnMessage(){
    // todo ...
}

// 开关功能
func (p *WechatyPlugin) SetActive(enable bool) {
    p.enable = enable
}

type WechatyPluginManager struct {
    priorityChanged bool
    nextRound bool
    plugins	[]WechatyPlugin
}

func(m *WechatyPluginManager) AddPlugin(p *WechatyPlugin) {
    m.plugins = append(m.plugins, p)
    // 优先级排序过程省略
    p.Load(m)
}

func(m *WechatyPluginManager) GetPlugin(name string) *WechatyPlugin{
    // 检索，从plugins返回指针
}

func(m *WechatyPluginManager) SetPriority(plugin *WechatyPlugin, priority PluginPriority) {
    m.priorityChanged = true
    plugin.priority = priority // PluginPriority类型是int,todo
}

func(m *WechatyPluginManager) NextRound() {
    m.nextRound = true
}

// 按照优先级顺序，逐个遍历运行插件内存储的回调函数。
func(m *WechatyPluginManager) Emit(name, i ...interface{}){
    if m.priorityChanged {
        // 重新排序
        m.priorityChanged = false
    }
    for plugin := range m.plugins {
        // 开关
        if plugin.enable{
            // 方法类似wechaty.initPuppetEventBridge
            // 逐个遍历event,触发插件内的保存的回调函数。
            for _, name := range schemas.GetEventNames() {
                switch name {
                case schemas.PuppetEventNameDong:
                    plugin.events.emit(name, i[0].(*schemas.EventDongPayload).Data)
                case schemas.PuppetEventNameError:
                    // ... 省略 ...
                    // 这部分太长了，可以提取成WechatyPlugin的方法。

        }
        // 事件截断
        if m.nextRound {
            m.nextRound = false
            break
        }
    }
}

本周遇到的困难和需要配合的地方

TypeScript 语法较复杂，功能强大，对刚入门的新手来说存在一定难度。
第一次开发 Go 项目，需要时间上手。

下周的开发计划和预计成果

目前插件机制设计仍有一些不满意的地方，需要进一步修改完善。
更深入地阅读 go-wechaty 源码，目前在设计插件机制的过程中，我只考虑了应该会用到的部分，对项目加深理解有利于更好的设计新功能。
如果插件机制的设计已经接近满意，开始开发初步版本。

@FINCTIVE It is great to seeing your progress about the Go Wechaty Plugin System!
Your code and analytics is very good, please keep moving and looking forward to using our plugin for Go Wechaty!

@FINCTIVE 相信我们的 go-wechaty 插件系统在不久的将来就能使用啦～

[为 go-wechaty 设计实现 插件体系] 进度报告
日期：07-24
本周完成的成果

开始根据设想的文档写代码，代码仓库链接：go-wechaty/tree/plugin
开始编写试验插件(代码未上传）。
更正了原本文档伪代码中的设计错误，如 interface 定义不允许有成员变量。
尝试了各种插件机制的设计，精简代码中拖沓的实现。目前仍有许多待解决问题，已逐一记录。

本周遇到的困难和需要配合的地方

对 Go 语言的编程方式不够熟悉，实现一些面向对象编程概念需要查阅资料、跳出旧的思维模式。

下周的开发计划和预计成果

继续完善插件机制代码，解决代码中的各类问题。
写文档、完善注释，与其他开发成员交流。

其他需要说明和同步的事项
试验插件的代码仓库：hello-plugin，暂时没有内容，且有可能有变动。当代码完成度达到一定程度时会先上传到这里 :smile:

[项目名称] 导师评分
日期：07-18
本周进度报告的评分

[ ] 1: Deliverable not acceptable
[ ] 2: Deliverable is below expectations
[ ] 3: Deliverable is OK
[x] 4: Deliverable is above expectations
[ ] 5: Deliverable is perfect

其他需要说明和同步的事项
第一周的设计工作完成的十分漂亮，超出预期；虽然没有达到完美的状态，但从设计的角度，一些细节是可以在编码的过程中慢慢磨合的，比如优先级的实现部分。
打4分是一个中肯的分数，没有打5分有些细节没有达到完美的状态，但是依然不影响设计思路，综合起来4分是一个中肯的分数，希望不要对分数有所纠结，加油！

[项目名称] 导师评分
日期：07-24
本周进度报告的评分

[ ] 1: Deliverable not acceptable
[ ] 2: Deliverable is below expectations
[ ] 3: Deliverable is OK
[x] 4: Deliverable is above expectations
[ ] 5: Deliverable is perfect

其他需要说明和同步的事项
本周的进度非常不错，但相对来说就没有上周的惊艳，不过完成度还是不错的，不过有些建议，可以参考下：

可以先建立待处理PR: 创建 WIP PR，这样有一些自动化的 Action 可以帮助你处理一些语法或格式上的检查，也方便我们针对代码进行讨论，当然你想等稍后更完善些也是可以的。
存在一些竞态问题，你可以通过 Google Go 竞态 获得详细的内容，比如在 SetData() 中直接操作 Map。
我没有实际运行，但通过代码看，在实际运行中还会存在一些空指针之类的问题。

当然，现在还是前期，我提出如上建议，只是在跟进过程中发现了这些容易看出的问题，你不必立刻着手去调整，也不必因此而打乱自己的计划。

[为 go-wechaty 设计实现 插件体系] 进度报告
日期：08-02
本周完成的成果

开始编写用于功能演示、测试用法的插件 Demo（详情见下方说明）。
在编写 Demo 的过程中发现了一些插件机制的问题，以反馈为参考重新修改了插件机制的设计。比如：插件执行前可能需要执行判断代码，才决定是否执行，为此我加入了 CheckBlock 函数。但在后续试验中发现这种解决方案并不成立，而且有更简洁的方式实现（详见下方说明）。
对插件机制的代码进行了其他小幅度修改，如删除了累赘的Name属性、将插件的事件注册移动到其他普通事件之前。
修复了一些Bug，主要是nil指针未初始化的问题。

go-wechaty 插件分支链接
插件 Demo 仓库链接 （我还没有实际运行过，该项目目前只做演示说明用途。）
现阶段插件机制的使用方法如下，代码对应的文件链接: demo_bot.go （有删改）
插件 wordCounter：统计消息字数。
插件 tldr：读取插件 wordCounter 的统计结果，如果超过50字，回复「太长不看」，截断消息，跳过后续插件对消息事件的处理。
插件 xp：读取插件 wordCounter 的统计结果，如果超过15字，回复「xp+1」；记录 xp 值（经验值），经验超过10，设置数据 LevelUp 为 true。
以下的代码中，增加了一个“临时”插件，当消息中含有“通知”时，暂时关闭 tldr 插件。用插入新插件的方法来控制其他插件。
当升级时(xp 插件数据 LevelUp 为 true)，禁用 xp 插件。
func main() {
	var bot = wechaty.NewWechaty()

	wordCounterPlugin := word_counter_plugin.NewWordCounterPlugin()
	tldrPlugin := tldr_plugin.NewTLDRPlugin(wordCounterPlugin, "太长不看")
	xpPlugin := xp_plugin.NewXPPlugin(wordCounterPlugin)

	bot.Use(wordCounterPlugin)
	// use a simple plugin to manage other plugins
	bot.Use(wechaty.NewPlugin().OnMessage(func(message *user.Message) {
		if strings.Contains(message.Text(), "通知") {
			tldrPlugin.DisableOnce()
		}
	}))
	bot.Use(tldrPlugin)
	bot.Use(xpPlugin)

        bot.OnMessage(func(message *user.Message) {
		if wordCounterPlugin.IsActive(){
			// Get values from a plugin
			count := word_counter_plugin.GetResult(wordCounterPlugin)
			fmt.Println(count)
		}

		if xpPlugin.IsActive() && xp_plugin.IsLevelUp(xpPlugin) {
			fmt.Println("Level Up !")
			xpPlugin.SetEnable(false)
		}
	}))

	var err = bot.Start()
    // 省略后续代码
}

本周遇到的困难和需要配合的地方
遇到的困难：

对 Go 语言开发的设计思路依旧不熟悉，仍需努力。
从 Bot 开发者角度、插件开发者角度思考插件机制，到实际代码之间的编程设计存在一定难度。

下周的开发计划和预计成果

继续打磨插件系统的设计。目前仍有一些设计有提升空间，但仍未有可行的思路，比如：数据传递 SetData/GetData 如果能使用具体类型实现，Bot开发者使用起来会非常方便。一些代码与项目中其他部分有重复。
继续学习项目中的其他部分，加深理解。
尝试把 Demo 运行起来。
完善文档。

其他需要说明和同步的事项

我会在代码更完善一些的时候建立待处理PR，目前代码中还有一些Todo事项没有解决。
关于竞态的问题，我认为现阶段暂时不需要考虑。因为当前的 Plugin 事件以及 Wechaty 事件，都是依赖 go-wechaty/wechaty-puppet/events/events.go 里的 emitter 执行的。这里的实现方法没有使用并行执行。如果需要并行执行，许多代码都要修改实现方式。我的想法可能存在错误，欢迎各位导师补充、指正 :smile_cat:

@FINCTIVE 竞态是肯定存在的，可以看下 wechaty-puppet-hostie/puppet_hostie.go 触发事件地方，目前每次触发事件都开了一个新的 goroutine，所以是并行执行😊,  所以如果在事件中对插件有 set 相关操作就会导致竞态.

@FINCTIVE �竞态是肯定存在的，可以看下 wechaty-puppet-hostie/puppet_hostie.go 触发事件地方，目前每次触发事件都开了一个新的 goroutine，所以是并行执行, 所以如果在事件中对插件有 set 相关操作就会导致竞态.

收到，看来我需要对Puppet部分好好研究一下了 :eyes:

[为 go-wechaty 设计实现 插件体系] 导师评分
日期：08-02
本周进度报告的评分

[ ] 1: Deliverable not acceptable
[ ] 2: Deliverable is below expectations
[ ] 3: Deliverable is OK
[x] 4: Deliverable is above expectations
[ ] 5: Deliverable is perfect

其他需要说明和同步的事项
很高兴看到新的进度，下面的代码，十分适合作为扩展的样例，当然不是希望插件的编写者使用这样的方法去实现扩展，但是这样可以大大降低新手去理解和接触扩展的难度（从一定的角度它并不是很好的实现，但却是一种很简单用法展示）
// use a simple plugin to manage other plugins
bot.Use(wechaty.NewPlugin().OnMessage(func(message *user.Message) {
	if strings.Contains(message.Text(), "通知") {
		tldrPlugin.DisableOnce()
	}
}))

@dchaofei 超飞也提到了，事件都是 go 出来处理的，所以对于扩展来说，消息是并发的，但同一消息，扩展是顺序的（另一点：扩展注册的时候，优先级就会确定）；如果要改变扩展的值会出现并发问题，但是如果是改变消息的上下文，按照 event. Emit 是顺序的；所以 SetData 需要是每个消息的上下文；如果扩展自己需要根据消息改变扩展的配置，需要内部加锁处理。
这是对Go-wechaty的推理，但实际情况，扩展也可能自己也可以 go 出去，所以前期我们可以简单的直接加锁，后期有优化空间的时候再作考虑。

曾提到插件管理的部分，需要跳出消息和扩展本身来看，权限不可下放，扩展可以通过消息上下文传递内容，但不能控制其他扩展。

Link

event. Emit

[为 go-wechaty 设计实现 插件体系] 进度报告
日期：08-09
本周完成的成果

本周无代码产出。
阅读 go-wechaty 项目中 wechaty-puppet 以及 wechaty-puppet-hostie源码。
学习 Go 并发编程。

go-wechaty 插件分支链接
插件 Demo 仓库链接
下周的开发计划和预计成果
整理文档，写中期报告。
其他需要说明和同步的事项
由于需要返校参加期末考试，我在接下来两周的时间（8月10日-8月24日）无法进行开发工作。
在略读了 puppet-hostie 源码后我忽然明白为什么丁小雨导师 @dingdayu 建议在每个消息的上下文传递插件之间的数据，而之前我的设计没有考虑并行运行，只参照了 emitter.Emit 的顺序调用。所以目前的设计会推倒重来，重新设计。
按照预想中的情况，现在的代码加上锁机制之后是可以运行的，但是这样会阻挡后来的 gorountine，并发效率会大大降低。目前的设计中有一些特性是我比较满意的（比如插件变量注册事件的方式和 wecahty 变量一致），我希望能改进当前的设计，将数据传递通过消息上下文变量实现。由于这个原因，我没有给现在的代码加上锁机制，方便修改代码。
请教一些问题

PuppetHostie 的 Emit 函数具体实现在哪里呢？我没有找到相应代码。
插件的执行顺序（优先级）在运行的时候是否可变？这个功能似乎不重要，我暂时想不到实际应用场景，而且在并发运行的条件下实现这个功能增加了复杂性。

@FINCTIVE 这里解答一下 puppet 的事件注册(on)和触发(emit)的时机.
puppet 注册事件 on 可以看这里, 是 wechaty 启动时注册: https://github.com/wechaty/go-wechaty/blob/master/wechaty/wechaty.go#L280
puppet 事件被触发 emit 看这里, 是 puppet hostie 接收到 grpc 消息后触发: https://github.com/wechaty/go-wechaty/blob/master/wechaty-puppet-hostie/puppet_hostie.go#L235
event 的实现看这里: https://github.com/wechaty/go-wechaty/blob/eed5490b90f567f89f1ef338ec5b14327ed7aaba/wechaty-puppet/events/events.go
你问的 PuppetHostie 的 Emit 函数具体实现是指 emit 之后会执行什么逻辑吗？如果是的话那就是这里 https://github.com/wechaty/go-wechaty/blob/master/wechaty/wechaty.go#L280

@dchaofei 感谢解答。不过我想问的是另一方面的问题。
Emit方法是在EventEmitter 接口 定义的；而 emitter 类型(struct)实现了EventEmitter接口，它的 Emit 方法实现 在这里
PuppetHostie类型的 Emit 方法的实现在哪里呢？PuppetHostie想要实现EventEmitter接口，应该要有Emit方法的实现吧？
对 Go 语言不太熟悉，希望能得到解答 :smile:

puppet 是直接继承了 events.EventEmitter, 而 puppet-hostie 又继承了 puppet，所以 event 的所有实现都在 events.EventEmitter 里。
这里会把 events.EventEmitter 的实现注入到 puppet:
https://github.com/wechaty/go-wechaty/blob/master/wechaty-puppet/puppet.go#L138
// NewPuppet instance
func NewPuppet(option Option) (*Puppet, error) {
	......
	return &Puppet{
		......
		EventEmitter:               events.New(),
		......
	}, nil
}

这里是继承结构
type EventEmitter interface {
    ......
    Emit(EventName, ...interface{})
    // On registers a particular listener for an event, func receiver parameter(s) is/are optional
    On(EventName, ...Listener)
    ......
  }

// https://github.com/wechaty/go-wechaty/blob/master/wechaty-puppet/events/events.go#L142
// emitter 结构体实现了 EventEmitter 接口
type emitter struct {
    maxListeners int
    evtListeners Events
    mu           sync.Mutex
  }

// https://github.com/wechaty/go-wechaty/blob/master/wechaty-puppet/events/events.go#L142
func (e *emitter) Emit(evt EventName, data ...interface{})

// https://github.com/wechaty/go-wechaty/blob/master/wechaty-puppet/puppet.go#L100
// Puppet puppet abstract struct
type Puppet struct {
        ......
	events.EventEmitter  // 这里虽然是接口，但是具体实现是由 type emitter struct 完成的
        ......
}

// https://github.com/wechaty/go-wechaty/blob/master/wechaty-puppet-hostie/puppet_hostie.go
type PuppetHostie struct {
	*wechatyPuppet.Puppet
	grpcConn    *grpc.ClientConn
	grpcClient  pbwechaty.PuppetClient
	eventStream pbwechaty.Puppet_EventClient
}

go 语言的继承是通过组合来实现的。
以上，是否能解答你的疑问？

@dchaofei 明白了！讲得很详细，感谢 :heart:
Go语言真神奇 :smile_cat:

go-wechaty 插件机制开发说明文档（阶段性总结）
与进度报告中的更新说明不同，本文将从整体描述目前 go-wechaty 插件机制的开发设计情况。我对 Go 程序开发不是很熟悉，目前的设计仍可能有潜在问题，我会认真听取你们的意见和建议 :smile:
至此插件机制的实现并非最终版本，后续会有较大更改。
相关代码

插件机制开发分支 FINCTIVE/go-wechaty
插件示例代码仓库 FINCTIVE/wechaty-demo-plugin

功能说明
优先级
对插件设置优先级，按照优先级排序决定执行顺序。
开关

禁用、启用插件。
本轮消息暂时禁用插件。
消息拦截(跳过后续插件对消息的处理)。

共享数据
每个插件内部可以存储数据，与其他插件共享。
实现方式
相关代码：插件机制开发分支 FINCTIVE/go-wechaty
插件机制围绕两个 struct 类型实现：Plugin, PluginManager
在 Wechaty 结构中增加成员 pluginManager, 该变量管理所有插件的状态。每个插件是一个 Plugin 类型的结构体。
在 Wechaty 中，事件管理是通过 events.EventEmitter 实现的，于是我把 EventEmitter 加入到了每个插件中。
具体的状态管理参见 PluginManager.emit方法
使用方式
相关代码：插件示例代码仓库 FINCTIVE/wechaty-demo-plugin
插件编写 （来源）：
func NewWordCounterPlugin() *wechaty.Plugin{
	p := wechaty.NewPlugin()
	p.OnMessage(func(message *user.Message) {
		count := len(message.Text())
		p.SetData("wordCount", count)
	})
	return p
}

插件使用(来源)：
var bot = wechaty.NewWechaty()
wordCounterPlugin := word_counter_plugin.NewWordCounterPlugin()
wordCounterPlugin.SetPriority(1)
tldrPlugin := tldr_plugin.NewTLDRPlugin(wordCounterPlugin, "太长不看")
xpPlugin := xp_plugin.NewXPPlugin(wordCounterPlugin)

// Use a simple plugin to manage other plugins
bot.Use(wechaty.NewPlugin().OnMessage(func(message *user.Message) {
    if strings.Contains(message.Text(), "通知") {
        tldrPlugin.DisableOnce()
    }
}))
bot.Use(tldrPlugin).Use(xpPlugin).Use(wordCounterPlugin)

问题与改进
以上实现方式在单线程的情况下是可行的，但是 go-wechaty 采用了高效率的并行执行（详见 wechaty-puppet-hostie/puppet_hostie.go）每次触发事件都会启动一个新的 goroutine。
我会在后续的开发中，把数据传递部分的代码通过事件触发的上下文实现，解决并行冲突问题。

[为 go-wechaty 设计实现 插件体系] 导师评分
日期：08-09/08-16
本周进度报告的评分

[ ] 1: Deliverable not acceptable
[ ] 2: Deliverable is below expectations
[ ] 3: Deliverable is OK
[x] 4: Deliverable is above expectations
[ ] 5: Deliverable is perfect

其他需要说明和同步的事项
很抱歉上周没有即时进行评分，Week4 和 Week5 合并到这里；这里主要是对中期报告进行一个汇总（评审已提交到对应的 issue 里），很高兴在中期报告里，已经能够看到功能的雏形，相比于前两周已经具有很高的完善度。
@dchaofei 导师，上周解释了 Go 语言通过组合实现的继承，相信 @FINCTIVE 对 Go 语言的一些特性有着更进一步的了解；关于对数据传递部分通过实践触发，Go 社区里有着经典的一句话：不要通过共享内存来通信，而应该通过通信来共享内存。 分享给你。

[为 go-wechaty 设计实现 插件体系] 进度报告
日期：08-31
本周完成的成果
重新设计插件机制传递值的方式，实现通过上下文(Context)的方式传递数据。
代码
本周遇到的困难和需要配合的地方
Context应该放在哪里？

方案A: 放在 wechaty 的所有事件中，这样的好处是可以在普通代码中控制插件，但是这种会改变API的参数列表:
比如 OnMessage(f EventMessage)， 它的原本参数是： EventMessage       func(message *user.Message)
加入Context后变成了：PluginEventMessage func(context *PluginContext, message *user.Message)
因此，我认为这个方案行不通，但也可能有更好的设计，能让普通代码访问到每次事件的context变量。

方案B:将Context限制在插件机制内。
这样的弊端是:如果需要管理插件，则需要临时建立一个插件来编写管理代码（对应方法）。

代码重复问题
由于我想让插件结构也能像wecahty变量一样使用 OnMessage 等方法，因此代码中存在大量重复部分，但又有略微不同，我暂时没有想到合并的方法。这可能会照成代码维护的隐患。
下周的开发计划和预计成果

写新的演示代码。
尽早把项目 PR 到 wechaty/go-wechaty 仓库。
完善、测试代码，修改错误。
完善注释。
在实际运行环境中测试。

@FINCTIVE 其实不必再搞个 PluginEvent，直接采用方案A, 把原来的 event 第一个参数加上 context, 然后在 hostie grpc 有事件的时候调用 event 就传入 context, 可以直接使用 go 语言的 context

type (
  EventDong       func(ctx context.Context, data string)
  EventLogin       func(ctx context.Context, user *user.ContactSelf)
  ......
)

@FINCTIVE 其实不必再搞个 PluginEvent，直接采用方案A, 把原来的 event 第一个参数加上 context, 然后在 hostie grpc 有事件的时候调用 event 就传入 context, 可以直接使用 go 语言的 context

收到，我去研究研究 :thinking:

[为 go-wechaty 设计实现 插件体系] 进度报告
日期：09-08
本周完成的成果
代码

go-wechaty PR
用法演示

成果

修改 PluginContext 到所有 wechaty 事件中。
重新设计了插件结构，早期版本中每一个插件结构存储了一个 event.Emitter，并通过 PluginManager 管理，存在大量难以维护的重复代码；现在的版本删除了 PluginManager，插件结构只存储回调函数，事件注册到 wecahty 的 event.Emitter 中。这样精简设计后，解决了原先代码重复的问题。

本周遇到的困难和需要配合的地方
在 Plugin 事件注册时，我想到了两种版本：

一种是使用反射来“包裹”回调函数，加入插件管理功能。
另一种是在注册时手动“包裹”插件管理功能，这个方法执行效率更高，但是当API修改时需要手动修改这里的内容。

截取自 plugin.go

// TODO: reflect version
func (p *Plugin) registerPluginEvent(wechaty *Wechaty) {
	for _, pluginEvent := range p.events {
		pluginEvent := pluginEvent
		f := func(data ...interface{}) {
			defer func() {
				if err := recover(); err != nil {
					wechaty.events.Emit(schemas.PuppetEventNameError, fmt.Errorf("panic: event %s %v", pluginEvent.name, err))
				}
			}()
			values := make([]reflect.Value, 0, len(data))
			for _, v := range data {
				values = append(values, reflect.ValueOf(v))
			}
			// check whether the plugin can be used.
			if values[0].Interface().(*PluginContext).IsActive(p) &&
				values[0].Interface().(*PluginContext).abort != true {
				_ = reflect.ValueOf(pluginEvent.f).Call(values)
			}
		}
		wechaty.registerEvent(pluginEvent.name, f)
	}
}

// TODO: reflect version
func (p *Plugin) OnScan(f EventScan) *Plugin {
	p.events = append(p.events, PluginEvent{
		name: schemas.PuppetEventNameScan,
		f: f,
	})
	return p
}

// TODO: normal version(temporary)
func (p *Plugin) registerPluginEvent2(wechaty *Wechaty) {
	for _, pluginEvent := range p.events {
		wechaty.registerEvent(pluginEvent.name, pluginEvent.f)
	}
}

// OnScan ...
// TODO: normal version(temporary)
func (p *Plugin) OnScan2(f EventScan) *Plugin {
	p.events = append(p.events, PluginEvent{
		name: schemas.PuppetEventNameScan,
		f: func(context *PluginContext, qrCode string, status schemas.ScanStatus, data string){
			if context.IsActive(p) && !context.abort {
				f(context, qrCode, status, data)
			}
		},
	})
	return p
}

我应该使用哪一种版本呢？我个人倾向使用普通版本。
下周的开发计划和预计成果

解决 PR 合并报错
在 PluginContext 中实现 Go 语言中 Context 的并发管理功能
测试、修改错误

@FINCTIVE 我觉得反射更好些，后期有新的 event 不需要再维护了
另外我也有点建议，但是不一定对哈， @dingdayu 一起看下：
1. event 新增了一个签名字段 context *PluginContext
叫做 PluginContext 会很奇怪, 因为我 on 一个事件的时候和 plugin 根本就没关系
bot.OnScan(func(ctx *wechaty.PluginContext, qrCode string, status schemas.ScanStatus, data string) {
	fmt.Printf("Scan QR Code to login: %v\nhttps://wechaty.github.io/qrcode/%s\n", status, qrCode)
})

我觉得这里签名这里可以使用 context.Context 就更好了，wechaty.PluginContext 来实现 context.Context 接口。
这样 context.Context 就不单单是为 plugin 使用的, 更通用些

@FINCTIVE 我觉得反射更好些，后期有新的 event 不需要再维护了

收到，反射这块我再研究验证一下正确性。

我觉得这里签名这里可以使用 context.Context 就更好了，wechaty.PluginContext 来实现 context.Context 接口。
这样 context.Context 就不单单是为 plugin 使用的, 更通用些

这几天我可能会改成 WechatyContext，因为我想封装一些字段和函数，对于一些功能 Go 语言的 context.Context 可能不是很方便，我会把这两个方面的需求整合到一起。

@dchaofei @FINCTIVE

关于注册，我也更倾向于反射的方式注册事件。
context.Context 是一个接口类型，可以传入任意实现了 context.Context 的类型；wechaty.PluginContext 也好，wechaty.WechatyContext 也好，都可以直接传入。

[为 go-wechaty 设计实现 插件体系] 进度报告
日期：09-15
本周完成的成果
代码

go-wechaty PR
用法演示(demo_bot.go) / 完整仓库

成果

修改 PluginContext 到所有 wechaty 事件中。
重新设计了插件结构，早期版本中每一个插件结构存储了一个 event.Emitter，并通过 PluginManager 管理，存在大量难以维护的重复代码；现在的版本删除了 PluginManager，插件结构只存储回调函数，事件注册到 wecahty 的 event.Emitter 中。这样精简设计后，解决了原先代码重复的问题。
增加了单元测试。
修改了部分设计。为方便阅读，完整文档见下方。

下周的开发计划和预计成果

测试、修改错误。
尝试实现插件。

go-wechaty 插件机制

go-wechaty PR
用法演示(demo_bot.go) / 完整仓库

实现思路
Plugin 结构存储插件相应的回调函数，它支持 Wechaty 中的所有事件注册函数(比如 OnMessage())，使用方式与 Wechaty 实例一致，便于把 Bot 代码封装成为插件。
新增加的 wechaty.Context 结构类型用于一轮消息事件的控制、传递。在每一次接收到新的消息事件时传入一个新的变量。同时，该结构实现了 context.Context 接口。
功能
调用顺序（优先级）
按照注册顺序依次调用。
其中，Bot 逻辑代码与插件逻辑代码可以存在交错执行顺序。即：
var bot = wechaty.NewWechaty()
bot.OnMessage(func(context *wechaty.Context, message *user.Message) {
	// Part A
})
bot.Use(pluginB).Use(pluginC)
bot.OnMessage(func(context *wechaty.Context, message *user.Message) {
	// Part D
}

执行顺序：Part A → pluginB → pluginC → Part D
开关

禁用、启用插件。
对应方法：Plugin.SetEnable()
通过加锁的方式修改插件属性变量。这个方法是并发安全的。

在本轮消息事件中，暂时禁用某一个插件。
对应方法：Context.DisableOnce()

消息拦截，跳过后续插件对该本轮消息事件的处理。同时终止所有仍在进行的插件代码操作，即先前插件产生的 Goroutine。
对应方法：Context.Abort() 以及 Context.Done()

在并发程序中，控制插件内部 goroutine 的结束。用法与 Go 语言中的 context.Context (WithCancel())相同。
对应方法：Context.Abort() 以及 Context.Done()
示例：
plugin := NewPlugin()
plugin.OnMessage(func(context *wechaty.Context, message *user.Message) {
	go func(ctx context.Context) {
        // other code ...
        select {
        case <-ctx.Done():
            // terminated by wechaty.Context.Abort()

        // other code ...

        }
	}(context)
})

// other code ...

// context.Abort() will terminate the goroutine

数据传递
通过 Context 传递数据，数据只在本轮消息时间有效。
不支持并发读写。
对应方法：Context.SetData(), Context.GetData()

[为 go-wechaty 设计实现 插件体系] 进度报告
日期：09-24
本周完成的成果
代码

go-wechaty PR
插件Demo - wordcounter
插件机制用法

成果

根据原先编写的插件机制编写了一个插件Demo wordcounter，并在实际环境中运行成功。该插件的功能是统计限定小时内群成员发言词数。

import "github.com/FINCTIVE/wordcounter"
func main() {
    var bot = wechaty.NewWechaty()
    bot.Use(wordcounter.New(wordcounter.Config{
            SearchKeyword:  "#排名",
            MaxResultCount: 10,
            Hours:          6,
        }))
    }
    // starting bot ...
}

本周遇到的困难和需要配合的地方

在服务器上部署运行 Token 转换的 docker image 遇到问题，在排错尝试了几天后成功运行。

下周的开发计划和预计成果

根据导师意见测试、修改错误。
写总结报告。

其他需要说明和同步的事项
我认为到目前为止，距离项目的核心目标已经非常接近了，请导师们评审我的代码 :smile_cat:
@dingdayu @dchaofei

评审结果
评审对象

评审内容：结项报告
提交人：林昊翰

评审结果

项目完成度：安装原计划方案，完成原计划的功能开发
学生参与度：项目参加活动的部分，全部由学生完成
代码贡献量：Plugin 100% 由学生完成，包涵一个示例 Plugin，占到整个开源项目的10%-20%。
综合评价及建议：

昊翰同学的学习能力，和能动性特别强，能够很快的上手新的知识和方法；从最初的对开源项目的无从下手，到熟悉常规的共享代码的方式，以及对 Go 的掌握，都能感受到进步和收获；相信这么一次短暂的活动经历，能在你今后的工作和生活中成为谈资。
相信大部分从学校过渡到工作中，都会对长周期的项目产生动摇，其实你只需要按照原计划去完成既定工作就好，大项目拆解成小项目是计划和执行中很重要的部分；报告中提到了周计划，很欣慰你看到了这点带给你的价值，他使你没有偏离原有计划的方向，也希望你今后的工作中能从此有所收获。

最终评审结果：通过

@dingdayu Thanks for the mentoring!
@FINCTIVE Thank you very much for joining the Wechaty open source project and finished Summer 2020 successfully!

@dingdayu Thanks for the mentoring!
@FINCTIVE Thank you very much for joining the Wechaty open source project and finished Summer 2020 successfully!

authors: FINCTIVE MitsuhaOma ShiinaOrez dchaofei dingdayu huan

repo: wechaty/summer-of-code


text:
Java wechaty transplant blog

Fixes # .
Make sure these boxes are checked before creating your pull request -- thank you!

[x] Add Blog Header, including title, author, date.
For example:
---
title: "Your Great Blog Title"
author: your_github_id
image: /assets/2020/08-your-blog-slug/teaser.jpg
---

YOUR_FIRST_SENTENCE_SHOULD_BE_A_SUMMARY_FOR_YOUR_POST

[x] Keep all filenames & url as lowercase, and use - to connect words instead of space. e.g. 2017-10-06-wechat-pc-impactor instead of 2017-10-06-WeChat PC Impactor,

[x] Embed the photo & video before publishing, save all external file to a folder named by ${MONTH}-${YOUR_BLOG_SLUG}/ under /assets/2020 directory.

[x] Add teaser image for the blog

[x] Add your self as an author to the author data file at https://github.com/wechaty/wechaty.js.org/blob/master/_developers/YOUR_GITHUB_USERNAME.md with your GitHub username. And please also remember to reference yourself with the Github username in your blog post, so that we can have nice author information besides your blog after we published it!
For excample:
---
name: Jiarui LI (李佳芮)
site: https://lijiarui.github.io
bio: 句子互动创始人 & CEO，微软人工智能最具价值专家 (AI MVP)
avatar: /assets/developers/lijiarui/avatar.png
email: rui@juzi.bot
twitter: https://weibo.com/u/2175505900
---

Here is the example file:

lijiarui.md: https://github.com/wechaty/wechaty.github.io/blob/master/_developers/lijiarui.md
It will shown like this on wechaty blog: https://wechaty.github.io/developers/lijiarui/

To read more about the contribute guideline, visit: https://github.com/wechaty/wechaty.js.org#contribute-guideline

Congratulations! 🎉 🎉 🎉
You become a wechaty contributor successfully! 👏 👏 👏
Please:

[ ] Update your profile here: Contributor List, then other contributors will know you better!
[ ]  Join wechaty org by clicking https://github.com/wechaty
[ ]  Add my wechat: ruirui_0914 and send me this pr link. I will invite you into Wechaty Contributor Room

authors: cunkoulaocai lijiarui


text:
Error in customDomainDnsVerification (DNSSEC)

I'm trying to set up WeDeploy with a Google domain, but I've tried several configuration options and none succeeded.
Console error:
"Ensure progeta.app resolves to dns.wedeploy.com via A, CNAME or ALIAS."
Message in DNSSEC (Google):
{   "Status": 2,   "TC": false,   "RD": true,   "RA": true,   "AD": false,   "CD": false,   "Question": [     {       "name": "progeta.app.",       "type": 1     }   ],   "Comment": "Name servers refused query (lame delegation?) [91.109.245.139, 173.255.231.87, 37.123.115.172, 173.255.215.107, 178.62.47.76, 188.226.197.55]." }
Note:
There is a DNSSEC configuration section in Google Domains, but I did not find anything about generating a key or anything like that in the WeDeploy documentation.
Regards,
Dorcílio Neto.

Problem solved by using Cloudflare.

authors: albertmourato dorcilio


text:
feature: allow comparing exit codes

took a stab at #9
I figured I wouldn't  make exit code a dependency on comparing errors

Thanks!

Released in 0.7.0.

Cool thanks @weirdan ! Appreciate the helpful package

authors: mr-feek weirdan

repo: weirdan/codeception-psalm-module


text:
Ditch the clever "should we build this" logic

We have a bunch of complex build logic that decides to skip building things if we don't think they've changed – this comes from the days of Travis CI, when CI time was much more constrained.
It's not something we'd do if we started from fresh today – and indeed, the concepts-pipeline is a comparable project and has none of this.
This PR deletes all that "clever" logic, in favour of a "build everything all the time" approach. I think this will be more reliable and easier to understand in the long run.

Part of https://github.com/wellcomecollection/platform/issues/5626

repo: wellcomecollection/catalogue-api


text:
books viewed online and search terms for wc.org and wl.org

Request from Vicky Webb for 1/9/20

Listing of digitised books viewed online (1/3/19-30/9/19 vs 1/3/20-30/9/20)

wc.org: GA Data Studio report X Kibana event: search, workType: Books (match on data.workId)
wl.org: GA Data Studio report X Sierra listing MARC data, books (match on b numbers)

title
author
date
b number
Subject headings - displayed as Subject in Works, found in field 650 in MARC
Classmark - this is in both the bib & item record in MARC, but on Works it should appear under location/shelfmark

Most frequent search search terms (1/3/19-30/9/19 vs 1/3/20-30/9/20)

wc.org: Kibana
wl.org: GA Site search/overview

https://wellcomelibrary.org/
https://wellcomelibrary.org/search-the-catalogues/
http://catalogue.wellcomelibrary.org/search/

Requirement changed to:
wc.org:
top 100 books viewed online listed by workId and subject
wl.org:
top 100 b-numbers for works viewed online

Datasets delivered. Collections might require assistance writing SQL queries on Sierra data in a few months.


text:
adding some guidance of creating an exhibition guide in Prismic

Who is this for?
Editors and anyone who wants to add an exhibition guide to weco.org. This work forms part of https://github.com/wellcomecollection/wellcomecollection.org/issues/8106 and https://github.com/wellcomecollection/wellcomecollection.org/issues/8107 (Identify the most useful data format for each media type).
What is it doing for them?
It talks them through the process of adding a guide, tells you how it works in terms of what shows on weco.org and gives some tips on how to label audio files before you upload them to the Prismic Media Library.

@melanierogan pending putting this into Notion, only one comment.
Rather than filenames in the format
ExhibitionTitleHere_AudioWithDescription_stoptitle_stopnumber
could we have them in the format
ExhibitionTitleHere_AudioWithDescription_stopnumber_stoptitle
-- that way when you list them in a directory, they'll be in the right order for the tour

I've moved this to notion, so i'll close this PR

authors: dannybirchall melanierogan


text:
My patience has expired [remove ExtendedPatience]

Another piece of the common-common lib we don't need. I've been replacing ExtendedPatience with IntegrationPatience as I move libraries which used it, and figured I'd try doing it across the entire repo.

I'd say this is only worth it if the number of projects in which this change makes no difference is only a few (one or two). That way we could justify copy pasting the ExtendedPatience code where required.

I may come back to this, but not right now.

Closing due to inactivity.

authors: alexwlchan kenoir

repo: wellcometrust/platform


text:
Improve internal error handling

For https://github.com/wellcometrust/platform/issues/3745

gives up

repo: wellcometrust/storage-service


text:
Youth & Schools Audience Poll

Setting up a one question hotjar poll on youth and school pages asking them whether they are:
14-19 years old
Teach
Parent or carer
Other
This is to help us understand who is actually using these pages which will help the content team decide who the content is primarily aimed at.
Type

🚑 Health report

Needs

[x] User research

Problem to be solved
Youth and schools pages may have difference audiences, we don't know whether it's mainly gatekeepers or younger people themselves accessing the content. Having a better understanding of this will help the content team in writing the pages.

So far:
overview =

Breakdown across page types:
Raw Minds summer project = 12 (14-19), 2 (teacher), 2 (parent)
learning resources = 1 (teacher)
Rawminds main page = 4 (14-19), 2 (teacher), 2 (parent/carer)
Young people main page = 1 (teacher), 1 (parent)
Youth and schools page = 6 (14-19), 1 (teacher), 2 (other, governor, educator in hosp. laboratory)
Sat studio main page = 2 (14-19), 1 (parent)

Poll ended.
Breakdown of pages:
Young people = 5 14-19 yr olds, 5 parents, 1 teacher and 1 other
learning resources = 9 teachers, 1 parent
sat studio = 8 14-19 yr olds, 3 other, two parents
RMsummer project = 38 14-19 year olds, 6 parents, 5 teachers, 2 other
RM  = 6 14-19 yr olds, 1 teacher, 1 parent
youth and schools = 14 14-19 year olds, 10 teachers, 5 other (youth workers), 3 parents
schools = 4 teachers, 4 14-19 year olds, 1 parent
RM ambassadors = 3 14-19 year olds, 1 parent
n.b. they likely answered the poll on the page they came in to the site on, therefore other audiences may have viewed the other pages.


text:
Add more skills

... and unlock them when leveling

done

repo: wendelscardua/file-fixers


text:
question on wenetruntime

When we use decode_main to do decoding, we can apply several parameters likes:
--beam
--lattice_beam
--max_active
--blank_skip_thresh
--ctc_weight
--rescoring_weight
--reverse_weight
--chunk_size
--acoustic_scale
My question is whether wenetruntime support those parameters? if not, what is the purpose please?

weneruntime is depreciated plz
use wenet cli, thx

authors: Mddct kelvinqin


text:
between条件下Range的bug

Specification spec = Specifications.or()
.eq(StringUtils.isNotBlank(mobileBasic.getCity()), "city", mobileBasic.getCity())
.between(StringUtils.isNotBlank(dateInfo.getDateRange()), "createTime", Range.of(Range.Bound.inclusive(dateInfo.getStartDate()), Range.Bound.inclusive(dateInfo.getEndDate())))
.build();
您好，StringUtils.isNotBlank(dateInfo.getDateRange())这一句我已经判空了，却还是进入后面Range.of(Range.Bound.inclusive(dateInfo.getStartDate())导致程序一直报 must not be null，
这个是什么原因呢！

今天修复。没有测试条件为空的情况。

好的，修复好了，告诉我一下，我更新哈，谢谢！

Spring Data内的Range类要去值不能为空。新版本3.2.3去掉了Range类。

jcenter和maven central仓库都已更新。

repo: wenhao/jpa-spec

license: mit


text:
Update code to work with recent k8s.io/client-go

This replaces vendor/vendor.json completely, which probably is not
the correct thing to do. The point of this PR is to show what
changes were necessary to compile stern with a recent k8s.io/client-go

I was debugging some problems that may possibly be related to
the version of k8s.io/client-go that stern was using. This investigation
has not been completed yet, but I thought it would save somebody else's
time if I shared what I needed to change in order to work with a recent k8s.io/client-go
please feel free to close/create another PR if this doesn't work for you,
especially because I wiped out vendor/vendor.json to just get on with it.

does this break any backwards compat with older versions of k8s?

honestly, I have not checked. I guess it has to do more with k8s' deprecation/support policy

I've created another PR which used most of the changes provided by this PR, thanks for that :+1: . The other one does peg the version of the client to v5.0.1 though: https://github.com/wercker/stern/pull/62

Closing as #62 does the same

authors: hatchan lestrrat termie

repo: wercker/stern


text:
How to pass in an arbitrary object as state from request to response or error?

Greetings! First of all, thank you for all your effort on the library, works great 😄
I am using version: 2.4.0.
I am using the interceptors to measure response time, so wanted to know a way I could pass in some kind of object as state between the request and the response functions. I am looking for something like this:
fetchIntercept.register({
    request: function (url, config) {
        return [url, config, {state: 'Good!'}]
    },
    response: async function (response, state) {
        console.log(state) // logs {state: "Good!"}
        return response
    }
})

My request comes that if I store the state inside a file, I'll get the values overriden when different respond at different times.
Any way to walk this around? It could also work to access the state from within the response object, as we do with the request object.
Thanks!

You can modify the config object in the request handler and access the config in your response handler via response.request.

Forget my previous answer the problem is the url and config get merged in a fetch#Request object. I think to realize this the current solution needs to use CLS.

No worries!
Can't a third argument be passed by in between functions?
I created a fork that does that and does the trick, but I think it'd be better if I can use it already with the lib.
Let me know your thoughts!

Hey! I believe you can pass your state object to the config on your request, and then on your response and error interceptors you can access it via response.request.{your_state_object} and error.request.{your_state_object}, respectively.

authors: falcoagustin mlegenhausen ruifcnunes


text:
Will it renew the TLS certificate?

I’ve looked through the Dockerfile and run.sh and I can’t see how it will renew the TLS certificate. Ie I don’t see it running cron in the background or anything like that.
Is cron magically running or is renewals a todo?
I’m new to Home Assistant plug-ins so apologies if this is an obvious question.

@pearj There is no cron.  You can setup a Home Assistant Automation to run the Add-on when you need it to.
See https://www.home-assistant.io/docs/automation/basics/
Example
- id: renew-certificate
  alias: Renew Certificate
  trigger:
  - platform: time
    at: 00:00
  action:
  - service: hassio.addon_restart
    data:
      addon: bea82187-acme-sh
  initial_state: true
  mode: single

authors: pearj wernerhp


text:
AttributeError("module 'six.moves.urllib_parse' has no attribute 'unquote_to_bytes'",)

Windows 10, Python 3.5.2
Manual Install
https://github.com/werwolfby/monitorrent/releases/download/1.1.6/monitorrent-1.1.6.zip
pip install -r requirements.txt
python server.py
When I try to open
http://localhost:6687
I got the following:
f:\monitorent>python server.py
F:\Python35\lib\site-packages\alembic\util\messaging.py:69: UserWarning: 'connection' argument to configure() is expected to be a sqlalchemy.engine.Connection instance, got <sqlalchemy.orm.session.ContextSession object at 0x000001D2048530B8>
warnings.warn(msg)
Server started on 0.0.0.0:6687
AttributeError("module 'six.moves.urllib_parse' has no attribute 'unquote_to_bytes'",)
Traceback (most recent call last):
File "F:\Python35\lib\site-packages\cheroot\server.py", line 1183, in communicate
req.parse_request()
File "F:\Python35\lib\site-packages\cheroot\server.py", line 663, in parse_request
success = self.read_request_line()
File "F:\Python35\lib\site-packages\cheroot\server.py", line 862, in read_request_line
for x in QUOTED_SLASH_REGEX.split(path)
File "F:\Python35\lib\site-packages\cheroot\server.py", line 862, in
for x in QUOTED_SLASH_REGEX.split(path)
AttributeError: module 'six.moves.urllib_parse' has no attribute 'unquote_to_bytes'
AttributeError("module 'six.moves.urllib_parse' has no attribute 'unquote_to_bytes'",)
Traceback (most recent call last):
File "F:\Python35\lib\site-packages\cheroot\server.py", line 1183, in communicate
req.parse_request()
File "F:\Python35\lib\site-packages\cheroot\server.py", line 663, in parse_request
success = self.read_request_line()
File "F:\Python35\lib\site-packages\cheroot\server.py", line 862, in read_request_line
for x in QUOTED_SLASH_REGEX.split(path)
File "F:\Python35\lib\site-packages\cheroot\server.py", line 862, in
for x in QUOTED_SLASH_REGEX.split(path)
AttributeError: module 'six.moves.urllib_parse' has no attribute 'unquote_to_bytes'
AttributeError("module 'six.moves.urllib_parse' has no attribute 'unquote_to_bytes'",)
Traceback (most recent call last):
File "F:\Python35\lib\site-packages\cheroot\server.py", line 1183, in communicate
req.parse_request()
File "F:\Python35\lib\site-packages\cheroot\server.py", line 663, in parse_request
success = self.read_request_line()
File "F:\Python35\lib\site-packages\cheroot\server.py", line 862, in read_request_line
for x in QUOTED_SLASH_REGEX.split(path)
File "F:\Python35\lib\site-packages\cheroot\server.py", line 862, in
for x in QUOTED_SLASH_REGEX.split(path)
AttributeError: module 'six.moves.urllib_parse' has no attribute 'unquote_to_bytes'
Stopping engine
Stopping new_version_checker
Server stopped

Наблюдаю подобную ошибку в Ubuntu 16.04.
/opt/monitorrent# /usr/local/lib/python3.5/dist-packages/alembic/util/messaging.py:73: UserWarning: 'connection' argument to configure() is expected to be a sqlalchemy.engine.Connection instance, got <sqlalchemy.orm.session.ContextSession object at 0x7ff7a5f8c128>
warnings.warn(msg)
Server started on 0.0.0.0:6687
AttributeError("module 'six.moves.urllib_parse' has no attribute 'unquote_to_bytes'",)
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/cheroot/server.py", line 1242, in communicate
req.parse_request()
File "/usr/local/lib/python3.5/dist-packages/cheroot/server.py", line 712, in parse_request
success = self.read_request_line()
File "/usr/local/lib/python3.5/dist-packages/cheroot/server.py", line 912, in read_request_line
for x in QUOTED_SLASH_REGEX.split(path)
File "/usr/local/lib/python3.5/dist-packages/cheroot/server.py", line 912, in
for x in QUOTED_SLASH_REGEX.split(path)
AttributeError: module 'six.moves.urllib_parse' has no attribute 'unquote_to_bytes'
AttributeError("module 'six.moves.urllib_parse' has no attribute 'unquote_to_bytes'",)
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/cheroot/server.py", line 1242, in communicate
req.parse_request()
File "/usr/local/lib/python3.5/dist-packages/cheroot/server.py", line 712, in parse_request
success = self.read_request_line()
File "/usr/local/lib/python3.5/dist-packages/cheroot/server.py", line 912, in read_request_line
for x in QUOTED_SLASH_REGEX.split(path)
File "/usr/local/lib/python3.5/dist-packages/cheroot/server.py", line 912, in
for x in QUOTED_SLASH_REGEX.split(path)
AttributeError: module 'six.moves.urllib_parse' has no attribute 'unquote_to_bytes'

authors: gmlvsv ibnlukum

repo: werwolfby/monitorrent

license: WTFPL


text:
Bug: $lsx(num=1) may not work properly in some cases

Environment
Host

item
version

OS

GROWI
4.0.7

node.js
12.18.1

npm
6.14.5

Using Docker
yes

Using growi-docker-compose
yes

growi-plugin-lsx
4.0.0

(Accessing https://{GROWI_HOST}/admin helps you to fill in above versions)
Client

item
version

OS
windows 10

browser
chrome 83

How to reproduce? (再現手順)

$lsx(/user, num=1)

What happens? (症状)

Two items are displayed when the parent folder is empty.

What is the expected result? (期待される動作)

It shows one of them.

@hkato312 Thank you for your report. I'll fix it, but it will be late for priority.

This issue has fixed.
Wait a moment until GROWI v4.1.0 (with growi-plugin-lsx@v4.0.1) is released.

repo: weseek/growi


text:
Updated algorithms for search and analysis of candidate's Twitter accounts

Updated the searching of candidate's Twitter accounts by using additional search terms that factor in the candidate's initials and nickname (if any).
Updated the WeVote functions and CandidateCampaign model to extract all possible parts of a person's full name.
Updated the nameparser package to the latest version in pip.
Modified the scoring of each Twitter account to prioritize active accounts, correct names in the Twitter name and handle, and office names in the description. Scores can also increase or decrease depending on different keywords.
Modified the table headers of the Edit Candidate page to be consistent with those found in the search results.

👍

authors: DaleMcGrew edward-ly

repo: wevote/WeVoteServer


text:
[Question] Why do not copy resolved $ref into /components/*  ?

I've started with speccy last week and I found it awesome. It help me improve a lot my oas3. Congrats for the excellent lint tool.
However, today I tried the resolve command and being honest, I didn't enjoy it as much as the lint... I think it was because the strange generated path.
I'm wondering here....
If one of those resolved references are being copied into the generated document, why do not copy it into the place designed for that: components/schemas or components/* and reference them from there?

I'm closing this because there is a same question here #315

repo: wework/speccy


text:
Sometimes the hour hand in the analog clock points wrong.

This seems to self correct after a few minutes.  Seems most likely to happen just before the hour change.

I get the same problem. WIth the original code from Dan Geiger. When i try to set the time say for 03.00- 3am i get 13:00 or 1pm. I haven't tried wfududly yet.
Joseph

I get the same problem. WIth the original code from Dan Geiger. When i try to set the time say for 03.00- 3am i get 13:00 or 1pm. I haven't tried wfududly yet.
Joseph

Not the same problem.
The bug I reported is that the hour hand will briefly point wrong, but it
corrects itself, probably when the next minute starts.
Bill Dudley
This email is free of malware because I run Linux.
On Wed, Jan 6, 2021 at 2:16 PM Therealjosephchrzempiec <
notifications@github.com> wrote:

I get the same problem. WIth the original code from Dan Geiger. When i try
to set the time say for 03.00- 3am i get 13:00 or 1pm. I haven't tried
wfududly yet.
Joseph
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/wfdudley/T-watch-2020/issues/6#issuecomment-755544055,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AI4VYU2C3HFIIX6OHHOOZK3SYSZH5ANCNFSM4SKUGQEQ
.

Not the same problem.
The bug I reported is that the hour hand will briefly point wrong, but it
corrects itself, probably when the next minute starts.
Bill Dudley
This email is free of malware because I run Linux.
On Wed, Jan 6, 2021 at 2:16 PM Therealjosephchrzempiec <
notifications@github.com> wrote:

I get the same problem. WIth the original code from Dan Geiger. When i try
to set the time say for 03.00- 3am i get 13:00 or 1pm. I haven't tried
wfududly yet.
Joseph
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/wfdudley/T-watch-2020/issues/6#issuecomment-755544055,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AI4VYU2C3HFIIX6OHHOOZK3SYSZH5ANCNFSM4SKUGQEQ
.

I will have to check that out. I guess because i didn't check it before the minute was up. I just saw it and freaked out.
Joseph

I will have to check that out. I guess because i didn't check it before the minute was up. I just saw it and freaked out.
Joseph

authors: Therealjosephchrzempiec wfdudley


text:
🛑 Forums is down

In c5c69f5, Forums (https://forums.winterco.org) was down:

HTTP code: 500
Response time: 390 ms

Resolved: Forums is back up in a537f24.

repo: wfjsw/status-winterco-org


text:
About processed dataset download

Hello, I always receive server errors when trying to download the processed DSIFN and LEVIR datasets(DSIFN-CD-256.zip and LEVIR-CD-256.zip in dropbox). Can you provide an alternative download method, such as Baidu Netdisk or Google Drive?

@Ozone-oo Thanks for raising this issue. I have just fixed the broken links.

authors: Ozone-oo wgcban

repo: wgcban/ChangeFormer


text:
描述/Description

苦恼哔咔客户端下载那个逆天命名方式很久了本来想自己用爬虫直接从网页端爬下来的，然后google发现有人做好电脑客户端支持下载省了我不少事，主要是想保存一下全xp合集：)

所以我用Python写了一个批量重命名的脚本，感觉不是什么很重要的功能
这个是用来将以漫画id命名的文件夹转换为人类可读的形式
import json,os
#将下载的漫画目录转换为人类可读的形式，即根据漫画标题和章节重命名
info_pathlist=[]    #留空
download_path='''F:\SteamLibrary\steamapps\picacg\download\\'''     #替换成自己下载的目录
folders = [name for name in os.listdir(download_path) if os.path.isdir(os.path.join(download_path, name))]
print(folders)
for i in folders:
    info_pathlist.append(download_path+i+'\info.json')
print(info_pathlist)

for i in info_pathlist:
    with open(i,encoding='utf-8') as f:
        data=json.load(f)
    chapters=data['chapters']
    id=data["comicItem"]['id']
    title=data['comicItem']['title']
    folder_path=download_path+id+'\\'
    chapter_folders = [name for name in os.listdir(folder_path) if os.path.isdir(os.path.join(folder_path, name))]
    lenth=len(chapters)

    for i in chapter_folders:
        os.rename(folder_path+str(i),folder_path+chapters[int(i)-1])
        print('already renamed',folder_path+str(i),'to',folder_path+chapters[int(i)-1])

    os.rename(download_path+id,download_path+title)
    print('already renamed',folder_path,download_path+title)

这个是用来将已经转换为人类可读的文件夹恢复原状从而让PICACG识别到已下载的漫画，用来继续下载或者在应用内打开……
import json,os
#将已经重命名成人类可读的文件夹恢复原状从而让PICACG识别到已下载的漫画，用来继续下载或者在应用内打开……
info_pathlist=[]    #留空
download_path='''F:\SteamLibrary\steamapps\picacg\download\\'''     #替换成自己下载的目录
folders = [name for name in os.listdir(download_path) if os.path.isdir(os.path.join(download_path, name))]
print(folders)
for i in folders:
    info_pathlist.append(download_path+i+'\info.json')
print(info_pathlist)

for i in info_pathlist:
    with open(i,encoding='utf-8') as f:
        data=json.load(f)
    chapters=data['chapters']
    id=data["comicItem"]['id']
    title=data['comicItem']['title'].rstrip()
    folder_path=download_path+title+'\\'
    chapter_folders = [name for name in os.listdir(folder_path) if os.path.isdir(os.path.join(folder_path, name))]
    lenth=len(chapters)

    for i in chapter_folders:
        os.rename(folder_path+str(i),folder_path+str(chapters.index(i)+1))
        print('already renamed',folder_path+str(i),'to',folder_path+str(chapters.index(i)+1))

    os.rename(download_path+title,download_path+id)
    print('already renamed',download_path+title,'to',download_path+id)

如图，我用有限的几个文件夹测试了一下正逆重命名都没问题
总之用法就是装了Python然后把该改的路径改成自己的，注意斜杠的转义就行
我在Windows10下运行的，理论上来说Linux把路径格式改了也能用
操作系统/Operating System
No response
图片/picture
No response

#344 希望增加批量下载功能不然还是得我一个个点真的挺麻烦的，但是短时间内请求过多不知道会不会被服务器ban

#344

妈呀点错两次
#344 批量下载确实挺需要的不然确实很麻烦，就是不知道短时间请求过多会不会被服务器ban了


text:
描述/Description
在阅读漫画后无法正常使用键盘
已成功复现bug（不能排除是概率性问题
设备iPhone 8Plus iOS15.6.1
Version
3.1.3
使用的操作系统/Operating system
iOS
日志/logs
No response
截图或视频/Screenshot or video
https://cloud.hhco.asia/f/oeT5/IMG_9148.MOV

这是flutter的问题, 并且已被flutter官方修复, 请等待下个版本的发布


text:
Add a LICENSE

Helps with https://github.com/whatwg/sg/issues/133.

Does it say somewhere in the repo this is the intended license, and this is just clarifying that?

No it does not. I'm making it match the LICENSE we used for other documents back then. All contributions but those from @caridy seem minor enough that we don't need explicit consent.

authors: annevk foolip

repo: whatwg/loader


text:
Add Visual Studio Code version

Hi, I have recently ported Gotham to Visual Studio Code. Please review the pull request and let me know if any change needed to be made. You can take a look at ported version on Visual Studio Marketplace.
Just a quick note, Current version is ported from Sublime version and while it's fine it has few differences with the original vim-gotham. In the near future, I will add another theme into extension with the original version's color scheme.

Thanks a lot @alireza-ahmadi! 💟

authors: alireza-ahmadi whatyouhide

repo: whatyouhide/gotham-contrib


text:
Execution failed for task ':react-native-nfc:compileReleaseJavaWithJavac'.

react-native-nfc:preBuild UP-TO-DATE
:react-native-nfc:preReleaseBuild UP-TO-DATE
:react-native-nfc:checkReleaseManifest
:react-native-nfc:preDebugAndroidTestBuild UP-TO-DATE
:react-native-nfc:preDebugBuild UP-TO-DATE
:react-native-nfc:preDebugUnitTestBuild UP-TO-DATE
:react-native-nfc:preReleaseUnitTestBuild UP-TO-DATE
:react-native-nfc:prepareComAndroidSupportAppcompatV72301Library
:react-native-nfc:prepareComAndroidSupportSupportV42301Library
:react-native-nfc:prepareComFacebookFbuiTextlayoutbuilderTextlayoutbuilder100Library
:react-native-nfc:prepareComFacebookFrescoDrawee130Library
:react-native-nfc:prepareComFacebookFrescoFbcore130Library
:react-native-nfc:prepareComFacebookFrescoFresco130Library
:react-native-nfc:prepareComFacebookFrescoImagepipeline130Library
:react-native-nfc:prepareComFacebookFrescoImagepipelineBase130Library
:react-native-nfc:prepareComFacebookFrescoImagepipelineOkhttp3130Library
:react-native-nfc:prepareComFacebookReactReactNative0504Library
:react-native-nfc:prepareComFacebookSoloaderSoloader010Library
:react-native-nfc:prepareOrgWebkitAndroidJscR174650Library
:react-native-nfc:prepareReleaseDependencies
:react-native-nfc:compileReleaseAidl
:react-native-nfc:compileReleaseNdk UP-TO-DATE
:react-native-nfc:compileLint
:react-native-nfc:copyReleaseLint UP-TO-DATE
:react-native-nfc:compileReleaseRenderscript
:react-native-nfc:generateReleaseBuildConfig
:react-native-nfc:generateReleaseResValues
:react-native-nfc:generateReleaseResources
:react-native-nfc:mergeReleaseResources
:react-native-nfc:processReleaseManifest
:react-native-nfc:processReleaseResources
:react-native-nfc:generateReleaseSources
:react-native-nfc:incrementalReleaseJavaCompilationSafeguard UP-TO-DATE
:react-native-nfc:compileReleaseJavaWithJavac
:react-native-nfc:compileReleaseJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
D:\ProjectDirectory\node_modules\react-native-nfc\android\src\main\java\com\novadart\reactnativenfc\ReactNativeNFCPackage.java:21: error: method does not override or implement a method from a supertype
    @Override
    ^
1 error
:react-native-nfc:compileReleaseJavaWithJavac FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':react-native-nfc:compileReleaseJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

I tried with yarn and npm install both but facing the same issue.

Hi, looks like this issue is in another library react-native-nfc rather than this one (react-native-nfc-manager).
If you don't mind, you can give this library (react-native-nfc-manager) a shot and it should work!

trying with that, will let you know. Thanks.

@whitedogg13 thanks. it solved the issue.


text:
Add support for BVR boardview output (fixes pin number caveats)

The .brd format has some caveats with pin numbers that are detailed in the README. The .bvr format does not have these caveats, so I updated the script to also be able to output BVR boardviews.
BGA part in .brd

That same BGA part in .bvr

This does come at a cost of a file size that is 8x to 9x larger, but it is much more readable by the end user should someone look through the text in either file.
I apologize for my lack of Git knowledge and will try to keep the excessive commits to a minimum. The only thing I could think of changing apart from any suggestions you may have is updating the README to reflect this option.

Thanks, and sorry for the long delay!

authors: sabogalc whitequark

repo: whitequark/kicad-boardview