Use display name in forum rather than login for forum.

Fixes #946

[x] PR title accurately summarizes changes
Tested locally

Before code review and after additional commits during review.

[x] Update title and description to account for additional changes
[ ] All tests green
[x] Booted up the branch locally, exercised any new code
[ ] Percy changes are purposeful or explained
[ ] Css changes are happy on mobile (via Percy is ok)

Hey @innatewonderer! Thanks for tackling.
The reason that logins were chosen is because of the ability to @ someone on the forum, which is one of the key features we wanted. We'd need to:

Confirm that ability works with display names which can a wider range of characters (vs. logins which can't have spaces or special characters).
Confirm that the dropdown that appears when typing @ is populated with display names and NOT logins

If those two things are true, we can merge this.
Otherwise the Plan A was to show the display name in the forum but also show the login with an @ in front of it, so people would know which username they could use to reply to someone. This would require overriding the thredded view (copying it into our app) where the user is displayed.

Hmmmm does this look OK?

@innatewonderer What shows up in the dropdown? Is it whatever user_display_name_method returns or is it @username

Ahh, looking at the screenshot, it seems the UI uses both user_display_name_method and login? but only login for the mentions dropdown?
If so, then we are good to go, but I'd like to change the formatting to: Display Name (@login)

What shows up in the mentions dropdown? Is it whatever user_display_name_method returns or is it :login?

@sudara not sure why, but for me, there is no dropdown even on alonetone itself so I can't test it.


Allow Features to handle connection errors

This addresses https://github.com/httprb/http/issues/547
It allows a Feature to implement an on_error handler so that it has a chance to react to Requests that never get a Response.

Looks like you need to fix the RuboCop errors. Otherwise conceptually this seems ok to me.
@ixti what do you think?

@paul any thoughts on this approach, or suggested alternatives?

@tarcieri No, this seems fine to me. :+1:

Looks like you need to fix the RuboCop errors. Otherwise conceptually this seems ok to me.

It is difficult as an outside contributor to understand which rubocop rules a team cares about. Were each of the rules chosen because they are what the team values?  Or were they just the defaults?
For example, this project currently has the Metrics/MethodLength rule enabled, so this PR has this violation:
lib/http/client.rb:66:5: C: Metrics/MethodLength: Method has too many lines. [32/25]
    def perform(req, options)

Is it really appropriate for this PR to take on the task of refactoring the Client#perform method so that it isn't so long?
Or should I disable the rule? Or just exclude this file? Or just exclude this method?

It is difficult as an outside contributor to understand which rubocop rules a team cares about. Were each of the rules chosen because they are what the team values? Or were they just the defaults?

It's explicitly configured to 25 lines in .rubocop.yml. To answer your question: yes this project values smaller methods.

Is it really appropriate for this PR to take on the task of refactoring the Client#perform method so that it isn't so long?

If you really don't want to refactor it you can disable the check for this method in particular using rubocop:disable and leave it for someone else to refactor. At the very least the RuboCop check needs to pass.
That said it looks like Response.new could benefit from some refactoring and is the source of much of the methods bulk by lines.

If you really don't want to refactor it you can disable the check for this method in particular using rubocop:disable and leave it for someone else to refactor. At the very least the RuboCop check needs to pass.

I don't mind doing the refactor, I just thought it was out of scope for this task, and would obscure the point of this PR. I'll go ahead and disable the rule here, and leave it as a follow up issue.

What if error will happen down the course, e.g. during response streaming?

@ixti it seems like under this approach features wouldn't be able to handle errors, however it seems like they can handle the most interesting errors

I have rebased and addressed the rubocop issues.

Thank you!
I have taken another look, and I think we can make API a bit more "flexible" if we will rename on_error to observe:
def observe(event, data); end

# ...

options.features.each_value { |f| f.observe(:request_error, :req => self, :err => e) }

Just an idea. As I don't like on_error name it's too vague, while used in very specific case only. Also, probably we should add observers in general instead of bloating this functionality into features.

@ixti what about on_event that takes a symbol (e.g. :error) as an argument?

@ixti what about on_event that takes a symbol (e.g. :error) as an argument?

I think that could be a good idea if you know of other events that would make sense to observe.
I could imagine having :request and :response events, which could replace the need to "wrap" those objects for all use cases. I understand the wrapping approach is required for some features, but it leads to an awkward implementation for things like logging, which don't need to modify the request/response.

Yeah. I think on_event makes sense to me.
And I agree, that :request and :response events will make notifications (which are actually observers) code look much better. Also after giving it another look, I guess I'm not very against on_error name any more, we can create a bunch of on_{event} methods:
def on_request(req:); end
def on_request_error(req:, err:); end
def on_response(res:); end
def on_response_error(res:, err:); end

Can we move forward with this PR and leave the on_request/on_response changes for a follow-up effort?
I'm not exactly sure how you want to differentiate between on_request_error and on_response_error, but willing to make the changes with some direction.

@joshuaflanagan that sounds fine to me

Done

@joshuaflanagan this one now has a conflict

@ixti let me know if you have any qualms about landing this. We can potentially explore alternatives before cutting another release


Added InitScriptVariables() function, refactor & bugfix.

List of Changes and the Reasoning Behind Them:

Introduction of InitScriptVariables() Function:

Reasoning: This function has been introduced to ensure that when you open and close Termdebug, and then open it again, there are no leftover script variable values from the previous session. Leftover values could potentially cause issues. The goal is for each Termdebug session to be independent of previous sessions. At startup, all script variables are initialized. The only exception is g:termdebug_loaded located at the very beginning of the script to prevent sourcing the script twice. The variables are declared at script level and defined in InitScriptVariables().

More Descriptive Variable Names:

Reasoning: The names of variables have been made more comprehensive. Almost every Termdebug buffer now has a variable to indicate its name and another variable to indicate its number, improving code readability and maintainability. Due to the latest discussion around the &mousemodel option save/restore mechanism, perhaps some other variables shall be prepended with saved_.

Consistent Naming for GDB Terminal Buffers:

Reasoning: The name of the GDB terminal buffer now matches the name of the GDB program being used, e.g., 'gdb', 'mygdb', 'arm-eabi-none-gdb', etc. This ensures clarity and consistency in identifying buffers.

Other:
Moved EchoErr() on top, added another test, some refactoring, mainly changed several 0 and 1 to true and  false.

Is it worth mentioning specifically what bug is fixed by this PR?

Is it worth mentioning specifically what bug is fixed by this PR?

Line 1770: there where a leftover from legacy Vim that produce an error: let v:swapchoice = 'o' is now v:swapchoice = 'o'.

Thanks. All in all I like the approach this takes and the cleanup is valuable. Please address all the mentioned items.

@chrisbra Is there anything else that you wish me to do before merging this PR? I think the points raised by @errael shall be discussed and the removal o f Echoerr('Termdebug already loaded.') at the beginning.  But IMHO we can leave them as they are.

Yeah, I think its fine, if you could please remove the CHECKME now?

Yeah, I think its fine, if you could please remove the CHECKME now?

Done!

@chrisbra the master branch of my fork is still 7 commits ahead and I cannot sync with the upstram repo (I made thesee changes directly on the master branch in my own fork). It looks like this PR has not been merged yet... Can you confirm?

It is merged. Take a look at https://github.com/vim/vim/commits/master/ there's patch 9.1.0482: termdebug plugin needs more love
When I pulled from the main repo, I get it in my local clone, also when I update and pull from my fork.
I never update my master directly, always push a branch. Do you have merge conflicts?

@ubaldot I did have an accident a while back; I can't remember all the details, but...
I have "Branch protection rules", "require a pull request before merging" in my fork set to prevent direct changes to master.
I vaguely remember that after the accident, when my fork was screwed up, and I couldn't update,
there was a button under the "Sync Fork" pulldown in my fork. I don't remember what it said, but
it didn't work to clean things up. I had to temporarily disable the "require a pull request before
merging" and then the button (whatever it was called) worked and things got back in sync. It may
be that I had to repush some stuff from my local clone; don't remember.

@errael In-fact I did the "mistake" of developing directly on (my fork) master and then push onto (upstream) master. Now I have this situation:

Whereas I expected to be only 32 commits behind. But I have now seen that my changes are included in a commit named "termdebug needs more love" so I assume I can safely discard these 7 commits.


Question about angles through split coeff

Hi:
thanks for your contribution.
After split coeff, we can have ruler angle and use it to calculate rotation matrix.
I am confused that, is the angles equals to (roll, pitch, yaw)?
@

The angles returned represent the rotation along fixed axis (x,y,z) in the camera space. You can find a definition here https://en.wikipedia.org/wiki/Rotation_matrix. The General Rotations section clarifies the angles we use in our work.


Ratio Animating

Working on creating Animations in tmap and ggplot/ggmap to display chemistry data as they relate at and between our Cameron Peak Sites.
Initially starting with discrete chem data but would love to build this out for continuous data
Tmap Issues:

I can get it to display all the spatial data correctly and animate in "plot" mode but it lacks basemap (ie context)
In view mode, I cannot get it to animate
Ex:

ggmap Issues:

I can get it to develop a basemap (which looks bad) and animate point data
It does not animate line data correctly, colors look bad and graph is fuzzy.
Ex:

Possible solutions:

Merge what works between these two methods and have a wonderful animation of points, lines, basemap and colors/shapes that look good.
Make it an animation with a slider rather than a gif?

@kathryn-willi or @ccmothes Can either of you shed light on these issues/ solutions and let me know if there is a better package/ something I'm missing? I can provide more specific code if needed but am mostly thinking from a general view


backward compatibilty, bootstraps and the 333 devnet

Issue being fixed or feature implemented

What was done?

Refactor to allow for two bootstrap files (mnlistdiff and qrinfo)

How Has This Been Tested?

Breaking Changes

Checklist:

[ ] I have performed a self-review of my own code
[ ] I have commented my code, particularly in hard-to-understand areas
[ ] I have added or updated relevant unit/integration/functional/e2e tests
[ ] I have made corresponding changes to the documentation

For repository code-owners and collaborators only

[ ] I have assigned this pull request to a milestone

Codecov Report

Merging #165 (696a3e5) into feature-quorum-rotation (878b7d4) will increase coverage by 0.80%.
The diff coverage is 47.35%.

@@                      Coverage Diff                      @@
##             feature-quorum-rotation     #165      +/-   ##
=============================================================
+ Coverage                      44.64%   45.45%   +0.80%
- Complexity                      5173     5298     +125
=============================================================
  Files                            367      367
  Lines                          40831    40924      +93
  Branches                        5575     5580       +5
=============================================================
+ Hits                           18230    18601     +371
+ Misses                         20762    20389     -373
- Partials                        1839     1934      +95

Impacted Files
Coverage Δ

...ain/java/org/bitcoinj/core/AbstractBlockChain.java
79.76% <0.00%> (-0.43%)
:arrow_down:

...rc/main/java/org/bitcoinj/core/VersionMessage.java
57.69% <ø> (ø)

...ain/java/org/bitcoinj/crypto/BLSBatchVerifier.java
0.00% <ø> (ø)

...g/bitcoinj/params/ThreeThreeThreeDevNetParams.java
94.44% <ø> (+5.55%)
:arrow_up:

...ain/java/org/bitcoinj/quorums/InstantSendLock.java
54.92% <0.00%> (-5.08%)
:arrow_down:

.../java/org/bitcoinj/quorums/InstantSendManager.java
6.86% <0.00%> (-0.66%)
:arrow_down:

...main/java/org/bitcoinj/quorums/SigningManager.java
6.15% <0.00%> (+0.32%)
:arrow_up:

core/src/main/java/org/bitcoinj/core/Context.java
53.46% <25.00%> (-1.09%)
:arrow_down:

...va/org/bitcoinj/evolution/AbstractQuorumState.java
30.02% <59.42%> (+5.60%)
:arrow_up:

...va/org/bitcoinj/evolution/AbstractDiffMessage.java
58.82% <61.53%> (+25.49%)
:arrow_up:

... and 60 more

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 878b7d4...696a3e5. Read the comment docs.


issue with running Omega - missing packages

Hi! I followed the instructions to install into a new condo environment. I got stuck at the "solving environment" stage when I tried to  install napari from conda-forge, so instead I used pip install "napari[all]". Downstream I used pip to install napari-chatgpt and when I tried to "start Omega" I got that I was missing the cryptography module. So I installed that and now I'm getting the following:
dlopen(/opt/anaconda3/envs/napari-chatgpt/lib/python3.9/site-packages/cryptography/hazmat/bindings/_openssl.abi3.so, 0x0002): Library not loaded: @rpath/libssl.1.1.dylib
Do you think this is an issue with the strategy I used to install napari? (I should try conda-forge again?) Or do you think something else might be going on?

You would need to provide more information about the system you are using (operating system, type of machine, etc...) for troubleshooting this.
The cryptography is only needed when storing the key via the UI interface.
If you store your OpenAI key in the env variable: OPENAI_API_KEY then it just works,
and it will never need to encrypt or decrypt anything. I am pushing a version with local imports just in case....
hope this helps...

Looking at this again, did you have success?
If you work on a mac M1 or M2, you must use conda and conda-forge,
and follow the instructions as provided in the readme...
Let me know how it went...

Closing this issue as I assume this is solved now...


Run with WEBSITE_RUN_FROM_PACKAGE= + FastAPI get 404?

Hello everyone,
I've tested to run my Azure Functions with FastAPI good in both local & Azure, but when I tried to use Managed Identity for all connection authentication, the Functions gone and left just 404.
Can someone helps me to figure out how to do right deployment with FastAPI Azure Functions & WEBSITE_RUN_FROM_PACKAGE=URL? big thanks~
Scenario & Step I've done

Python v2 model, FUNCTIONS_EXTENSION_VERSION: ~4
Runtime: Python 3.11 | Linux
App Service Plan: Y1(Consumption), Dynamic
Using Bicep to build: Storage Account, App Service Plan(ServerFarm), Azure Functions (with environment variables & Managed Identity role assignment)
Manually upload .zip to storage container

In order to (let Functions) connect to Storage Account with Managed Identity, I've changed environment variables from AzureWebJobsStorage to AzureWebJobsStorage__accountName. (I've assigned role: Storage Blob Data Contributor to this Azure Functions before this step)
According to this documentation, I noticed this in the blue 'Important area':

