Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scripts/ci/actions/restore-artifacts/builddir/index.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ More info on storage limits: https://docs.github.com/en/billing/managing-billing
`+s),t.push(n+"m+"+HE.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=k8e()+e+" "+t[0]}function k8e(){return Zr.inspectOpts.hideDate?"":new Date().toISOString()+" "}function O8e(...t){return process.stderr.write(qE.formatWithOptions(Zr.inspectOpts,...t)+`
`)}function F8e(t){t?process.env.DEBUG=t:delete process.env.DEBUG}function L8e(){return process.env.DEBUG}function M8e(t){t.inspectOpts={};let e=Object.keys(Zr.inspectOpts);for(let r=0;r<e.length;r++)t.inspectOpts[e[r]]=Zr.inspectOpts[e[r]]}HE.exports=n5()(Zr);var{formatters:Kq}=HE.exports;Kq.o=function(t){return this.inspectOpts.colors=this.useColors,qE.inspect(t,this.inspectOpts).split(`
`).map(e=>e.trim()).join(" ")};Kq.O=function(t){return this.inspectOpts.colors=this.useColors,qE.inspect(t,this.inspectOpts)}});var GE=f((_nt,o5)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?o5.exports=zq():o5.exports=Xq()});var tH=f(_n=>{"use strict";var U8e=_n&&_n.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,i,n)}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]}),q8e=_n&&_n.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Zq=_n&&_n.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&U8e(e,t,r);return q8e(e,t),e};Object.defineProperty(_n,"__esModule",{value:!0});_n.req=_n.json=_n.toBuffer=void 0;var H8e=Zq(require("http")),G8e=Zq(require("https"));async function eH(t){let e=0,r=[];for await(let i of t)e+=i.length,r.push(i);return Buffer.concat(r,e)}_n.toBuffer=eH;async function j8e(t){let r=(await eH(t)).toString("utf8");try{return JSON.parse(r)}catch(i){let n=i;throw n.message+=` (input: ${r})`,n}}_n.json=j8e;function z8e(t,e={}){let i=((typeof t=="string"?t:t.href).startsWith("https:")?G8e:H8e).request(t,e),n=new Promise((s,a)=>{i.once("response",s).once("error",a).end()});return i.then=n.then.bind(n),i}_n.req=z8e});var c5=f(jn=>{"use strict";var iH=jn&&jn.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,i,n)}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]}),V8e=jn&&jn.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),nH=jn&&jn.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&iH(e,t,r);return V8e(e,t),e},Y8e=jn&&jn.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&iH(e,t,r)};Object.defineProperty(jn,"__esModule",{value:!0});jn.Agent=void 0;var W8e=nH(require("net")),rH=nH(require("http")),J8e=require("https");Y8e(tH(),jn);var Da=Symbol("AgentBaseInternalState"),l5=class extends rH.Agent{constructor(e){super(e),this[Da]={}}isSecureEndpoint(e){if(e){if(typeof e.secureEndpoint=="boolean")return e.secureEndpoint;if(typeof e.protocol=="string")return e.protocol==="https:"}let{stack:r}=new Error;return typeof r!="string"?!1:r.split(`
`).some(i=>i.indexOf("(https.js:")!==-1||i.indexOf("node:https:")!==-1)}incrementSockets(e){if(this.maxSockets===1/0&&this.maxTotalSockets===1/0)return null;this.sockets[e]||(this.sockets[e]=[]);let r=new W8e.Socket({writable:!1});return this.sockets[e].push(r),this.totalSocketCount++,r}decrementSockets(e,r){if(!this.sockets[e]||r===null)return;let i=this.sockets[e],n=i.indexOf(r);n!==-1&&(i.splice(n,1),this.totalSocketCount--,i.length===0&&delete this.sockets[e])}getName(e){return(typeof e.secureEndpoint=="boolean"?e.secureEndpoint:this.isSecureEndpoint(e))?J8e.Agent.prototype.getName.call(this,e):super.getName(e)}createSocket(e,r,i){let n={...r,secureEndpoint:this.isSecureEndpoint(r)},s=this.getName(n),a=this.incrementSockets(s);Promise.resolve().then(()=>this.connect(e,n)).then(o=>{if(this.decrementSockets(s,a),o instanceof rH.Agent)try{return o.addRequest(e,n)}catch(l){return i(l)}this[Da].currentSocket=o,super.createSocket(e,r,i)},o=>{this.decrementSockets(s,a),i(o)})}createConnection(){let e=this[Da].currentSocket;if(this[Da].currentSocket=void 0,!e)throw new Error("No socket was returned in the `connect()` function");return e}get defaultPort(){return this[Da].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(e){this[Da]&&(this[Da].defaultPort=e)}get protocol(){return this[Da].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(e){this[Da]&&(this[Da].protocol=e)}};jn.Agent=l5});var sH=f(Ou=>{"use strict";var $8e=Ou&&Ou.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ou,"__esModule",{value:!0});Ou.parseProxyResponse=void 0;var K8e=$8e(GE()),jE=(0,K8e.default)("https-proxy-agent:parse-proxy-response");function X8e(t){return new Promise((e,r)=>{let i=0,n=[];function s(){let d=t.read();d?c(d):t.once("readable",s)}function a(){t.removeListener("end",o),t.removeListener("error",l),t.removeListener("readable",s)}function o(){a(),jE("onend"),r(new Error("Proxy connection ended before receiving CONNECT response"))}function l(d){a(),jE("onerror %o",d),r(d)}function c(d){n.push(d),i+=d.length;let A=Buffer.concat(n,i),u=A.indexOf(`\r
`).some(i=>i.indexOf("(https.js:")!==-1||i.indexOf("node:https:")!==-1)}incrementSockets(e){if(this.maxSockets===1/0&&this.maxTotalSockets===1/0)return null;this.sockets[e]||(this.sockets[e]=[]);let r=new W8e.Socket({writable:!1});return this.sockets[e].push(r),this.totalSocketCount++,r}decrementSockets(e,r){if(!this.sockets[e]||r===null)return;let i=this.sockets[e],n=i.indexOf(r);n!==-1&&(i.splice(n,1),this.totalSocketCount--,i.length===0&&delete this.sockets[e])}getName(e){return this.isSecureEndpoint(e)?J8e.Agent.prototype.getName.call(this,e):super.getName(e)}createSocket(e,r,i){let n={...r,secureEndpoint:this.isSecureEndpoint(r)},s=this.getName(n),a=this.incrementSockets(s);Promise.resolve().then(()=>this.connect(e,n)).then(o=>{if(this.decrementSockets(s,a),o instanceof rH.Agent)try{return o.addRequest(e,n)}catch(l){return i(l)}this[Da].currentSocket=o,super.createSocket(e,r,i)},o=>{this.decrementSockets(s,a),i(o)})}createConnection(){let e=this[Da].currentSocket;if(this[Da].currentSocket=void 0,!e)throw new Error("No socket was returned in the `connect()` function");return e}get defaultPort(){return this[Da].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(e){this[Da]&&(this[Da].defaultPort=e)}get protocol(){return this[Da].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(e){this[Da]&&(this[Da].protocol=e)}};jn.Agent=l5});var sH=f(Ou=>{"use strict";var $8e=Ou&&Ou.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ou,"__esModule",{value:!0});Ou.parseProxyResponse=void 0;var K8e=$8e(GE()),jE=(0,K8e.default)("https-proxy-agent:parse-proxy-response");function X8e(t){return new Promise((e,r)=>{let i=0,n=[];function s(){let d=t.read();d?c(d):t.once("readable",s)}function a(){t.removeListener("end",o),t.removeListener("error",l),t.removeListener("readable",s)}function o(){a(),jE("onend"),r(new Error("Proxy connection ended before receiving CONNECT response"))}function l(d){a(),jE("onerror %o",d),r(d)}function c(d){n.push(d),i+=d.length;let A=Buffer.concat(n,i),u=A.indexOf(`\r
\r
`);if(u===-1){jE("have not received end of HTTP headers yet..."),s();return}let p=A.slice(0,u).toString("ascii").split(`\r
`),h=p.shift();if(!h)return t.destroy(),r(new Error("No header received from proxy CONNECT response"));let m=h.split(" "),E=+m[1],C=m.slice(2).join(" "),w={};for(let N of p){if(!N)continue;let S=N.indexOf(":");if(S===-1)return t.destroy(),r(new Error(`Invalid header from proxy CONNECT response: "${N}"`));let U=N.slice(0,S).toLowerCase(),X=N.slice(S+1).trimStart(),P=w[U];typeof P=="string"?w[U]=[P,X]:Array.isArray(P)?P.push(X):w[U]=X}jE("got proxy server response: %o %o",h,w),a(),e({connect:{statusCode:E,statusText:C,headers:w},buffered:A})}t.on("error",l),t.on("end",o),s()})}Ou.parseProxyResponse=X8e});var AH=f(ys=>{"use strict";var Z8e=ys&&ys.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,i,n)}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]}),e3e=ys&&ys.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),cH=ys&&ys.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Z8e(e,t,r);return e3e(e,t),e},dH=ys&&ys.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ys,"__esModule",{value:!0});ys.HttpsProxyAgent=void 0;var zE=cH(require("net")),aH=cH(require("tls")),t3e=dH(require("assert")),r3e=dH(GE()),i3e=c5(),n3e=require("url"),s3e=sH(),bm=(0,r3e.default)("https-proxy-agent"),oH=t=>t.servername===void 0&&t.host&&!zE.isIP(t.host)?{...t,servername:t.host}:t,VE=class extends i3e.Agent{constructor(e,r){super(r),this.options={path:void 0},this.proxy=typeof e=="string"?new n3e.URL(e):e,this.proxyHeaders=r?.headers??{},bm("Creating new HttpsProxyAgent instance: %o",this.proxy.href);let i=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),n=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={ALPNProtocols:["http/1.1"],...r?lH(r,"headers"):null,host:i,port:n}}async connect(e,r){let{proxy:i}=this;if(!r.host)throw new TypeError('No "host" provided');let n;i.protocol==="https:"?(bm("Creating `tls.Socket`: %o",this.connectOpts),n=aH.connect(oH(this.connectOpts))):(bm("Creating `net.Socket`: %o",this.connectOpts),n=zE.connect(this.connectOpts));let s=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders},a=zE.isIPv6(r.host)?`[${r.host}]`:r.host,o=`CONNECT ${a}:${r.port} HTTP/1.1\r
Expand Down
1 change: 0 additions & 1 deletion scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
"chalk": "5.4.1",
"commander": "14.0.0",
"crc": "4.3.2",
"dotenv": "17.0.1",
"esbuild": "0.25.5",
"execa": "9.6.0",
"express": "5.1.0",
Expand Down
6 changes: 0 additions & 6 deletions scripts/release/createReleasePR.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import path from 'path';

import chalk from 'chalk';
import dotenv from 'dotenv';
import semver from 'semver';

import generationCommitText, {
Expand All @@ -20,7 +17,6 @@ import {
MAIN_BRANCH,
OWNER,
REPO,
ROOT_DIR,
run,
setVerbose,
TODAY,
Expand All @@ -34,8 +30,6 @@ import type { Changelog, Commit, CommitType, ParsedCommit, Scope, Versions } fro
import { updateAPIVersions } from './updateAPIVersions.ts';
import { generateVersionsHistory } from './versionsHistory.ts';

dotenv.config({ path: path.resolve(ROOT_DIR, '.env') });

// python pre-releases have a pattern like `X.Y.ZaN` for alpha or `X.Y.ZbN` for beta
// see https://peps.python.org/pep-0440/
// It also support ruby pre-releases like `X.Y.Z.alpha.N` for alpha or `X.Y.Z.beta.N` for beta
Expand Down
3 changes: 0 additions & 3 deletions templates/javascript/tests/e2e/e2e.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ import { describe, test, expect } from 'vitest';

import { union } from '../helpers.js';

import * as dotenv from 'dotenv';

dotenv.config({path:'../../.env'});
import { {{{clientName}}} } from '{{{importPackage}}}';
import type { RequestOptions } from '@algolia/client-common';

Expand Down
1 change: 0 additions & 1 deletion templates/javascript/tests/package.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
},
"devDependencies": {
"@types/node": "22.16.0",
"dotenv": "17.0.1",
"typescript": "5.8.3",
"vitest": "3.2.4"
}
Expand Down
39 changes: 0 additions & 39 deletions tests/output/javascript/src/e2e/composition.test.ts

This file was deleted.

9 changes: 9 additions & 0 deletions tests/output/javascript/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import path from 'path';
import { loadEnv } from 'vite';
import { defineConfig } from 'vitest/config';

export default defineConfig(({ mode }) => ({
test: {
env: loadEnv(mode, path.join(process.cwd(), '../../'), ''),
},
}));
Loading