8000 fix(providence-analytics): allow compatibility with node 16 by tlouisse · Pull Request #2229 · ing-bank/lion · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix(providence-analytics): allow compatibility with node 16 #2229

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 27, 2024
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
5 changes: 5 additions & 0 deletions .changeset/fuzzy-badgers-glow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'providence-analytics': patch
---

fix: allow compatibility with node 16
Original file line number Diff line number Diff line change
@@ -1,21 +1,31 @@
import { isBuiltin } from 'module';
import { builtinModules } from 'module';
import path from 'path';
import { nodeResolve } from '@rollup/plugin-node-resolve';
import { LogService } from '../core/LogService.js';
import { memoize } from './memoize.js';
import { toPosixPath } from './to-posix-path.js';

/**
* Solution inspired by es-dev-server:
* https://github.com/open-wc/open-wc/blob/master/packages/es-dev-server/src/utils/resolve-module-imports.js
*/
import { isRelativeSourcePath } from './relative-source-path.js';

/**
* @typedef {import('../../../types/index.js').PathRelativeFromProjectRoot} PathRelativeFromProjectRoot
* @typedef {import('../../../types/index.js').PathFromSystemRoot} PathFromSystemRoot
* @typedef {import('../../../types/index.js').SpecifierSource} SpecifierSource
*/

/**
* @param {string} importee
*/
function isBuiltin(importee) {
return (
!isRelativeSourcePath(importee) &&
Boolean(builtinModules.find(m => importee.split('/')[0] === m))
);
}

/**
* Solution inspired by es-dev-server:
* https://github.com/open-wc/open-wc/blob/master/packages/es-dev-server/src/utils/resolve-module-imports.js
*/
const fakePluginContext = {
meta: {
// rollupVersion needed in plugin context => nodeResolvePackageJson.peerDependencies.rollup
Expand Down
Loading
0