When you enable identity-based connections for AzureWebJobsStorage in Linux Consumption, you will need to deploy via an external deployment package.

I've added environment variables: WEBSITE_RUN_FROM_PACKAGE with URL value, because it asked me to deploy via external deployment package.
After .zip uploaded, I restarted Functions from Azure Portal (because it asked me to sync triggers mannually, I chose 'restart Functions from portal'), and the Functions disappeared.
Then I tried to make sure whether good or not while using python sample code below and uploaded again. The endpoint in sample code appear! (so both "WEBSITE_RUN_FROM_PACKAGE with URL" & "AzureWebJobsStorage__accountName with accountName" seem working, and something wrong in deployment of Functions with ASGIFunctionApp)

Using same environment variables for these code below
Bicep snippet for environment variables

# sample code snippet and this runs well in both local & Azure Functions
import azure.functions as func

app = func.FunctionApp()

@app.function_name(name="HttpTrigger1")
@app.route(route="req")
def main(req: func.HttpRequest) -> str:
    user = req.params.get("user")
    return f"Hello, {user}!"

# another code snippet using FastAPI, only runs well in local and get 404 in Azure Functions
import azure.functions as func
from fastapi import FastAPI

fast_api = FastAPI()

@fast_api.get("/")
async def test():
    return {"Hello, human!"}

app = func.AsgiFunctionApp(app=fast_api, http_auth_level=func.AuthLevel.ANONYMOUS)

@eddison-shyi If you're using managed identities you will have to add WEBSITE_RUN_FROM_PACKAGE_BLOB_MI_RESOURCE_ID to the app settings. If you're using the system assigned identity then the value of this app setting will be SystemAssigned or if you're using user assigned identity the value will be the resource id of the user assigned identity
For more info refer to https://learn.microsoft.com/en-us/azure/app-service/deploy-run-package#access-a-package-in-azure-blob-storage-using-a-managed-identity

@eddison-shyi If you're using managed identities you will have to add WEBSITE_RUN_FROM_PACKAGE_BLOB_MI_RESOURCE_ID to the app settings. If you're using the system assigned identity then the value of this app setting will be SystemAssigned or if you're using user assigned identity the value will be the resource id of the user assigned identity
For more info refer to https://learn.microsoft.com/en-us/azure/app-service/deploy-run-package#access-a-package-in-azure-blob-storage-using-a-managed-identity

Dear gavin-aguiar,
I've tried to add env: WEBSITE_RUN_FROM_PACKAGE_BLOB_MI_RESOURCE_ID=SystemAssigned , it still failed with error code: 404


setting tmux autostart yes, disables 256 color

%echo $TERM
screen-256color

%tmux a

first tmux window 256 color is working
now I set auto-start to yes
set zstyle ':prezto:module:tmux:auto-start' local 'yes'

and open a new terminal window.
This new tmux session does not have 256 color. But the first tmux session still does.
$TERM remains screen-256color

Fixed my issue by appending
export TERM='screen-256color'
to my  .zpreztorc file

I does not work when I open a new tmux window with tmux neww within an existing tmux session.


move tcp tunnel code to separate file

Summary
In preparation for an http2 and http3 version of the TCP tunnel, break out the current http1 CONNECT tunnel code into a separate file.
Related issues

#464

Checklist

[x] reference any related issues
[ ] updated unit tests
[x] add appropriate tag (improvement / bug / etc)
[x] ready for review

Yeah.


Allow layers, not only folders, to have transforms

Pinging @TrueDoctor @0HyperCube

This issue is blocking #201 and #143.


[Bug] Missing configuration for rails 6

Description
Fails to boot for Rails 6 due to missing file.
LoadError: cannot load such file -- appoptics_apm/frameworks/rails/inst/action_controller6

Oh, thanks for pointing this out.
I'll prioritize this and see if this would work with the same implementation as Rails 5.
If that's the case I may be able to push a release tomorrow.

Sorry, this will be delayed. Need to fix the integration and acceptance tests, so that they run with rails 6.

Fix in appoptics_apm-4.8.3.gem
it will not raise an error anymore.
Rails 6 is not instrumented yet: Rack will still create a trace, but there will not be any Rails or Actionview traces.
Rails 6 instrumentation coming soon.

now we also generate traces from Rails 6
https://github.com/appoptics/appoptics-apm-ruby/releases/tag/4.8.4


require is not supported by ESM

<EMAIL_ADDRESS>16:41
Module parse failed: Unexpected token (16:41)
File was processed with these loaders:

./node_modules/babel-loader/lib/index.js
You may need an additional loader to handle the result of these loaders.
| const REQUIRE_ERROR = 'require is not supported by ESM';
| const REQUIRE_DIRECTORY_ERROR = 'loading a directory of commands is not supported yet for ESM';

const mainFilename = fileURLToPath(import.meta.url).split('node_modules')[0];
|
| const __dirname = fileURLToPath(import.meta.url);

