Skip to content

"VSCode recent projects" is not working with the latest VSCode update #823

Closed

Description

@gallard1

TypeError: Cannot read properties of undefined (reading 'entries')

v:index.js:1:1401

1: var U=Object.create;var d=Object.defineProperty;var x=Object.getOwnPropertyDescriptor;var C=Object.getOwnPropertyNames;var I=Object.getPrototypeOf,W=Object.prototype.hasOwnProperty;var h=e=>d(e,"__esModule",{value:!0});var b=(e,i)=>{for(var o in i)d(e,o,{get:i[o],enumerable:!0})},E=(e,i,o,r)=>{if(i&&typeof i=="object"||typeof i=="function")for(let c of C(i))!W.call(e,c)&&(o||c!=="default")&&d(e,c,{get:()=>i[c],enumerable:!(r=x(i,c))||r.enumerable});return e},S=(e,i)=>E(h(d(e!=null?U(I(e)):{},"default",!i&&e&&e.__esModule?{get:()=>e.default,enumerable:!0}:{value:e,enumerable:!0})),e),O=(e=>(i,o)=>e&&e.get(i)||(o=E(h({}),i,1),e&&e.set(i,o),o))(typeof WeakMap!="undefined"?new WeakMap:0);var j={};b(j,{default:()=>L});var t=require("@raycast/api"),s=require("fs"),R=require("os"),p=require("path");var l=S(require("path"),1),k=S(require("os"),1),g=k.default.homedir();function m(e){let i=l.default.normalize(e)+l.default.sep;return(i.startsWith(g)?i.replace(g+l.default.sep,~${l.default.sep}):i).slice(0,-1)}var a=require("url");function A(e){return e.fileUri!==void 0}function u(e){return e.folderUri!==void 0}function F(e){return e.workspace!==void 0&&e.workspace.configPath!==void 0}function P(e){return u(e)&&e.remoteAuthority!==void 0}var f=${(0,R.homedir)()}/Library/Application Support/Code/storage.json;function v(){return JSON.parse((0,s.readFileSync)(f).toString()).openedPathsList.entries}function L(){let e=new Array,i=new Array,o=new Array,r=new Array;return v().forEach(n=>{P(n)?r.push(_jsx(N,{key:n.folderUri,entry:n})):u(n)&&(0,s.existsSync)(new a.URL(n.folderUri))?e.push(_jsx(y,{key:n.folderUri,uri:n.folderUri})):A(n)&&(0,s.existsSync)(new a.URL(n.fileUri))?i.push(_jsx(y,{key:n.fileUri,uri:n.fileUri})):F(n)&&(0,s.existsSync)(new a.URL(n.workspace.configPath))&&o.push(_jsx(y,{key:n.workspace.configPath,uri:n.workspace.configPath}))}),_jsx(t.List,{searchBarPlaceholder:"Search recent projects..."},_jsx(t.List.Section,{title:"Workspaces"},o),_jsx(t.List.Section,{title:"Folders"},e),_jsx(t.List.Section,{title:"Remotes Folders"},r),_jsx(t.List.Section,{title:"Files"},i))}function N(e){let i=decodeURI((0,p.basename)(e.entry.folderUri)),o=e.entry.folderUri.replace("vscode-remote://","vscode://vscode-remote/");return _jsx(t.List.Item,{title:i,subtitle:e.entry.label||"/",icon:t.Icon.Globe,actions:_jsx(t.ActionPanel,null,_jsx(t.ActionPanel.Section,null,_jsx(t.OpenInBrowserAction,{title:"Open in Code",icon:"action-icon.png",url:o})),_jsx(w,null))})}function y(e){let i=decodeURI((0,p.basename)(e.uri)),o=(0,a.fileURLToPath)(e.uri),r=m(o),c=(0,p.dirname)(r),n=o.split("/");return _jsx(t.List.Item,{title:i,subtitle:c,icon:{fileIcon:o},keywords:n,actions:_jsx(t.ActionPanel,null,_jsx(t.ActionPanel.Section,null,_jsx(t.OpenAction,{title:"Open in Code",icon:"action-icon.png",target:e.uri,application:"Visual Studio Code"}),_jsx(t.ShowInFinderAction,{path:o}),_jsx(t.OpenWithAction,{path:o,shortcut:{modifiers:["cmd"],key:"o"}})),_jsx(t.ActionPanel.Section,null,_jsx(t.CopyToClipboardAction,{title:"Copy Name",content:i,shortcut:{modifiers:["cmd"],key:"."}}),_jsx(t.CopyToClipboardAction,{title:"Copy Path",content:r,shortcut:{modifiers:["cmd","shift"],key:"."}})),_jsx(t.ActionPanel.Section,null,_jsx(t.TrashAction,{paths:[o],shortcut:{modifiers:["ctrl"],key:"x"}})),_jsx(w,null))})}function w(){return t.environment.isDevelopment?_jsx(t.ActionPanel.Section,{title:"Development"},_jsx(t.OpenAction,{title:"Open Storage File in Code",icon:"icon.png",target:f,application:"Visual Studio Code"}),_jsx(t.ShowInFinderAction,{title:"Show Storage File in Finder",path:f}),_jsx(t.CopyToClipboardAction,{title:"Copy Storage File Path",content:f})):null}module.exports=O(j);0&&(module.exports={});
2:

L:index.js:1:1482
wl:react-reconciler.production.min.js:5:19061
Wi:react-reconciler.production.min.js:9:6962
ji:react-reconciler.production.min.js:9:940
Jo:react-reconciler.production.min.js:9:871
Ut:react-reconciler.production.min.js:9:728
Jl:react-reconciler.production.min.js:7:12492
react-reconciler.production.min.js:5:4358
C.unstable_runWithPriority:react-reconciler.production.min.js:1:5006

image

Activity

  1. added
    bug
    extension
    on Feb 7, 2022
  2. mattisssa commented on Feb 7, 2022

    @mattisssa
    Contributor

    This is a duplicate of #808

  3. gallard1 commented on Feb 7, 2022

    @gallard1
    Author

    Thanks

  4. added a commit that references this issue on Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugextension

    Type

    No type

    Fields

    Priority

    None yet

    Severity

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions