@dr.pogodin/react-utils 1.56.0 → 1.56.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,18 @@
1
+ #!/usr/bin/env node
2
+
3
+ // As of Babel v8, it looks that @babel/node does not quite work with ES module
4
+ // codebase. This simple script effectively implements the base @babel/node
5
+ // functionality relying on the Node's "module customization hooks"
6
+ // (release candidate API, as of Node v24), see:
7
+ // https://nodejs.org/docs/latest-v24.x/api/module.html#customization-hooks
8
+ import { createRequire } from 'node:module';
9
+ import { resolve } from 'node:path';
10
+ import { registerBabelLoader, registerResolver } from '@dr.pogodin/react-utils/server';
11
+ const [,, script] = process.argv;
12
+ if (!script) throw Error('No script provided');
13
+ registerResolver();
14
+ registerBabelLoader();
15
+ const require = createRequire(import.meta.url);
16
+
17
+ // eslint-disable-next-line import/no-dynamic-require
18
+ require(resolve(script));
@@ -1,3 +1,8 @@
1
+ // TODO: It makes sense to move these to more generic JS Utils,
2
+ // but it will probably require some rework of exports there, as these
3
+ // are strictly for NodeJS environment, while current JS Utils are
4
+ // generic JavaScript, environment-agnostic... thus, for now let's
5
+ // keep it here, until we really need these outside a React app.
1
6
  import { existsSync, readFileSync, statSync } from "node:fs";
2
7
  import { createRequire, registerHooks } from "node:module";
3
8
  import { basename, dirname } from "node:path";
@@ -1 +1 @@
1
- {"version":3,"file":"modules.js","names":[],"sources":["../../../../src/server/utils/modules.ts"],"sourcesContent":["import { existsSync, readFileSync, statSync } from 'node:fs';\nimport { type LoadFnOutput, createRequire, registerHooks } from 'node:module';\nimport { basename, dirname } from 'node:path';\nimport { fileURLToPath } from 'node:url';\n\nimport type * as BabelCore from '@babel/core';\n\nconst CANDIDATE_EXTENSIONS = [\n '.js',\n '.jsx',\n '.ts',\n '.tsx',\n];\n\nconst require = createRequire(import.meta.url);\n\ntype RegisterBabelLoaderArgT = {\n envName?: string;\n root?: string;\n};\n\n/**\n * It looks like, as of Babel v8, @babel/node does not quite work with ES module\n * codebase. This function registers a Node module API hook that customizes ES\n * module loading, to run Babel transformation on them.\n *{(\n * BEWARE: It is intended for development environments only.\n */\nexport function registerBabelLoader({\n envName = 'development',\n root = process.cwd(),\n}: RegisterBabelLoaderArgT = {}): void {\n // eslint-disable-next-line import/no-extraneous-dependencies\n const { transformSync } = require('@babel/core') as typeof BabelCore;\n\n const cache = new Map<string, LoadFnOutput>();\n\n registerHooks({\n load(url, context, next) {\n const cached = cache.get(url);\n if (cached !== undefined) return cached;\n\n if (\n url.startsWith('file://')\n && !url.includes('/node_modules/')\n && !url.includes('/config/babel/')\n && url.match(/.(js|jsx|svg|ts|tsx)$/)\n ) {\n const path = fileURLToPath(url);\n const source = readFileSync(path, 'utf8');\n\n const transformed = transformSync(source, {\n cwd: dirname(path),\n envName,\n filename: basename(path),\n root,\n });\n\n const res: LoadFnOutput = {\n format: 'module',\n shortCircuit: true,\n source: transformed?.code ?? '',\n };\n\n cache.set(url, res);\n return res;\n }\n\n return next(url, context);\n },\n });\n}\n\n/**\n * Registers a Node module API hook that customizes ES module resolution\n * to make mandatory file extensions optional.\n */\nexport function registerResolver(): void {\n registerHooks({\n resolve(specifier, context, next) {\n let target = specifier;\n\n if (\n (target.startsWith('.') || target.startsWith('/'))\n && context.conditions.includes('import')\n ) {\n target = new URL(target, context.parentURL).pathname;\n\n if (existsSync(target) && statSync(target).isDirectory()) {\n target += '/index';\n }\n\n for (const ext of CANDIDATE_EXTENSIONS) {\n const resolved = target + ext;\n if (existsSync(resolved)) {\n target = resolved;\n break;\n }\n }\n }\n\n return next(target, context);\n },\n });\n}\n"],"mappings":"AAAA,SAAS,UAAU,EAAE,YAAY,EAAE,QAAQ,QAAQ,SAAS;AAC5D,SAA4B,aAAa,EAAE,aAAa,QAAQ,aAAa;AAC7E,SAAS,QAAQ,EAAE,OAAO,QAAQ,WAAW;AAC7C,SAAS,aAAa,QAAQ,UAAU;AAIxC,MAAM,oBAAoB,GAAG,CAC3B,KAAK,EACL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AG,CAAC;QACnB,OAAO,GAAG;MACZ;MAEA,OAAO,IAAI,CAAC,GAAG,EAAE,OAAO,CAAC;IAC3B;EACF,CAAC,CAAC;AACJ,CAEA;AACA;AACA;AACA;AACA,OAAO,SAAS,gBAAgB,GAAS;EACvC,aAAa,CAAC;IACZ,OAAO,CAAC,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE;MAChC,IAAI,MAAM,GAAG,SAAS;MAEtB,IACE,CAAC,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,KAC9C,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,QAAQ,CAAC,EACxC;QACA,MAAM,GAAG,IAAI,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC,QAAQ;QAEpD,IAAI,UAAU,CAAC,MAAM,CAAC,IAAI,QAAQ,CAAC,MAAM,CAAC,CAAC,WAAW,CAAC,CAAC,EAAE;UACxD,MAAM,IAAI,QAAQ;QACpB;QAEA,KAAK,MAAM,GAAG,IAAI,oBAAoB,EAAE;UACtC,MAAM,QAAQ,GAAG,MAAM,GAAG,GAAG;UAC7B,IAAI,UAAU,CAAC,QAAQ,CAAC,EAAE;YACxB,MAAM,GAAG,QAAQ;YACjB;UACF;QACF;MACF;MAEA,OAAO,IAAI,CAAC,MAAM,EAAE,OAAO,CAAC;IAC9B;EACF,CAAC,CAAC;AACJ","ignoreList":[]}
1
+ {"version":3,"file":"modules.js","names":[],"sources":["../../../../src/server/utils/modules.ts"],"sourcesContent":["// TODO: It makes sense to move these to more generic JS Utils,\n// but it will probably require some rework of exports there, as these\n// are strictly for NodeJS environment, while current JS Utils are\n// generic JavaScript, environment-agnostic... thus, for now let's\n// keep it here, until we really need these outside a React app.\n\nimport { existsSync, readFileSync, statSync } from 'node:fs';\nimport { type LoadFnOutput, createRequire, registerHooks } from 'node:module';\nimport { basename, dirname } from 'node:path';\nimport { fileURLToPath } from 'node:url';\n\nimport type * as BabelCore from '@babel/core';\n\nconst CANDIDATE_EXTENSIONS = [\n '.js',\n '.jsx',\n '.ts',\n '.tsx',\n];\n\nconst require = createRequire(import.meta.url);\n\ntype RegisterBabelLoaderArgT = {\n envName?: string;\n root?: string;\n};\n\n/**\n * It looks like, as of Babel v8, @babel/node does not quite work with ES module\n * codebase. This function registers a Node module API hook that customizes ES\n * module loading, to run Babel transformation on them.\n *{(\n * BEWARE: It is intended for development environments only.\n */\nexport function registerBabelLoader({\n envName = 'development',\n root = process.cwd(),\n}: RegisterBabelLoaderArgT = {}): void {\n // eslint-disable-next-line import/no-extraneous-dependencies\n const { transformSync } = require('@babel/core') as typeof BabelCore;\n\n const cache = new Map<string, LoadFnOutput>();\n\n registerHooks({\n load(url, context, next) {\n const cached = cache.get(url);\n if (cached !== undefined) return cached;\n\n if (\n url.startsWith('file://')\n && !url.includes('/node_modules/')\n && !url.includes('/config/babel/')\n && url.match(/.(js|jsx|svg|ts|tsx)$/)\n ) {\n const path = fileURLToPath(url);\n const source = readFileSync(path, 'utf8');\n\n const transformed = transformSync(source, {\n cwd: dirname(path),\n envName,\n filename: basename(path),\n root,\n });\n\n const res: LoadFnOutput = {\n format: 'module',\n shortCircuit: true,\n source: transformed?.code ?? '',\n };\n\n cache.set(url, res);\n return res;\n }\n\n return next(url, context);\n },\n });\n}\n\n/**\n * Registers a Node module API hook that customizes ES module resolution\n * to make mandatory file extensions optional.\n */\nexport function registerResolver(): void {\n registerHooks({\n resolve(specifier, context, next) {\n let target = specifier;\n\n if (\n (target.startsWith('.') || target.startsWith('/'))\n && context.conditions.includes('import')\n ) {\n target = new URL(target, context.parentURL).pathname;\n\n if (existsSync(target) && statSync(target).isDirectory()) {\n target += '/index';\n }\n\n for (const ext of CANDIDATE_EXTENSIONS) {\n const resolved = target + ext;\n if (existsSync(resolved)) {\n target = resolved;\n break;\n }\n }\n }\n\n return next(target, context);\n },\n });\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AAE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QAAQ,CAAC,IAAI,CAAC;UACxB;QACF,CAAC,CAAC;QAEF,MAAM,GAAiB,GAAG;UACxB,MAAM,EAAE,QAAQ;UAChB,YAAY,EAAE,IAAI;UAClB,MAAM,EAAE,WAAW,EAAE,IAAI,IAAI;QAC/B,CAAC;QAED,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC;QACnB,OAAO,GAAG;MACZ;MAEA,OAAO,IAAI,CAAC,GAAG,EAAE,OAAO,CAAC;IAC3B;EACF,CAAC,CAAC;AACJ,CAEA;AACA;AACA;AACA;AACA,OAAO,SAAS,gBAAgB,GAAS;EACvC,aAAa,CAAC;IACZ,OAAO,CAAC,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE;MAChC,IAAI,MAAM,GAAG,SAAS;MAEtB,IACE,CAAC,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,KAC9C,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,QAAQ,CAAC,EACxC;QACA,MAAM,GAAG,IAAI,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC,QAAQ;QAEpD,IAAI,UAAU,CAAC,MAAM,CAAC,IAAI,QAAQ,CAAC,MAAM,CAAC,CAAC,WAAW,CAAC,CAAC,EAAE;UACxD,MAAM,IAAI,QAAQ;QACpB;QAEA,KAAK,MAAM,GAAG,IAAI,oBAAoB,EAAE;UACtC,MAAM,QAAQ,GAAG,MAAM,GAAG,GAAG;UAC7B,IAAI,UAAU,CAAC,QAAQ,CAAC,EAAE;YACxB,MAAM,GAAG,QAAQ;YACjB;UACF;QACF;MACF;MAEA,OAAO,IAAI,CAAC,MAAM,EAAE,OAAO,CAAC;IAC9B;EACF,CAAC,CAAC;AACJ","ignoreList":[]}
@@ -1,3 +1,8 @@
1
+ // TODO: It makes sense to move these to more generic JS Utils,
2
+ // but it will probably require some rework of exports there, as these
3
+ // are strictly for NodeJS environment, while current JS Utils are
4
+ // generic JavaScript, environment-agnostic... thus, for now let's
5
+ // keep it here, until we really need these outside a React app.
1
6
  import{existsSync,readFileSync,statSync}from"node:fs";import{createRequire,registerHooks}from"node:module";import{basename,dirname}from"node:path";import{fileURLToPath}from"node:url";const CANDIDATE_EXTENSIONS=[".js",".jsx",".ts",".tsx"];const require=createRequire(import.meta.url);/**
2
7
  * It looks like, as of Babel v8, @babel/node does not quite work with ES module
3
8
  * codebase. This function registers a Node module API hook that customizes ES
@@ -1 +1 @@
1
- {"version":3,"file":"modules.js","names":[],"sources":["../../../../src/server/utils/modules.ts"],"sourcesContent":["import { existsSync, readFileSync, statSync } from 'node:fs';\nimport { type LoadFnOutput, createRequire, registerHooks } from 'node:module';\nimport { basename, dirname } from 'node:path';\nimport { fileURLToPath } from 'node:url';\n\nimport type * as BabelCore from '@babel/core';\n\nconst CANDIDATE_EXTENSIONS = [\n '.js',\n '.jsx',\n '.ts',\n '.tsx',\n];\n\nconst require = createRequire(import.meta.url);\n\ntype RegisterBabelLoaderArgT = {\n envName?: string;\n root?: string;\n};\n\n/**\n * It looks like, as of Babel v8, @babel/node does not quite work with ES module\n * codebase. This function registers a Node module API hook that customizes ES\n * module loading, to run Babel transformation on them.\n *{(\n * BEWARE: It is intended for development environments only.\n */\nexport function registerBabelLoader({\n envName = 'development',\n root = process.cwd(),\n}: RegisterBabelLoaderArgT = {}): void {\n // eslint-disable-next-line import/no-extraneous-dependencies\n const { transformSync } = require('@babel/core') as typeof BabelCore;\n\n const cache = new Map<string, LoadFnOutput>();\n\n registerHooks({\n load(url, context, next) {\n const cached = cache.get(url);\n if (cached !== undefined) return cached;\n\n if (\n url.startsWith('file://')\n && !url.includes('/node_modules/')\n && !url.includes('/config/babel/')\n && url.match(/.(js|jsx|svg|ts|tsx)$/)\n ) {\n const path = fileURLToPath(url);\n const source = readFileSync(path, 'utf8');\n\n const transformed = transformSync(source, {\n cwd: dirname(path),\n envName,\n filename: basename(path),\n root,\n });\n\n const res: LoadFnOutput = {\n format: 'module',\n shortCircuit: true,\n source: transformed?.code ?? '',\n };\n\n cache.set(url, res);\n return res;\n }\n\n return next(url, context);\n },\n });\n}\n\n/**\n * Registers a Node module API hook that customizes ES module resolution\n * to make mandatory file extensions optional.\n */\nexport function registerResolver(): void {\n registerHooks({\n resolve(specifier, context, next) {\n let target = specifier;\n\n if (\n (target.startsWith('.') || target.startsWith('/'))\n && context.conditions.includes('import')\n ) {\n target = new URL(target, context.parentURL).pathname;\n\n if (existsSync(target) && statSync(target).isDirectory()) {\n target += '/index';\n }\n\n for (const ext of CANDIDATE_EXTENSIONS) {\n const resolved = target + ext;\n if (existsSync(resolved)) {\n target = resolved;\n break;\n }\n }\n }\n\n return next(target, context);\n },\n });\n}\n"],"mappings":"AAAA,OAAS,UAAU,CAAE,YAAY,CAAE,QAAQ,KAAQ,SAAS,CAC5D,OAA4B,aAAa,CAAE,aAAa,KAAQ,aAAa,CAC7E,OAAS,QAAQ,CAAE,OAAO,KAAQ,WAAW,CAC7C,OAAS,aAAa,KAAQ,UAAU,CAIxC,KAAM,qBAAoB,CAAG,CAC3B,KAAK,CACL,MAAM,CACN,KAAK,CACL,MAAM,CACP,CAED,KAAM,QAAO,CAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAO9C;AACA;AACA;AACA;AACA;AACA;AACA,GACA,MAAO,SAAS,oBAAmB,CAAC,CAClC,OAAO,CAAG,aAAa,CACvB,IAAI,CAAG,OAAO,CAAC,GAAG,CAAC,CACI,CAAC,CAAG,CAAC,CAAC,CAAQ,CACrC;AACA,KAAM,CAAE,aAAc,CAAC,CAAG,OAAO,CAAC,aAAa,CAAqB,CAEpE,KAAM,MAAK,CAAG,GAAI,IAA2B,CAE7C,aAAa,CAAC,CACZ,IAAI,CAAC,GAAG,CAAE,OAAO,CAAE,IAAI,CAAE,CACvB,KAAM,OAAM,CAAG,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAC7B,GAAI,MAAM,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,EAAI,QAAQ,CAAC,MAAM,CAAC,CAAC,WAAW,CAAC,CAAC,CAAE,CACxD,MAAM,EAAI,QAAQ,CACpB,CAEA,IAAK,KAAM,IAAG,GAAI,qBAAoB,CAAE,CACtC,KAAM,SAAQ,CAAG,MAAM,CAAG,GAAG,CAC7B,GAAI,UAAU,CAAC,QAAQ,CAAC,CAAE,CACxB,MAAM,CAAG,QAAQ,CACjB,MACF,CACF,CACF,CAEA,MAAO,KAAI,CAAC,MAAM,CAAE,OAAO,CAAC,CAC9B,CACF,CAAC,CAAC,CACJ","ignoreList":[]}
1
+ {"version":3,"file":"modules.js","names":[],"sources":["../../../../src/server/utils/modules.ts"],"sourcesContent":["// TODO: It makes sense to move these to more generic JS Utils,\n// but it will probably require some rework of exports there, as these\n// are strictly for NodeJS environment, while current JS Utils are\n// generic JavaScript, environment-agnostic... thus, for now let's\n// keep it here, until we really need these outside a React app.\n\nimport { existsSync, readFileSync, statSync } from 'node:fs';\nimport { type LoadFnOutput, createRequire, registerHooks } from 'node:module';\nimport { basename, dirname } from 'node:path';\nimport { fileURLToPath } from 'node:url';\n\nimport type * as BabelCore from '@babel/core';\n\nconst CANDIDATE_EXTENSIONS = [\n '.js',\n '.jsx',\n '.ts',\n '.tsx',\n];\n\nconst require = createRequire(import.meta.url);\n\ntype RegisterBabelLoaderArgT = {\n envName?: string;\n root?: string;\n};\n\n/**\n * It looks like, as of Babel v8, @babel/node does not quite work with ES module\n * codebase. This function registers a Node module API hook that customizes ES\n * module loading, to run Babel transformation on them.\n *{(\n * BEWARE: It is intended for development environments only.\n */\nexport function registerBabelLoader({\n envName = 'development',\n root = process.cwd(),\n}: RegisterBabelLoaderArgT = {}): void {\n // eslint-disable-next-line import/no-extraneous-dependencies\n const { transformSync } = require('@babel/core') as typeof BabelCore;\n\n const cache = new Map<string, LoadFnOutput>();\n\n registerHooks({\n load(url, context, next) {\n const cached = cache.get(url);\n if (cached !== undefined) return cached;\n\n if (\n url.startsWith('file://')\n && !url.includes('/node_modules/')\n && !url.includes('/config/babel/')\n && url.match(/.(js|jsx|svg|ts|tsx)$/)\n ) {\n const path = fileURLToPath(url);\n const source = readFileSync(path, 'utf8');\n\n const transformed = transformSync(source, {\n cwd: dirname(path),\n envName,\n filename: basename(path),\n root,\n });\n\n const res: LoadFnOutput = {\n format: 'module',\n shortCircuit: true,\n source: transformed?.code ?? '',\n };\n\n cache.set(url, res);\n return res;\n }\n\n return next(url, context);\n },\n });\n}\n\n/**\n * Registers a Node module API hook that customizes ES module resolution\n * to make mandatory file extensions optional.\n */\nexport function registerResolver(): void {\n registerHooks({\n resolve(specifier, context, next) {\n let target = specifier;\n\n if (\n (target.startsWith('.') || target.startsWith('/'))\n && context.conditions.includes('import')\n ) {\n target = new URL(target, context.parentURL).pathname;\n\n if (existsSync(target) && statSync(target).isDirectory()) {\n target += '/index';\n }\n\n for (const ext of CANDIDATE_EXTENSIONS) {\n const resolved = target + ext;\n if (existsSync(resolved)) {\n target = resolved;\n break;\n }\n }\n }\n\n return next(target, context);\n },\n });\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AAEA,OAAS,UAAU,CAAE,YAAY,CAAE,QAAQ,KAAQ,SAAS,CAC5D,OAA4B,aAAa,CAAE,aAAa,KAAQ,aAAa,CAC7E,OAAS,QAAQ,CAAE,OAAO,KAAQ,WAAW,CAC7C,OAAS,aAAa,KAAQ,UAAU,CAIxC,KAAM,qBAAoB,CAAG,CAC3B,KAAK,CACL,MAAM,CACN,KAAK,CACL,MAAM,CACP,CAED,KAAM,QAAO,CAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAO9C;AACA;AACA;AACA;AACA;AACA;AACA,GACA,MAAO,SAAS,oBAAmB,CAAC,CAClC,OAAO,CAAG,aAAa,CACvB,IAAI,CAAG,OAAO,CAAC,GAAG,CAAC,CACI,CAAC,CAAG,CAAC,CAAC,CAAQ,CACrC;AACA,KAAM,CAAE,aAAc,CAAC,CAAG,OAAO,CAA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AAU,CAAC,GAAG,CAAC,GAC9C,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,QAAQ,CAAC,CACxC,CACA,MAAM,CAAG,GAAI,IAAG,CAAC,MAAM,CAAE,OAAO,CAAC,SAAS,CAAC,CAAC,QAAQ,CAEpD,GAAI,UAAU,CAAC,MAAM,CAAC,EAAI,QAAQ,CAAC,MAAM,CAAC,CAAC,WAAW,CAAC,CAAC,CAAE,CACxD,MAAM,EAAI,QAAQ,CACpB,CAEA,IAAK,KAAM,IAAG,GAAI,qBAAoB,CAAE,CACtC,KAAM,SAAQ,CAAG,MAAM,CAAG,GAAG,CAC7B,GAAI,UAAU,CAAC,QAAQ,CAAC,CAAE,CACxB,MAAM,CAAG,QAAQ,CACjB,MACF,CACF,CACF,CAEA,MAAO,KAAI,CAAC,MAAM,CAAE,OAAO,CAAC,CAC9B,CACF,CAAC,CAAC,CACJ","ignoreList":[]}
@@ -1,3 +1,8 @@
1
+ // TODO: It makes sense to move these to more generic JS Utils,
2
+ // but it will probably require some rework of exports there, as these
3
+ // are strictly for NodeJS environment, while current JS Utils are
4
+ // generic JavaScript, environment-agnostic... thus, for now let's
5
+ // keep it here, until we really need these outside a React app.
1
6
  import{existsSync,readFileSync,statSync}from"node:fs";import{createRequire,registerHooks}from"node:module";import{basename,dirname}from"node:path";import{fileURLToPath}from"node:url";const CANDIDATE_EXTENSIONS=[".js",".jsx",".ts",".tsx"];const require=createRequire(import.meta.url);/**
2
7
  * It looks like, as of Babel v8, @babel/node does not quite work with ES module
3
8
  * codebase. This function registers a Node module API hook that customizes ES
@@ -1 +1 @@
1
- {"version":3,"file":"modules.js","names":[],"sources":["../../../../src/server/utils/modules.ts"],"sourcesContent":["import { existsSync, readFileSync, statSync } from 'node:fs';\nimport { type LoadFnOutput, createRequire, registerHooks } from 'node:module';\nimport { basename, dirname } from 'node:path';\nimport { fileURLToPath } from 'node:url';\n\nimport type * as BabelCore from '@babel/core';\n\nconst CANDIDATE_EXTENSIONS = [\n '.js',\n '.jsx',\n '.ts',\n '.tsx',\n];\n\nconst require = createRequire(import.meta.url);\n\ntype RegisterBabelLoaderArgT = {\n envName?: string;\n root?: string;\n};\n\n/**\n * It looks like, as of Babel v8, @babel/node does not quite work with ES module\n * codebase. This function registers a Node module API hook that customizes ES\n * module loading, to run Babel transformation on them.\n *{(\n * BEWARE: It is intended for development environments only.\n */\nexport function registerBabelLoader({\n envName = 'development',\n root = process.cwd(),\n}: RegisterBabelLoaderArgT = {}): void {\n // eslint-disable-next-line import/no-extraneous-dependencies\n const { transformSync } = require('@babel/core') as typeof BabelCore;\n\n const cache = new Map<string, LoadFnOutput>();\n\n registerHooks({\n load(url, context, next) {\n const cached = cache.get(url);\n if (cached !== undefined) return cached;\n\n if (\n url.startsWith('file://')\n && !url.includes('/node_modules/')\n && !url.includes('/config/babel/')\n && url.match(/.(js|jsx|svg|ts|tsx)$/)\n ) {\n const path = fileURLToPath(url);\n const source = readFileSync(path, 'utf8');\n\n const transformed = transformSync(source, {\n cwd: dirname(path),\n envName,\n filename: basename(path),\n root,\n });\n\n const res: LoadFnOutput = {\n format: 'module',\n shortCircuit: true,\n source: transformed?.code ?? '',\n };\n\n cache.set(url, res);\n return res;\n }\n\n return next(url, context);\n },\n });\n}\n\n/**\n * Registers a Node module API hook that customizes ES module resolution\n * to make mandatory file extensions optional.\n */\nexport function registerResolver(): void {\n registerHooks({\n resolve(specifier, context, next) {\n let target = specifier;\n\n if (\n (target.startsWith('.') || target.startsWith('/'))\n && context.conditions.includes('import')\n ) {\n target = new URL(target, context.parentURL).pathname;\n\n if (existsSync(target) && statSync(target).isDirectory()) {\n target += '/index';\n }\n\n for (const ext of CANDIDATE_EXTENSIONS) {\n const resolved = target + ext;\n if (existsSync(resolved)) {\n target = resolved;\n break;\n }\n }\n }\n\n return next(target, context);\n },\n });\n}\n"],"mappings":"AAAA,OAAS,UAAU,CAAE,YAAY,CAAE,QAAQ,KAAQ,SAAS,CAC5D,OAA4B,aAAa,CAAE,aA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,CAChB,YAAY,CAAE,IAAI,CAClB,MAAM,CAAE,WAAW,EAAE,IAAI,EAAI,EAC/B,CAAC,CAED,KAAK,CAAC,GAAG,CAAC,GAAG,CAAE,GAAG,CAAC,CACnB,MAAO,IAAG,CACZ,CAEA,MAAO,KAAI,CAAC,GAAG,CAAE,OAAO,CAAC,CAC3B,CACF,CAAC,CAAC,CACJ,CAEA;AACA;AACA;AACA,GACA,MAAO,SAAS,iBAAgB,EAAS,CACvC,aAAa,CAAC,CACZ,OAAO,CAAC,SAAS,CAAE,OAAO,CAAE,IAAI,CAAE,CAChC,GAAI,OAAM,CAAG,SAAS,CAEtB,GACE,CAAC,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,EAAI,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,GAC9C,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,QAAQ,CAAC,CACxC,CACA,MAAM,CAAG,GAAI,IAAG,CAAC,MAAM,CAAE,OAAO,CAAC,SAAS,CAAC,CAAC,QAAQ,CAEpD,GAAI,UAAU,CAAC,MAAM,CAAC,EAAI,QAAQ,CAAC,MAAM,CAAC,CAAC,WAAW,CAAC,CAAC,CAAE,CACxD,MAAM,EAAI,QAAQ,CACpB,CAEA,IAAK,KAAM,IAAG,GAAI,qBAAoB,CAAE,CACtC,KAAM,SAAQ,CAAG,MAAM,CAAG,GAAG,CAC7B,GAAI,UAAU,CAAC,QAAQ,CAAC,CAAE,CACxB,MAAM,CAAG,QAAQ,CACjB,MACF,CACF,CACF,CAEA,MAAO,KAAI,CAAC,MAAM,CAAE,OAAO,CAAC,CAC9B,CACF,CAAC,CAAC,CACJ","ignoreList":[]}
1
+ {"version":3,"file":"modules.js","names":[],"sources":["../../../../src/server/utils/modules.ts"],"sourcesContent":["// TODO: It makes sense to move these to more generic JS Utils,\n// but it will probably require some rework of exports there, as these\n// are strictly for NodeJS environment, while current JS Utils are\n// generic JavaScript, environment-agnostic... thus, for now let's\n// keep it here, until we really need these outside a React app.\n\nimport { existsSync, readFileSync, statSync } from 'node:fs';\nimport { type LoadFnOutput, createRequire, registerHooks } from 'node:module';\nimport { basename, dirname } from 'node:path';\nimport { fileURLToPath } from 'node:url';\n\nimport type * as BabelCore from '@babel/core';\n\nconst CANDIDATE_EXTENSIONS = [\n '.js',\n '.jsx',\n '.ts',\n '.tsx',\n];\n\nconst require = createRequire(import.meta.url);\n\ntype RegisterBabelLoaderArgT = {\n envName?: string;\n root?: string;\n};\n\n/**\n * It looks like, as of Babel v8, @babel/node does not quite work with ES module\n * codebase. This function registers a Node module API hook that customizes ES\n * module loading, to run Babel transformation on them.\n *{(\n * BEWARE: It is intended for development environments only.\n */\nexport function registerBabelLoader({\n envName = 'development',\n root = process.cwd(),\n}: RegisterBabelLoaderArgT = {}): void {\n // eslint-disable-next-line import/no-extraneous-dependencies\n const { transformSync } = require('@babel/core') as typeof BabelCore;\n\n const cache = new Map<string, LoadFnOutput>();\n\n registerHooks({\n load(url, context, next) {\n const cached = cache.get(url);\n if (cached !== undefined) return cached;\n\n if (\n url.startsWith('file://')\n && !url.includes('/node_modules/')\n && !url.includes('/config/babel/')\n && url.match(/.(js|jsx|svg|ts|tsx)$/)\n ) {\n const path = fileURLToPath(url);\n const source = readFileSync(path, 'utf8');\n\n const transformed = transformSync(source, {\n cwd: dirname(path),\n envName,\n filename: basename(path),\n root,\n });\n\n const res: LoadFnOutput = {\n format: 'module',\n shortCircuit: true,\n source: transformed?.code ?? '',\n };\n\n cache.set(url, res);\n return res;\n }\n\n return next(url, context);\n },\n });\n}\n\n/**\n * Registers a Node module API hook that customizes ES module resolution\n * to make mandatory file extensions optional.\n */\nexport function registerResolver(): void {\n registerHooks({\n resolve(specifier, context, next) {\n let target = specifier;\n\n if (\n (target.startsWith('.') || target.startsWith('/'))\n && context.conditions.includes('import')\n ) {\n target = new URL(target, context.parentURL).pathname;\n\n if (existsSync(target) && statSync(target).isDirectory()) {\n target += '/index';\n }\n\n for (const ext of CANDIDATE_EXTENSIONS) {\n const resolved = target + ext;\n if (existsSync(resolved)) {\n target = resolved;\n break;\n }\n }\n }\n\n return next(target, context);\n },\n });\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AAEA,OAAS,UAAU,CAAE,YAAY,CAAE,QAAQ,KAAQ,SAAS,CAC5D,OAA4B,aAAa,CAAE,aAAa,KAAQ,aAAa,CAC7E,OAAS,QAAQ,CAAE,OAAO,KAAQ,WAAW,CAC7C,OAAS,aAAa,KAAQ,UAAU,CAIxC,KAAM,qBAAoB,CAAG,CAC3B,KAAK,CACL,MAAM,CACN,KAAK,CACL,MAAM,CACP,CAED,KAAM,QAAO,CAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAO9C;AACA;AACA;AACA;AACA;AACA;AACA,GACA,MAAO,SAAS,oBAAmB,CAAC,CAClC,OAAO,CAAG,aAAa,CACvB,IAAI,CAAG,OAAO,CAAC,GAAG,CAAC,CACI,CAAC,CAAG,CAAC,CAAC,CAAQ,CACrC;AACA,KAAM,CAAE,aAAc,CAAC,CAAG,OAAO,CAAC,aAAa,CAAqB,CAEpE,KAAM,MAAK,CAAG,GAAI,IAA2B,CAE7C,aAAa,CAAC,CACZ,IAAI,CAAC,GAAG,CAAE,OAAO,CAAE,IAAI,CAAE,CACvB,KAAM,OAAM,CAAG,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAC7B,GAAI,MAAM,GAAK,SAAS,CAAE,MAAO,OAAM,CAEvC,GACE,GAAG,CAAC,UAAU,CAAC,SAAS,CAAC,EACtB,CAAC,GAAG,CAAC,QAAQ,CAAC,gBAAgB,CAAC,EAC/B,CAAC,GAAG,CAAC,QAAQ,CAAC,gBAAgB,CAAC,EAC/B,GAAG,CAAC,KAAK,CAAC,uBAAuB,CAAC,CACrC,CACA,KAAM,KAAI,CAAG,aAAa,CAAC,GAAG,CAAC,CAC/B,KAAM,OAAM,CAAG,YAAY,CAAC,IAAI,CAAE,MAAM,CAAC,CAEzC,KAA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reList":[]}
package/eslint.config.mjs CHANGED
@@ -4,6 +4,7 @@ config.push(
4
4
  {
5
5
  ignores: [
6
6
  'bin/build.js',
7
+ 'bin/run-with-babel.js',
7
8
  'config/babel/',
8
9
  'config/webpack/',
9
10
  'docs/.docusaurus/',
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
- "version": "1.56.0",
2
+ "version": "1.56.1",
3
3
  "bin": {
4
4
  "react-utils-build": "bin/build.js",
5
+ "react-utils-run-with-babel": "bin/run-with-babel.js",
5
6
  "react-utils-setup": "bin/setup.js"
6
7
  },
7
8
  "bugs": {
@@ -25,7 +26,7 @@
25
26
  "cookie-parser": "^1.4.7",
26
27
  "core-js-pure": "^3.50.0",
27
28
  "cross-env": "^10.1.0",
28
- "dayjs": "^1.11.22",
29
+ "dayjs": "^1.11.23",
29
30
  "express": "^5.2.1",
30
31
  "helmet": "^8.3.0",
31
32
  "http-status-codes": "^2.3.0",
@@ -55,13 +56,13 @@
55
56
  "@dr.pogodin/babel-plugin-add-import-extension": "^3.0.2",
56
57
  "@dr.pogodin/babel-plugin-transform-assets": "^2.0.0",
57
58
  "@dr.pogodin/babel-preset-svgr": "^2.0.0",
58
- "@dr.pogodin/eslint-configs": "^0.3.5",
59
+ "@dr.pogodin/eslint-configs": "^0.3.6",
59
60
  "@jest/globals": "^30.4.1",
60
61
  "@pmmmwh/react-refresh-webpack-plugin": "^0.6.2",
61
62
  "@standard-schema/spec": "^1.1.0",
62
63
  "@testing-library/dom": "^10.4.1",
63
64
  "@testing-library/react": "^16.3.2",
64
- "@testing-library/user-event": "^14.6.4",
65
+ "@testing-library/user-event": "^14.6.6",
65
66
  "@tsconfig/recommended": "^1.0.13",
66
67
  "@types/compression": "^1.8.1",
67
68
  "@types/config": "^3.3.5",
@@ -103,18 +104,18 @@
103
104
  "pretty": "^2.0.0",
104
105
  "react-refresh": "^0.18.0",
105
106
  "resolve-url-loader": "^5.0.0",
106
- "sass": "^1.102.0",
107
+ "sass": "^1.103.1",
107
108
  "sass-loader": "^17.0.0",
108
109
  "sitemap": "^9.0.1",
109
110
  "source-map-loader": "^5.0.0",
110
111
  "stylelint": "^17.14.1",
111
112
  "stylelint-config-standard-scss": "^17.0.0",
112
113
  "supertest": "^7.2.2",
113
- "tsc-alias": "1.9.1",
114
- "tstyche": "^7.2.2",
114
+ "tsc-alias": "1.9.2",
115
+ "tstyche": "^7.2.3",
115
116
  "typed-scss-modules": "^8.1.1",
116
117
  "typescript": "^6.0.3",
117
- "webpack": "5.109.2",
118
+ "webpack": "^5.109.2",
118
119
  "webpack-dev-middleware": "^8.1.1",
119
120
  "webpack-hot-middleware": "^2.26.1",
120
121
  "webpack-merge": "^6.0.1",