I used version 3.21.0 in the React
node -v 10.13.0
npm -v 6.4.1
this is my package.json
{
"name": "apipost_fe",
"version": "0.1.0",
"private": true,
"dependencies": {
"@babel/core": "7.12.3",
"@babel/plugin-syntax-jsx": "^7.16.0",
"@pmmmwh/react-refresh-webpack-plugin": "0.4.3",
"@svgr/webpack": "5.5.0",
"@testing-library/jest-dom": "^5.11.4",
"@testing-library/react": "^11.1.0",
"@testing-library/user-event": "^12.1.10",
"@typescript-eslint/eslint-plugin": "^4.5.0",
"@typescript-eslint/parser": "^5.1.0",
"ali-oss": "^6.16.0",
"art-template": "^4.13.2",
"async-validator": "^4.0.7",
"axios": "^0.24.0",
"babel-eslint": "^10.1.0",
"babel-jest": "^26.6.0",
"babel-loader": "8.1.0",
"babel-plugin-named-asset-import": "^0.3.7",
"babel-preset-react-app": "^10.0.0",
"bfj": "^7.0.2",
"camelcase": "^6.1.0",
"case-sensitive-paths-webpack-plugin": "2.3.0",
"classnames": "^2.3.1",
"cropperjs": "^1.5.12",
"crypto-js": "^4.1.1",
"css-loader": "4.3.0",
"curlconverter": "^3.21.0",
"dayjs": "^1.10.7",
"dexie": "^3.0.3",
"dotenv": "8.2.0",
"dotenv-expand": "5.1.0",
"dva": "^2.4.1",
"easymde": "^2.16.1",
"eslint": "^7.11.0",
"eslint-config-react-app": "^6.0.0",
"eslint-friendly-formatter": "^4.0.1",
"eslint-plugin-flowtype": "^5.2.0",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-jest": "^24.1.0",
"eslint-plugin-jsx-a11y": "^6.3.1",
"eslint-plugin-react": "^7.21.5",
"eslint-plugin-react-hooks": "^4.2.0",
"eslint-plugin-testing-library": "^3.9.2",
"eslint-webpack-plugin": "^2.5.2",
"file-loader": "6.1.1",
"fs-extra": "^9.0.1",
"history": "^5.0.3",
"html-beautify": "^1.0.4",
"html-webpack-plugin": "4.5.0",
"identity-obj-proxy": "3.0.0",
"jest": "26.6.0",
"jest-circus": "26.6.0",
"jest-resolve": "26.6.0",
"jest-watch-typeahead": "0.6.1",
"jquery": "^3.6.0",
"js-beautify": "^1.14.0",
"json-bigint": "^1.0.0",
"json5": "^2.2.0",
"jsondiffpatch": "^0.4.1",
"jsonpath": "^1.1.0",
"less": "^4.1.2",
"less-loader": "^5.0.0",
"lodash": "^4.17.21",
"markdown-it": "^12.3.2",
"mime-types": "^2.1.34",
"mini-css-extract-plugin": "0.11.3",
"moment": "^2.29.1",
"optimize-css-assets-webpack-plugin": "5.0.4",
"picocolors": "^0.2.1",
"pnp-webpack-plugin": "1.6.4",
"postcss-flexbugs-fixes": "4.2.1",
"postcss-loader": "3.0.0",
"postcss-normalize": "8.0.1",
"postcss-preset-env": "6.7.0",
"postcss-safe-parser": "5.0.2",
"postcss-selector-parser": "^6.0.8",
"prompts": "2.4.0",
"prop-types": "^15.7.2",
"qrcode-react": "^0.1.16",
"rc-field-form": "^1.22.0-2",
"react": "^17.0.2",
"react-addons-update": "^15.6.3",
"react-app-polyfill": "^2.0.0",
"react-copy-to-clipboard": "^5.0.4",
"react-cropper": "^2.1.8",
"react-dev-utils": "^11.0.3",
"react-dnd": "^14.0.4",
"react-dnd-html5-backend": "^14.0.2",
"react-dom": "^17.0.2",
"react-load-script": "0.0.6",
"react-pdf-js": "^5.1.0",
"react-refresh": "^0.8.3",
"react-rnd": "^10.3.5",
"react-router-config": "^5.1.1",
"react-simplemde-editor": "^5.0.2",
"react-transition-group": "^4.4.2",
"resolve": "1.18.1",
"resolve-url-loader": "^3.1.2",
"sass-loader": "^10.0.5",
"semver": "7.3.2",
"source-map": "^0.6.1",
"style-loader": "1.3.0",
"ts-pnp": "1.2.0",
"tunnel": "0.0.6",
"url-loader": "4.1.1",
"uuid": "^8.3.2",
"vm": "^0.1.0",
"vm2": "^3.9.5",
"web-vitals": "^1.0.1",
"webpack": "4.44.2",
"webpack-dev-server": "3.11.1",
"webpack-manifest-plugin": "2.2.0",
"workbox-webpack-plugin": "5.1.4",
"x2js": "^3.4.2"
},
"scripts": {
"start": "node scripts/start.js",
"build": "node scripts/build.js",
"build:rc": "cross-env NODE_ENV=rc node scripts/build.js",
"dev": "node scripts/build.js",
"test": "node scripts/test.js",
"commit": " npm run lint && git-cz ",
"genlog": "conventional-changelog -p angular -i CHANGELOG.md -s",
"lint": "eslint --ext .jsx,.js  src/ --fix",
"build:stats": "webpack --mode production --json > stats.json",
"svgmap": "node scripts/svgmap.js"
},
"eslintConfig": {
"root": true,
"extends": [
"react-app",
"react-app/jest",
"airbnb"
],
"env": {
"browser": true
}
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"jest": {
"roots": [
"/src"
],
"collectCoverageFrom": [
"src//*.{js,jsx,ts,tsx}",
"!src//.d.ts"
],
"setupFiles": [
"react-app-polyfill/jsdom"
],
"setupFilesAfterEnv": [
"/src/setupTests.js"
],
"testMatch": [
"/src//tests//.{js,jsx,ts,tsx}",
"/src/**/.{spec,test}.{js,jsx,ts,tsx}"
],
"testEnvironment": "jsdom",
"testRunner": "D:\IDE\apipost_fe\node_modules\jest-circus\runner.js",
"transform": {
"^.+\.(js|jsx|mjs|cjs|ts|tsx)$": "/config/jest/babelTransform.js",
"^.+\.css$": "/config/jest/cssTransform.js",
"^(?!.\.(js|jsx|mjs|cjs|ts|tsx|css|json)$)": "/config/jest/fileTransform.js"
},
"transformIgnorePatterns": [
"[/\\]node_modules[/\\].+\.(js|jsx|mjs|cjs|ts|tsx)$",
"^.+\.module\.(css|sass|scss)$"
],
"modulePaths": [],
"moduleNameMapper": {
"^react-native$": "react-native-web",
"^.+\.module\.(css|sass|scss)$": "identity-obj-proxy"
},
"moduleFileExtensions": [
"web.js",
"js",
"web.ts",
"ts",
"web.tsx",
"tsx",
"json",
"web.jsx",
"jsx",
"node"
],
"watchPlugins": [
"jest-watch-typeahead/filename",
"jest-watch-typeahead/testname"
],
"resetMocks": true
},
"babel": {
"presets": [
"react-app",
"@babel/preset-react"
]
},
"devDependencies": {
"@babel/preset-react": "^7.16.0",
"@monaco-editor/react": "^4.3.0",
"cache-loader": "^4.1.0",
"commitizen": "^4.2.4",
"compression-webpack-plugin": "^5.0.1",
"cross-env": "^7.0.3",
"css-minimizer-webpack-plugin": "^3.4.1",
"cz-conventional-changelog": "^3.3.0",
"dependency-cruiser": "^11.3.0",
"eslint-config-airbnb": "^18.2.1",
"eslint-import-resolver-webpack": "^0.13.2",
"eslint-loader": "^4.0.2",
"file-saver": "^2.0.5",
"html-beautify": "^1.0.4",
"http-proxy-middleware": "^2.0.1",
"husky": "^7.0.4",
"immutability-helper": "^3.1.1",
"import": "0.0.6",
"inspectpack": "^4.7.1",
"js-beautify": "^1.14.0",
"loadsh": "0.0.4",
"mockjs": "^1.1.0",
"monaco-editor": "^0.31.1",
"monaco-editor-webpack-plugin": "^7.0.1",
"react-color": "^2.19.3",
"react-load-script": "0.0.6",
"socket.io": "^4.4.1",
"terser-webpack-plugin": "^4.2.3",
"unused-webpack-plugin": "^2.4.0",
"webpack-bundle-analyzer": "^4.5.0"
},
"config": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
}
},
"husky": {
"hooks": {
"commit-msg": "commitlint -e $GIT_PARAMS",
"pre-commit": "npm run lint"
}
},
"settings": {
"import/resolver": "webpack"
}
}
this is my webpack.config.js
const fs = require('fs');
const path = require('path');
const webpack = require('webpack');
const resolve = require('resolve');
const PnpWebpackPlugin = require('pnp-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin');
const InlineChunkHtmlPlugin = require('react-dev-utils/InlineChunkHtmlPlugin');
const TerserPlugin = require('terser-webpack-plugin');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin');
const safePostCssParser = require('postcss-safe-parser');
const ManifestPlugin = require('webpack-manifest-plugin');
const InterpolateHtmlPlugin = require('react-dev-utils/InterpolateHtmlPlugin');
const WorkboxWebpackPlugin = require('workbox-webpack-plugin');
const WatchMissingNodeModulesPlugin = require('react-dev-utils/WatchMissingNodeModulesPlugin');
const ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin');
const getCSSModuleLocalIdent = require('react-dev-utils/getCSSModuleLocalIdent');
const ESLintPlugin = require('eslint-webpack-plugin');
const ModuleNotFoundPlugin = require('react-dev-utils/ModuleNotFoundPlugin');
const ForkTsCheckerWebpackPlugin = require('react-dev-utils/ForkTsCheckerWebpackPlugin');
const typescriptFormatter = require('react-dev-utils/typescriptFormatter');
const ReactRefreshWebpackPlugin = require('@pmmmwh/react-refresh-webpack-plugin');
const postcssNormalize = require('postcss-normalize');
const MonacoWebpackPlugin = require('monaco-editor-webpack-plugin');
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');
const UnusedWebpackPlugin = require('unused-webpack-plugin');
const CompressionPlugin = require('compression-webpack-plugin');
const { DuplicatesPlugin } = require('inspectpack/plugin');
const getClientEnvironment = require('./env');
const modules = require('./modules');
const paths = require('./paths');
// eslint-disable-next-line import/no-dynamic-require
const appPackageJson = require(paths.appPackageJson);
// Source maps are resource heavy and can cause out of memory issue for large source files.
const shouldUseSourceMap = process.env.GENERATE_SOURCEMAP !== 'false';
const webpackDevClientEntry = require.resolve(
'react-dev-utils/webpackHotDevClient',
);
const reactRefreshOverlayEntry = require.resolve(
'react-dev-utils/refreshOverlayInterop',
);
// Some apps do not need the benefits of saving a web request, so not inlining the chunk
// makes for a smoother build process.
const shouldInlineRuntimeChunk = process.env.INLINE_RUNTIME_CHUNK !== 'false';
const emitErrorsAsWarnings = process.env.ESLINT_NO_DEV_ERRORS === 'true';
const disableESLintPlugin = process.env.DISABLE_ESLINT_PLUGIN === 'true';
const imageInlineSizeLimit = parseInt(
process.env.IMAGE_INLINE_SIZE_LIMIT || '10000', 10,
);
// Check if TypeScript is setup
const useTypeScript = fs.existsSync(paths.appTsConfig);
// Get the path to the uncompiled service worker (if it exists).
const swSrc = paths.swSrc;
// style files regexes
const cssRegex = /.css$/;
const cssModuleRegex = /.module.css$/;
const sassRegex = /.(scss|sass)$/;
const sassModuleRegex = /.module.(scss|sass)$/;
const lessRegex = /.less$/;
const lessModuleRegex = /.module.less$/;
const hasJsxRuntime = (() => {
if (process.env.DISABLE_NEW_JSX_TRANSFORM === 'true') {
return false;
}
try {
require.resolve('react/jsx-runtime');
return true;
} catch (e) {
return false;
}
})();
// This is the production and development configuration.
// It is focused on developer experience, fast rebuilds, and a minimal bundle.
module.exports = function (webpackEnv) {
const isEnvDevelopment = webpackEnv === 'development';
const isEnvProduction = webpackEnv === 'production';
// Variable used for enabling profiling in Production
// passed into alias object. Uses a flag if passed into the build command
const isEnvProductionProfile = isEnvProduction && process.argv.includes('--profile');
// We will provide paths.publicUrlOrPath to our app
// as %PUBLIC_URL% in index.html and process.env.PUBLIC_URL in JavaScript.
// Omit trailing slash as %PUBLIC_URL%/xyz looks better than %PUBLIC_URL%xyz.
// Get environment variables to inject into our app.
const env = getClientEnvironment(paths.publicUrlOrPath.slice(0, -1));
const shouldUseReactRefresh = env.raw.FAST_REFRESH;
// common function to get style loaders
const getStyleLoaders = (cssOptions, preProcessor) => {
const loaders = [
isEnvDevelopment && require.resolve('style-loader'),
isEnvProduction && {
loader: MiniCssExtractPlugin.loader,
// css is located in static/css, use '../../' to locate index.html folder
// in production paths.publicUrlOrPath can be a relative path
options: paths.publicUrlOrPath.startsWith('.')
? { publicPath: '../../' }
: {},
},
{
loader: require.resolve('css-loader'),
options: cssOptions,
},
{
// Options for PostCSS as we reference these options twice
// Adds vendor prefixing based on your specified browser support in
// package.json
loader: require.resolve('postcss-loader'),
options: {
// Necessary for external CSS imports to work
// https://github.com/facebook/create-react-app/issues/2677
ident: 'postcss',
plugins: () => [
// eslint-disable-next-line global-require
require('postcss-flexbugs-fixes'),
// eslint-disable-next-line global-require
require('postcss-preset-env')({
autoprefixer: {
flexbox: 'no-2009',
},
stage: 3,
}),
// Adds PostCSS Normalize as the reset css with default options,
// so that it honors browserslist config in package.json
// which in turn let's users customize the target behavior as per their needs.
postcssNormalize(),
],
sourceMap: isEnvProduction ? shouldUseSourceMap : isEnvDevelopment,
},
},
].filter(Boolean);
if (preProcessor) {
loaders.push(
{
loader: require.resolve('resolve-url-loader'),
options: {
sourceMap: isEnvProduction ? shouldUseSourceMap : isEnvDevelopment,
root: paths.appSrc,
},
},
{
loader: require.resolve(preProcessor),
options: {
sourceMap: true,
},
},
);
}
return loaders;
};
return {
mode: isEnvProduction ? 'production' : isEnvDevelopment && 'development',
// Stop compilation early in production
bail: isEnvProduction,
// eslint-disable-next-line no-nested-ternary
devtool: isEnvProduction
? shouldUseSourceMap
? 'source-map'
: false
: isEnvDevelopment && 'cheap-module-source-map',
// These are the "entry points" to our application.
// This means they will be the "root" imports that are included in JS bundle.
entry:
isEnvDevelopment && !shouldUseReactRefresh
? [
// Include an alternative client for WebpackDevServer. A client's job is to
// connect to WebpackDevServer by a socket and get notified about changes.
// When you save a file, the client will either apply hot updates (in case
// of CSS changes), or refresh the page (in case of JS changes). When you
// make a syntax error, this client will display a syntax error overlay.
// Note: instead of the default WebpackDevServer client, we use a custom one
// to bring better experience for Create React App users. You can replace
// the line below with these two lines if you prefer the stock client:
//
// require.resolve('webpack-dev-server/client') + '?/',
// require.resolve('webpack/hot/dev-server'),
//
// When using the experimental react-refresh integration,
// the webpack plugin takes care of injecting the dev client for us.
webpackDevClientEntry,
// Finally, this is your app's code:
paths.appIndexJs,
// We include the app code last so that if there is a runtime error during
// initialization, it doesn't blow up the WebpackDevServer client, and
// changing JS code would still trigger a refresh.
]
: paths.appIndexJs,
output: {
// The build folder.
path: isEnvProduction ? paths.appBuild : undefined,
// Add /* filename */ comments to generated require()s in the output.
pathinfo: isEnvDevelopment,
// There will be one main bundle, and one file per asynchronous chunk.
// In development, it does not produce real files.
filename: isEnvProduction
? 'static/js/[name].[contenthash:8].js'
: isEnvDevelopment && 'static/js/bundle.js',
// TODO: remove this when upgrading to webpack 5
futureEmitAssets: true,
// There are also additional JS chunk files if you use code splitting.
chunkFilename: isEnvProduction
? 'static/js/[name].[contenthash:8].chunk.js'
: isEnvDevelopment && 'static/js/[name].chunk.js',
// webpack uses publicPath to determine where the app is being served from.
// It requires a trailing slash, or the file assets will get an incorrect path.
// We inferred the "public path" (such as / or /my-project) from homepage.
publicPath: paths.publicUrlOrPath,
// Point sourcemap entries to original disk location (format as URL on Windows)
devtoolModuleFilenameTemplate: isEnvProduction
? (info) => path
.relative(paths.appSrc, info.absoluteResourcePath)
.replace(/\/g, '/')
: isEnvDevelopment
&& ((info) => path.resolve(info.absoluteResourcePath).replace(/\/g, '/')),
// Prevents conflicts when multiple webpack runtimes (from different apps)
// are used on the same page.
jsonpFunction: webpackJsonp${appPackageJson.name},
// this defaults to 'window', but by setting it to 'this' then
// module chunks which are built will work in web workers as well.
globalObject: 'this',
},
externals: {
Alioss: 'aliyun-oss-sdk',
React: 'umd React',
ReactDom: 'umd ReactDom',
$: '$',
_: 'lodash',
// lodash: 'lodash',
Mock: 'mock',
less: 'less',
},
optimization: {
minimize: isEnvProduction,
// concatenateModules: isEnvProduction,
minimizer: [
// This is only used in production mode
new TerserPlugin({
terserOptions: {
parse: {
// We want terser to parse ecma 8 code. However, we don't want it
// to apply any minification steps that turns valid ecma 5 code
// into invalid ecma 5 code. This is why the 'compress' and 'output'
// sections only apply transformations that are ecma 5 safe
// https://github.com/facebook/create-react-app/pull/4234
ecma: 8,
},
compress: {
ecma: 5,
warnings: false,
// Disabled because of an issue with Uglify breaking seemingly valid code:
// https://github.com/facebook/create-react-app/issues/2376
// Pending further investigation:
// https://github.com/mishoo/UglifyJS2/issues/2011
comparisons: false,
// Disabled because of an issue with Terser breaking valid code:
// https://github.com/facebook/create-react-app/issues/5250
// Pending further investigation:
// https://github.com/terser-js/terser/issues/120
inline: 2,
},
mangle: {
safari10: true,
},
// Added for profiling in devtools
keep_classnames: isEnvProductionProfile,
keep_fnames: isEnvProductionProfile,
output: {
ecma: 5,
comments: false,
// Turned on because emoji and regex is not minified properly using default
// https://github.com/facebook/create-react-app/issues/2488
ascii_only: true,
},
},
sourceMap: false,
}),
// This is only used in production mode
new OptimizeCSSAssetsPlugin({
cssProcessorOptions: {
parser: safePostCssParser,
map: shouldUseSourceMap
? {
// inline: false forces the sourcemap to be output into a
// separate file
inline: false,
// annotation: true appends the sourceMappingURL to the end of
// the css file, helping the browser find the sourcemap
annotation: true,
}
: false,
},
cssProcessorPluginOptions: {
preset: ['default', { minifyFontValues: { removeQuotes: false } }],
},
}),
],
// Automatically split vendor and commons
// https://twitter.com/wSokra/status/969633336732905474
// https://medium.com/webpack/webpack-4-code-splitting-chunk-graph-and-the-splitchunks-optimization-be739a861366
splitChunks: {
chunks: 'all',
minSize: 3000,
minChunks: 2,
maxAsyncRequests: 5,
maxInitialRequests: 3,
automaticNameDelimiter: '~',
name: true,
cacheGroups: {
vendors: {
test: /[\/]node_modules[\/]/,
priority: -10,
},
default: {
minChunks: 2,
priority: -20,
reuseExistingChunk: true,
},
},
},
// Keep the runtime chunk separated to enable long term caching
// https://twitter.com/wSokra/status/969679223278505985
// https://github.com/facebook/create-react-app/issues/5358
runtimeChunk: {
name: (entrypoint) => runtime-${entrypoint.name},
},
},
resolve: {
// This allows you to set a fallback for where webpack should look for modules.
// We placed these paths second because we want node_modules to "win"
// if there are any conflicts. This matches Node resolution mechanism.
// https://github.com/facebook/create-react-app/issues/253
modules: ['node_modules', paths.appNodeModules].concat(
modules.additionalModulePaths || [],
),
// These are the reasonable defaults supported by the Node ecosystem.
// We also include JSX as a common component filename extension to support
// some tools, although we do not recommend using it, see:
// https://github.com/facebook/create-react-app/issues/290
// web extension prefixes have been added for better support
// for React Native Web.
extensions: paths.moduleFileExtensions
.map((ext) => .${ext})
.filter((ext) => useTypeScript || !ext.includes('ts')),
alias: {
// Support React Native Web
// https://www.smashingmagazine.com/2016/08/a-glimpse-into-the-future-with-react-native-for-web/
'react-native': 'react-native-web',
// Allows for better profiling with ReactDevTools
...(isEnvProductionProfile && {
'react-dom$': 'react-dom/profiling',
'scheduler/tracing': 'scheduler/tracing-profiling',
}),
'@Component': path.resolve(__dirname, '../src/component'),
'@Services': path.resolve(__dirname, '../src/services'),
'@apipost-icons': path.resolve(__dirname, '../src/pages/icons'),
'@Utils': path.resolve(__dirname, '../src/utils'),
'@Assets': path.resolve(__dirname, '../src/assets'),
'@IndexDB': path.resolve(__dirname, '../src/indexedDB'),
    ...(modules.webpackAliases || {}),
  },
  plugins: [
    // Adds support for installing with Plug'n'Play, leading to faster installs and adding
    // guards against forgotten dependencies and such.
    PnpWebpackPlugin,
    // Prevents users from importing files from outside of src/ (or node_modules/).
    // This often causes confusion because we only process files within src/ with babel.
    // To fix this, we prevent you from importing files out of src/ -- if you'd like to,
    // please link the files into your node_modules/ and let module-resolution kick in.
    // Make sure your source files are compiled, as they will not be processed in any way.
    new ModuleScopePlugin(paths.appSrc, [
      paths.appPackageJson,
      reactRefreshOverlayEntry,
    ]),
  ],
},
resolveLoader: {
  plugins: [
    // Also related to Plug'n'Play, but this time it tells webpack to load its loaders
    // from the current package.
    PnpWebpackPlugin.moduleLoader(module),
  ],
},
module: {
  strictExportPresence: true,
  rules: [
    // Disable require.ensure as it's not a standard language feature.
    { parser: { requireEnsure: false } },
    {
      // "oneOf" will traverse all following loaders until one will
      // match the requirements. When no loader matches it will fall
      // back to the "file" loader at the end of the loader list.
      oneOf: [
        // TODO: Merge this config once `image/avif` is in the mime-db
        // https://github.com/jshttp/mime-db
        {
          test: [/\.avif$/],
          loader: require.resolve('url-loader'),
          options: {
            limit: imageInlineSizeLimit,
            mimetype: 'image/avif',
            name: 'static/media/[name].[hash:8].[ext]',
          },
        },
        // "url" loader works like "file" loader except that it embeds assets
        // smaller than specified limit in bytes as data URLs to avoid requests.
        // A missing `test` is equivalent to a match.
        {
          test: [/\.bmp$/, /\.gif$/, /\.jpe?g$/, /\.png$/],
          loader: require.resolve('url-loader'),
          options: {
            limit: imageInlineSizeLimit,
            name: 'static/media/[name].[hash:8].[ext]',
          },
        },
        // Process application JS with Babel.
        // The preset includes JSX, Flow, TypeScript, and some ESnext features.
        {
          test: /\.(js|mjs|jsx|ts|tsx)$/,
          include: paths.appSrc,
          use: [{
            loader: require.resolve('cache-loader'),
          }, {
            loader: require.resolve('babel-loader'),
            options: {
              customize: require.resolve(
                'babel-preset-react-app/webpack-overrides',
              ),
              presets: [
                [
                  require.resolve('babel-preset-react-app'),
                  {
                    runtime: hasJsxRuntime ? 'automatic' : 'classic',
                  },
                ],
              ],

              plugins: [
                [
                  require.resolve('babel-plugin-named-asset-import'),
                  {
                    loaderMap: {
                      svg: {
                        ReactComponent:
                          '@svgr/webpack?-svgo,+titleProp,+ref![path]',
                      },
                    },
                  },
                ],
                isEnvDevelopment
                  && shouldUseReactRefresh
                  && require.resolve('react-refresh/babel'),
              ].filter(Boolean),
              // This is a feature of `babel-loader` for webpack (not Babel itself).
              // It enables caching results in ./node_modules/.cache/babel-loader/
              // directory for faster rebuilds.
              cacheDirectory: true,
              // See #6846 for context on why cacheCompression is disabled
              cacheCompression: false,
              compact: isEnvProduction,
            },
          }],

        },
        // Process any JS outside of the app with Babel.
        // Unlike the application JS, we only compile the standard ES features.
        {
          test: /\.(js|mjs)$/,
          exclude: /@babel(?:\/|\\{1,2})runtime/,
          loader: require.resolve('babel-loader'),
          options: {
            babelrc: false,
            configFile: false,
            compact: false,
            presets: [
              [
                require.resolve('babel-preset-react-app/dependencies'),
                { helpers: true },
              ],
            ],
            cacheDirectory: true,
            // See #6846 for context on why cacheCompression is disabled
            cacheCompression: false,

            // Babel sourcemaps are needed for debugging into node_modules
            // code.  Without the options below, debuggers like VSCode
            // show incorrect code and set breakpoints on the wrong lines.
            sourceMaps: shouldUseSourceMap,
            inputSourceMap: shouldUseSourceMap,
          },
        },
        // "postcss" loader applies autoprefixer to our CSS.
        // "css" loader resolves paths in CSS and adds assets as dependencies.
        // "style" loader turns CSS into JS modules that inject <style> tags.
        // In production, we use MiniCSSExtractPlugin to extract that CSS
        // to a file, but in development "style" loader enables hot editing
        // of CSS.
        // By default we support CSS Modules with the extension .module.css
        {
          test: cssRegex,
          exclude: cssModuleRegex,
          use: getStyleLoaders({
            importLoaders: 1,
            sourceMap: isEnvProduction
              ? shouldUseSourceMap
              : isEnvDevelopment,
          }),
          // Don't consider CSS imports dead code even if the
          // containing package claims to have no side effects.
          // Remove this when webpack adds a warning or an error for this.
          // See https://github.com/webpack/webpack/issues/6571
          sideEffects: true,
        },
        // Adds support for CSS Modules (https://github.com/css-modules/css-modules)
        // using the extension .module.css
        {
          test: cssModuleRegex,
          use: getStyleLoaders({
            importLoaders: 1,
            sourceMap: isEnvProduction
              ? shouldUseSourceMap
              : isEnvDevelopment,
            modules: {
              getLocalIdent: getCSSModuleLocalIdent,
            },
          }),
        },
        // Opt-in support for SASS (using .scss or .sass extensions).
        // By default we support SASS Modules with the
        // extensions .module.scss or .module.sass
        {
          test: sassRegex,
          exclude: sassModuleRegex,
          use: getStyleLoaders(
            {
              importLoaders: 3,
              sourceMap: isEnvProduction
                ? shouldUseSourceMap
                : isEnvDevelopment,
            },
            'sass-loader',
          ),
          // Don't consider CSS imports dead code even if the
          // containing package claims to have no side effects.
          // Remove this when webpack adds a warning or an error for this.
          // See https://github.com/webpack/webpack/issues/6571
          sideEffects: true,
        },
        // Adds support for CSS Modules, but using SASS
        // using the extension .module.scss or .module.sass
        {
          test: sassModuleRegex,
          use: getStyleLoaders(
            {
              importLoaders: 3,
              sourceMap: isEnvProduction
                ? shouldUseSourceMap
                : isEnvDevelopment,
              modules: {
                getLocalIdent: getCSSModuleLocalIdent,
              },
            },
            'sass-loader',
          ),
        },
        // Less Modules
        {
          test: lessRegex,
          exclude: lessModuleRegex,
          use: getStyleLoaders(
            {
              importLoaders: 2,
              sourceMap: isEnvProduction && shouldUseSourceMap,
            },
            'less-loader',
          ),
          // Don't consider CSS imports dead code even if the
          // containing package claims to have no side effects.
          // Remove this when webpack adds a warning or an error for this.
          // See https://github.com/webpack/webpack/issues/6571
          sideEffects: true,
        },
        // Adds support for CSS Modules, but using SASS
        // using the extension .module.scss or .module.sass
        {
          test: lessModuleRegex,
          use: getStyleLoaders(
            {
              importLoaders: 2,
              sourceMap: isEnvProduction && shouldUseSourceMap,
              modules: true,
              getLocalIdent: getCSSModuleLocalIdent,
            },
            'less-loader',
          ),
        },
        // "file" loader makes sure those assets get served by WebpackDevServer.
        // When you `import` an asset, you get its (virtual) filename.
        // In production, they would get copied to the `build` folder.
        // This loader doesn't use a "test" so it will catch all modules
        // that fall through the other loaders.
        {
          loader: require.resolve('file-loader'),
          // Exclude `js` files to keep "css" loader working as it injects
          // its runtime that would otherwise be processed through "file" loader.
          // Also exclude `html` and `json` extensions so they get processed
          // by webpacks internal loaders.
          exclude: [/\.(js|mjs|jsx|ts|tsx)$/, /\.html$/, /\.json$/],
          options: {
            name: 'static/media/[name].[hash:8].[ext]',
          },
        },
        // ** STOP ** Are you adding a new loader?
        // Make sure to add the new loader(s) before the "file" loader.
      ],
    },
  ],
},
plugins: [
  // Generates an `index.html` file with the <script> injected.
  new HtmlWebpackPlugin(
    {

      inject: true,
      template: paths.appHtml,
      ...(isEnvProduction
        ? {
          minify: {
            removeComments: true,
            collapseWhitespace: true,
            removeRedundantAttributes: true,
            useShortDoctype: true,
            removeEmptyAttributes: true,
            removeStyleLinkTypeAttributes: true,
            keepClosingSlash: true,
            minifyJS: true,
            minifyCSS: true,
            minifyURLs: true,
          },
        }
        : undefined),
    },
  ),
  // isEnvDevelopment && new BundleAnalyzerPlugin(),
  isEnvDevelopment && new UnusedWebpackPlugin({
    directories: [path.join(__dirname, 'src')],
    root: __dirname,
  }),
  isEnvDevelopment && new DuplicatesPlugin({
    // Emit compilation warning or error? (Default: `false`)
    emitErrors: false,
    // Handle all messages with handler function (`(report: string)`)
    // Overrides `emitErrors` output.
    emitHandler: undefined,
    // List of packages that can be ignored. (Default: `[]`)
    // - If a string, then a prefix match of `{$name}/` for each module.
    // - If a regex, then `.test(pattern)` which means you should add slashes
    //   where appropriate.
    //
    // **Note**: Uses posix paths for all matching (e.g., on windows `/` not `\`).
    ignoredPackages: undefined,
    // Display full duplicates information? (Default: `false`)
    verbose: false,
  }),
  // Inlines the webpack runtime script. This script is too small to warrant
  // a network request.
  // https://github.com/facebook/create-react-app/issues/5358
  isEnvProduction
    && shouldInlineRuntimeChunk
    && new InlineChunkHtmlPlugin(HtmlWebpackPlugin, [/runtime-.+[.]js/]),
  // Makes some environment variables available in index.html.
  // The public URL is available as %PUBLIC_URL% in index.html, e.g.:
  // <link rel="icon" href="%PUBLIC_URL%/favicon.ico">
  // It will be an empty string unless you specify "homepage"
  // in `package.json`, in which case it will be the pathname of that URL.
  new InterpolateHtmlPlugin(HtmlWebpackPlugin, env.raw),
  // This gives some necessary context to module not found errors, such as
  // the requesting resource.
  new ModuleNotFoundPlugin(paths.appPath),
  // Makes some environment variables available to the JS code, for example:
  // if (process.env.NODE_ENV === 'production') { ... }. See `./env.js`.
  // It is absolutely essential that NODE_ENV is set to production
  // during a production build.
  // Otherwise React will be compiled in the very slow development mode.
  new webpack.DefinePlugin(env.stringified),
  // This is necessary to emit hot updates (CSS and Fast Refresh):
  isEnvDevelopment && new webpack.HotModuleReplacementPlugin(),
  // Experimental hot reloading for React .
  // https://github.com/facebook/react/tree/master/packages/react-refresh
  isEnvDevelopment
    && shouldUseReactRefresh
    && new ReactRefreshWebpackPlugin({
      overlay: {
        entry: webpackDevClientEntry,
        // The expected exports are slightly different from what the overlay exports,
        // so an interop is included here to enable feedback on module-level errors.
        module: reactRefreshOverlayEntry,
        // Since we ship a custom dev client and overlay integration,
        // the bundled socket handling logic can be eliminated.
        sockIntegration: false,
      },
    }),
  // Watcher doesn't work well if you mistype casing in a path so we use
  // a plugin that prints an error when you attempt to do this.
  // See https://github.com/facebook/create-react-app/issues/240
  isEnvDevelopment && new CaseSensitivePathsPlugin(),
  // If you require a missing module and then `npm install` it, you still have
  // to restart the development server for webpack to discover it. This plugin
  // makes the discovery automatic so you don't have to restart.
  // See https://github.com/facebook/create-react-app/issues/186
  isEnvDevelopment
    && new WatchMissingNodeModulesPlugin(paths.appNodeModules),
  isEnvProduction
    && new MiniCssExtractPlugin({
      // Options similar to the same options in webpackOptions.output
      // both options are optional
      filename: 'static/css/[name].[contenthash:8].css',
      chunkFilename: 'static/css/[name].[contenthash:8].chunk.css',
    }),
  // Generate an asset manifest file with the following content:
  // - "files" key: Mapping of all asset filenames to their corresponding
  //   output file so that tools can pick it up without having to parse
  //   `index.html`
  // - "entrypoints" key: Array of files which are included in `index.html`,
  //   can be used to reconstruct the HTML if necessary
  new ManifestPlugin({
    fileName: 'asset-manifest.json',
    publicPath: paths.publicUrlOrPath,
    generate: (seed, files, entrypoints) => {
      const manifestFiles = files.reduce((manifest, file) => {
        manifest[file.name] = file.path;
        return manifest;
      }, seed);
      const entrypointFiles = entrypoints.main.filter(
        (fileName) => !fileName.endsWith('.map'),
      );

      return {
        files: manifestFiles,
        entrypoints: entrypointFiles,
      };
    },
  }),

  // Moment.js is an extremely popular library that bundles large locale files
  // by default due to how webpack interprets its code. This is a practical
  // solution that requires the user to opt into importing specific locales.
  // https://github.com/jmblog/how-to-optimize-momentjs-with-webpack
  // You can remove this if you don't use Moment.js:
  new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),

  // Generate a service worker script that will precache, and keep up to date,
  // the HTML & assets that are part of the webpack build.
  isEnvProduction
    && fs.existsSync(swSrc)
    && new WorkboxWebpackPlugin.InjectManifest({
      swSrc,
      dontCacheBustURLsMatching: /\.[0-9a-f]{8}\./,
      exclude: [/\.map$/, /asset-manifest\.json$/, /LICENSE/],
      // Bump up the default maximum size (2mb) that's precached,
      // to make lazy-loading failure scenarios less likely.
      // See https://github.com/cra-template/pwa/issues/13#issuecomment-722667270
      maximumFileSizeToCacheInBytes: 5 * 1024 * 1024,
    }),
  // TypeScript type checking
  useTypeScript
    && new ForkTsCheckerWebpackPlugin({
      typescript: resolve.sync('typescript', {
        basedir: paths.appNodeModules,
      }),
      async: isEnvDevelopment,
      checkSyntacticErrors: true,
      resolveModuleNameModule: process.versions.pnp
        ? `${__dirname}/pnpTs.js`
        : undefined,
      resolveTypeReferenceDirectiveModule: process.versions.pnp
        ? `${__dirname}/pnpTs.js`
        : undefined,
      tsconfig: paths.appTsConfig,
      reportFiles: [
        // This one is specifically to match during CI tests,
        // as micromatch doesn't match
        // '../cra-template-typescript/template/src/App.tsx'
        // otherwise.
        '../**/src/**/*.{ts,tsx}',
        '**/src/**/*.{ts,tsx}',
        '!**/src/**/__tests__/**',
        '!**/src/**/?(*.)(spec|test).*',
        '!**/src/setupProxy.*',
        '!**/src/setupTests.*',
      ],
      silent: true,
      // The formatter is invoked directly in WebpackDevServerUtils during development
      formatter: isEnvProduction ? typescriptFormatter : undefined,
    }),
  !disableESLintPlugin
    && new ESLintPlugin({
      // Plugin options
      extensions: ['js', 'mjs', 'jsx', 'ts', 'tsx'],
      formatter: require.resolve('react-dev-utils/eslintFormatter'),
      eslintPath: require.resolve('eslint'),
      failOnError: !(isEnvDevelopment && emitErrorsAsWarnings),
      context: paths.appSrc,
      cache: true,
      cacheLocation: path.resolve(
        paths.appNodeModules,
        '.cache/.eslintcache',
      ),
      // ESLint class options
      cwd: paths.appPath,
      resolvePluginsRelativeTo: __dirname,
      baseConfig: {
        extends: [require.resolve('eslint-config-react-app/base')],
        rules: {
          ...(!hasJsxRuntime && {
            'react/react-in-jsx-scope': 'error',
          }),
        },
      },
    }),
  new MonacoWebpackPlugin(),
  isEnvProduction && new CompressionPlugin({
    test: /\.(js|css)(\?.*)?$/i,
    algorithm: 'gzip',
    compressionOptions: {
      level: 1,
    },
  }),
  // new MonacoWebpackPlugin(),
].filter(Boolean),
// Some libraries import Node modules but don't use them in the browser.
// Tell webpack to provide empty mocks for them so importing them works.
node: {
  module: 'empty',
  dgram: 'empty',
  dns: 'mock',
  fs: 'empty',
  http2: 'empty',
  net: 'empty',
  tls: 'empty',
  child_process: 'empty',
},
// Turn off performance processing because we utilize
// our own hints via the FileSizeReporter
performance: false,

};
};
This error occurs when I execute this statement。
‘const curlconverter = require('curlconverter');'

Can you try Node 12 please? Node 10 is no longer supported and we don't support it either.

First of all, curlconverter needs Node 12+ to work.
This issue is related to the fact that there's two ways to import stuff in JavaScript, the old way
const curlconverter = require('curlconverter')

and the new way, ESM
import * as curlconverter from 'curlconverter'

The new way requires that you have this line in your package.json to work, and you also can't mix the old way and the new way in the same package
  "type": "module",

But this is surprising because I thought curlconverter 3 is not an ESM module... maybe try reading stuff here, it seems to be a similar issue https://stackoverflow.com/questions/69041454/error-require-of-es-modules-is-not-supported-when-importing-node-fetch
Finally, you could upgrade to curlconverter 4 with npm install curlconverter@next, which is definitely a ESM module (the new kind) and then try to convert your require() into an import statement.
Let me know if you ever figure it out.

Can you please post step-by-step instructions that I can run to get this issue, or make a git repo that I can just clone and see the issue or something? I want to fix this or at least figure out what is going on but what you posted in the issue is not enough.


Rename the project and library on pypi "peppi"

💡 Description
Change the name of the repository and of the published package.
⚔ Parent Epic / Related Tickets
No response

Hi @collinss-jpl , @jordanpadams ,
I realized that we usually prefix our package names on pypi with pds.. For now we will do the same with peppi.
So:

github repository will be: peppi
python package name: pds.peppi

Thanks,


Commits with scope "deps" does not trigger the creation of a release pr

TL;DR
Commits with scope "deps" does not trigger the creation of a release pr.
Expected behavior
My assumption is that a commit (e.g. https://github.com/SAP/ui5-tooling-extensions/commit/bd5a78abaf0cf8a1218db9b2e076442398e4c184) with commit message deps: bump packageX to version Y will create a release PR.
Observed behavior
No release PR is created.
Action YAML
on:
  workflow_dispatch:
    inputs:
      new-version:
        description: 'The semver version of the new release'
        required: true
        type: string
      package-folder:
        description: 'The package to be released'
        required: true
        type: choice
        options:
          - middleware-code-coverage
  push:
    branches:
      - main
name: release-please
jobs:
  pull-request:
    runs-on: ubuntu-22.04
    outputs:
      releases_created: ${{steps.release.outputs.releases_created}}
      paths_released: ${{steps.release.outputs.paths_released}}
    steps:
    - uses: google-github-actions/release-please-action@v3
      id: release
      with:
        command: manifest
        token: ${{secrets.GH_OPENUI5BOT}}
        monorepo-tags: true
        release-as: ${{ inputs.new-version }}
        path: packages/${{ inputs.package-folder }}
  publish-package:
    needs: pull-request
    if: ${{needs.pull-request.outputs.releases_created}}
    runs-on: ubuntu-22.04
    strategy:
      matrix:
        path_released: ${{fromJson(needs.pull-request.outputs.paths_released)}}
    steps:
    - name: Checkout
      uses: actions/checkout@v3
    - name: Use Node.js LTS 18.x
      uses<EMAIL_ADDRESS>      with:
        node-version: 18.x
    - name: Publish to NPM
      env:
        NPM_TOKEN: ${{secrets.NPM_UI5BOT}}
      run: |
        cd ${{ matrix.path_released }}
        echo '//registry.npmjs.org/:_authToken=${NPM_TOKEN}' >> ./.npmrc
        npm publish --workspaces false --access public

Log output
❯ Fetching release-please-config.json from branch main
❯ Fetching .release-please-manifest.json from branch main
✔ Building releases
✔ Building strategies by path
❯ packages/middleware-code-coverage: node
❯ Fetching release-please-config.json from branch main
❯ Fetching .release-please-manifest.json from branch main
✔ Building pull requests
✔ Building strategies by path
❯ packages/middleware-code-coverage: node
❯ Fetching packages/middleware-code-coverage/package.json from branch main
✔ Collecting release commit SHAs
❯ release search depth: 400
❯ Fetching releases with cursor undefined
❯ Found release for path packages/middleware-code-coverage, middleware-code-coverage-v1.0.3
❯ release for path: packages/middleware-code-coverage, version: 1.0.3, sha: 640fdc8faec728337cea56ec1c05ad16478b29d5
✔ Collecting commits since all latest releases
❯ commit search depth: 500
❯ Set(1) { '640fdc8faec728337cea56ec1c05ad16478b29d5' }
❯ Fetching merge commits on branch main with cursor: undefined
❯ Backfilling file list for commit: 28d4026a883d60b53b6eacd3f5976f79a1819e3d
❯ Found 1 files
❯ Fetching merge commits on branch main with cursor: bd5a78abaf0cf8a1218db9b2e076442398e4c184 24
❯ Fetching merge commits on branch main with cursor: bd5a78abaf0cf8a1218db9b2e076442398e4c184 49
❯ Backfilling file list for commit: e59e921780ace11cdf2bc1ff98e2af241580f118
❯ Found 1 files
✔ Splitting 51 commits by path
✔ Building candidate release pull request for path: packages/middleware-code-coverage
❯ type: node
❯ targetBranch: main
❯ commits: 56
✔ Considering: 56 commits
❯ component: middleware-code-coverage
❯ pull request title pattern: release:${component} v${version}
⚠ pullRequestTitlePattern miss the part of '${scope}'
✔ No user facing commits found since 640fdc8faec728337cea56ec1c05ad16478b29d5 - skipping

Additional information
Its a mono-repo and the lockfile is only stored on the root level of the repository. The subpackage does not have its own lockfile.

For most languages, deps types are not considered releasable commits.
2 options:

use fix(deps): blah blah
configure the changelog section to include deps types which will make it appear in the changelog (as a new section and force a patch bump).

Thanks @chingor13. Option 2 is the config I searched for. I just found https://github.com/npm/cli/blob/c736b622b8504b07f5a19f631ade42dd40063269/release-please-config.json#L6. Thx!


Not fully functional

I moved to another server and after that not everything works fine.
1 i cant see the stats anymore, as it redirects to root
2 when i try to add a new url, it never finnish.
3 at the bottom of the pages there is the following code::
DB driver: pdo
SELECT option_name, option_value FROM yourls_options WHERE 1=1
SELECT option_value FROM yourls_options WHERE option_name = 'active_plugins' LIMIT 1
SELECT COUNT(keyword) as count, SUM(clicks) as sum FROM yourls_url WHERE 1=1
SELECT * FROM yourls_url WHERE 1=1  ORDER BY timestamp desc LIMIT 0, 15;
Any ideas?
Thanks

Looks like you have database issues.
Try to access your database server from within your webserver with the
credentials and see what happens.
Cheers,
LEslie
On Fri, Jul 21, 2017 at 3:49 AM, sedvardt<EMAIL_ADDRESS>wrote:

I moved to another server and after that not everything works fine.
1 i cant see the stats anymore, as it redirects to root
2 when i try to add a new url, it never finnish.
3 at the bottom of the pages there is the following code::
DB driver: pdo
SELECT option_name, option_value FROM yourls_options WHERE 1=1
SELECT option_value FROM yourls_options WHERE option_name =
'active_plugins' LIMIT 1
SELECT COUNT(keyword) as count, SUM(clicks) as sum FROM yourls_url WHERE
1=1
SELECT * FROM yourls_url WHERE 1=1 ORDER BY timestamp desc LIMIT 0, 15;
Any ideas?
Thanks
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/YOURLS/YOURLS/issues/2272, or mute the thread
https://github.com/notifications/unsubscribe-auth/AAbPVWposJofuuPNCDhkl_xDqsQl8pYiks5sQEoJgaJpZM4OfBZv
.

--
Leslie H. Watter

Seconding @watter, you mat recheck your database config carefully.
Also, missing a lot of information, please don't clear out the issue template when creating a new issue.


nullPointerException in unquotedParameter

I think I already reported this problem, but I encountered it again: nullPointerException when the argument of unquotedParameter is null. Please validate the argument

I think it would be also nice if in case of null it appends "null" to the string. This happens in the tests when we mock exceptions and they don't have a message:
.unquotedParameter("cause", exception.getMessage())

yes. It was fixed in 0.2.1. Please double-check that you're using the latest version

I'm using 0.2.1, I've just added it to the project, so it can't be a cache effect


[BUG - Release] The bUseUObjectArrayCache doesn't work (solution inside).

Branch or Release
v<IP_ADDRESS>Alpha-Hotfix
Game and Engine Version
All games and all engine versions.
Describe the bug
The setting bUseUObjectArrayCache is incorrect in UE4SS-settings.ini.
In the code, it's parsing UseUObjectArrayCache without the b infront of it.
As a result, the value has no effect and the array cache will always be used.
To Reproduce
N/A
Expected behavior
N/A
Screenshots and UE4SS Log
N/A
Desktop (please complete the following information):
N/A
Additional context
To fix this, I would recommend that you change the code so that it parses bUseUObjectArrayCache instead of UseUObjectArrayCache, that way users don't need to update their existing ini files.
Another way to fix this is to update the ini file for future releases but that would require users that downloaded UE4SS before this fix manually apply the change in their ini file.
Alternatively, allow both of them in the ini file.

Thank you, will likely add the b in the code.

Fixed in 782f8a15e2f4f1e5e29a4a65bc5db8eec8646831 and 5bf12476934d746970e12009812beb2048967fe3.


Support editing config file from the command line

Fixes #164.

This looks like a great change :partying_face: The docs for configuring the sync server seem a lot easier to follow along given this change


Hyphen-Minus in text parameter skips error generation

If you write the characters Hyphen-Minus (U+002D) or Non-Breaking Hyphen (U+2011) in the text parameter, an audio file will be returned, but the error Text is not correct was expected

fixed in https://github.com/twirapp/silero-tts-api-server/commit/a3a6d9d741d3ff9c801a536d51c4f00888d94f7e


Setup java takes much too long

Description:
Currently I'm experiencing extreme slow build times because setup-java takes more than 10 minutes
Task version:
v1
Platform:

[X] Ubuntu
[ ] macOS
[ ] Windows

Runner type:

[X] Hosted
[ ] Self-hosted

Repro steps:
jobs:
  build:
    timeout-minutes: 60
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Set up JDK 11
        uses: actions/setup-java@v1
        with:
          java-version: 11

Expected behavior:
In the past the step only took a couple of seconds.
Actual behavior:
The step takes more than 10 minutes. May be missing caching and slow download servers?
Restarting doesn't help.

Hello @joshiste, currently, we are working on implementation actions/setup-java@v2.
One of the major feature will be consuming Java versions pre-installed on images that should significantly reduce task time. We are expecting V2 to be available in a couple of weeks.

Hello @joshiste, currently, we are working on implementation actions/setup-java@v2.
One of the major feature will be consuming Java versions pre-installed on images that should significantly reduce task time. We are expecting V2 to be available in a couple of weeks.

Hi @maxim-lobanov This issue was not there yesterday for the same exact setup for me (v1) and has just started occurring out of the blue right now.

Yes, I think it could be caused by some temporary connection issues / slowness on Azul CDN. actions/setup-java@v1 downloads Java directly from Azul site: https://www.azul.com/downloads/zulu-community/?package=jdk

Experiencing the same , its taking around 19 mins to complete

The same for me.

seems to be good again.

Hello everyone. I am closing the issue because it was a temporary Azul's server side issue. If you have any concerns, feel free to reopen the issue.


Incorrect recurrence date calculations?

Expected Behavior
When I have the following task:
- [ ] Review 🔁 every 4 days 🗓 2021-06-24

And I mark it as complete on 2021-06-21, it should result in:
- [ ] Review 🔁 every 4 days 🗓 2021-06-28
- [x] Review 🔁 every 4 days 🗓 2021-06-24 ✅ 2021-06-21

Current Behavior
In a note that only has the original task as its content, I end up with:
- [ ] Review 🔁 every 4 days 🗓 2021-06-26
- [x] Review 🔁 every 4 days 🗓 2021-06-24 ✅ 2021-06-21

Note the date of the new task is five days from the completion date of 2021-06-21, and only two days from the original task.
Steps to Reproduce

Create new note
Add task (manually or with the command palette) containing - [ ] Review 🔁 every 4 days 🗓 2021-06-24
Switch to preview mode
Mark as done
Observe wrong date

Context (Environment)

Obsidian version: v0.12.4
Tasks version: Version 1.1.1
[ ] I have tried it with all other plugins disabled and the error still occurs

Q: Does this mean core plugins as well? I can try that if desired—this is the only community plugin I have installed, though.

Possible Solution
I was trying to think of how this might've been calculated, and the only thing I can think of is that it could be calculating four days from the date of completion but has a timezone issue 🤔

Thank you for your well crafted bug report. You don't need to re-try with the core plugins disabled. I can easily reproduce the behavor you describe.

Fixed in the latest 1.1.2 release!

Appears to be working indeed, thanks @schemar!

I'm having a similar problem which I can't debug.

The bottom task is the one for today. I click on it, and the one above is created for tomorrow. Click on that and the one above is created for the next day.
Expected behaviour: click on the bottom one and it creates task for next month.
I have a lot of plugins installed. Do I need to disable them all to debug?
Thanks a lot for any advice.

Disabling all other plugins is required in almost all cases, but I don't think it makes a difference here. I can easily reproduce the bug.
The thing is: Tasks uses rrule to determine the next occurrence. And it appears rrule decides that that's how the rule works (which is obviously not how it is intended).
Since recurrence is handled by rrule, there is nothing I can do to help, unfortunately. You could ask for support at rrule how to craft such a rule. If you find out, please share it with us :smile:

Thanks a lot @schemar for responding. The strange thing is that these rules were working fine a few weeks ago and then suddenly stopped working as expected.
I am not a programmer, and do not understand what to do to look into this further.

Ok, sorry to hear that it broke. Did it break with an update to the Tasks plugin? Do you know by any chance?
In any case I can see if there is a newer version of rrule that I can bundle with Tasks next release. Until then/if there is no update to rrule, there is nothing I can do, I am afraid.


Fix windows com problem.

The system check was inverted, and the --skip-port-check wasn't active for that check.

TBR.


Unhelpful error: TypeError: Cannot read property '0' of   undefined

Describe the bug
typing in ntl deploy --prod gets this:
Deploy path:        /Users/swyx/Work/swyxdotio/public
Configuration path: /Users/swyx/Work/swyxdotio/netlify.toml
Deploying to main site URL...
 ›   Warning:
 ›   {}
 ›
    TypeError: Cannot read property '0' of
     undefined

I've never seen this error before as a heavy netlify user. netlify console displayed this

When I reran ntl deploy, it worked again. I think there is some bad error handling inside of the CLI but cant tell more because the stack trace is swallowed.
Configuration

If possible, please copy/paste below your netlify.toml.

[build]
  command = "yarn build"
  publish = "public/"

[[headers]]
  for = "/dist/svelte/*"
  [headers.values]
    cache-control = '''
      public,
      max-age=31536000,
      immutable'''

Please enter the following command in a terminal and copy/paste its output:

npx envinfo --system --binaries --npmPackages netlify-cli --npmGlobalPackages netlify-cli

  System:
    OS: macOS 11.3.1
    CPU: (8) x64 Apple M1
    Memory: 32.25 MB / 8.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 15.5.0 - /usr/local/bin/node
    Yarn: 1.22.10 - /usr/local/bin/yarn
    npm: 7.3.0 - /usr/local/bin/npm
  npmGlobalPackages:
    netlify-cli: 3.21.10

Thanks for opening the issue @sw-yx ❤
I believe this is somehow a duplicate of #2086.
In #2086 the error was coming from our js-client, but since then https://github.com/netlify/js-client/issues/157 was resolved, so now the offending code is part of the CLI.
Moving the code to the CLI should allow us to better debug this once we follow up on #2086 with some more refactoring.
Keeping the issue open for now.

@ascorbic is this the error you were seeing?

@eduardoboucas  Yes, it is. It's intermittent, when I was running ntl deploy --build

interesting. i think itd be good to identify the part of the CLI that is throwing this error and showing the rest of the stack trace. in general ive started to dislike swallowing stack traces... it reduces our ability to debug or even report issues. perhaps worth scanning thru the codebase for console.error and making sure things are thrown properly instead of swallowed

💯  to not swallowing stack traces. I believe we are mostly using the oclif this.error utility to report errors and exit so I have a feeling that's the culprit but I'll need to investigate more.

This should be fixed in the next release.
As for swallowing errors, that is coming from oclif here:
https://github.com/oclif/errors/blob/4aa3941839812523bec265c93333e166ce71bbed/src/handle.ts#L18
https://github.com/oclif/errors/blob/4aa3941839812523bec265c93333e166ce71bbed/src/errors/pretty-print.ts#L55
and can be overridden  via  DEBUG='*' ntl deploy.
We can also enable debug in oclif config, but I tested it a bit and it seems too verbose.


⚠ Agora Aveiro has degraded performance

In 76df0cf, Agora Aveiro (https://agoraaveiro.org) experienced degraded performance:

HTTP code: 200
Response time: 4192 ms

Resolved: Agora Aveiro performance has improved in 4cd7135.


Module not found: Can't resolve '@babel/runtime-corejs2/core-js/object/keys'

Describe the bug
Getting Module not found: Can't resolve '@babel/runtime-corejs2/core-js/object/keys' Error, I am not using babel
Stack Trace
./node_modules/rjsf-conditionals/dist/es/actions/uiAppend.js:1:1 Module not found: Can't resolve '@babel/runtime-corejs2/core-js/object/keys' https://nextjs.org/docs/messages/module-not-found Import trace for requested module: ./node_modules/rjsf-conditionals/dist/es/actions/index.js ./node_modules/rjsf-conditionals/dist/es/applyRules.js ./node_modules/rjsf-conditionals/dist/es/index.js
To Reproduce:

Try Sum Material template
Provide steps to reproduce: No changes in provided code

Expected behavior
Form should be visible
Library details:

Next 14.1.4

React 18.2.0

rjsf-conditionals: 1.5.0,

"@rjsf/core": "^5.18.1",
"@rjsf/material-ui": "^5.18.1",
"@rjsf/mui": "^5.18.1",
"@rjsf/utils": "^5.18.1",
"@rjsf/validator-ajv8": "^5.18.1",
"json-rules-engine": "^6.5.0",
"json-rules-engine-simplified": "^0.2.0",

Which file/dependency is used, which module system? next js app router

core-js is a required npm peer dependency at the moment, see package.json
"peerDependencies": {
    "@rjsf/core": ">=2.0.0",
    "core-js": "^2.5.7",
    "prop-types": "^15.7.2",
    "react": "^16.9.0 || >=17"
  },

I know it is old and people would want to use a later version but anyone could do a PR


import_table2 does not preserve spaces in node headlines

import_table1 does preserve spaces, so how is it different from import_table2 (he asked himself...he narrated)?

Found and fixed the problem. Somehow a '\s' got into a regex where it didn't belong.


Tgi crash on multi GPUs

System Info
I am trying to run TGI on Docker using 8 GPUs with 16GB each (In-house server) . Docker works fine with using single GPU.
My server crashes when using all GPUs. is there any other way to do it.
PS. I Need to use all GPUs so I can load big models. using single GPU I can use small models with less max-input-lenght
Information

[X] Docker
[ ] The CLI directly

Tasks

[X] An officially supported command
[ ] My own modifications

Reproduction

docker run --gpus all --name tgi --shm-size 1g --cpus="5.0" --rm --runtime=nvidia -e HUGGING_FACE_HUB_TOKEN=******* -p 8060:80 -v '$PATH':/data ghcr.io/huggingface/text-generation-inference --model-id meta-llama/Meta-Llama-3-8B --num-shard 8 --max-input-length 14000 --max-batch-prefill-tokens 14000 --max-total-tokens 16000

Expected behavior
INFO text_generation_router: router/src/main.rs:242: Using the Hugging Face API to retrieve tokenizer config
INFO text_generation_router: router/src/main.rs:291: Warming up model
WARN text_generation_router: router/src/main.rs:306: Model does not support automatic max batch total tokens
INFO text_generation_router: router/src/main.rs:328: Setting max batch total tokens to 16000
INFO text_generation_router: router/src/main.rs:329: Connected

Seeing a similar issue on my end.

@RohanSohani30 Can you share the output of TGI when it errors?

I had the same problem like #2192, and was able to solve it by trying --cuda-graphs 0 method like #2099. This obviously caused major performance problems, but it was at least a better option than being broken.

@RohanSohani30 Can you share the output of TGI when it errors?

There are no errors but system is getting crashed while the Warming model.

Yeah seems related to CUDA graphs and a bug introduced in NCCL 2.20.5. Can you retry with the latest docker image as #2099 was merged?

Yeah seems related to CUDA graphs and a bug introduced in NCCL 2.20.5. Can you retry with the latest docker image as #2099 was merged?

I am using the latest docker image. Still facing the same issue.
I found one quick fix: when I use 2 or 4 GPUs, TGI image is running using --runtime=nvidia --env BUILD_EXTENSIONS=False --env NCCL_SHM_DISABLE=1
but here is a catch. let's say a model takes 11 GB of GPU memory to load on a single GPU. but when I use 2 GPUs it takes more than 11GB per GPU the total GPU would go above 25GB. I used --cuda-memory-fraction to limit GPU usage per GPU.

I am missing something?

If disabling SHM solves the issue, it means that there is a problem on the way your system handles SHM. How much RAM do you have on the machine?
If I understand well, loading the model on 1GPU takes 11G VRAM while you OOM when using 2 GPUs?
@HoKim98 does the latest Docker image made it work?

@Hugoch It seems to be working! Had a 10-min stress testing and no errors were found.

If disabling SHM solves the issue, it means that there is a problem on the way your system handles SHM. How much RAM do you have on the machine? If I understand well, loading the model on 1GPU takes 11G VRAM while you OOM when using 2 GPUs?
@HoKim98 does the latest Docker image made it work?

1TB RAM with 8*16G VRAM.
while using 2 GPUs I am getting OOM if model is big (above 22B) .
There is another scenario. when I am loading model using TGI CLI. I can load big models on all 8 GPUs without OOM. but tokens per sec are very low ...less than 1. using CLI model is distributed accross all GPUs.

Llama3-8B has a context of 8k, so you probably want to reduce max-total-tokens, and max-input-length. Try to set a low max-batch-total-tokens to check if you can load the model. If that's the case then you can incrementally increase it until OOM.


Toolbar menu links rendered with incorrect "url" href instead of blank

I have an intermittent problem on CMS v3.3.2 whereby the toolbar top-level  tags used as menu links are rendered with href set to "url" instead of blank, see below for an example.
Note that "url" is the actual url rendered and not just my placeholder, meaning when I click the toolbar menu item which should just give a dropdown I get a 404 Page not found: http://<IP_ADDRESS>:8000/en/url/ Raised by cms.views.details
I'm not using any toolbar extensions and just using the standard {% cms_toolbar %} at the top of  in the base template.
Expected:

        Page

...

Error:
...

...

It seems as though when the toolbar is constructed, no url is passed to each toolbar item, hence {{ url }} is rendering as "url".
Possibly in toolbar.populate() in the toolbar templatetag?
Any help much appreciated..

It appears to me as though the SubMenu toolbar item needs to have a default url of '' which is passed as context... This certainly fixes the bug.
How did this ever work?
In cms.toolbar.items:
class BaseItem(six.with_metaclass(ABCMeta)):
    template = None
+   url = ''

...

class SubMenu(ToolbarAPIMixin, BaseItem):
    template = "cms/toolbar/items/menu.html"
    sub_level = True
    active = False

    def __init__(self, name, csrf_token, disabled=False, side=LEFT):
        ToolbarAPIMixin.__init__(self)
        BaseItem.__init__(self, side)
        self.name = name
        self.disabled = disabled
        self.csrf_token = csrf_token

    def __repr__(self):
        return '<Menu:%s>' % force_text(self.name)

    def add_break(self, identifier=None, position=None):
        item = Break(identifier)
        self.add_item(item, position=position)
        return item

    def get_items(self):
        items = self.items
        for item in items:
            if hasattr(item, 'disabled'):
                item.disabled = self.disabled or item.disabled
        return items

    def get_context(self):
        return {
+           'url': self.url,
            'active': self.active,
            'disabled': self.disabled,
            'items': self.get_items(),
            'title': self.name,
            'sub_level': self.sub_level
        }

The answer to this is that the cms is not compatible with anything being set for string_if_invalid
Hopefully my pain is useful for someone else one day!


Encode special characters

Closes #181

Coverage remained the same at 100.0% when pulling e03b42a6a88d0fde1e04a9aabb11531af7fff9fb on nbayramberdiyev:fix/encode-special-characters into bc6f29ecf5bfe94061661229ea508badfa5fd741 on slimphp:master.


Transparent material mix issue.

Godot version:
3.0.2
OS/device including version:
Ubuntu Linux 18.04
Issue description:
When I look through my skylight asset the glass seems to flicker. This is because the Blend Mode is set to Mix. With Blend Mode set to Add it doesn't happen. I'm not sure if this still counts as a bug, since you can work around it, but I thought I report it anyway.
Steps to reproduce:
Apply a transparent material with the Blend Mode set to Mix to two different objects and look through both of them.

It does count as a bug, and it seems to be a problem with the rendering system.

Maybe it's z-sorting related. Where are the origins of your glass objects?

Yes, @CptPotato, it appears the origin is all at the same position. I thought the polygon position set it's z position, but it's the origin position?

When multiple transparent objects are rendered, the z-buffer becomes mostly useless. Instead, they have to be sorted on-CPU before sending them for drawing, otherwise, improper layering occurs.

So should this be regarded as a bug or should I close this? And don't put transparent objects at the same origin point?

It's not really a bug in my opinion, it's just how 3d engines sort transparent objects.
One possible proposal would be to have an option to automatically calculate an origin offset that's used for sorting. But looping through thousands of vertices is kind of slow so it would mostly make sense as an import option.
Personally I think that fixing the origin should be done when exporting the mesh. Adding a new feature just for that seems more like an unnecessary workaround to me.

I had similar issues with meshes at different origin points (clouds = player's origin, tree = the tree's own origin, ahead of the player; clouds ended up obscuring the tree). I worked around this by making most of them use alpha scissor, which moves them to opaque pass and neatly sidesteps the issue.

This can't really be solved without introducing expensive order-independent transparency, so I'll close this.
This limitation (among many others) has been documented in 3D rendering limitations.


[Android] IndicatorsShape did not set to square

Hi, I have set the CarouselViewControl IndicatorShape to Square in xaml, but it did not change to square at all.

Android? iOS?

Android. tested using your demo build on both Android Device (OnePlus 3T) 8.0 and Genymotion Emulator 8.0

I don't have a OnePlus but I did test with Genymotion 8.0 and still cannot reproduce this.

Found the problem. Fix included in next release.


Re-write PDFHistory from scratch

Please refer to the individual commit messages.
Supersedes PR #6272.

/botio-linux preview


[MM-40171] Update retrospective reminder illustration

Summary
This PR updates retrospective reminder illustration

Ticket Link
Fixes: https://mattermost.atlassian.net/browse/MM-40171
Checklist

[ ] Telemetry updated
[ ] Gated by experimental feature flag
[ ] Unit tests updated

I noticed that in the previous svg we where using fill='var(--button-bg)' and other colours for theme changes. Not sure if new illustration needs that @abhijit-singh. I just used this https://github.com/gregberge/svgr to get the jsx component and copied it in code(without theming).

Updated colors


add snippets for compatibility with metaknight

https://github.com/diesdasdigital/kirby-meta-knight/tree/master/snippets

to much work


Issue with k8s.io/docs/concepts/workloads/controllers/deployment/

"Flag --record has been deprecated" (c) kubectl
But still used in recommendations and examples (10 times in this article).

@sftim, is this a candidate for a good first issue?

I'm afraid for this to be a good first issue we'd need to provide more advice to people reading this so that we had lowered the barrier to entry enough.
@alexeyerm if you'd like to revise the issue description with the guidelines in mind, that'd be lovely. We can still work on the issue if that doesn't happen though.

/sig apps

Should we also fix https://kubernetes.io/docs/tasks/manage-daemon/rollback-daemon-set/ ?

BTW https://github.com/kubernetes/enhancements/tree/master/keps/sig-cli/859-kubectl-headers doesn't mention the annotation.

Sorry, i am not experienced in Kubernetes to write docs.
BTW i don't think that "good first issue" badge should be achieved for expired documentation remarks.

BTW https://github.com/kubernetes/enhancements/tree/master/keps/sig-cli/859-kubectl-headers doesn't mention the annotation.

@sftim from what I understood, including the kubectl subcommand in the header replaces the need to use --record to write to the annotation, since the cause of the change is now recorded in the header.

Fixes in #29593

Closing this because it was fixed. Thanks @vaibhav2107 !
/close


Invoke-RestMethod -FollowRelLink should return a single array of objects

Invoke-RestMethod with the -FollowRelLink parameter correctly retrieves additional pages of results from REST services. However, the return is an array of pages rather than one array of all results.
Steps to reproduce
PS /> $apikey = 'MYAPIKEYHERE'
PS /> $headers = @{'Accept'='application/json';'Content-Type'='application/json';'Authorization'="SSWS $apikey"}
PS />
PS /> $users = Invoke-RestMethod -Uri 'https://MYORGNAME.okta.com/api/v1/users/?filter=status eq "ACTIVE"&limit=10' -Method GET -Headers $headers -FollowRelLink -MaximumFollowRelLink 3
PS />
PS /> $users.Count
3
PS /> $users.Item(0).Count
10
PS /> $users.Item(1).Count
10
PS /> $users.Item(2).Count
10
PS />

Expected behavior
Invoke-RestMethod should return a single array of objects instead of an array of arrays (pages).

PS /> $users.Count
30

Actual behavior
Invoke-RestMethod returns an array of arrays (pages).

Environment data
PS /> $PSVersionTable
Name                           Value
----                           -----
PSVersion                      6.0.0-rc
PSEdition                      Core
GitCommitId                    v6.0.0-rc
OS                             Linux 4.4.0-43-Microsoft #1-Microsoft Wed Dec 31 14:42:53 PST 2014
Platform                       Unix
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion      2.3
SerializationVersion           <IP_ADDRESS>
WSManStackVersion              3.0

PS />

The specific API I'm using returns multiple Link headers, which may or may not be related.
https://github.com/PowerShell/PowerShell/pull/5265

I disagree. If we do this we lose parity with the JSON objects being returned from the APIs.
Page 1
[
  {
    "Value": "One",
    "Id": 1
  },
  {
    "Value": "Two",
    "Id": 2
  }
]

Page 2:
[
  {
    "Value": "Three",
    "Id": 3
  },
  {
    "Value": "Four",
    "Id": 4
  }
]

That is clearly 2 JSON arrays of JSON objects, not a single array of objects.

#5265 is unrelated to the output.

I will also add that unwrapping the jagged array is easily done with Foreach-Object:
$uri = 'https://api.github.com/repos/powershell/powershell/issues'
Invoke-RestMethod -FollowRelLink -MaximumFollowRelLink 2 -uri $Uri |
    Measure-Object

Count : 2
$uri = 'https://api.github.com/repos/powershell/powershell/issues'
Invoke-RestMethod -FollowRelLink -MaximumFollowRelLink 2 -uri $Uri |
    Foreach-Object { $_ } |
    Measure-Object

Count: 60.

Thanks, @markekraus. You're absolutely right that the current behavior more closely matches the actual return. However, from my (outside) perspective FollowRelLink was added as a convenience so the caller doesn't need to think about paging and multiple calls. With that spirit in mind it seems like we shouldn't require them to post-process results in any way either.

@dddugan It's certainly a difference of opinion on how it should work. On the one hand, we need to maintain parity with the objects as they are returned from the API and on the other is convenience. I cannot condone making the default behavior break parity with APIs. As someone who works heavily with APIs, I cannot stand it when something makes assumptions about how the objects should be provided to me, especially when that assumption breaks with what the API has documented. The API says it will return an array of objects per page, I would expect and array of arrays from FollowReLlink. My vehicle for obtaining these objects from the API may change, and I don't want to adjust my logic to fit with what ever API breaking format that vehicle has decided to impose on me.
We could maybe add a switch to unwrap arrays, but, I'm not real excited about doing so. I think it is best to just return the objects as they are and let the user decide how they want to process them.

FollowRelLink was added as a convenience so the caller doesn't need to think about paging and multiple calls.

And they don't. In 5.1 for this operation to work you needed

fall back to Invoke-WebRequest,
Check for errors,
Inspect Content-type header,
convert the Content to an object,
handle serialization errors,
inspect the headers for Link,
regex parse the single Link header,
and finally repeat the process with the next link URI.

In 6.0.0 irm -FollowRelLink manages all of that for you.

@markekraus I second that.  It is easy to merge the multiple pages in script, but not trivial to unwind it if merged in cmdlet.
Unless there is a particular efficiency gain from append them in the cmdlet that is.
Does the project have any specific single responsibility type guidance for things like this?

Does the project have any specific single responsibility type guidance for things like this?

Good question. I don't know about any in the project specifically, There is always the "The PowerShell Best Practices and Style Guide" (One relvant to this thread)

Fair enough. Given:

The current behavior more closely matches the objects as returned from the API.
The caller collapsing a jagged array is vastly simpler than unwinding it.

I see the logic in status quo. It just wasn't the behavior I originally expected, which prompted me to raise the issue prior to GA.
Any further discussion before we close this?

@dddugan nothing from my end. I think this might make sense to note this in the documentation. If that wasn't what you expected, it's likely others will possible have the same experience.

Just a note here - in PS 7.10 preview 6 the FollowRelLink doesn't work at all. You only get the first page.

@silentdth you should probably file a new issue for that so it can be triaged appropriately. 🙂

Will do @vexx32 . For now I will use the DIY version for V5 of Powershell so I can get my job done ,then i'll come back and log it :)


Allow access to document.hidden and document.visibilityState

We provide functions to return the values of these read only properties to allow users to query and act on them.
I hope these are ok. Happy to make changes as needed.
We could have a custom type with Visible and Hidden values if we'd like to go in that direction.

We haven't gone in that direction with enums so far, so I will merge these as is.
More generally thinking about stricter API's I'm all for but I think we need to consider that change in the context of the library as a whole